mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-08-02 16:01:15 +00:00
Fixed tests
This commit is contained in:
@@ -76,7 +76,7 @@ public class ActionScript3ClassicAirDecompileTest extends ActionScript3Decompile
|
||||
+ "var extraLine:Boolean = false;\r\n"
|
||||
+ "var r:int = 7;\r\n"
|
||||
+ "var t:int = 0;\r\n"
|
||||
+ "t = int(this.getInt());\r\n"
|
||||
+ "t = this.getInt();\r\n"
|
||||
+ "if(t + 1 < g.length)\r\n"
|
||||
+ "{\r\n"
|
||||
+ "t++;\r\n"
|
||||
@@ -218,7 +218,7 @@ public class ActionScript3ClassicAirDecompileTest extends ActionScript3Decompile
|
||||
public void testConvert() {
|
||||
decompileMethod("classic_air", "testConvert", "var s:String = \"a\";\r\n"
|
||||
+ "var i:int = int(s);\r\n"
|
||||
+ "var j:int = int(n);\r\n"
|
||||
+ "var j:int = n;\r\n"
|
||||
+ "s = String(j);\r\n"
|
||||
+ "s = ns;\r\n",
|
||||
false);
|
||||
@@ -280,7 +280,7 @@ public class ActionScript3ClassicAirDecompileTest extends ActionScript3Decompile
|
||||
|
||||
@Test
|
||||
public void testDeobfuscation() {
|
||||
decompileMethod("classic_air", "testDeobfuscation", "var r:int = int(Math.random());\r\n"
|
||||
decompileMethod("classic_air", "testDeobfuscation", "var r:int = Math.random();\r\n"
|
||||
+ "if(r > 5)\r\n"
|
||||
+ "{\r\n"
|
||||
+ "trace(\"A\");\r\n"
|
||||
@@ -909,7 +909,7 @@ public class ActionScript3ClassicAirDecompileTest extends ActionScript3Decompile
|
||||
|
||||
@Test
|
||||
public void testIfFinally() {
|
||||
decompileMethod("classic_air", "testIfFinally", "var a:int = int(Math.random());\r\n"
|
||||
decompileMethod("classic_air", "testIfFinally", "var a:int = Math.random();\r\n"
|
||||
+ "if(a == 5)\r\n"
|
||||
+ "{\r\n"
|
||||
+ "try\r\n"
|
||||
@@ -979,7 +979,7 @@ public class ActionScript3ClassicAirDecompileTest extends ActionScript3Decompile
|
||||
|
||||
@Test
|
||||
public void testIgnoreAndOr() {
|
||||
decompileMethod("classic_air", "testIgnoreAndOr", "var k:int = int(Math.random());\r\n"
|
||||
decompileMethod("classic_air", "testIgnoreAndOr", "var k:int = Math.random();\r\n"
|
||||
+ "if(k > 5)\r\n"
|
||||
+ "{\r\n"
|
||||
+ "trace(\"A\");\r\n"
|
||||
@@ -1244,7 +1244,7 @@ public class ActionScript3ClassicAirDecompileTest extends ActionScript3Decompile
|
||||
+ "var a:* = ns::unnamespacedFunc();\r\n"
|
||||
+ "var b:* = ns::[name];\r\n"
|
||||
+ "trace(b.c);\r\n"
|
||||
+ "var c:* = myInternal::neco;\r\n",
|
||||
+ "var c:int = myInternal::neco;\r\n",
|
||||
false);
|
||||
}
|
||||
|
||||
@@ -1472,7 +1472,7 @@ public class ActionScript3ClassicAirDecompileTest extends ActionScript3Decompile
|
||||
|
||||
@Test
|
||||
public void testTryIf() {
|
||||
decompileMethod("classic_air", "testTryIf", "var a:int = int(Math.random());\r\n"
|
||||
decompileMethod("classic_air", "testTryIf", "var a:int = Math.random();\r\n"
|
||||
+ "try\r\n"
|
||||
+ "{\r\n"
|
||||
+ "if(a > 5 && a < 50)\r\n"
|
||||
|
||||
@@ -76,7 +76,7 @@ public class ActionScript3ClassicDecompileTest extends ActionScript3DecompileTes
|
||||
+ "var extraLine:Boolean = false;\r\n"
|
||||
+ "var r:int = 7;\r\n"
|
||||
+ "var t:int = 0;\r\n"
|
||||
+ "t = int(this.getInt());\r\n"
|
||||
+ "t = this.getInt();\r\n"
|
||||
+ "if(t + 1 < g.length)\r\n"
|
||||
+ "{\r\n"
|
||||
+ "t++;\r\n"
|
||||
@@ -217,7 +217,7 @@ public class ActionScript3ClassicDecompileTest extends ActionScript3DecompileTes
|
||||
public void testConvert() {
|
||||
decompileMethod("classic", "testConvert", "var s:String = \"a\";\r\n"
|
||||
+ "var i:int = int(s);\r\n"
|
||||
+ "var j:int = int(this.n);\r\n"
|
||||
+ "var j:int = this.n;\r\n"
|
||||
+ "s = String(j);\r\n"
|
||||
+ "s = this.ns;\r\n",
|
||||
false);
|
||||
@@ -279,7 +279,7 @@ public class ActionScript3ClassicDecompileTest extends ActionScript3DecompileTes
|
||||
|
||||
@Test
|
||||
public void testDeobfuscation() {
|
||||
decompileMethod("classic", "testDeobfuscation", "var r:int = int(Math.random());\r\n"
|
||||
decompileMethod("classic", "testDeobfuscation", "var r:int = Math.random();\r\n"
|
||||
+ "if(r > 5)\r\n"
|
||||
+ "{\r\n"
|
||||
+ "trace(\"A\");\r\n"
|
||||
@@ -974,7 +974,7 @@ public class ActionScript3ClassicDecompileTest extends ActionScript3DecompileTes
|
||||
|
||||
@Test
|
||||
public void testIgnoreAndOr() {
|
||||
decompileMethod("classic", "testIgnoreAndOr", "var k:int = int(Math.random());\r\n"
|
||||
decompileMethod("classic", "testIgnoreAndOr", "var k:int = Math.random();\r\n"
|
||||
+ "if(k > 5)\r\n"
|
||||
+ "{\r\n"
|
||||
+ "trace(\"A\");\r\n"
|
||||
|
||||
@@ -79,7 +79,7 @@ public class ActionScript3CrossCompileDecompileTest extends ActionScript3Decompi
|
||||
|
||||
@Test(dataProvider = "swfNamesProvider")
|
||||
public void testTryCatchInIf(String swfUsed) {
|
||||
decompileMethod(swfUsed, "testTryCatchInIf", "var a:int = int(Math.random());\r\n"
|
||||
decompileMethod(swfUsed, "testTryCatchInIf", "var a:int = Math.random();\r\n"
|
||||
+ "if(a > 10)\r\n"
|
||||
+ "{\r\n"
|
||||
+ "try\r\n"
|
||||
@@ -96,7 +96,7 @@ public class ActionScript3CrossCompileDecompileTest extends ActionScript3Decompi
|
||||
|
||||
@Test(dataProvider = "swfNamesProvider")
|
||||
public void testTryCatchInIf2(String swfUsed) {
|
||||
decompileMethod(swfUsed, "testTryCatchInIf2", "var a:int = int(Math.random());\r\n"
|
||||
decompileMethod(swfUsed, "testTryCatchInIf2", "var a:int = Math.random();\r\n"
|
||||
+ "if(a > 10)\r\n"
|
||||
+ "{\r\n"
|
||||
+ "try\r\n"
|
||||
@@ -744,7 +744,7 @@ public class ActionScript3CrossCompileDecompileTest extends ActionScript3Decompi
|
||||
|
||||
@Test(dataProvider = "swfNamesProvider")
|
||||
public void testTryFinallyReturnNested(String swfUsed) {
|
||||
decompileMethod(swfUsed, "testTryFinallyReturnNested", "var a:int = int(Math.random() * 5);\r\n"
|
||||
decompileMethod(swfUsed, "testTryFinallyReturnNested", "var a:int = Math.random() * 5;\r\n"
|
||||
+ "try\r\n"
|
||||
+ "{\r\n"
|
||||
+ "trace(\"before try2\");\r\n"
|
||||
@@ -776,7 +776,7 @@ public class ActionScript3CrossCompileDecompileTest extends ActionScript3Decompi
|
||||
|
||||
@Test(dataProvider = "swfNamesProvider")
|
||||
public void testTryFinallyReturnNested2(String swfUsed) {
|
||||
decompileMethod(swfUsed, "testTryFinallyReturnNested2", "var a:int = int(Math.random() * 5);\r\n"
|
||||
decompileMethod(swfUsed, "testTryFinallyReturnNested2", "var a:int = Math.random() * 5;\r\n"
|
||||
+ "try\r\n"
|
||||
+ "{\r\n"
|
||||
+ "try\r\n"
|
||||
@@ -828,7 +828,7 @@ public class ActionScript3CrossCompileDecompileTest extends ActionScript3Decompi
|
||||
|
||||
@Test(dataProvider = "swfNamesProvider")
|
||||
public void testTryFinallyReturnVoid(String swfUsed) {
|
||||
decompileMethod(swfUsed, "testTryFinallyReturnVoid", "var a:int = int(Math.random() * 5);\r\n"
|
||||
decompileMethod(swfUsed, "testTryFinallyReturnVoid", "var a:int = Math.random() * 5;\r\n"
|
||||
+ "trace(\"before try\");\r\n"
|
||||
+ "try\r\n"
|
||||
+ "{\r\n"
|
||||
|
||||
@@ -70,7 +70,7 @@ public class ActionScript3CrossCompileSwfToolsDecompileTest extends ActionScript
|
||||
|
||||
@Test
|
||||
public void testTryCatchInIf() {
|
||||
decompileMethod("swftools", "testTryCatchInIf", "var _loc1_:int = int(Math.random());\r\n"
|
||||
decompileMethod("swftools", "testTryCatchInIf", "var _loc1_:int = Math.random();\r\n"
|
||||
+ "if(_loc1_ > 10)\r\n"
|
||||
+ "{\r\n"
|
||||
+ "try\r\n"
|
||||
@@ -87,7 +87,7 @@ public class ActionScript3CrossCompileSwfToolsDecompileTest extends ActionScript
|
||||
|
||||
@Test
|
||||
public void testTryCatchInIf2() {
|
||||
decompileMethod("swftools", "testTryCatchInIf2", "var _loc1_:* = int(Math.random());\r\n"
|
||||
decompileMethod("swftools", "testTryCatchInIf2", "var _loc1_:int = Math.random();\r\n"
|
||||
+ "if(_loc1_ > 10)\r\n"
|
||||
+ "{\r\n"
|
||||
+ "try\r\n"
|
||||
@@ -762,7 +762,7 @@ public class ActionScript3CrossCompileSwfToolsDecompileTest extends ActionScript
|
||||
|
||||
@Test
|
||||
public void testTryFinallyReturnNested() {
|
||||
decompileMethod("swftools", "testTryFinallyReturnNested", "var _loc1_:* = int(Math.random() * 5);\r\n"
|
||||
decompileMethod("swftools", "testTryFinallyReturnNested", "var _loc1_:int = Math.random() * 5;\r\n"
|
||||
+ "try\r\n"
|
||||
+ "{\r\n"
|
||||
+ "trace(\"before try2\");\r\n"
|
||||
@@ -803,7 +803,7 @@ public class ActionScript3CrossCompileSwfToolsDecompileTest extends ActionScript
|
||||
|
||||
@Test
|
||||
public void testTryFinallyReturnNested2() {
|
||||
decompileMethod("swftools", "testTryFinallyReturnNested2", "var _loc1_:* = int(Math.random() * 5);\r\n"
|
||||
decompileMethod("swftools", "testTryFinallyReturnNested2", "var _loc1_:int = Math.random() * 5;\r\n"
|
||||
+ "try\r\n"
|
||||
+ "{\r\n"
|
||||
+ "try\r\n"
|
||||
@@ -870,7 +870,7 @@ public class ActionScript3CrossCompileSwfToolsDecompileTest extends ActionScript
|
||||
|
||||
@Test
|
||||
public void testTryFinallyReturnVoid() {
|
||||
decompileMethod("swftools", "testTryFinallyReturnVoid", "var _loc1_:* = int(Math.random() * 5);\r\n"
|
||||
decompileMethod("swftools", "testTryFinallyReturnVoid", "var _loc1_:int = Math.random() * 5;\r\n"
|
||||
+ "trace(\"before try\");\r\n"
|
||||
+ "try\r\n"
|
||||
+ "{\r\n"
|
||||
|
||||
Reference in New Issue
Block a user