mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-07-06 12:19:39 +00:00
Fixed tests.
This commit is contained in:
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user