Browse Source

moved the test for #9204 to misc completely

Aleksandr Kuzmenko 5 years ago
parent
commit
c3170b7111

+ 4 - 4
tests/misc/projects/Issue9204/Main.hx

@@ -5,16 +5,16 @@ class C {
 	static public function f(x:Int) {
 	static public function f(x:Int) {
 		switch (x) {
 		switch (x) {
 			case SOME:
 			case SOME:
-				trace(1);
+				return 'hello';
 			case _:
 			case _:
-				trace(2);
+				return 'world';
 		}
 		}
 	}
 	}
 }
 }
 
 
 class Main {
 class Main {
 	static function main() {
 	static function main() {
-		C.f(1);
-		C.f(2);
+		if(C.f(1) != 'hello') throw 'Test C.f(1) failed';
+		if(C.f(2) != 'world') throw 'Test C.f(2) failed';
 	}
 	}
 }
 }

+ 2 - 1
tests/misc/projects/Issue9204/compile.hxml

@@ -1 +1,2 @@
--main Main
+-main Main
+--interp

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

@@ -1,18 +0,0 @@
-package unit.issues;
-
-class Issue9204 extends unit.Test {
-	@:deprecated
-	static inline final DEPRECATED = 123;
-
-	function test() {
-		eq(1, switchWithDeprecated(123));
-		eq(2, switchWithDeprecated(321));
-	}
-
-	static public function switchWithDeprecated(x:Int) {
-		return switch x {
-			case DEPRECATED: 1;
-			case _: 2;
-		}
-	}
-}