Browse Source

[ci] break jvm

Rudy Ges 1 year ago
parent
commit
64519826c0
69 changed files with 111 additions and 125 deletions
  1. 1 1
      tests/sys/src/FileNames.hx
  2. 3 3
      tests/sys/src/TestSys.hx
  3. 4 4
      tests/sys/src/TestUnicode.hx
  4. 1 1
      tests/unit/src/RunCastGenerator.hx
  5. 0 2
      tests/unit/src/unit/MyClass.hx
  6. 3 3
      tests/unit/src/unit/TestConstrainedMonomorphs.hx
  7. 1 1
      tests/unit/src/unit/TestDCE.hx
  8. 3 3
      tests/unit/src/unit/TestExceptions.hx
  9. 2 2
      tests/unit/src/unit/TestInterface.hx
  10. 1 1
      tests/unit/src/unit/TestJava.hx
  11. 2 2
      tests/unit/src/unit/TestMain.hx
  12. 1 1
      tests/unit/src/unit/TestMisc.hx
  13. 1 1
      tests/unit/src/unit/TestNumericCasts.hx
  14. 2 2
      tests/unit/src/unit/TestOverloads.hx
  15. 2 2
      tests/unit/src/unit/TestReflect.hx
  16. 1 1
      tests/unit/src/unit/TestType.hx
  17. 1 1
      tests/unit/src/unit/issues/Issue10143.hx
  18. 2 2
      tests/unit/src/unit/issues/Issue10193.hx
  19. 1 1
      tests/unit/src/unit/issues/Issue10508.hx
  20. 1 1
      tests/unit/src/unit/issues/Issue10571.hx
  21. 1 1
      tests/unit/src/unit/issues/Issue10618.hx
  22. 2 2
      tests/unit/src/unit/issues/Issue1925.hx
  23. 2 2
      tests/unit/src/unit/issues/Issue2049.hx
  24. 2 2
      tests/unit/src/unit/issues/Issue2648.hx
  25. 2 2
      tests/unit/src/unit/issues/Issue2688.hx
  26. 1 1
      tests/unit/src/unit/issues/Issue2754.hx
  27. 1 1
      tests/unit/src/unit/issues/Issue2772.hx
  28. 1 1
      tests/unit/src/unit/issues/Issue2861.hx
  29. 2 2
      tests/unit/src/unit/issues/Issue2927.hx
  30. 1 1
      tests/unit/src/unit/issues/Issue3084.hx
  31. 4 4
      tests/unit/src/unit/issues/Issue3138.hx
  32. 2 2
      tests/unit/src/unit/issues/Issue3171.hx
  33. 3 3
      tests/unit/src/unit/issues/Issue3173.hx
  34. 2 2
      tests/unit/src/unit/issues/Issue3306.hx
  35. 2 2
      tests/unit/src/unit/issues/Issue3400.hx
  36. 3 3
      tests/unit/src/unit/issues/Issue3575.hx
  37. 1 1
      tests/unit/src/unit/issues/Issue3579.hx
  38. 1 1
      tests/unit/src/unit/issues/Issue3818.hx
  39. 2 2
      tests/unit/src/unit/issues/Issue3842.hx
  40. 1 1
      tests/unit/src/unit/issues/Issue3894.hx
  41. 2 2
      tests/unit/src/unit/issues/Issue3979.hx
  42. 1 1
      tests/unit/src/unit/issues/Issue3987.hx
  43. 3 3
      tests/unit/src/unit/issues/Issue4000.hx
  44. 1 1
      tests/unit/src/unit/issues/Issue4203.hx
  45. 1 1
      tests/unit/src/unit/issues/Issue4526.hx
  46. 1 1
      tests/unit/src/unit/issues/Issue5025.hx
  47. 1 1
      tests/unit/src/unit/issues/Issue5505.hx
  48. 1 1
      tests/unit/src/unit/issues/Issue5507.hx
  49. 4 4
      tests/unit/src/unit/issues/Issue5862.hx
  50. 0 2
      tests/unit/src/unit/issues/Issue6276.hx
  51. 1 1
      tests/unit/src/unit/issues/Issue6291.hx
  52. 2 2
      tests/unit/src/unit/issues/Issue6379.hx
  53. 1 1
      tests/unit/src/unit/issues/Issue6482.hx
  54. 2 2
      tests/unit/src/unit/issues/Issue7599.hx
  55. 2 2
      tests/unit/src/unit/issues/Issue9034.hx
  56. 1 3
      tests/unit/src/unit/issues/Issue9217.hx
  57. 2 2
      tests/unit/src/unit/issues/Issue9220.hx
  58. 2 2
      tests/unit/src/unit/issues/Issue9438.hx
  59. 1 1
      tests/unit/src/unit/issues/Issue9601.hx
  60. 2 2
      tests/unit/src/unit/issues/Issue9619.hx
  61. 3 3
      tests/unit/src/unit/issues/Issue9791.hx
  62. 1 1
      tests/unit/src/unit/issues/Issue9854.hx
  63. 0 4
      tests/unit/src/unitstd/Map.unit.hx
  64. 0 2
      tests/unit/src/unitstd/Type.unit.hx
  65. 2 2
      tests/unit/src/unitstd/haxe/ds/Vector.unit.hx
  66. 2 2
      tests/unit/src/unitstd/haxe/ds/WeakMap.unit.hx
  67. 1 1
      tests/unit/src/unitstd/haxe/zip/Compress.unit.hx
  68. 1 1
      tests/unit/src/unitstd/haxe/zip/Uncompress.unit.hx
  69. 1 3
      tests/unit/src/unitstd/sys/net/Socket.unit.hx

