瀏覽代碼

[tests] update special handling

Rudy Ges 1 年之前
父節點
當前提交
b8a44215c6
共有 83 個文件被更改,包括 94 次插入1481 次删除
  1. 1 6
      extra/ImportAll.hx
  2. 0 12
      tests/sys/src/ExitCode.hx
  3. 1 1
      tests/sys/src/FileNames.hx
  4. 0 12
      tests/sys/src/TestArguments.hx
  5. 0 16
      tests/sys/src/TestCommandBase.hx
  6. 1 9
      tests/sys/src/TestSys.hx
  7. 0 26
      tests/sys/src/TestUnicode.hx
  8. 0 30
      tests/sys/src/UtilityProcess.hx
  9. 2 2
      tests/unit/src/unit/MyClass.hx
  10. 0 840
      tests/unit/src/unit/TestCSharp.hx
  11. 1 1
      tests/unit/src/unit/TestDCE.hx
  12. 0 2
      tests/unit/src/unit/TestExceptions.hx
  13. 1 8
      tests/unit/src/unit/TestMain.hx
  14. 2 4
      tests/unit/src/unit/TestMisc.hx
  15. 0 2
      tests/unit/src/unit/TestNullCoalescing.hx
  16. 4 4
      tests/unit/src/unit/TestOverloads.hx
  17. 2 2
      tests/unit/src/unit/TestReflect.hx
  18. 2 4
      tests/unit/src/unit/TestSyntaxModule.hx
  19. 1 1
      tests/unit/src/unit/TestType.hx
  20. 2 2
      tests/unit/src/unit/issues/Issue10143.hx
  21. 0 5
      tests/unit/src/unit/issues/Issue10145.hx
  22. 2 2
      tests/unit/src/unit/issues/Issue10193.hx
  23. 0 2
      tests/unit/src/unit/issues/Issue10761.hx
  24. 0 2
      tests/unit/src/unit/issues/Issue10906.hx
  25. 1 1
      tests/unit/src/unit/issues/Issue11010.hx
  26. 6 8
      tests/unit/src/unit/issues/Issue1925.hx
  27. 2 6
      tests/unit/src/unit/issues/Issue2049.hx
  28. 2 2
      tests/unit/src/unit/issues/Issue2688.hx
  29. 1 1
      tests/unit/src/unit/issues/Issue2754.hx
  30. 2 2
      tests/unit/src/unit/issues/Issue2776.hx
  31. 1 4
      tests/unit/src/unit/issues/Issue2927.hx
  32. 2 2
      tests/unit/src/unit/issues/Issue3138.hx
  33. 2 2
      tests/unit/src/unit/issues/Issue3171.hx
  34. 4 4
      tests/unit/src/unit/issues/Issue3173.hx
  35. 2 2
      tests/unit/src/unit/issues/Issue3306.hx
  36. 0 29
      tests/unit/src/unit/issues/Issue3383.hx
  37. 0 4
      tests/unit/src/unit/issues/Issue3396.hx
  38. 0 37
      tests/unit/src/unit/issues/Issue3558.hx
  39. 3 3
      tests/unit/src/unit/issues/Issue3575.hx
  40. 1 1
      tests/unit/src/unit/issues/Issue3579.hx
  41. 1 4
      tests/unit/src/unit/issues/Issue3637.hx
  42. 1 6
      tests/unit/src/unit/issues/Issue3639.hx
  43. 0 12
      tests/unit/src/unit/issues/Issue3771.hx
  44. 1 1
      tests/unit/src/unit/issues/Issue3826.hx
  45. 2 2
      tests/unit/src/unit/issues/Issue3842.hx
  46. 2 2
      tests/unit/src/unit/issues/Issue3894.hx
  47. 0 12
      tests/unit/src/unit/issues/Issue3946.hx
  48. 0 40
      tests/unit/src/unit/issues/Issue3949.hx
  49. 1 3
      tests/unit/src/unit/issues/Issue3979.hx
  50. 3 3
      tests/unit/src/unit/issues/Issue4000.hx
  51. 0 45
      tests/unit/src/unit/issues/Issue4045.hx
  52. 1 1
      tests/unit/src/unit/issues/Issue4203.hx
  53. 2 2
      tests/unit/src/unit/issues/Issue4526.hx
  54. 2 2
      tests/unit/src/unit/issues/Issue5025.hx
  55. 0 18
      tests/unit/src/unit/issues/Issue5110.hx.disabled
  56. 0 19
      tests/unit/src/unit/issues/Issue5399.hx
  57. 1 1
      tests/unit/src/unit/issues/Issue5505.hx
  58. 1 1
      tests/unit/src/unit/issues/Issue5507.hx
  59. 0 10
      tests/unit/src/unit/issues/Issue5747.hx
  60. 0 12
      tests/unit/src/unit/issues/Issue5751.hx
  61. 1 3
      tests/unit/src/unit/issues/Issue5862.hx
  62. 0 31
      tests/unit/src/unit/issues/Issue6039.hx
  63. 2 2
      tests/unit/src/unit/issues/Issue6145.hx
  64. 1 1
      tests/unit/src/unit/issues/Issue6276.hx
  65. 2 2
      tests/unit/src/unit/issues/Issue6291.hx
  66. 2 2
      tests/unit/src/unit/issues/Issue6482.hx
  67. 0 10
      tests/unit/src/unit/issues/Issue6784.hx
  68. 2 2
      tests/unit/src/unit/issues/Issue6871.hx
  69. 2 2
      tests/unit/src/unit/issues/Issue6942.hx
  70. 3 3
      tests/unit/src/unit/issues/Issue7599.hx
  71. 0 2
      tests/unit/src/unit/issues/Issue7736.hx
  72. 0 25
      tests/unit/src/unit/issues/Issue8978.hx
  73. 0 24
      tests/unit/src/unit/issues/Issue8979.hx
  74. 3 3
      tests/unit/src/unit/issues/Issue9619.hx
  75. 0 18
      tests/unit/src/unit/issues/Issue9738.hx
  76. 0 3
      tests/unit/src/unit/issues/Issue9744.hx
  77. 1 10
      tests/unit/src/unit/issues/Issue9746.hx
  78. 1 2
      tests/unit/src/unit/issues/Issue9854.hx
  79. 0 30
      tests/unit/src/unit/issues/Issue9946.hx
  80. 2 2
      tests/unit/src/unitstd/Map.unit.hx
  81. 1 1
      tests/unit/src/unitstd/Type.unit.hx
  82. 0 2
      tests/unit/src/unitstd/haxe/Http.unit.hx.disabled
  83. 2 2
      tests/unit/src/unitstd/haxe/ds/Vector.unit.hx

+ 1 - 6
extra/ImportAll.hx

