mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-06-09 18:32:31 +00:00
Improved tests.
Fixed try..catch..finally.
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -14,11 +14,12 @@ package
|
||||
TestTryCatchIfInTry;
|
||||
TestTryCatchLoop;
|
||||
TestTryCatchExceptionUsage
|
||||
TestTryFinally;
|
||||
TestTryFinally;
|
||||
TestTryFinallyDirectReturnInFinally;
|
||||
TestTryFinallyLoop;
|
||||
TestTryFinallyLoopInFinally;
|
||||
TestTryFinallyMultipleCatch;
|
||||
TestTryFinallyNoCatch;
|
||||
TestTryFinallyReturn;
|
||||
TestTryFinallyReturnInFinally;
|
||||
TestTryFinallyReturnNested;
|
||||
|
||||
@@ -11,14 +11,16 @@ package tests
|
||||
|
||||
public function run() : void
|
||||
{
|
||||
var j:* = undefined;
|
||||
for (var i:* = 0; i < 100; i++)
|
||||
var i:int = 0;
|
||||
while (i < 100)
|
||||
{
|
||||
try
|
||||
{
|
||||
for (j = 0; j < 20; j++)
|
||||
var j:int = 0;
|
||||
while (j < 20)
|
||||
{
|
||||
trace("a");
|
||||
j++;
|
||||
}
|
||||
}
|
||||
catch (e:EOFError)
|
||||
@@ -30,6 +32,7 @@ package tests
|
||||
continue;
|
||||
}
|
||||
trace("after_try");
|
||||
i++;
|
||||
}
|
||||
trace("end");
|
||||
}
|
||||
|
||||
@@ -9,7 +9,8 @@ package tests
|
||||
|
||||
public function run() : void
|
||||
{
|
||||
for (var i:int = 0; i < 10; i++)
|
||||
var i:int = 0;
|
||||
while (i < 10)
|
||||
{
|
||||
trace("before try");
|
||||
try
|
||||
@@ -17,7 +18,8 @@ package tests
|
||||
trace("in try");
|
||||
if (i == 5)
|
||||
{
|
||||
trace("continue for");
|
||||
i += 5;
|
||||
trace("continue while");
|
||||
continue;
|
||||
}
|
||||
}
|
||||
@@ -30,6 +32,7 @@ package tests
|
||||
trace("in finally");
|
||||
}
|
||||
trace("after");
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -9,7 +9,8 @@ package tests
|
||||
|
||||
public function run() : void
|
||||
{
|
||||
for (var i:int = 0; i < 10; i++)
|
||||
var i:int = 0;
|
||||
while (i < 10)
|
||||
{
|
||||
trace("before try");
|
||||
try
|
||||
@@ -24,12 +25,14 @@ package tests
|
||||
{
|
||||
if (i == 5)
|
||||
{
|
||||
trace("continue for");
|
||||
i += 7;
|
||||
trace("continue while");
|
||||
continue;
|
||||
}
|
||||
trace("in finally");
|
||||
}
|
||||
trace("after");
|
||||
i++
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
26
libsrc/ffdec_lib/testdata/cross_compile/src/tests/TestTryFinallyNoCatch.as
vendored
Normal file
26
libsrc/ffdec_lib/testdata/cross_compile/src/tests/TestTryFinallyNoCatch.as
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
package tests
|
||||
{
|
||||
/**
|
||||
* ...
|
||||
* @author JPEXS
|
||||
*/
|
||||
public class TestTryFinallyNoCatch
|
||||
{
|
||||
|
||||
public function run() : void
|
||||
{
|
||||
trace("before try");
|
||||
try
|
||||
{
|
||||
trace("in try");
|
||||
}
|
||||
finally
|
||||
{
|
||||
trace("in finally");
|
||||
}
|
||||
trace("after");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -9,13 +9,13 @@ package tests
|
||||
|
||||
public function run() : String
|
||||
{
|
||||
var a:int = Math.random() * 5;
|
||||
try
|
||||
{
|
||||
trace("before try2");
|
||||
try
|
||||
{
|
||||
trace("in try2");
|
||||
var a:int = 5;
|
||||
if (a > 4)
|
||||
{
|
||||
return "RET";
|
||||
|
||||
@@ -9,11 +9,11 @@ package tests
|
||||
|
||||
public function run() : void
|
||||
{
|
||||
var a:int = Math.random() * 5;
|
||||
trace("before try");
|
||||
try
|
||||
{
|
||||
trace("in try");
|
||||
var a:int = 5;
|
||||
if (a > 4)
|
||||
{
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user