+ 1 - 1
tests/sys/src/FileNames.hx

@@ -28,7 +28,7 @@ class FileNames {
 		case _:
 		[
 			// 255 bytes is the max filename length according to http://en.wikipedia.org/wiki/Comparison_of_file_systems
-			#if !(python || neko || cpp || java)
+			#if !(python || neko || cpp || jvm)
 			[for (i in 0...255) "a"].join(""),
 			#end
 		];

+ 3 - 3
tests/sys/src/TestSys.hx

@@ -16,7 +16,7 @@ class TestSys extends TestCommandBase {
 		// new copies should not be affected
 		Assert.isNull(Sys.environment()[nonExistent]);
 
-		#if !java
+		#if !jvm
 		// env should not update when environment updates
 		final toUpdate = "TO_UPDATE";
 
@@ -58,7 +58,7 @@ class TestSys extends TestCommandBase {
 		Assert.isNull(Sys.getEnv("doesn't exist"));
 	}
 
-	#if !java
+	#if !jvm
 	function testPutEnv() {
 		Sys.putEnv("FOO", "value");
 		Assert.equals("value", Sys.getEnv("FOO"));
@@ -129,7 +129,7 @@ class TestSys extends TestCommandBase {
 		Assert.notEquals(current, haxe.io.Path.removeTrailingSlashes(current));
 	}
 
-	#if !java
+	#if !jvm
 	function testSetCwd() {
 		var cur = Sys.getCwd();
 		Sys.setCwd("../");

+ 4 - 4
tests/sys/src/TestUnicode.hx

@@ -140,7 +140,7 @@ class TestUnicode extends utest.Test {
 
 #if target.unicode
 	function testFilesystem() {
-#if !java // java does not have this functionality
+#if !jvm // java does not have this functionality
 		// setCwd + getCwd
 		Sys.setCwd("test-res");
 		function enterLeave(dir:String, ?alt:String):Void {
@@ -175,7 +175,7 @@ class TestUnicode extends utest.Test {
 					);
 			}, "test-res");
 
-#if !java // java does not have this functionality
+#if !jvm // java does not have this functionality
 		assertNormalEither(path -> {
 				if (!FileSystem.exists(path)) return false; // NFC/NFD differences
 				Sys.setCwd(path);
@@ -302,7 +302,7 @@ class TestUnicode extends utest.Test {
 				assertUEquals(runUtility(["println", '$i', mode]).stdout, str + endLine);
 				// trace
 				assertUEnds(runUtility(["trace", '$i', mode]).stdout, str + endLine);
-				#if !java
+				#if !jvm
 				// putEnv + getEnv
 				assertUEquals(runUtility(["putEnv", "HAXE_TEST", '$i', mode, "getEnv", "HAXE_TEST"]).stdout, str + endLine);
 				// putEnv + environment
@@ -311,7 +311,7 @@ class TestUnicode extends utest.Test {
 			});
 
 		// args
-		if (#if (java || eval || cpp) Sys.systemName() != "Windows" #else true #end) {
+		if (#if (jvm || eval || cpp) Sys.systemName() != "Windows" #else true #end) {
 			// https://stackoverflow.com/questions/7660651/passing-command-line-unicode-argument-to-java-code
 			UnicodeSequences.normalBoth(str -> {
 					assertUEquals(runUtility(["args", str]).stdout, str + endLine);

+ 1 - 1
tests/unit/src/RunCastGenerator.hx

@@ -83,7 +83,7 @@ class RunCastGenerator {
 		}
 		line("// This file is auto-generated from RunCastGenerator.hx - do not edit!");
 		line("package unit;");
-		line("#if java");
+		line("#if jvm");
 		line("import java.StdTypes;");
 		line("private typedef Int32 = Int;");
 		line("private typedef Float32 = Single;");

+ 0 - 2
tests/unit/src/unit/MyClass.hx

@@ -153,10 +153,8 @@ class ParamConstraintsClass {
 
 	public function memberAnon < A:{ x : Int } & { y : Float }> (v:A) { return v.x + v.y; }
 
-#if !java  //this is a known bug caused by issue #915
 	@:overload(function< A, B:Array<A> > (a:A, b:B):Void { } )
 	public function memberOverload < A, B > (a:String, b:String) { }
-#end
 }
 
 class ParamConstraintsClass2<T> {

+ 3 - 3
tests/unit/src/unit/TestConstrainedMonomorphs.hx

@@ -18,7 +18,7 @@ private class MyNotString {
 	}
 }
 
-#if java
+#if jvm
 @:native("unit.DetectiveHaxeExtern")
 extern private class DetectiveHaxeExtern {
 	overload static function itWasYou(i1:Int, i2:Int):String;
@@ -64,7 +64,7 @@ class TestConstrainedMonomorphs extends Test {
 		eq("fooFOO", infer(new MyNotString("foo")));
 	}
 
-	#if java
+	#if jvm
 	function testDetectiveHaxe() {
 		var a = null;
 		eq("nullfoo", DetectiveHaxeExtern.itWasYou(a, "foo"));
@@ -121,4 +121,4 @@ class TestConstrainedMonomorphs extends Test {
 	}
 	#end
 
-}
+}

+ 1 - 1
tests/unit/src/unit/TestDCE.hx

@@ -169,7 +169,7 @@ class TestDCE extends Test {
 	}
 
 	// TODO: this should be possible in lua
-	#if (!cpp && !java && !lua)
+	#if (!cpp && !jvm && !lua)
 	public function testProperty2() {
 		var a = new RemovePropertyKeepAccessors();
 		a.test = 3;

+ 3 - 3
tests/unit/src/unit/TestExceptions.hx

@@ -23,7 +23,7 @@ private class CustomNativeException extends php.Exception {}
 private class CustomNativeException extends js.lib.Error {}
 #elseif flash
 private class CustomNativeException extends flash.errors.Error {}
-#elseif java
+#elseif jvm
 private class CustomNativeException extends java.lang.RuntimeException {}
 #elseif python
 private class CustomNativeException extends python.Exceptions.Exception {}
@@ -31,7 +31,7 @@ private class CustomNativeException extends python.Exceptions.Exception {}
 private class CustomNativeException { public function new(m:String) {} }
 #end
 
-#if java
+#if jvm
 private class NativeExceptionBase extends java.lang.RuntimeException {}
 private class NativeExceptionChild extends NativeExceptionBase {}
 private class NativeExceptionOther extends java.lang.RuntimeException {}
@@ -381,7 +381,7 @@ class TestExceptions extends Test {
 		}
 	}
 
-#if java
+#if jvm
 	function testCatchChain() {
 		eq("caught NativeExceptionChild: msg", raise(() -> throw new NativeExceptionChild("msg")));
 		eq("caught NativeExceptionBase: msg", raise(() -> throw new NativeExceptionBase("msg")));

+ 2 - 2
tests/unit/src/unit/TestInterface.hx

@@ -33,7 +33,7 @@ private class Point implements IX implements IY {
 		return x;
 	}
 
-	public function getY() : #if java /* see https://github.com/HaxeFoundation/haxe/issues/6486 */ Float #else Int #end {
+	public function getY() : Int {
 		return y;
 	}
 
@@ -95,4 +95,4 @@ class TestInterface extends Test {
 		eq(i2, c);
 		eq(i1,i2);
 	}
-}
+}

+ 1 - 1
tests/unit/src/unit/TestJava.hx

@@ -13,7 +13,7 @@ import haxe.test.TEnum;
 import java.util.EnumSet;
 import java.vm.*;
 
-#if java
+#if jvm
 @:strict(haxe.test.MyClass.MyClass_MyAnnotation({author: "John Doe", someEnum: TB}))
 @:strict(MyClass_ParameterLessAnnotation)
 class TestJava extends Test {

+ 2 - 2
tests/unit/src/unit/TestMain.hx

@@ -69,7 +69,7 @@ function main() {
 		#if !no_pattern_matching
 		new TestMatch(),
 		#end
-		#if java
+		#if jvm
 		new TestJava(),
 		#end
 		#if lua
@@ -84,7 +84,7 @@ function main() {
 		#if php
 		new TestPhp(),
 		#end
-		#if java
+		#if jvm
 		new TestOverloads(),
 		#end
 		new TestOverloadsForEveryone(),

+ 1 - 1
tests/unit/src/unit/TestMisc.hx

@@ -382,7 +382,7 @@ class TestMisc extends Test {
 		eq(opt2().x, 5);
 		eq(opt2().y, "hello");
 
-		#if !(flash || cpp || java)
+		#if !(flash || cpp || jvm)
 		eq(opt2(null, null).x, 5);
 		#end
 		eq(opt2(0, null).y, "hello");

+ 1 - 1
tests/unit/src/unit/TestNumericCasts.hx

@@ -1,6 +1,6 @@
 // This file is auto-generated from RunCastGenerator.hx - do not edit!
 package unit;
-#if java
+#if jvm
 import java.StdTypes;
 private typedef Int32 = Int;
 private typedef Float32 = Single;

+ 2 - 2
tests/unit/src/unit/TestOverloads.hx

@@ -151,7 +151,7 @@ class TestOverloads extends Test
 		eq(Primitives.prim(nf, null), "Null<Float>");
 		var dyn:Dynamic = null;
 		eq(Primitives.prim(dyn), "Dynamic");
-		#if java
+		#if jvm
 		var s:Single = 1.0;
 		eq(Primitives.prim(s), "Single" );
 		var ns:Null<Single> = null;
@@ -251,7 +251,7 @@ private class Primitives
 		return "Null<Int>";
 	}
 
-	#if java
+	#if jvm
 	overload public static function prim(v:Single):String
 	{
 		return "Single";

+ 2 - 2
tests/unit/src/unit/TestReflect.hx

@@ -225,8 +225,8 @@ class TestReflect extends Test {
 		eq( i.intValue, 55 );
 		var i = Type.createEmptyInstance(MyClass);
 		t( (i is MyClass) );
-		eq( i.get(), #if (flash || cpp || java || hl) 0 #else null #end );
-		eq( i.intValue, #if (flash || cpp || java || hl) 0 #else null #end );
+		eq( i.get(), #if (flash || cpp || jvm || hl) 0 #else null #end );
+		eq( i.intValue, #if (flash || cpp || jvm || hl) 0 #else null #end );
 		var e : MyEnum = Type.createEnum(MyEnum,__unprotect__("A"));
 		eq( e, MyEnum.A );
 		var e : MyEnum = Type.createEnum(MyEnum,__unprotect__("C"),[55,"hello"]);

+ 1 - 1
tests/unit/src/unit/TestType.hx

@@ -427,7 +427,7 @@ class TestType extends Test {
 		//typeError(pcc.memberAnon( { x : 1 } ));
 		//typeError(pcc.memberAnon( { y : 3. } ));
 
-		#if !java
+		#if !jvm
 		// pcc.memberOverload("foo", "bar");
 		#end
 		// TODO: this should not fail (overload accepts)

+ 1 - 1
tests/unit/src/unit/issues/Issue10143.hx

@@ -1,7 +1,7 @@
 package unit.issues;
 
 //targets with pf_supports_rest_args = true
-#if (js || lua || php || java || python || flash)
+#if (js || lua || php || jvm || python || flash)
 
 class Issue10143 extends Test {
 	function test1() {

+ 2 - 2
tests/unit/src/unit/issues/Issue10193.hx

@@ -1,7 +1,7 @@
 package unit.issues;
 
 class Issue10193 extends Test {
-	#if (js || java)
+	#if (js || jvm)
 	function test() {
 		var c = new C(42);
 		eq(42, c.a);
@@ -10,7 +10,7 @@ class Issue10193 extends Test {
 	#end
 }
 
-#if (js || java) // some targets are not happy with this for some reason...
+#if (js || jvm) // some targets are not happy with this for some reason...
 @:keep
 @:native("Issue10193E")
 private class EImpl {

+ 1 - 1
tests/unit/src/unit/issues/Issue10508.hx

@@ -1,7 +1,7 @@
 package unit.issues;
 
 class Issue10508 extends Test {
-	#if java
+	#if jvm
 	function test() {
 		t(java.math.RoundingMode.getConstructors().length > 0);
 		t(java.math.RoundingMode.createAll().length > 0);

+ 1 - 1
tests/unit/src/unit/issues/Issue10571.hx

@@ -1,7 +1,7 @@
 package unit.issues;
 
 class Issue10571 extends Test {
-	#if java
+	#if jvm
 	function test() {
 		eq("test()", foo());
 		eq("test(I)", foo(1));

+ 1 - 1
tests/unit/src/unit/issues/Issue10618.hx

@@ -1,6 +1,6 @@
 package unit.issues;
 
-#if java
+#if jvm
 @:keep
 private class NotMain implements java.util.Iterator<String> {
 	static function main() {}

+ 2 - 2
tests/unit/src/unit/issues/Issue1925.hx

@@ -1,10 +1,10 @@
 package unit.issues;
-#if java
+#if jvm
 import java.NativeArray;
 #end
 
 class Issue1925 extends Test {
-#if java
+#if jvm
 	static var d2:Array<NativeArray<Int>>;
 	function test() {
 		var d = new NativeArray<Int>(10);

+ 2 - 2
tests/unit/src/unit/issues/Issue2049.hx

@@ -1,12 +1,12 @@
 package unit.issues;
-#if java
+#if jvm
 import java.NativeArray;
 import java.Lib;
 #end
 
 class Issue2049 extends unit.Test
 {
-#if java
+#if jvm
 	public function test()
 	{
 		var arr = [ 1., 1., 1., 0.5 ].map( function( n: Float ): Single { return n; });

+ 2 - 2
tests/unit/src/unit/issues/Issue2648.hx

@@ -1,7 +1,7 @@
 package unit.issues;
 import unit.Test;
 
-#if java
+#if jvm
 private class TestParam<T> {
 	@:overload static public function forName(s:Int) { }
 	@:overload static public function forName(s:String) { }
@@ -9,7 +9,7 @@ private class TestParam<T> {
 #end
 
 class Issue2648 extends Test {
-	#if java
+	#if jvm
 	function test() {
 		TestParam.forName(1);
 		TestParam.forName("s");

+ 2 - 2
tests/unit/src/unit/issues/Issue2688.hx

@@ -1,7 +1,7 @@
 package unit.issues;
 
 class Issue2688 extends Test {
-#if java
+#if jvm
   public function test() {
     var x = 0;
     var b = new B(function() {
@@ -13,7 +13,7 @@ class Issue2688 extends Test {
 #end
 }
 
-#if java
+#if jvm
 @:nativeGen
 private class A {
   public function new() {

+ 1 - 1
tests/unit/src/unit/issues/Issue2754.hx

@@ -2,7 +2,7 @@ package unit.issues;
 
 class Issue2754 extends unit.Test
 {
-#if java
+#if jvm
 	public function testClass()
 	{
 		var tc = new TestClass();

+ 1 - 1
tests/unit/src/unit/issues/Issue2772.hx

@@ -2,7 +2,7 @@ package unit.issues;
 
 class Issue2772 extends Test
 {
-#if java
+#if jvm
 	public function test()
 	{
 		var f = false;

+ 1 - 1
tests/unit/src/unit/issues/Issue2861.hx

@@ -2,7 +2,7 @@ package unit.issues;
 
 class Issue2861 extends Test
 {
-#if (flash || neko || cpp || java || php || hl)
+#if (flash || neko || cpp || jvm || php || hl)
 	public function test()
 	{
 		var b = haxe.io.Bytes.alloc(2048);

+ 2 - 2
tests/unit/src/unit/issues/Issue2927.hx

@@ -1,11 +1,11 @@
 package unit.issues;
-#if java
+#if jvm
 import java.Lib;
 import java.NativeArray;
 #end
 
 class Issue2927 extends Test {
-#if java
+#if jvm
 	public function test()
 	{
 		var arr = Lib.array(new NativeArray<Int>(1));

+ 1 - 1
tests/unit/src/unit/issues/Issue3084.hx

@@ -3,7 +3,7 @@ import unit.Test;
 
 class Issue3084 extends Test
 {
-#if java
+#if jvm
 	function test()
 	{
 		for (i in 0...40)

+ 4 - 4
tests/unit/src/unit/issues/Issue3138.hx

@@ -5,7 +5,7 @@ class Issue3138 extends Test
 	public function test()
 	{
 		var a = new B();
-#if java
+#if jvm
 		var b = new D();
 #end
 		noAssert();
@@ -18,11 +18,11 @@ private class A {
 
 private class B extends A {
 	public function new(?a = 1) {
-		super(a); // error CS0030: Cannot convert type 'int' to 'haxe.lang.Null<int>'
+		super(a);
 	}
 }
 
-#if java
+#if jvm
 
 private class C {
 	public function new(a) {}
@@ -30,7 +30,7 @@ private class C {
 
 private class D extends C {
 	public function new(?a:Single = 1) {
-		super(a); // error CS0030: Cannot convert type 'int' to 'haxe.lang.Null<int>'
+		super(a);
 	}
 }
 

+ 2 - 2
tests/unit/src/unit/issues/Issue3171.hx

@@ -2,7 +2,7 @@ package unit.issues;
 
 class Issue3171 extends Test
 {
-#if java
+#if jvm
 	public function test()
 	{
 		var oint = new O2();
@@ -22,7 +22,7 @@ class Issue3171 extends Test
 	}
 #end
 }
-#if java
+#if jvm
 class O<T>
 {
 	public var lastVal = 0;

+ 3 - 3
tests/unit/src/unit/issues/Issue3173.hx

@@ -1,7 +1,7 @@
 package unit.issues;
 import haxe.ds.StringMap;
 
-#if java
+#if jvm
 
 class Issue3173 extends Test
 {
@@ -20,7 +20,7 @@ private class O2 extends O<StringMap<Int>>
 	{
 	}
 
-#if java
+#if jvm
 	@:overload
 #end
 	override public function foo(t:StringMap<Int>):Int
@@ -31,7 +31,7 @@ private class O2 extends O<StringMap<Int>>
 
 private class O<T>
 {
-#if java
+#if jvm
 	@:overload
 #end
 	public function foo(t:T):Int

+ 2 - 2
tests/unit/src/unit/issues/Issue3306.hx

@@ -1,11 +1,11 @@
 package unit.issues;
 
-#if java
+#if jvm
 typedef Float32 = Single;
 #end
 
 class Issue3306 extends Test {
-#if java
+#if jvm
 	function test() {
 		var iw:Float32 = 0.0;
 		var iw2:Float32;

+ 2 - 2
tests/unit/src/unit/issues/Issue3400.hx

@@ -2,7 +2,7 @@ package unit.issues;
 
 class Issue3400 extends Test
 {
-#if java
+#if jvm
 	public function test()
 	{
 		var a:AbstractList<haxe.Int64> = AbstractList.empty();
@@ -11,7 +11,7 @@ class Issue3400 extends Test
 #end
 }
 
-#if java
+#if jvm
 private abstract AbstractList<T>(java.util.ArrayList<T>)
 {
 	function new(a:T)

+ 3 - 3
tests/unit/src/unit/issues/Issue3575.hx

@@ -10,13 +10,13 @@ class Issue3575 extends Test {
 
 #if !cpp @:nativeGen #end private class Base
 {
-#if java @:overload #end
+#if jvm @:overload #end
 	public function getName()
 	{
 		return "Base!";
 	}
 
-#if java
+#if jvm
 	@:overload public function getName(s:String)
 	{
 		return 'Base!:$s';
@@ -35,7 +35,7 @@ class Child extends DirectDescendant
 	{
 	}
 
-#if java @:overload #end
+#if jvm @:overload #end
 	override public function getName()
 	{
 		return "Something Else";

+ 1 - 1
tests/unit/src/unit/issues/Issue3579.hx

@@ -31,6 +31,6 @@ private class SomeClass
 	}
 }
 
-#if (!java)
+#if (!jvm)
 private typedef Single = Float
 #end

+ 1 - 1
tests/unit/src/unit/issues/Issue3818.hx

@@ -11,7 +11,7 @@ class Issue3818 extends Test
 		var s1 = "UI/fx/Materials/fx_ui_atlas_icons_additive_mat";
 		var s2 = "UI/img/bg_info";
 		var s3 = "art/3d/env/props/city_props/textures/cityprops_debris01";
-#if java
+#if jvm
 		//known collisions
 		s1 = "Aa";
 		s2 = "BB";

+ 2 - 2
tests/unit/src/unit/issues/Issue3842.hx

@@ -2,7 +2,7 @@ package unit.issues;
 
 class Issue3842 extends Test
 {
-#if java
+#if jvm
 	// public function test()
 	// {
 	// 	var c = new Child();
@@ -13,7 +13,7 @@ class Issue3842 extends Test
 #end
 }
 //
-// #if java
+// #if jvm
 // private class Base
 // {
 // 	public function new()

+ 1 - 1
tests/unit/src/unit/issues/Issue3894.hx

@@ -2,7 +2,7 @@ package unit.issues;
 
 class Issue3894 extends Test {
 	function test() {
-		#if (flash || java || cpp)
+		#if (flash || jvm || cpp)
 		// this doesn't actually error until post-processing so we cannot test it like this
 		//t(unit.HelperMacros.typeError((null : haxe.Int64)));
 		#end

+ 2 - 2
tests/unit/src/unit/issues/Issue3979.hx

@@ -1,11 +1,11 @@
 package unit.issues;
-#if java
+#if jvm
 import java.NativeArray;
 #end
 
 class Issue3979 extends Test
 {
-	#if java
+	#if jvm
 	public function test()
 	{
 		var v = 0;

+ 1 - 1
tests/unit/src/unit/issues/Issue3987.hx

@@ -1,7 +1,7 @@
 package unit.issues;
 
 class Issue3987 extends Test {
-#if java
+#if jvm
 	public function test() {
 		var int =  java.lang.Integer.valueOf(123);
 		eq(int.intValue(), 123);

+ 3 - 3
tests/unit/src/unit/issues/Issue4000.hx

@@ -10,7 +10,7 @@ class Issue4000 extends Test
 		eq(c.dyn.a,1);
 		eq(c.dyn.b,10);
 		f(c.b);
-#if java
+#if jvm
 		var c = new Child(42);
 		eq(c.i,42);
 		eq(c.f,1.0);
@@ -35,7 +35,7 @@ private class Child extends NativeGen
 	public var dyn = { a:1, b:10 };
 	public var b = true;
 
-#if java
+#if jvm
 	@:overload
 #end
 	public function new()
@@ -44,7 +44,7 @@ private class Child extends NativeGen
 		this.b = false;
 	}
 
-#if java
+#if jvm
 	@:overload public function new(i:Float)
 	{
 		super();

+ 1 - 1
tests/unit/src/unit/issues/Issue4203.hx

@@ -9,7 +9,7 @@ class Issue4203 extends Test {
   }
 }
 
-#if java
+#if jvm
 @:nativeGen
 #end
 private interface NativeItem<T> {

+ 1 - 1
tests/unit/src/unit/issues/Issue4526.hx

@@ -39,7 +39,7 @@ private class Struct4 {
 
 class Issue4526 extends Test {
 	function test() {
-		var fieldNull = #if (cpp || flash || java || hl) 0 #else null #end;
+		var fieldNull = #if (cpp || flash || jvm || hl) 0 #else null #end;
 
 		var s1:Struct1 = { x: 12, y: 13 };
 		eq("12 13", s1.get());

+ 1 - 1
tests/unit/src/unit/issues/Issue5025.hx

@@ -6,7 +6,7 @@ class Issue5025 extends Test {
 	}
 
 	function shouldCompile() {
-		#if !(java || lua)
+		#if !lua
 		try {
 			switch (null) {
 				case Value(i):

+ 1 - 1
tests/unit/src/unit/issues/Issue5505.hx

@@ -1,7 +1,7 @@
 package unit.issues;
 
 class Issue5505 extends Test {
-  #if java
+  #if jvm
   function test() {
     eq(StringTools.urlEncode('~'), '~');
     eq(StringTools.urlDecode(StringTools.urlEncode('~')), '~');

+ 1 - 1
tests/unit/src/unit/issues/Issue5507.hx

@@ -5,7 +5,7 @@ private abstract S(String) to String {
 }
 
 class Issue5507 extends unit.Test {
-	#if java
+	#if jvm
 	@:readOnly static var a(default,never):S = "hello";
 
 	function test() {

+ 4 - 4
tests/unit/src/unit/issues/Issue5862.hx

@@ -1,11 +1,11 @@
 package unit.issues;
 import haxe.ds.*;
-#if java
+#if jvm
 import java.NativeArray;
 #end
 
 class Issue5862 extends Test {
-#if java
+#if jvm
   public function test() {
     var imap = new IntMap();
     imap.set(0, "val1");
@@ -41,7 +41,7 @@ class Issue5862 extends Test {
     for (i in 0...v.length) {
       t(v[i] != "val3");
     }
-#if java
+#if jvm
     var wmap = new WeakMap<{}, String>();
     wmap.set(imap, "val1");
     wmap.set(smap, "val2");
@@ -91,7 +91,7 @@ class Issue5862 extends Test {
     for (i in 0...v.length) {
       t(v[i] != "val2");
     }
-#if java
+#if jvm
     var wmap = new WeakMap<{}, String>();
     wmap.set(imap, "val1");
     wmap.set(smap, "val2");

+ 0 - 2
tests/unit/src/unit/issues/Issue6276.hx

@@ -3,7 +3,6 @@ package unit.issues;
 using Reflect;
 
 class Issue6276 extends unit.Test {
-	#if (!java)
 	function test(){
 		var s = "bar";
 
@@ -40,5 +39,4 @@ class Issue6276 extends unit.Test {
 		var toString = s.field("toString");
 		eq(s.toString(), Reflect.callMethod(s, toString, []));
 	}
-	#end
 }

+ 1 - 1
tests/unit/src/unit/issues/Issue6291.hx

@@ -9,7 +9,7 @@ class Issue6291 extends Test
   }
 }
 
-#if java
+#if jvm
 @:nativeGen @:keep
 #end
 private class BadCode {

+ 2 - 2
tests/unit/src/unit/issues/Issue6379.hx

@@ -1,7 +1,7 @@
 package unit.issues;
 
 class Issue6379 extends unit.Test {
-	#if (!java && !lua)
+	#if (!lua)
 	function test() {
         eq(g("x_x").length, 2);
     }
@@ -12,4 +12,4 @@ class Issue6379 extends unit.Test {
         return r;
 	}
 	#end
-}
+}

+ 1 - 1
tests/unit/src/unit/issues/Issue6482.hx

@@ -1,7 +1,7 @@
 package unit.issues;
 
 class Issue6482 extends unit.Test {
-	#if (!cpp && !java && !lua)
+	#if (!cpp && !jvm && !lua)
 	function test() {
 		exc(function() {
 			cast("foo", Int);

+ 2 - 2
tests/unit/src/unit/issues/Issue7599.hx

@@ -1,6 +1,6 @@
 package unit.issues;
 
-#if java
+#if jvm
 
 @:keep
 private class Overloader {
@@ -48,7 +48,7 @@ private class Overloader {
 #end
 
 class Issue7599 extends unit.Test {
-	#if java
+	#if jvm
 
 	function testGeneric() {
 		var overloader = new Overloader();

+ 2 - 2
tests/unit/src/unit/issues/Issue9034.hx

@@ -3,7 +3,7 @@ package unit.issues;
 import unit.Test;
 
 class Issue9034 extends Test{
-	#if java
+	#if jvm
 	function test() {
 		bar(java.nio.file.Paths.get('build.hxml'));
 		utest.Assert.pass();
@@ -11,4 +11,4 @@ class Issue9034 extends Test{
 
 	static public inline function bar(path:java.nio.file.Path):Void { }
 	#end
-}
+}

+ 1 - 3
tests/unit/src/unit/issues/Issue9217.hx

@@ -3,7 +3,6 @@ package unit.issues;
 import unit.Test;
 
 class Issue9217 extends Test {
-	#if (!java || jvm) // doesn't work on genjava
 	function test() {
 		eq("default", switch(Ea) {
 			case "FB": "FB";
@@ -39,5 +38,4 @@ class Issue9217 extends Test {
 
 	var Ea = "Ea";
 	var FB = "FB";
-	#end
-}
+}

+ 2 - 2
tests/unit/src/unit/issues/Issue9220.hx

@@ -3,9 +3,9 @@ package unit.issues;
 import unit.Test;
 
 class Issue9220 extends Test {
-	#if java
+	#if jvm
 	public function test() {
 		eq("12.200", java.NativeString.format(java.util.Locale.US, '%.3f', 12.2));
 	}
 	#end
-}
+}

+ 2 - 2
tests/unit/src/unit/issues/Issue9438.hx

@@ -1,10 +1,10 @@
 package unit.issues;
 
 class Issue9438 extends unit.Test {
-	#if java
+	#if jvm
 	function test() {
 		var x:java.util.Set = null;
 		utest.Assert.pass();
 	}
 	#end
-}
+}

+ 1 - 1
tests/unit/src/unit/issues/Issue9601.hx

@@ -1,7 +1,7 @@
 package unit.issues;
 
 class Issue9601 extends Test {
-	#if (java || eval)
+	#if (jvm || eval)
 	public function test() {
 		utest.Assert.same(["", "Test"], ~/^/g.split("Test"));
 		utest.Assert.same(["Test", ""], ~/$/g.split("Test"));

+ 2 - 2
tests/unit/src/unit/issues/Issue9619.hx

@@ -1,6 +1,6 @@
 package unit.issues;
 
-#if java
+#if jvm
 
 private abstract class AbstractOverloadParent {
 	public function new():Void {}
@@ -79,7 +79,7 @@ private class ConcreteChild extends AbstractParent {
 
 class Issue9619 extends unit.Test {
 	function test() {
-		#if java
+		#if jvm
 		var cc = new ConcreteOverloadChild();
 		t(HelperMacros.typeError(new AbstractOverloadParent()));
 

+ 3 - 3
tests/unit/src/unit/issues/Issue9791.hx

@@ -1,6 +1,6 @@
 package unit.issues;
 
-#if java
+#if jvm
 
 overload function moduleOverload(i:Int) {
 	return "Int: " + i;
@@ -13,10 +13,10 @@ overload function moduleOverload(s:String) {
 #end
 
 class Issue9791 extends unit.Test {
-	#if java
+	#if jvm
 	function test() {
 		eq("Int: 12", moduleOverload(12));
 		eq("String: foo", moduleOverload("foo"));
 	}
 	#end
-}
+}

+ 1 - 1
tests/unit/src/unit/issues/Issue9854.hx

@@ -1,7 +1,7 @@
 package unit.issues;
 
 class Issue9854 extends Test {
-#if java
+#if jvm
 	overload
 	static function infer<T>(s:String):T {
 		return null;

+ 0 - 4
tests/unit/src/unitstd/Map.unit.hx

@@ -256,25 +256,21 @@ map["bar"] = map["foo"] = 9;
 map["bar"] == 9;
 map["foo"] == 9;
 
-#if !java
 ['' => ''].keys().next() == '';
 ['' => ''].iterator().next() == '';
 [2 => 3].keys().next() == 2;
 [2 => 3].iterator().next() == 3;
 //[a => b].keys().next() == a;
 //[a => b].iterator().next() == b;
-#end
 
 var map:Map<String, Int>;
 HelperMacros.typedAs((null : Map<String, Int>), map = []);
 HelperMacros.typeError(map[1] = 1) == true;
 
-#if !java
 ['' => ''].keyValueIterator().next().key == '';
 ['' => ''].keyValueIterator().next().value == '';
 [2 => 3].keyValueIterator().next().key == 2;
 [2 => 3].keyValueIterator().next().value == 3;
-#end
 
 // Test unification
 

+ 0 - 2
tests/unit/src/unitstd/Type.unit.hx

@@ -3,9 +3,7 @@ Type.getClass("foo") == String;
 Type.getClass(new C()) == C;
 
 //Issue #1485
-#if !java
 Type.getClass([]) == Array;
-#end
 Type.getClass(Float) == null;
 Type.getClass(null) == null;
 Type.getClass(Int) == null;

+ 2 - 2
tests/unit/src/unitstd/haxe/ds/Vector.unit.hx

@@ -27,7 +27,7 @@ vec.get(2) == vNullBool;
 // fromArray
 var arr = ["1", "2", "3"];
 var vec:haxe.ds.Vector<String> = haxe.ds.Vector.fromArrayCopy(arr);
-#if (!flash && !neko && !java && !lua && !eval && !php)
+#if (!flash && !neko && !jvm && !lua && !eval && !php)
 arr != vec.toData();
 #end
 vec.length == 3;
@@ -192,7 +192,7 @@ vec2[1] == "value: 13";
 
 // sort
 
-#if !(neko || java || eval)
+#if !(neko || jvm || eval)
 var vec = new haxe.ds.Vector(4);
 vec[0] = 99;
 vec[1] = 101;

+ 2 - 2
tests/unit/src/unitstd/haxe/ds/WeakMap.unit.hx

@@ -1,4 +1,4 @@
-#if (flash || java)
+#if (flash || jvm)
 var k1 = new IntWrap(1);
 var k2 = new IntWrap(2);
 var k3 = new IntWrap(3);
@@ -97,4 +97,4 @@ a == [];
 
 #else
 1 == 1;
-#end
+#end

+ 1 - 1
tests/unit/src/unitstd/haxe/zip/Compress.unit.hx

@@ -1,5 +1,5 @@
 // not supported in js/python yet
-#if (cpp || php || java || neko || flash || hl)
+#if (cpp || php || jvm || neko || flash || hl)
 var b = haxe.io.Bytes.ofString("test");
 var c = haxe.zip.Compress.run(b, 9);
 

+ 1 - 1
tests/unit/src/unitstd/haxe/zip/Uncompress.unit.hx

@@ -1,5 +1,5 @@
 // not supported in js/python yet
-#if (cpp || php || java || neko || flash)
+#if (cpp || php || jvm || neko || flash)
 var d = [120, 218, 43, 73, 45, 46, 1, 0, 4, 93, 1, 193];
 var b = haxe.io.Bytes.alloc(d.length);
 for (i in 0...d.length) b.set(i, d[i]);

+ 1 - 3
tests/unit/src/unitstd/sys/net/Socket.unit.hx

@@ -14,7 +14,6 @@ c.connect(host, port);
 c.input != null;
 c.output != null;
 
-#if !java
 // select when accept() would succeed
 var select = sys.net.Socket.select([s], [s], [s], 0.01);
 select.read.length == 1;
@@ -54,11 +53,10 @@ select.read.length == 1;
 select.write.length == 1;
 select.others.length == 0;
 c.read() == "abc";
-#end
 
 c.close();
 s.close();
 
 #else
 1 == 1;
-#end
+#end