X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=lib%2Fas3%2Fok%2Ffinally.as;h=f614c2bb065a3215917b56e2af8272d5b4796c3d;hb=bdad407fb79c2f7be9f3603694ebdeadc645b52d;hp=687802078e8a44d188cad87aa2d5e9f3ef83b51d;hpb=31d952f451b459070a6d42f482284efa3915c968;p=swftools.git diff --git a/lib/as3/ok/finally.as b/lib/as3/ok/finally.as index 6878020..f614c2b 100644 --- a/lib/as3/ok/finally.as +++ b/lib/as3/ok/finally.as @@ -7,7 +7,7 @@ package { return; trace("error"); } finally { - trace("ok 1/8"); + trace("ok 1/9"); } trace("error"); } @@ -18,7 +18,7 @@ package { break; trace("error"); } finally { - trace("ok 2/8"); + trace("ok 2/9"); } trace("error"); } while(true); @@ -28,7 +28,7 @@ package { try { var x = 1+1; } finally { - trace("ok 3/8"); + trace("ok 3/9"); } } @@ -38,11 +38,11 @@ package { throw new Error(); trace("error"); } finally { - trace("ok 4/8"); + trace("ok 4/9"); } trace("error"); } catch(e:Error) { - trace("ok 5/8"); + trace("ok 5/9"); } } @@ -54,25 +54,33 @@ package { } catch(e:Error) { x=1; } finally { - x*=2; + x++; } if(x==2) - trace("ok 6/8"); + trace("ok 6/9"); } - function fail() { + function fail1() { try { throw new Error(); } finally { - trace("ok 7/8"); + trace("ok 7/9"); + } + } + + function fail2() { + try { + fail1(); + } finally { + trace("ok 8/9"); } } function test_exception3() { try { - fail(); + fail2(); } catch(e:Error) { - trace("ok 8/8"); + trace("ok 9/9"); } } @@ -83,6 +91,7 @@ package { test_exception(); test_exception2(); test_exception3(); + trace("[exit]"); } } }