git.asbjorn.biz
/
swftools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
added some more as3 tests
[swftools.git]
/
lib
/
as3
/
ok
/
trycatch.as
diff --git
a/lib/as3/ok/trycatch.as
b/lib/as3/ok/trycatch.as
index
9f8dbc0
..
794392c
100644
(file)
--- a/
lib/as3/ok/trycatch.as
+++ b/
lib/as3/ok/trycatch.as
@@
-5,11
+5,11
@@
package {
public class MyError {
}
public class MyOtherError {
public class MyError {
}
public class MyOtherError {
- var ok5="ok 5/7";
+ var ok5="ok 5/8";
}
public class ClassWithStaticFunctions {
static function ok7() {
}
public class ClassWithStaticFunctions {
static function ok7() {
- trace("ok 7/7");
+ trace("ok 7/8");
}
}
public class Main extends flash.display.MovieClip {
}
}
public class Main extends flash.display.MovieClip {
@@
-24,7
+24,7
@@
package {
flash.net.navigateToURL;
} catch (e:Error) {
}
flash.net.navigateToURL;
} catch (e:Error) {
}
- trace("ok 6/7");
+ trace("ok 6/8");
with(getClass()) {
try {
with(getClass()) {
try {
@@
-34,6
+34,22
@@
package {
}
}
}
}
}
}
+ public function checkActivation():void
+ {
+ var yy:uint = 0;
+ var inc_y = function() {
+ yy = yy + 1;
+ }
+
+ try {
+ inc_y();
+ throw new Error;
+ } catch(e:Error) {
+ inc_y();
+ }
+ if(yy!=2) trace("error ("+yy+")")
+ else trace("ok 8/8");
+ }
function Main() {
function Main() {
@@
-44,7
+60,7
@@
package {
// MyError is not of the Error class
trace("error");
} catch(error:MyError) {
// MyError is not of the Error class
trace("error");
} catch(error:MyError) {
- trace("ok 1/7");
+ trace("ok 1/8");
} catch(x) {
trace("error");
}
} catch(x) {
trace("error");
}
@@
-55,11
+71,11
@@
package {
} catch(error:MyError) {
trace("error");
} catch(x:*) { // ":*" is the same as ""
} catch(error:MyError) {
trace("error");
} catch(x:*) { // ":*" is the same as ""
- trace("ok 2/7");
+ trace("ok 2/8");
}
try {
}
try {
- trace("ok 3/7");
+ trace("ok 3/8");
// don't throw any error
} catch(error:MyError) {
trace("error");
// don't throw any error
} catch(error:MyError) {
trace("error");
@@
-69,7
+85,7
@@
package {
trace("error");
}
trace("error");
}
- trace("ok 4/7");
+ trace("ok 4/8");
try {throw new MyOtherError}
catch(x:*) {
try {throw new MyOtherError}
catch(x:*) {
@@
-77,6
+93,7
@@
package {
}
checkScope();
}
checkScope();
+ checkActivation();
trace("[exit]");
}
trace("[exit]");
}