Fixed tests.

This commit is contained in:
Jindra Petřík
2025-09-30 21:39:32 +02:00
parent dccf870ce0
commit 5db66ae32b
7 changed files with 81 additions and 4 deletions

View File

@@ -1246,6 +1246,24 @@ public class ActionScript3ClassicAirDecompileTest extends ActionScript3Decompile
false);
}
@Test
public void testIfInsteadSwitch() {
decompileMethod("classic_air", "testIfInsteadSwitch", "var a:int = 5;\r\n"
+ "if(a > 5)\r\n"
+ "{\r\n"
+ "if(a === 0)\r\n"
+ "{\r\n"
+ "trace(\"X\");\r\n"
+ "}\r\n"
+ "}\r\n"
+ "if(a === 1)\r\n"
+ "{\r\n"
+ "return \"A\";\r\n"
+ "}\r\n"
+ "return \"B\";\r\n",
false);
}
@Test
public void testIfTry() {
decompileMethod("classic_air", "testIfTry", "var c:int = 0;\r\n"

View File

@@ -1245,6 +1245,24 @@ public class ActionScript3ClassicDecompileTest extends ActionScript3DecompileTes
false);
}
@Test
public void testIfInsteadSwitch() {
decompileMethod("classic", "testIfInsteadSwitch", "var a:int = 5;\r\n"
+ "if(a > 5)\r\n"
+ "{\r\n"
+ "if(a === 0)\r\n"
+ "{\r\n"
+ "trace(\"X\");\r\n"
+ "}\r\n"
+ "}\r\n"
+ "if(a === 1)\r\n"
+ "{\r\n"
+ "return \"A\";\r\n"
+ "}\r\n"
+ "return \"B\";\r\n",
false);
}
@Test
public void testIfTry() {
decompileMethod("classic", "testIfTry", "var c:int = 0;\r\n"