@@ -25,7 +25,7 @@ class ImportAll {
 
 	static function isSysTarget() {
 		return Context.defined("neko") || Context.defined("php") || Context.defined("cpp") ||
-		       Context.defined("java") || Context.defined("python") ||
+		       Context.defined("jvm") || Context.defined("python") ||
 		       Context.defined("lua") || Context.defined("hl") || Context.defined("eval");
 	}
 
@@ -51,12 +51,8 @@ class ImportAll {
 			if(!isSysTarget()) return;
 		case "sys.thread":
 			if ( !Context.defined("target.threaded") ) return;
-		case "java":
-			if( !Context.defined("java") ) return;
 		case "jvm":
 			if( !Context.defined("jvm") ) return;
-		case "cs":
-			if( !Context.defined("cs") ) return;
 		case "python":
 			if ( !Context.defined("python") ) return;
 		case "hl":
@@ -96,7 +92,6 @@ class ImportAll {
 						case "haxe.remoting.SocketWrapper": if( !Context.defined("flash") ) continue;
 						case "haxe.remoting.SyncSocketConnection": if( !(Context.defined("neko") || Context.defined("php") || Context.defined("cpp")) ) continue;
 						case "neko.vm.Ui" | "sys.db.Sqlite" | "sys.db.Mysql" if ( Context.defined("interp") ): continue;
-						case "sys.db.Sqlite" | "sys.db.Mysql" | "cs.db.AdoNet" if ( Context.defined("cs") ): continue;
 						case "haxe.atomic.AtomicBool" if(!Context.defined("target.atomics")): continue;
 						case "haxe.atomic.AtomicInt" if(!Context.defined("target.atomics")): continue;
 						case "haxe.atomic.AtomicObject" if(!Context.defined("target.atomics") || Context.defined("js") || Context.defined("cpp")): continue;

+ 0 - 12
tests/sys/src/ExitCode.hx

@@ -23,20 +23,8 @@ class ExitCode {
 		#else
 			"bin/cpp/ExitCode";
 		#end
-	#elseif cs
-		#if debug
-			"bin/cs/bin/ExitCode-Debug.exe";
-		#else
-			"bin/cs/bin/ExitCode.exe";
-		#end
 	#elseif jvm
 		"bin/jvm/ExitCode.jar";
-	#elseif java
-		#if debug
-			"bin/java/ExitCode-Debug.jar";
-		#else
-			"bin/java/ExitCode.jar";
-		#end
 	#elseif python
 		"bin/python/ExitCode.py";
 	#elseif php

+ 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 || cs)
+			#if !(python || neko || cpp || java)
 			[for (i in 0...255) "a"].join(""),
 			#end
 		];

+ 0 - 12
tests/sys/src/TestArguments.hx

@@ -83,20 +83,8 @@ class TestArguments extends utest.Test {
 		#else
 			"bin/cpp/TestArguments";
 		#end
-	#elseif cs
-		#if debug
-			"bin/cs/bin/TestArguments-Debug.exe";
-		#else
-			"bin/cs/bin/TestArguments.exe";
-		#end
 	#elseif jvm
 		"bin/jvm/TestArguments.jar";
-	#elseif java
-		#if debug
-			"bin/java/TestArguments-Debug.jar";
-		#else
-			"bin/java/TestArguments.jar";
-		#end
 	#elseif python
 		"bin/python/TestArguments.py";
 	#elseif php

+ 0 - 16
tests/sys/src/TestCommandBase.hx

@@ -13,23 +13,14 @@ class TestCommandBase extends utest.Test {
 		var bin = FileSystem.absolutePath(TestArguments.bin);
 		var args = TestArguments.expectedArgs;
 
-		#if !cs
 		var exitCode = run("haxe", ["compile-each.hxml", "--run", "TestArguments"].concat(args));
 		Assert.equals(0, exitCode);
-		#end
 
 		var exitCode =
 			#if (macro || interp)
 				run("haxe", ["compile-each.hxml", "--run", "TestArguments"].concat(args));
 			#elseif cpp
 				run(bin, args);
-			#elseif cs
-				switch (Sys.systemName()) {
-					case "Windows":
-						run(bin, args);
-					case _:
-						run("mono", [bin].concat(args));
-				}
 			#elseif java
 				run(Path.join([java.lang.System.getProperty("java.home"), "bin", "java"]), ["-jar", bin].concat(args));
 			#elseif python
@@ -120,13 +111,6 @@ class TestCommandBase extends utest.Test {
 					run("haxe", ["compile-each.hxml", "--run", "ExitCode"].concat(args));
 				#elseif cpp
 					run(bin, args);
-				#elseif cs
-					switch (Sys.systemName()) {
-						case "Windows":
-							run(bin, args);
-						case _:
-							run("mono", [bin].concat(args));
-					}
 				#elseif java
 					run(Path.join([java.lang.System.getProperty("java.home"), "bin", "java"]), ["-jar", bin].concat(args));
 				#elseif python

+ 1 - 9
tests/sys/src/TestSys.hx

@@ -31,13 +31,9 @@ class TestSys extends TestCommandBase {
 		Assert.equals("1", Sys.getEnv(toUpdate));
 
 		// variables set via target specific api should exist
-		#if (cs || python)
+		#if python
 		final toSetNatively = "SET_NATIVELY";
-		#if cs
-		cs.system.Environment.SetEnvironmentVariable(toSetNatively, "1");
-		#elseif python
 		python.lib.Os.environ.set(toSetNatively, "1");
-		#end
 		Assert.equals("1", Sys.environment()[toSetNatively]);
 		#end
 		#end
@@ -116,12 +112,8 @@ class TestSys extends TestCommandBase {
 				case _:
 					Assert.isTrue(StringTools.endsWith(p, "Main-debug"));
 			}
-		#elseif cs
-			Assert.isTrue(StringTools.endsWith(p, "Main-Debug.exe"));
 		#elseif jvm
 			Assert.isTrue(StringTools.endsWith(p, "sys.jar"));
-		#elseif java
-			Assert.isTrue(StringTools.endsWith(p, "Main-Debug.jar"));
 		#elseif python
 			Assert.isTrue(StringTools.endsWith(p, "sys.py"));
 		#elseif php

+ 0 - 26
tests/sys/src/TestUnicode.hx

@@ -16,12 +16,6 @@ class TestUnicode extends utest.Test {
 		#else
 			"bin-cpp";
 		#end
-#elseif cs
-		#if debug
-			"bin-cs-debug";
-		#else
-			"bin-cs";
-		#end
 #elseif hl
 		#if hlc
 			"bin-hlc";
@@ -32,12 +26,6 @@ class TestUnicode extends utest.Test {
 		"bin-lua";
 #elseif jvm
 		"bin-jvm";
-#elseif java
-		#if debug
-			"bin-java-debug";
-		#else
-			"bin-java";
-		#end
 #elseif neko
 		"bin-neko";
 #elseif php
@@ -153,7 +141,6 @@ class TestUnicode extends utest.Test {
 #if target.unicode
 	function testFilesystem() {
 #if !java // java does not have this functionality
-#if !cs // C# disabled temporarily (#8247)
 		// setCwd + getCwd
 		Sys.setCwd("test-res");
 		function enterLeave(dir:String, ?alt:String):Void {
@@ -168,7 +155,6 @@ class TestUnicode extends utest.Test {
 			if (FileSystem.exists(nfd)) enterLeave(nfd, nfc);
 		}
 		Sys.setCwd("..");
-#end
 #end
 
 		// absolutePath
@@ -190,7 +176,6 @@ class TestUnicode extends utest.Test {
 			}, "test-res");
 
 #if !java // java does not have this functionality
-#if !cs // C# disabled temporarily (#8247)
 		assertNormalEither(path -> {
 				if (!FileSystem.exists(path)) return false; // NFC/NFD differences
 				Sys.setCwd(path);
@@ -209,7 +194,6 @@ class TestUnicode extends utest.Test {
 				Sys.setCwd("../..");
 				return ret;
 			}, "test-res", "setCwd + absolutePath + endsWith failed");
-#end
 #end
 
 		// exists
@@ -218,7 +202,6 @@ class TestUnicode extends utest.Test {
 
 		// fullPath
 #if !lua // Lua disabled temporarily (#8215)
-		#if !cs // C# behaves like Windows here
 		if (Sys.systemName() != "Windows") {
 			// symlinks behave strangely on Windows
 			pathBoth(path -> {
@@ -228,7 +211,6 @@ class TestUnicode extends utest.Test {
 						);
 				}, "test-res");
 		}
-		#end
 #end
 
 		// isDirectory
@@ -236,11 +218,9 @@ class TestUnicode extends utest.Test {
 		assertNormalEither(path -> !FileSystem.isDirectory(path), 'test-res/b', 'expected isDirectory == false');
 
 		// readDirectory
-#if !cs // C# disabled temporarily (#8247)
 		sameFiles(FileSystem.readDirectory("test-res"), namesRoot);
 		sameFiles(FileSystem.readDirectory("test-res/a"), names);
 		sameFiles(FileSystem.readDirectory("test-res/b"), names);
-#end
 
 		// stat
 		assertNormalEither(path -> FileSystem.stat(path) != null, 'test-res/a', 'expected stat != null');
@@ -331,14 +311,12 @@ class TestUnicode extends utest.Test {
 			});
 
 		// args
-		#if !cs // C# behaves like Windows here
 		if (#if (java || 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);
 				});
 		}
-		#end
 	}
 	#end
 
@@ -358,26 +336,22 @@ class TestUnicode extends utest.Test {
 		// saveContent
 		File.saveContent("temp-unicode/data.bin", UnicodeSequences.validString);
 		assertBytesEqual(File.getBytes("temp-unicode/data.bin"), UnicodeSequences.validBytes);
-#if !cs // C# disabled temporarily (#8247)
 		pathBoth(str -> {
 				File.saveContent('temp-unicode/saveContent-$str.bin', UnicodeSequences.validString);
 				assertBytesEqual(File.getBytes('temp-unicode/saveContent-$str.bin'), UnicodeSequences.validBytes);
 			});
-#end
 
 		// write
 		var out = File.write("temp-unicode/out.bin");
 		out.writeString(UnicodeSequences.validString);
 		out.close();
 		assertBytesEqual(File.getBytes("temp-unicode/out.bin"), UnicodeSequences.validBytes);
-#if !cs // C# disabled temporarily (#8247)
 		pathBoth(str -> {
 				var out = File.write('temp-unicode/write-$str.bin');
 				out.writeString(UnicodeSequences.validString);
 				out.close();
 				assertBytesEqual(File.getBytes('temp-unicode/write-$str.bin'), UnicodeSequences.validBytes);
 			});
-#end
 
 		// update
 		var out = File.update("temp-unicode/out.bin");

+ 0 - 30
tests/sys/src/UtilityProcess.hx

@@ -10,8 +10,6 @@ class UtilityProcess {
 	public static var BIN_PATH =
 #if cpp
 		Path.join(["bin", "cpp"]);
-#elseif cs
-		Path.join(["bin", "cs", "bin"]);
 #elseif hl
 	#if hlc
 		Path.join(["bin", "hlc/utilityProcess"]);
@@ -22,8 +20,6 @@ class UtilityProcess {
 		Path.join(["bin", "lua"]);
 #elseif jvm
 		Path.join(["bin", "jvm"]);
-#elseif java
-		Path.join(["bin", "java"]);
 #elseif neko
 		Path.join(["bin", "neko"]);
 #elseif php
@@ -44,12 +40,6 @@ class UtilityProcess {
 		#else
 			"UtilityProcess";
 		#end
-#elseif cs
-		#if debug
-			"UtilityProcess-Debug.exe";
-		#else
-			"UtilityProcess.exe";
-		#end
 #elseif hl
 	#if hlc
 		"UtilityProcess.exe";
@@ -60,12 +50,6 @@ class UtilityProcess {
 		"UtilityProcess.lua";
 #elseif jvm
 		"UtilityProcess.jar";
-#elseif java
-		#if debug
-			"UtilityProcess-Debug.jar";
-		#else
-			"UtilityProcess.jar";
-		#end
 #elseif neko
 		"UtilityProcess.n";
 #elseif php
@@ -94,13 +78,6 @@ class UtilityProcess {
 		new Process("haxe", ["compile-each.hxml", "-p", options.execPath, "--run", options.execName].concat(args));
 		#elseif cpp
 		new Process(execFull, args);
-		#elseif cs
-		(switch (Sys.systemName()) {
-			case "Windows":
-				new Process(execFull, args);
-			case _:
-				new Process("mono", [execFull].concat(args));
-		});
 		#elseif java
 		new Process(Path.join([java.lang.System.getProperty("java.home"), "bin", "java"]), ["-jar", execFull].concat(args));
 		#elseif python
@@ -150,13 +127,6 @@ class UtilityProcess {
 		Sys.command("haxe", ["compile-each.hxml", "-p", options.execPath, "--run", options.execName].concat(args));
 		#elseif cpp
 		Sys.command(execFull, args);
-		#elseif cs
-		(switch (Sys.systemName()) {
-			case "Windows":
-				Sys.command(execFull, args);
-			case _:
-				Sys.command("mono", [execFull].concat(args));
-		});
 		#elseif java
 		Sys.command(Path.join([java.lang.System.getProperty("java.home"), "bin", "java"]), ["-jar", execFull].concat(args));
 		#elseif python

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

@@ -153,7 +153,7 @@ class ParamConstraintsClass {
 
 	public function memberAnon < A:{ x : Int } & { y : Float }> (v:A) { return v.x + v.y; }
 
-#if !(java || cs)  //this is a known bug caused by issue #915
+#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
@@ -295,4 +295,4 @@ class InlineCastB extends InlineCastA {
 	public function quote() {
 		return "I am the greatest.";
 	}
-}
+}

+ 0 - 840
tests/unit/src/unit/TestCSharp.hx

@@ -1,840 +0,0 @@
-package unit;
-import haxe.io.Bytes;
-import haxe.test.Base;
-import haxe.test.Base.Base_InnerClass;
-import haxe.test.TEnum;
-import haxe.test.TEnumWithValue;
-import haxe.test.TEnumWithBigValue;
-import haxe.test.TEnumWithFlag;
-import haxe.test.TEnumWithBigFlag;
-import haxe.test.IEditableTextBuffer;
-import haxe.test.LowerCaseClass;
-
-import cs.Flags;
-import cs.system.componentmodel.DescriptionAttribute;
-
-import NoPackage;
-#if unsafe
-import cs.Pointer;
-#end
-import cs.system.Action_1;
-
-//C#-specific tests, like unsafe code
-class TestCSharp extends Test
-{
-#if cs
-
-	function testIssue4325()
-	{
-		var b = new Base();
-		eq(b.Issue4325, 0);
-		b.setIssue4325(10);
-		eq(b.Issue4325, 10);
-	}
-
-	// -net-lib tests
-	function testHaxeKeywords()
-	{
-		eq(Base._inline, 42);
-		eq(Base.callback, 43);
-		eq(Base._cast, 44);
-		eq(Base._untyped, 45);
-		Base._untyped = 40;
-		eq(Base._untyped, 40);
-	}
-
-	function testIssue3474()
-	{
-		var a:IEditableTextBuffer = cast null;
-		eq(a,null);
-		var didRun = false;
-		try
-		{
-			eq(a.Property, "should not succeed");
-		}
-		catch(e:Dynamic)
-		{
-			didRun = true;
-		}
-
-		t(didRun);
-	}
-
-	function testLowerCase()
-	{
-		var l = new LowerCaseClass();
-		t(l.works);
-	}
-
-	function testGetItem()
-	{
-		var b = new Base();
-		eq(b[1], 20);
-		eq(b.get_Item(2,3), 6);
-		var dyn:Dynamic = b;
-		eq(dyn[1], 20);
-		eq(dyn.get_Item(2,3), 6);
-
-		var b:Base = new Base_InnerClass();
-		eq(b[1], 20);
-		eq(b.get_Item(2,3), 6);
-		var dyn:Dynamic = b;
-		eq(dyn[1], 20);
-		eq(dyn.get_Item(2,3), 6);
-	}
-
-	// function testOptional()
-	// {
-	// 	eq(new Base().optional(), 420);
-	// 	eq(new Base().optional(10), 100);
-	// }
-
-	function testProp()
-	{
-		var b = new Base();
-		eq(b.prop, "SomeValue");
-		var dyn:Dynamic = b;
-		eq(dyn.prop, "SomeValue");
-	}
-
-#if unsafe
-	@:unsafe function testBoxedPointer()
-	{
-		var ptr:Pointer<Int> = cast cs.system.runtime.interopservices.Marshal.AllocHGlobal(10 * 4).ToPointer();
-		ptr[0] = 0;
-		eq(ptr[0],0);
-		ptr[0] = -1;
-		eq(ptr[0],-1);
-
-		var dyn:Dynamic = ptr;
-		ptr = null;
-		ptr = dyn;
-		eq(ptr[0],-1);
-
-		var arr = [ptr];
-		eq(arr[0][0], -1);
-
-		var captured = ptr;
-		function test(v:Int) captured[0] = v;
-
-		test(0xFFFF);
-		eq(ptr[0],0xFFFF);
-		eq(captured[0],0xFFFF);
-		t(ptr == captured);
-
-		var other:Pointer<Pointer<Int>> = cast cs.system.runtime.interopservices.Marshal.AllocHGlobal(10 * 4).ToPointer();
-		other[0] = ptr;
-		eq(other[0][0], 0xFFFF);
-		var captured = other;
-		function test(v:Int) captured[0][0] = v;
-		test(-1);
-		eq(other[0][0],-1);
-		eq(captured[0][0],-1);
-		t(other == captured);
-
-		function test2(p:Pointer<Pointer<Int>>, v:Int)
-			p[0][0]=v;
-
-		test2(other,-2);
-		eq(other[0][0],-2);
-	}
-
-	@:unsafe function testPointerAccess()
-	{
-		var struct = new SomeStruct(10,20);
-		eq(10,struct.int);
-		eq(20.0,struct.float);
-
-		var addr = cs.Lib.addressOf(struct);
-		eq(10,addr.acc.int);
-		eq(20.0,addr.acc.float);
-		addr.acc.int = 22;
-		eq(22,addr.acc.int);
-		eq(22,struct.int);
-
-		addr.acc.float = 42.42;
-		eq(42.42,addr.acc.float);
-		eq(42.42,struct.float);
-
-		var arr = new cs.NativeArray<SomeStruct>(10);
-		cs.Lib.fixed({
-			var arrptr = cs.Lib.pointerOfArray(arr);
-			for (i in 0...10)
-			{
-				(arrptr + i).acc.int = i;
-				(arrptr + i).acc.float = i + i / 10;
-			}
-			var ptr = arrptr;
-			for (i in 0...10)
-			{
-				eq(arr[i].int,i);
-				eq(arr[i].float,i + i / 10);
-
-				eq((arrptr + i).acc.int, i);
-				eq((arrptr + i).acc.float, i + i / 10);
-
-				ptr.acc.int = i *2;
-				ptr.acc.float = (i + i / 10) * 2;
-				ptr++;
-			}
-			for (i in 0...10)
-			{
-				eq(arr[i].int,i*2);
-				eq(arr[i].float,(i + i / 10)*2);
-
-				eq((arrptr + i).acc.int, i*2);
-				eq((arrptr + i).acc.float, (i + i / 10)*2);
-			}
-		});
-	}
-#end
-
-	function testTypes()
-	{
-		eq(Base.charTest(cast 10), cast 10);
-		eq(Base.byteTest(cast 10), cast 10);
-	}
-
-	function testInnerClass()
-	{
-		//-java-lib should be able to detect inner classes on import
-		var i = new Base_InnerClass();
-		eq(10,i.nameClash());
-
-		var i2 = new Base_InnerClass_InnerInnerClass();
-		t(true);
-
-		var noPack:NoPackage = new NoPackage();
-		t(noPack.isWorking);
-		t(noPack.b != null);
-		t(noPack.b.isReallyWorking);
-
-		var noPack2 = new NoPackage.NoPackage_NoPackInner();
-		t(noPack2.isReallyWorking);
-	}
-
-	function testGenerics()
-	{
-		// t(haxe.test.GenericHelper.staticTypedGeneric(new Base_InnerClass_InnerInnerClass()) != null);
-
-		var helper = new haxe.test.GenericHelper();
-
-		var val = new Base_InnerClass();
-		var g1 = new haxe.test.Generic1_1(val);
-		g1.complexTypeParameterOfTypeParameter(new Base_InnerClass_InnerInnerClass());
-		//if no compile-time error, we're fine!
-		t(true);
-	}
-
-	function testDelegates()
-	{
-		var run = false;
-		var v:haxe.test.VoidVoid = function () run = true;
-		f(run);
-		v.Invoke();
-		t(run);
-		f(didRun);
-		v = doRun;
-		v.Invoke();
-		t(didRun);
-
-		run = false;
-		var someFunc = function() run = true;
-		f(run);
-		v = someFunc;
-		f(run);
-		v.Invoke();
-		t(run);
-
-		var someFunc2 = someFunc;
-		var getFun = function() return someFunc2;
-		run = false;
-		f(run);
-		v = { var x = "complex body"; getFun(); };
-		f(run);
-		v.Invoke();
-		t(run);
-
-		//var dyn:Dynamic = v;
-		//t((dyn is haxe.test.VoidVoid));
-	}
-
-	var didRun = false;
-	function doRun()
-	{
-		didRun = true;
-	}
-
-	function testOverloadOverride()
-	{
-		var c = new haxe.test.MyClass();
-		eq(42,c.SomeProp);
-		eq(42,c.SomeProp2);
-
-		var c = new TestMyClass();
-		c.normalOverload(true);
-		t(c.boolCalled);
-		c.normalOverload(10);
-		t(c.intCalled);
-		c.normalOverload(haxe.Int64.ofInt(0));
-		t(c.int64Called);
-		c.normalOverload("");
-		t(c.stringCalled);
-		c.normalOverload({});
-		t(c.dynamicCalled);
-		eq(21,c.SomeProp);
-		t(c.getCalled);
-		eq(21,c.SomeProp2);
-
-		var c = new TestMyClass("");
-		t(c.alternativeCtorCalled);
-		var b:haxe.test.MyClass = c;
-		b.normalOverload(true);
-		t(c.boolCalled);
-		b.normalOverload(10);
-		t(c.intCalled);
-		b.normalOverload(haxe.Int64.ofInt(0));
-		t(c.int64Called);
-		b.normalOverload("");
-		t(c.stringCalled);
-		b.normalOverload({});
-		t(c.dynamicCalled);
-		eq(21,c.SomeProp);
-		t(c.getCalled);
-		eq(21,c.SomeProp2);
-	}
-
-	function testEnumFlags()
-	{
-		var flags = new Flags(TFA) | TFC;
-		t(flags.has(TFA));
-		t(flags.has(TFC));
-		f(flags.has(TFB));
-		f(flags.has(TFD));
-		flags = new Flags();
-		f(flags.has(TFA));
-		f(flags.has(TFB));
-		f(flags.has(TFC));
-		f(flags.has(TFD));
-
-		flags |= TFB;
-		t(flags.has(TFB));
-		eq(flags & TFB,flags);
-		flags |= TFA;
-
-		f(flags.has(TFD));
-		t(flags.hasAny(new Flags(TFD) | TFB));
-		f(flags.hasAny(new Flags(TFD) | TFC));
-		f(flags.hasAll(new Flags(TFD) | TFB));
-		t(flags.hasAll(new Flags(TFB)));
-		t(flags.hasAll(new Flags(TFA) | TFB));
-
-		var flags = new Flags(TFBA) | TFBC;
-		t(flags.has(TFBA));
-		t(flags.has(TFBC));
-		f(flags.has(TFBB));
-		f(flags.has(TFBD));
-		flags = new Flags();
-		f(flags.has(TFBA));
-		f(flags.has(TFBB));
-		f(flags.has(TFBC));
-		f(flags.has(TFBD));
-
-		flags |= TFBB;
-		t(flags.has(TFBB));
-		eq(flags & TFBB,flags);
-		flags |= TFBA;
-
-		f(flags.has(TFBD));
-		t(flags.hasAny(new Flags(TFBD) | TFBB));
-		f(flags.hasAny(new Flags(TFBD) | TFBC));
-		f(flags.hasAll(new Flags(TFBD) | TFBB));
-		t(flags.hasAll(new Flags(TFBB)));
-		t(flags.hasAll(new Flags(TFBA) | TFBB));
-	}
-
-	function testEnum()
-	{
-		var e = TEnum.TA;
-		switch(e)
-		{
-			case TA:
-				t(true);
-			case _:
-				t(false);
-		}
-		eq("TA",Type.enumConstructor(e));
-
-		eq(Type.enumIndex(getTA()), Type.enumIndex(TEnum.TA));
-		eq(Type.enumIndex(getTVA()), Type.enumIndex(TEnumWithValue.TVA));
-		eq(Type.enumIndex(getTBA()), Type.enumIndex(TEnumWithBigValue.TBA));
-
-		eq(Type.enumIndex(getTVB()), Type.enumIndex(TEnumWithValue.TVB));
-		eq(Type.enumIndex(getTBB()), Type.enumIndex(TEnumWithBigValue.TBB));
-		eq(Type.enumIndex(getTB()), Type.enumIndex(TEnum.TB));
-
-		eq(Type.enumIndex(getTC()), Type.enumIndex(TEnum.TC));
-		eq(Type.enumIndex(getTVC()), Type.enumIndex(TEnumWithValue.TVC));
-		eq(Type.enumIndex(getTBC()), Type.enumIndex(TEnumWithBigValue.TBC));
-
-		eq(Type.enumIndex(getTVD()), Type.enumIndex(TEnumWithValue.TVD));
-		eq(Type.enumIndex(getTBD()), Type.enumIndex(TEnumWithBigValue.TBD));
-
-		checkEnum(TEnum,TEnum.TA);
-		checkEnum(TEnum,TEnum.TB);
-		checkEnum(TEnum,TEnum.TC);
-
-		checkEnum(TEnumWithValue,TEnumWithValue.TVA);
-		checkEnum(TEnumWithValue,TEnumWithValue.TVB);
-		checkEnum(TEnumWithValue,TEnumWithValue.TVC);
-		checkEnum(TEnumWithValue,TEnumWithValue.TVD);
-
-		checkEnum(TEnumWithBigValue,TEnumWithBigValue.TBA);
-		checkEnum(TEnumWithBigValue,TEnumWithBigValue.TBB);
-		checkEnum(TEnumWithBigValue,TEnumWithBigValue.TBC);
-		checkEnum(TEnumWithBigValue,TEnumWithBigValue.TBD);
-
-		//issue #2308
-		var fn = getEnumValue;
-		eq(0x100, Reflect.callMethod(null, fn, [TEnumWithValue.TVA]));
-
-		var e = getTVA();
-		switch(e) {
-			case TVA if (getEnumValue(e) == getEnumValue(getTVA())):
-				t(true);
-			case _:
-				t(false);
-		}
-
-		var e = getTVB();
-		switch(e) {
-			case TVA:
-				t(false);
-			case TVB if (getEnumValue(e) != getEnumValue(getTVA())):
-				t(true);
-			case _:
-				t(false);
-		}
-	}
-
-	static function getEnumValue(e:TEnumWithValue):Int
-	{
-		return cast e;
-	}
-
-	private static function getArray(arr:cs.system.Array)
-	{
-		return [ for (i in 0...arr.Length) arr.GetValue(i) ];
-	}
-
-	function checkEnum<T : EnumValue>(e:Enum<T>,v:T,?pos:haxe.PosInfos)
-	{
-		var idx = Type.enumIndex(v);
-		eq(v,Type.createEnumIndex(e,idx),pos);
-	}
-
-	function getTA() return TEnum.TA;
-	function getTVA() return TEnumWithValue.TVA;
-	function getTBA() return TEnumWithBigValue.TBA;
-	function getTB() return TEnum.TB;
-	function getTVB() return TEnumWithValue.TVB;
-	function getTBB() return TEnumWithBigValue.TBB;
-	function getTC() return TEnum.TC;
-	function getTVC() return TEnumWithValue.TVC;
-	function getTBC() return TEnumWithBigValue.TBC;
-	function getTVD() return TEnumWithValue.TVD;
-	function getTBD() return TEnumWithBigValue.TBD;
-
-	@:skipReflection private function refTest(i:cs.Ref<Int>):Void
-	{
-		i *= 2;
-	}
-
-	@:skipReflection private function refTestAssign(i:cs.Ref<Int>):Void
-	{
-		i = 2;
-	}
-
-	@:skipReflection private function outTest(out:cs.Out<Int>, x:Int):Void
-	{
-		out = x * 2;
-	}
-
-	// test for https://github.com/HaxeFoundation/haxe/issues/2528
-	public function testDynObjectSetField()
-	{
-		var a:Dynamic = {};
-		a.status = 10;
-		var b:{status:Int} = a;
-		b.status = 15;
-
-		eq(a, b);
-		eq(Reflect.fields(a).length, 1);
-		eq(Reflect.fields(b).length, 1);
-		eq(a.status, 15);
-		eq(b.status, 15);
-	}
-
-	public function testRef()
-	{
-		var i = 10;
-		refTestAssign(i);
-		eq(i, 2);
-
-		var i = 10;
-		refTest(i);
-		eq(i, 20);
-
-		var cl:NativeClass = new HxClass();
-		cl.refTest(i);
-		eq(i, 80);
-
-		cl.test = 100;
-		cl.refTest(cl.test);
-		eq(cl.test,400);
-
-		i = 10;
-		var cl = new haxe.test.MyClass();
-		cl.refTest(i);
-		eq(i,420);
-	}
-
-	public function testOut()
-	{
-		var i = 0;
-		outTest(i, 10);
-		eq(i, 20);
-
-		var cl:NativeClass = new HxClass();
-		cl.outTest(i, 10);
-		eq(i, 40);
-
-		cl.test = 20;
-		cl.outTest(cl.test, 10);
-		eq(cl.test,40);
-
-		var cl = new haxe.test.MyClass();
-		cl.outTest(i);
-		eq(i,42);
-	}
-
-	public function testChecked()
-	{
-		exc(function()
-				{
-					cs.Lib.checked({
-						var x = 1000;
-						while(true)
-					{
-						x *= x;
-					}
-					});
-				});
-	}
-
-	public function testUncheckedAttribute()
-	{
-		var cls = cs.Lib.toNativeType( TestMyClass ),
-				attribType = cs.Lib.toNativeType( cs.system.componentmodel.DescriptionAttribute );
-		var attrib:cs.system.componentmodel.DescriptionAttribute = cast cs.system.Attribute.GetCustomAttribute(cls,attribType,true);
-		t(attrib != null);
-		eq("MyClass Description", attrib.Description);
-
-		attrib = cast cs.system.Attribute.GetCustomAttribute(cls.GetMethod("argumentDescription"), attribType,true);
-		t(attrib != null);
-		eq("Argument description", attrib.Description);
-
-		attrib = cast cs.system.Attribute.GetCustomAttribute(cls.GetMethod("argumentDescription").GetParameters()[0], attribType,true);
-		t(attrib != null);
-		eq("Type description test", attrib.Description);
-	}
-
-	public function testEvents()
-	{
-		var x = new haxe.test.MyClass();
-		var hasFired = false;
-		f(hasFired);
-		var fn:haxe.test.VoidVoid = function() hasFired = true;
-		x.add_voidvoid( fn );
-		f(hasFired);
-		x.dispatch();
-		t(hasFired);
-		hasFired = false;
-		x.dispatch();
-		t(hasFired);
-		hasFired = false;
-		x.remove_voidvoid( fn );
-		x.dispatch();
-		f(hasFired);
-
-		var hasFired = false;
-		f(hasFired);
-		var fn:haxe.test.VoidVoid = function() hasFired = true;
-		haxe.test.MyClass.add_voidvoid2( fn );
-		f(hasFired);
-		haxe.test.MyClass.dispatch2();
-		t(hasFired);
-		hasFired = false;
-		haxe.test.MyClass.dispatch2();
-		t(hasFired);
-		hasFired = false;
-		haxe.test.MyClass.remove_voidvoid2( fn );
-		haxe.test.MyClass.dispatch2();
-		f(hasFired);
-	}
-
-	function testHaxeEvents() {
-		var c = new EventClass();
-		var sum = 0;
-		var cb:Action_1<Int> = function(x) sum += x;
-		c.add_Event1(cb);
-		c.invokeEvent1(1);
-		c.invokeEvent1(2);
-		c.remove_Event1(cb);
-		c.invokeEvent1(3);
-		eq(sum, 3);
-
-		c.add_Event2(cb);
-		eq(c.event2Counter, 1);
-		c.remove_Event2(cb);
-		eq(c.event2Counter, 0);
-
-		sum = 0;
-		EventClass.add_SEvent1(cb);
-		EventClass.invokeSEvent1(1);
-		EventClass.invokeSEvent1(2);
-		EventClass.remove_SEvent1(cb);
-		EventClass.invokeSEvent1(3);
-		eq(sum, 3);
-
-		EventClass.add_SEvent2(cb);
-		eq(EventClass.sEvent2Counter, 1);
-		EventClass.remove_SEvent2(cb);
-		eq(EventClass.sEvent2Counter, 0);
-
-		var i:IEventIface = c;
-		sum = 0;
-		i.add_IfaceEvent1(cb);
-		c.invokeIfaceEvent1(1);
-		c.invokeIfaceEvent1(2);
-		i.remove_IfaceEvent1(cb);
-		c.invokeIfaceEvent1(3);
-		eq(sum, 3);
-
-		i.add_IfaceEvent2(cb);
-		eq(c.ifaceEvent2Counter, 1);
-		i.remove_IfaceEvent2(cb);
-		eq(c.ifaceEvent2Counter, 0);
-	}
-
-#if unsafe
-
-	@:unsafe public function testUnsafe()
-	{
-		var x:cs.NativeArray<Int> = new cs.NativeArray(10);
-		cs.Lib.fixed({
-			var p = cs.Lib.pointerOfArray(x);
-			for (i in 0...10)
-		{
-			p[0] = i;
-			p = p.add(1);
-		}
-		});
-
-		cs.Lib.fixed( {
-			var p = cs.Lib.pointerOfArray(x);
-			for (i in 0...10)
-		{
-			eq(p[i], i);
-		}
-		});
-
-		var x:Int = 0;
-		var addr = cs.Lib.addressOf(x);
-		eq(cs.Lib.valueOf(addr), 0);
-		eq(addr[0], 0);
-		addr[0] = 42;
-		eq(cs.Lib.valueOf(addr), 42);
-		eq(addr[0], 42);
-		eq(x, 42);
-
-
-	}
-
-#end
-
-	// test these because C# generator got a special filter for these expressions
-	public function testNullConstEq()
-	{
-		var a:Null<Int> = 10;
-		f(a == null);
-		f(null == a);
-		t(a != null);
-		t(null != a);
-	}
-
-#end
-}
-
-@:nativeGen private class NativeClass
-{
-	public var test:Int;
-	public function outTest(out:cs.Out<Int>, x:Int):Void
-	{
-		out = x * 2;
-	}
-
-	public function refTest(i:cs.Ref<Int>):Void
-	{
-		i *= 2;
-	}
-}
-
-@:strict(DescriptionAttribute("Type description test"))
-typedef StringWithDescription = String;
-
-private class HxClass extends NativeClass
-{
-
-	public function new()
-	{
-
-	}
-
-	//here it would normally fail due to the added fast reflection field
-	override public function outTest(out:cs.Out<Int>, x:Int):Void
-	{
-		out = x * 4;
-	}
-
-	override public function refTest(i:cs.Ref<Int>):Void
-	{
-		super.refTest(i);
-		i *= 2;
-	}
-}
-
-@:strict(cs.system.componentmodel.DescriptionAttribute("MyClass Description"))
-private class TestMyClass extends haxe.test.MyClass
-{
-	@:overload public function new()
-	{
-		super();
-	}
-
-	@:overload public function new(str:String)
-	{
-		super();
-		alternativeCtorCalled = true;
-	}
-
-	public var alternativeCtorCalled:Bool;
-	public var boolCalled:Bool;
-	public var intCalled:Bool;
-	public var int64Called:Bool;
-	public var stringCalled:Bool;
-	public var dynamicCalled:Bool;
-	public var getCalled:Bool;
-
-	@:strict(DescriptionAttribute("Argument description"))
-	@:keep public function argumentDescription(arg:StringWithDescription)
-	{
-	}
-
-	@:overload override public function normalOverload(b:Bool):Void
-	{
-		this.boolCalled = true;
-	}
-
-	@:overload override public function normalOverload(i:Int):Void
-	{
-		this.intCalled = true;
-	}
-
-	@:overload override public function normalOverload(i64:haxe.Int64):Void
-	{
-		this.int64Called = true;
-	}
-
-	@:overload override public function normalOverload(str:String):Void
-	{
-		this.stringCalled = true;
-	}
-
-	@:overload override public function normalOverload(dyn:Dynamic):Void
-	{
-		this.dynamicCalled = true;
-	}
-
-	@:overload override public function get_SomeProp():Int
-	{
-		getCalled = true;
-		return 21;
-	}
-
-	@:overload override public function get_SomeProp2():Int
-	{
-		return Std.int(super.get_SomeProp2() / 2);
-	}
-}
-
-@:struct @:nativeGen private class SomeStruct
-{
-	public var int:Int;
-	public var float:Float;
-
-	public function new(i,f)
-	{
-		this.int = i;
-		this.float = f;
-	}
-}
-
-private interface IEventIface {
-	@:keep
-	@:event private var IfaceEvent1:Action_1<Int>;
-	function add_IfaceEvent1(cb:Action_1<Int>):Void;
-	function remove_IfaceEvent1(cb:Action_1<Int>):Void;
-
-	@:keep
-	@:event private var IfaceEvent2:Action_1<Int>;
-	function add_IfaceEvent2(cb:Action_1<Int>):Void;
-	function remove_IfaceEvent2(cb:Action_1<Int>):Void;
-}
-
-@:publicFields
-private class EventClass implements IEventIface {
-	function new() {}
-
-	@:event private var Event1:Action_1<Int>;
-	function add_Event1(cb:Action_1<Int>) {}
-	function remove_Event1(cb:Action_1<Int>) {}
-	function invokeEvent1(i) if (Event1 != null) Event1.Invoke(i);
-
-	@:keep
-	@:event private var Event2:Action_1<Int>;
-	var event2Counter = 0;
-	function add_Event2(cb:Action_1<Int>) event2Counter++;
-	function remove_Event2(cb:Action_1<Int>) event2Counter--;
-
-	@:event private static var SEvent1:Action_1<Int>;
-	static function add_SEvent1(cb:Action_1<Int>) {}
-	static function remove_SEvent1(cb:Action_1<Int>) {}
-	static function invokeSEvent1(i) if (SEvent1 != null) SEvent1.Invoke(i);
-
-	@:keep
-	@:event private static var SEvent2:Action_1<Int>;
-	static var sEvent2Counter = 0;
-	static function add_SEvent2(cb:Action_1<Int>) sEvent2Counter++;
-	static function remove_SEvent2(cb:Action_1<Int>) sEvent2Counter--;
-
-	@:event private var IfaceEvent1:Action_1<Int>;
-	function add_IfaceEvent1(cb:Action_1<Int>) {}
-	function remove_IfaceEvent1(cb:Action_1<Int>) {}
-	function invokeIfaceEvent1(i) if (IfaceEvent1 != null) IfaceEvent1.Invoke(i);
-
-	@:event private var IfaceEvent2:Action_1<Int>;
-	var ifaceEvent2Counter = 0;
-	function add_IfaceEvent2(cb:Action_1<Int>) ifaceEvent2Counter++;
-	function remove_IfaceEvent2(cb:Action_1<Int>) ifaceEvent2Counter--;
-}

+ 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 && !cs && !lua)
+	#if (!cpp && !java && !lua)
 	public function testProperty2() {
 		var a = new RemovePropertyKeepAccessors();
 		a.test = 3;

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

@@ -25,8 +25,6 @@ private class CustomNativeException extends js.lib.Error {}
 private class CustomNativeException extends flash.errors.Error {}
 #elseif java
 private class CustomNativeException extends java.lang.RuntimeException {}
-#elseif cs
-private class CustomNativeException extends cs.system.Exception {}
 #elseif python
 private class CustomNativeException extends python.Exceptions.Exception {}
 #elseif (lua || eval || neko || hl || cpp)

+ 1 - 8
tests/unit/src/unit/TestMain.hx

@@ -27,10 +27,6 @@ function main() {
 
 	var verbose = #if (cpp || neko || php) Sys.args().indexOf("-v") >= 0 #else false #end;
 
-	#if cs // "Turkey Test" - Issue #996
-	cs.system.threading.Thread.CurrentThread.CurrentCulture = new cs.system.globalization.CultureInfo('tr-TR');
-	cs.Lib.applyCultureChanges();
-	#end
 	#if !macro
 	trace("Generated at: " + HelperMacros.getCompilationDate());
 	#end
@@ -75,9 +71,6 @@ function main() {
 		#if !no_pattern_matching
 		new TestMatch(),
 		#end
-		#if cs
-		new TestCSharp(),
-		#end
 		#if java
 		new TestJava(),
 		#end
@@ -93,7 +86,7 @@ function main() {
 		#if php
 		new TestPhp(),
 		#end
-		#if (java || cs)
+		#if java
 		new TestOverloads(),
 		#end
 		new TestOverloadsForEveryone(),

+ 2 - 4
tests/unit/src/unit/TestMisc.hx

@@ -1,4 +1,4 @@
-package unit;
+package unit;
 import unit.MyClass;
 
 class MyDynamicClass {
@@ -283,11 +283,9 @@ class TestMisc extends Test {
 		// check inherited dynamic method
 		var inst = new MyOtherDynamicClass(0);
 		var add = inst.add;
-		#if (!cs && !java) //see https://groups.google.com/d/msg/haxedev/TUaUykoTpq8/Q4XwcL4UyNUJ
 		eq( inst.add(1,2), 13 );
 		eq( inst.add.bind(1)(2), 13 );
 		eq( add(1,2), 13 );
-		#end
 
 		// check static dynamic
 		eq( MyDynamicClass.staticDynamic(1,2), 13 );
@@ -384,7 +382,7 @@ class TestMisc extends Test {
 		eq( opt2().x, 5 );
 		eq( opt2().y, "hello" );
 
-		#if !(flash || cpp || cs || java)
+		#if !(flash || cpp || java)
 		eq( opt2(null, null).x, 5 );
 		#end
 		eq( opt2(0, null).y, "hello" );

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

@@ -119,7 +119,6 @@ class TestNullCoalescing extends Test {
 			eq(arr[i], v);
 
 		final arr = [];
-		#if !cs
 		function item(n) {
 			arr.push(n);
 			return null;
@@ -128,7 +127,6 @@ class TestNullCoalescing extends Test {
 		eq(arr.length, 3);
 		for (i => v in [1, 2, 3])
 			eq(arr[i], v);
-		#end
 
 		var b:B = cast null;
 		var c:C = cast null;

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

@@ -151,12 +151,12 @@ class TestOverloads extends Test
 		eq(Primitives.prim(nf, null), "Null<Float>");
 		var dyn:Dynamic = null;
 		eq(Primitives.prim(dyn), "Dynamic");
-#if (java || cs)
+		#if java
 		var s:Single = 1.0;
 		eq(Primitives.prim(s), "Single" );
 		var ns:Null<Single> = null;
 		eq(Primitives.prim(ns, null), "Null<Single>");
-#end
+		#end
 	}
 
 	//former java tests. only exact types
@@ -251,7 +251,7 @@ private class Primitives
 		return "Null<Int>";
 	}
 
-#if (java || cs)
+	#if java
 	overload public static function prim(v:Single):String
 	{
 		return "Single";
@@ -266,7 +266,7 @@ private class Primitives
 	{
 		return "Null<Single>";
 	}
-#end
+	#end
 }
 
 private interface I0

+ 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 || cs || hl) 0 #else null #end );
-		eq( i.intValue, #if (flash || cpp || java || cs || hl) 0 #else null #end );
+		eq( i.get(), #if (flash || cpp || java || hl) 0 #else null #end );
+		eq( i.intValue, #if (flash || cpp || java || 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"]);

+ 2 - 4
tests/unit/src/unit/TestSyntaxModule.hx

@@ -6,12 +6,10 @@ import js.Syntax;
 import php.Syntax;
 #elseif python
 import python.Syntax;
-#elseif cs
-import cs.Syntax;
 #end
 
 class TestSyntaxModule extends Test {
-#if (php || js || python || cs)
+#if (php || js || python)
 	function testCode() {
 		var i1 = 1;
 		var i2 = 2;
@@ -53,7 +51,7 @@ class TestSyntaxModule extends Test {
 	#end
 #end
 
-#if (js || cs)
+#if js
 	function testPlainCode() {
 		var s = Syntax.plainCode('"{0}"');
 		eq('{0}', s);

+ 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 || cs)
+		#if !java
 		// pcc.memberOverload("foo", "bar");
 		#end
 		// TODO: this should not fail (overload accepts)

+ 2 - 2
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 || cs || java || python || flash)
+#if (js || lua || php || java || python || flash)
 
 class Issue10143 extends Test {
 	function test1() {
@@ -31,4 +31,4 @@ private abstract AObj({field:String}) from {field:String} {
 
 #else
 class Issue10143 extends Test {}
-#end
+#end

+ 0 - 5
tests/unit/src/unit/issues/Issue10145.hx

@@ -1,7 +1,5 @@
 package unit.issues;
 
-// whatever
-#if !erase_generics
 private interface I<T> {
 	function get():T;
 }
@@ -30,14 +28,11 @@ private abstract A<T>(I<T>) {
 		return this.get();
 	}
 }
-#end
 
 class Issue10145 extends unit.Test {
-	#if !erase_generics
 	function test() {
 		var x = new A(10);
 		var y:Int = x;
 		eq(10, y);
 	}
-	#end
 }

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

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

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

@@ -7,11 +7,9 @@ class Issue10761 extends Test {
 		return args;
 	}
 
-	#if !erase_generics
 	function test() {
 		aeq([0, 1], rest(0, 1)); // works
 		aeq([0, 1], rest(...[0, 1])); // works
 		aeq([0, 1], rest(...[for (i in 0...2) i])); // errors
 	}
-	#end
 }

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

@@ -4,7 +4,6 @@ import haxe.Rest;
 import utest.Assert;
 
 class Issue10906 extends Test {
-	#if !erase_generics
 	function test() {
 		var a:Array<Any> = new Array<Any>();
 		a.push(1);
@@ -16,5 +15,4 @@ class Issue10906 extends Test {
 		eq(1, r[0]);
 		eq(3, r.length);
 	}
-	#end
 }

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

@@ -34,7 +34,7 @@ class ExampleGeneric<T> extends ExampleAbstract<Array<T>> {
 }
 
 class Issue11010 extends Test {
-	#if (!cs && !cppia)
+	#if (!cppia)
 	function test() {
 		var test = new ExampleGeneric<Int>([1, 2, 3, 4]);
 		utest.Assert.same([1, 2, 3, 4], test.value);

+ 6 - 8
tests/unit/src/unit/issues/Issue1925.hx

@@ -1,18 +1,16 @@
 package unit.issues;
 #if java
 import java.NativeArray;
-#elseif cs
-import cs.NativeArray;
 #end
 
 class Issue1925 extends Test {
-#if (java || cs)
-		static var d2:Array<NativeArray<Int>>;
+#if java
+	static var d2:Array<NativeArray<Int>>;
 	function test() {
-			var d = new NativeArray<Int>(10);
-			d2 = [d];
-			d[0] = 10;
-			eq(d2[0][0], 10);
+		var d = new NativeArray<Int>(10);
+		d2 = [d];
+		d[0] = 10;
+		eq(d2[0][0], 10);
 	}
 #end
 }

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

@@ -1,15 +1,12 @@
 package unit.issues;
-#if cs
-import cs.NativeArray;
-import cs.Lib;
-#elseif java
+#if java
 import java.NativeArray;
 import java.Lib;
 #end
 
 class Issue2049 extends unit.Test
 {
-#if (java || cs)
+#if java
 	public function test()
 	{
 		var arr = [ 1., 1., 1., 0.5 ].map( function( n: Float ): Single { return n; });
@@ -20,5 +17,4 @@ class Issue2049 extends unit.Test
 		eq(.5,scaleFactors[3]);
 	}
 #end
-
 }

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

@@ -1,7 +1,7 @@
 package unit.issues;
 
 class Issue2688 extends Test {
-#if (java || cs)
+#if java
   public function test() {
     var x = 0;
     var b = new B(function() {
@@ -13,7 +13,7 @@ class Issue2688 extends Test {
 #end
 }
 
-#if (java || cs)
+#if java
 @: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 (cs || java)
+#if java
 	public function testClass()
 	{
 		var tc = new TestClass();

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

@@ -25,11 +25,11 @@ class Issue2776 extends Test {
 		}));
 	}
 
-	static function getClassT<T>():#if cs Class<T> #else Null<Class<T>> #end {
+	static function getClassT<T>():Null<Class<T>> {
 		return (null : Class<T>);
 	}
 
-	static function getEnumT<T>():#if cs Enum<T> #else Null<Enum<T>> #end {
+	static function getEnumT<T>():Null<Enum<T>> {
 		return (null : Enum<T>);
 	}
 }

+ 1 - 4
tests/unit/src/unit/issues/Issue2927.hx

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

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

@@ -5,7 +5,7 @@ class Issue3138 extends Test
 	public function test()
 	{
 		var a = new B();
-#if (java || cs)
+#if java
 		var b = new D();
 #end
 		noAssert();
@@ -22,7 +22,7 @@ private class B extends A {
 	}
 }
 
-#if (cs || java)
+#if java
 
 private class C {
 	public function new(a) {}

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

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

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

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

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

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

+ 0 - 29
tests/unit/src/unit/issues/Issue3383.hx

@@ -1,29 +0,0 @@
-package unit.issues;
-
-class Issue3383 extends Test {
-#if cs
-	function test() {
-		var i:Int = cast null,
-				f:Float = cast null,
-				s:Single = cast null,
-				i64:haxe.Int64 = cast null,
-				span:cs.system.TimeSpan = null,
-				ui:UInt = cast null,
-				n:cs.system.Nullable_1<Int> = null;
-
-			#if !(erase_generics && !fast_cast)
-			eq(i, cast null);
-			eq(f, cast null);
-			eq(s, cast null);
-			eq(i64, cast null);
-			eq(span, null);
-			eq(ui, cast null);
-			eq(n, null);
-			#else
-			Sys.stderr().writeString("https://github.com/HaxeFoundation/haxe/issues/5503 pending\n");
-			noAssert();
-			#end
-	}
-#end
-}
-

+ 0 - 4
tests/unit/src/unit/issues/Issue3396.hx

@@ -8,11 +8,7 @@ class Issue3396 extends Test {
 		Reflect.makeVarArgs(f);
 		Reflect.makeVarArgs(f2);
 		var s:String = f([]);
-		#if cs
-		unit.HelperMacros.typedAs(r, (r : String));
-		#else
 		unit.HelperMacros.typedAs(r, (r : Null<String>));
-		#end
 		unit.HelperMacros.typedAs(f2([]), (null : Void));
 	}
 }

+ 0 - 37
tests/unit/src/unit/issues/Issue3558.hx

@@ -1,37 +0,0 @@
-package unit.issues;
-#if cs
-import cs.system.collections.generic.*;
-import cs.system.collections.*;
-#end
-
-class Issue3558 extends Test
-{
-#if cs
-	public function test()
-	{
-		var dict = new Dictionary_2<Int,String>();
-		dict[10] = "11";
-		var e:IDictionaryEnumerator = dict.GetEnumerator();
-		while (e.MoveNext())
-		{
-			eq(e.Key,10);
-			eq(e.Value,"11");
-		}
-		var e = dict.GetEnumerator();
-		while (e.MoveNext())
-		{
-			var cur = e.Current;
-			eq(cur.Key,10);
-			eq(cur.Value,"11");
-		}
-
-		var en = dict.Values.GetEnumerator();
-		while (en.MoveNext())
-		{
-			var cur = en.Current;
-			eq(cur,"11");
-		}
-	}
-#end
-
-}

+ 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 (cs || java) @:overload #end
+#if java @:overload #end
 	public function getName()
 	{
 		return "Base!";
 	}
 
-#if (cs || java)
+#if java
 	@:overload public function getName(s:String)
 	{
 		return 'Base!:$s';
@@ -35,7 +35,7 @@ class Child extends DirectDescendant
 	{
 	}
 
-#if (cs || java) @:overload #end
+#if java @: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 && !cs)
+#if (!java)
 private typedef Single = Float
 #end

+ 1 - 4
tests/unit/src/unit/issues/Issue3637.hx

@@ -17,13 +17,10 @@ class Issue3637 extends Test {
 			a.push(map[key]);
 		}
 		eq(4, a.length);
-		// TODO: some separate issue
-		#if !cs
 		t(Lambda.has(a, "a"));
 		t(Lambda.has(a, "b"));
 		t(Lambda.has(a, 1));
 		t(a.remove(1));
 		t(Lambda.has(a, 1));
-		#end
 	}
-}
+}

+ 1 - 6
tests/unit/src/unit/issues/Issue3639.hx

@@ -30,11 +30,8 @@ class Issue3639 extends Test {
 		MyClass.testStatic(1);
 		MyClass.eachStatic(0...5, function(x) return x);
 
-		#if !cs
-		// https://github.com/HaxeFoundation/haxe/issues/3658
 		hsf(MyClass, "testStatic_Int");
 		hsf(MyClass, "eachStatic_Int_IntIterator");
-		#end
 
 		var t = new MyClass();
 		t.testMember(1, "12");
@@ -42,10 +39,8 @@ class Issue3639 extends Test {
 		var t = new MyClass();
 		t.eachMember(0...5, function(x) return x);
 
-		#if !cs
 		hf(MyClass, "testMember_String");
 		hf(MyClass, "eachMember_IntIterator");
-		#end
 		noAssert();
 	}
-}
+}

+ 0 - 12
tests/unit/src/unit/issues/Issue3771.hx

@@ -1,12 +0,0 @@
-package unit.issues;
-
-class Issue3771 extends Test
-{
-	#if cs
-	public function test()
-	{
-		var arr = [test];
-		eq(arr.indexOf(test),0);
-	}
-	#end
-}

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

@@ -35,7 +35,7 @@ class Issue3826 extends Test {
 		#end
 	}
 
-	#if !((java && !jvm) || cs || flash)
+	#if !(flash)
 	public function testReflect() {
 		eq( Reflect.callMethod(this, get, []), "2/4.25" );
 		eq( Reflect.callMethod(this, get, [5]), "5/4.25" );

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

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

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

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

+ 0 - 12
tests/unit/src/unit/issues/Issue3946.hx

@@ -1,12 +0,0 @@
-package unit.issues;
-
-class Issue3946 extends Test {
-	#if cs
-	function test() {
-		var arr = cs.Lib.arrayAlloc(10);
-		eq(arr.length, 10);
-				arr[0] = 5;
-				eq(arr[0],5);
-	}
-	#end
-}

+ 0 - 40
tests/unit/src/unit/issues/Issue3949.hx

@@ -1,40 +0,0 @@
-package unit.issues;
-
-class Issue3949 extends unit.Test {
-#if cs
-	function test() {
-		var a = new Arr<Issue3949>();
-		a.arr[0] = this;
-		checkCastClass(a.arr[0]);
-
-		var a = new Arr<Int>();
-		a.arr[0] = 10;
-		checkCastInt(10, a.arr[0]);
-
-		var a = new Arr<String>();
-		a.arr[0] = 'hello';
-		checkCastString('hello', a.arr[0]);
-	}
-
-	@:pure(false)
-	function checkCastClass(v:Issue3949) {
-		eq(this, v);
-	}
-
-	@:pure(false)
-	function checkCastInt(v1:Int, v2:Int) {
-		eq(v1, v2);
-	}
-
-	@:pure(false)
-	function checkCastString(v1:String, v2:String) {
-		eq(v1, v2);
-	}
-#end
-}
-#if cs
-private class Arr<T> {
-	public var arr = new cs.NativeArray<T>(1);
-	public function new() {}
-}
-#end

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

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

+ 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 || cs)
+#if java
 		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 || cs)
+#if java
 	@:overload
 #end
 	public function new()
@@ -44,7 +44,7 @@ private class Child extends NativeGen
 		this.b = false;
 	}
 
-#if (java || cs)
+#if java
 	@:overload public function new(i:Float)
 	{
 		super();

+ 0 - 45
tests/unit/src/unit/issues/Issue4045.hx

@@ -1,45 +0,0 @@
-package unit.issues;
-
-class Issue4045 extends Test
-{
-#if cs
-	public function test()
-	{
-		var t = new TestS();
-		t.a = 10;
-		eq(10, t.a);
-	}
-#end
-}
-
-#if cs
-private abstract TestS(TestClass)
-{
-	inline public function new()
-	{
-		this = new TestClass(0);
-	}
-
-	public var a(get,set):Int;
-
-	inline private function get_a()
-	{
-		return this.a;
-	}
-
-	inline private function set_a(v:Int)
-	{
-		return this.a = v;
-	}
-}
-
-@:nativeGen @:struct private class TestClass
-{
-	public var a:Int;
-
-	public function new(av)
-	{
-		this.a = av;
-	}
-}
-#end

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

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

+ 2 - 2
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 || cs || hl) 0 #else null #end;
+		var fieldNull = #if (cpp || flash || java || hl) 0 #else null #end;
 
 		var s1:Struct1 = { x: 12, y: 13 };
 		eq("12 13", s1.get());
@@ -65,4 +65,4 @@ class Issue4526 extends Test {
 		var s4:Struct4 = { y: i++, x: i++, z: i++ };
 		eq("1 0 2", s4.get());
 	}
-}
+}

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

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

+ 0 - 18
tests/unit/src/unit/issues/Issue5110.hx.disabled

@@ -1,18 +0,0 @@
-package unit.issues;
-
-class Issue5110 extends Test {
-	public function test() {
-#if cs
-		var lst:List<Int> = cast new cs.system.collections.generic.List_1<Int>();
-		eq(lst.get_Item(0), 0);
-#end
-	}
-}
-
-#if cs
-private abstract List<T>(cs.system.collections.generic.List_1<T>) {
-    public function get_Item(n:Int):T {
-        return this.get_Item(n);
-    }
-}
-#end

+ 0 - 19
tests/unit/src/unit/issues/Issue5399.hx

@@ -1,19 +0,0 @@
-package unit.issues;
-
-class Issue5399 extends Test {
-#if cs
-  public function test() {
-    var s:Something = null;
-    s.width = 10;
-    eq(s.width, 10);
-  }
-#end
-}
-
-#if cs
-@:keep @:struct private class Something {
-  public var width:Float;
-  public function new() {
-  }
-}
-#end

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

@@ -1,7 +1,7 @@
 package unit.issues;
 
 class Issue5505 extends Test {
-	#if (java || cs)
+  #if java
   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 (cs || java)
+	#if java
 	@:readOnly static var a(default,never):S = "hello";
 
 	function test() {

+ 0 - 10
tests/unit/src/unit/issues/Issue5747.hx

@@ -1,10 +0,0 @@
-package unit.issues;
-
-class Issue5747 extends Test {
-    #if (cs && !erase_generics)
-    function test() {
-        var a = [1,2,3];
-        eq(@:privateAccess a.__a[0], 1);
-    }
-    #end
-}

+ 0 - 12
tests/unit/src/unit/issues/Issue5751.hx

@@ -1,12 +0,0 @@
-package unit.issues;
-
-class Issue5751 extends Test {
-#if cs
-  public function test() {
-    var arr = @:privateAccess (new Array(new cs.NativeArray(10)) : Array<Null<Int>>);
-    eq(arr[0], null);
-    arr[0] = 100;
-    eq(arr[0], 100);
-  }
-#end
-}

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

@@ -2,12 +2,10 @@ package unit.issues;
 import haxe.ds.*;
 #if java
 import java.NativeArray;
-#elseif cs
-import cs.NativeArray;
 #end
 
 class Issue5862 extends Test {
-#if (java || cs)
+#if java
   public function test() {
     var imap = new IntMap();
     imap.set(0, "val1");

+ 0 - 31
tests/unit/src/unit/issues/Issue6039.hx

@@ -1,31 +0,0 @@
-package unit.issues;
-#if cs
-import cs.system.Action_1;
-#end
-
-class Issue6039 extends Test
-{
-	#if cs
-  public function test()
-  {
-    var myStr = null;
-    var c:Callback = function(str) myStr = str;
-    c.invokeIt('test');
-    this.eq(myStr, 'test');
-  }
-  #end
-}
-
-#if cs
-@:keep
-private abstract Callback(cs.system.Action_1<String>) from Action_1<String> to Action_1<String>{
-	function new(f)
-		this = f;
-
-	public function invokeIt(data:String):Void
-		this.Invoke(data);
-
-	@:from static function fromHaxeFunc(foo:String->Void):Callback
-		return new Callback(new Action_1<String>(foo));
-}
-#end

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

@@ -1,11 +1,11 @@
 package unit.issues;
 
 class Issue6145 extends unit.Test {
-	#if (!cs && !php)
+	#if (!php)
 	function test() {
 		var r = ~/(a)/;
 		r.match("a");
 		exc(() -> r.matched(2));
 	}
 	#end
-}
+}

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

@@ -3,7 +3,7 @@ package unit.issues;
 using Reflect;
 
 class Issue6276 extends unit.Test {
-	#if (!java && !cs)
+	#if (!java)
 	function test(){
 		var s = "bar";
 

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

@@ -9,7 +9,7 @@ class Issue6291 extends Test
   }
 }
 
-#if (cs || java)
+#if java
 @:nativeGen @:keep
 #end
 private class BadCode {
@@ -32,4 +32,4 @@ private abstract Dictionary(Map<String, Dynamic>)
     this = new Map();
     this.set('a', 1);
   }
-}
+}

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

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

+ 0 - 10
tests/unit/src/unit/issues/Issue6784.hx

@@ -1,10 +0,0 @@
-package unit.issues;
-
-class Issue6784 extends Test {
-	function test() {
-		#if cs
-		cs.system.Console.BufferHeight;
-		#end
-		noAssert();
-	}
-}

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

@@ -10,7 +10,7 @@ class Issue6871 extends unit.Test {
 
 	function test() {
 		inline function exception(e:Dynamic) {
-			return #if cs e.InnerException.Message #else e #end;
+			return e;
 		}
 
 		try {
@@ -27,4 +27,4 @@ class Issue6871 extends unit.Test {
 			eq(SETTER_ERROR, e);
 		}
 	}
-}
+}

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

@@ -9,7 +9,7 @@ class Issue6942 extends unit.Test {
 		eq(2, 1 - IntEnum);
 
 		//these targets have actual UInt type at runtime
-		#if (flash || cs)
+		#if flash
 		eq(-4294967295, -UIntEnum);
 		eq(2, 1 - UIntEnum);
 		#else
@@ -39,4 +39,4 @@ enum abstract IntTest(Int) from Int to Int {
 
 enum abstract UIntTest(UInt) from UInt to UInt {
 	var UIntEnum = -1;
-}
+}

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

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

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

@@ -1,7 +1,6 @@
 package unit.issues;
 
 class Issue7736 extends Test {
-	#if !cs
 	@:nullSafety
 	function test() {
 		var found = null;
@@ -17,5 +16,4 @@ class Issue7736 extends Test {
 			eq(5, x);
 		}
 	}
-	#end
 }

+ 0 - 25
tests/unit/src/unit/issues/Issue8978.hx

@@ -1,25 +0,0 @@
-package unit.issues;
-
-class Issue8978 extends unit.Test {
-#if cs
-	var classField:cs.types.Int64 = 1;
-	var anon:{field:cs.types.Int64} = {field:1};
-
-	function test() {
-		var local:cs.types.Int64 = 1;
-		var shift = 1;
-
-		classField <<= shift;
-		t(2 == classField);
-		t(1 == classField >> shift);
-
-		anon.field <<= shift;
-		t(2 == anon.field);
-		t(1 == anon.field >> shift);
-
-		local <<= shift;
-		t(2 == local);
-		t(1 == local >> shift);
-	}
-#end
-}

+ 0 - 24
tests/unit/src/unit/issues/Issue8979.hx

@@ -1,24 +0,0 @@
-package unit.issues;
-
-import haxe.Json;
-
-class Issue8979 extends unit.Test {
-#if cs
-	function test() {
-		var d = new DummyStruct();
-		d.hello = 'world';
-		var json = Json.stringify(d);
-		eq('{"hello":"world"}', json);
-		eq('world', Json.parse(json).hello);
-	}
-#end
-}
-
-#if cs
-@:struct
-private class DummyStruct {
-	public var hello:String;
-	public function new() {}
-}
-#end
-

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

@@ -1,6 +1,6 @@
 package unit.issues;
 
-#if (java || cs)
+#if java
 
 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 || cs)
+		#if java
 		var cc = new ConcreteOverloadChild();
 		t(HelperMacros.typeError(new AbstractOverloadParent()));
 
@@ -98,4 +98,4 @@ class Issue9619 extends unit.Test {
 		var atiino:AbstractThatImplementsInterfaceNO = new ConcreteChildThatImplementsNO();
 		t(atiino.toBeImplemented());
 	}
-}
+}

+ 0 - 18
tests/unit/src/unit/issues/Issue9738.hx

@@ -1,18 +0,0 @@
-package unit.issues;
-
-class Issue9738 extends Test {
-#if cs
-	function test() {
-		try {
-			try {
-				throw new haxe.Exception("Hello");
-			} catch (e) {
-				cs.Lib.rethrow(e);
-			}
-			assert();
-		} catch(e) {
-			noAssert();
-		}
-	}
-#end
-}

+ 0 - 3
tests/unit/src/unit/issues/Issue9744.hx

@@ -74,14 +74,11 @@ class NadakoB {
 }
 
 class Issue9744 extends unit.Test {
-	#if (cs && fast_cast && erase_generics)
-	#else
 	function testAbstractOverAbstractSelf() {
 		var ref = new Ref();
 		eq(1, ref.value = 1);
 		eq(1, ref.value);
 	}
-	#end
 
 	function testUnopProperties() {
 		var vcs = new Vcs(true);

+ 1 - 10
tests/unit/src/unit/issues/Issue9746.hx

@@ -138,12 +138,9 @@ private abstract ValueAbstract(Int) {
 
 class Issue9746 extends unit.Test {
 	function testClass() {
-		#if (cs && fast_cast && erase_generics)
-		#else
 		var ctx = new PropertyClassTestContext();
 		eq(2, ctx.get()[ctx.index++].propGet += 2);
 		ctx.check(1, 1, 0);
-		#end
 
 		var ctx = new PropertyClassTestContext();
 		eq(2, ctx.get()[ctx.index++].propSet += 2);
@@ -154,8 +151,6 @@ class Issue9746 extends unit.Test {
 		ctx.check(1, 1, 1);
 	}
 
-	#if (cs && fast_cast && erase_generics)
-	#else
 	function testClassPrefix() {
 		var ctx = new PropertyClassTestContext();
 		eq(1, ++ctx.get()[ctx.index++].propGet);
@@ -169,7 +164,6 @@ class Issue9746 extends unit.Test {
 		eq(1, ++ctx.get()[ctx.index++].propGetSet);
 		ctx.check(1, 1, 1);
 	}
-	#end
 
 	function testClassPostfix() {
 		var ctx = new PropertyClassTestContext();
@@ -213,10 +207,7 @@ class Issue9746 extends unit.Test {
 		eq(2, getA()[index++].prop += 2);
 		eq(1, index);
 		eq(0 /* value semantics */, a.prop);
-		#if (cs && fast_cast && erase_generics)
-		#else
 		eq(2, a.prop += 2);
 		eq(2, a.prop);
-		#end
 	}
-}
+}

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

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

+ 0 - 30
tests/unit/src/unit/issues/Issue9946.hx

@@ -1,30 +0,0 @@
-package unit.issues;
-
-#if cs
-import cs.system.Attribute;
-import haxe.test.AttrWithNullType;
-import haxe.test.AttrWithNonNullType;
-import haxe.test.MyAttrAttribute;
-#end
-
-class Issue9946 extends unit.Test {
-	#if cs
-	function test() {
-		eq(hasNullArg(cs.Lib.toNativeType(AttrWithNullType)), true);
-		eq(hasNullArg(cs.Lib.toNativeType(AttrWithNonNullType)), false);
-	}
-
-	static function hasNullArg(cls:cs.system.Type):Null<Bool> {
-		var attributes = @:privateAccess new Array(Attribute.GetCustomAttributes(cls));
-
-		for (attr in attributes) {
-			if (Std.isOfType(attr, MyAttrAttribute)) {
-				var a:MyAttrAttribute = cast attr;
-				return a.check;
-			}
-		}
-
-		return null;
-	}
-	#end
-}

+ 2 - 2
tests/unit/src/unitstd/Map.unit.hx

@@ -256,7 +256,7 @@ map["bar"] = map["foo"] = 9;
 map["bar"] == 9;
 map["foo"] == 9;
 
-#if !(java || cs)
+#if !java
 ['' => ''].keys().next() == '';
 ['' => ''].iterator().next() == '';
 [2 => 3].keys().next() == 2;
@@ -269,7 +269,7 @@ var map:Map<String, Int>;
 HelperMacros.typedAs((null : Map<String, Int>), map = []);
 HelperMacros.typeError(map[1] = 1) == true;
 
-#if !(java || cs)
+#if !java
 ['' => ''].keyValueIterator().next().key == '';
 ['' => ''].keyValueIterator().next().value == '';
 [2 => 3].keyValueIterator().next().key == 2;

+ 1 - 1
tests/unit/src/unitstd/Type.unit.hx

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

+ 0 - 2
tests/unit/src/unitstd/haxe/Http.unit.hx.disabled

@@ -1,4 +1,3 @@
-#if !cs
 var http1 = new haxe.Http("_");
 var r = "";
 http1.onStatus = function(_) r = "status";
@@ -16,4 +15,3 @@ r == "error";
 #if !flash
 exc(function() haxe.Http.requestUrl("_"));
 #end
-#end

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