tests: Port avmplus Exception tests over

This commit is contained in:
Nathan Adams 2023-07-27 00:57:58 +02:00
parent 583caa3389
commit 55d77970e0
349 changed files with 4988 additions and 0 deletions

View File

@ -0,0 +1,18 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
package MultipleCatchBlocks2{
public class MyErrors2{
var a:Number;
public function MyArgumentError(a):String
{
var k:String = decodeURI("!@#$%^&*()<>?");
eval(m);
var arr:Array=new Array(-10);
return 6;
}
}
}

View File

@ -0,0 +1,59 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
package {
import flash.display.MovieClip;
public class Test extends MovieClip {}
}
import MultipleCatchBlocks2.*;
import com.adobe.test.Assert;
// var SECTION = "Definitions"; // provide a document reference (ie, ECMA section)
// var VERSION = "AS3"; // Version of JavaScript or ECMA
// var TITLE = "Testing try block with multiple catch blocks"; // Provide ECMA section title or a description
var BUGNUMBER = "";
var z = new MyErrors2();
thisError = "no error";
thisError1 = "no error";
thisError2 = "no error";
thisError3 = "no error";
thisError4 = "no error";
thisError5 = "no error";
thisError6 = "no error";
thisError7 = "no error";
try {
z.MyArgumentError();
}catch(e:ReferenceError){
thisError=(e.toString()).substr(0,26);//print(thisError);
}catch(e1:TypeError){
thisError1=(e1.toString()).substr(0,26);//print(thisError1);
}catch(e2:ArgumentError){
thisError2=(e2.toString()).substr(0,26);//print(thisError2);
}catch(e3:URIError){
thisError3=(e3.toString()).substr(0,26);//print(thisError3);
}catch(e4:UninitializedError){
thisError4=(e4.toString()).substr(0,26);//print(thisError4);
}catch(e5:EvalError){
thisError5=(e5.toString()).substr(0,26);//print(thisError5);
}catch(e6:RangeError){
thisError6=(e6.toString()).substr(0,26);//print(thisError6);
}catch(e7:Error){
thisError7=(e7.toString()).substr(0,26);//print(thisError7);
}finally{
Assert.expectEq( "Testing catch block with Reference Error", "no error" ,thisError);
Assert.expectEq( "Testing catch block with Type Error", "no error" ,thisError1);
Assert.expectEq( "Testing catch block with Argument Error", "ArgumentError: Error #1063",thisError2);
Assert.expectEq( "Testing catch block with URIError", "no error" ,thisError3);
Assert.expectEq( "Testing catch block with Eval Error", "no error" ,thisError5);
Assert.expectEq( "Testing catch block with Range Error", "no error" ,thisError6);
Assert.expectEq( "Testing catch block with Error", "no error" ,thisError7);
}
// displays results.

View File

@ -0,0 +1,13 @@
<flex-config>
<compiler>
<source-path>
<path-element>.</path-element>
<path-element>../../../../lib</path-element>
</source-path>
<debug>false</debug>
<omit-trace-statements>false</omit-trace-statements>
<show-actionscript-warnings>false</show-actionscript-warnings>
<strict>false</strict>
</compiler>
<output>test.swf</output>
</flex-config>

View File

@ -0,0 +1,7 @@
Testing catch block with Reference Error PASSED!
Testing catch block with Type Error PASSED!
Testing catch block with Argument Error PASSED!
Testing catch block with URIError PASSED!
Testing catch block with Eval Error PASSED!
Testing catch block with Range Error PASSED!
Testing catch block with Error PASSED!

View File

@ -0,0 +1,2 @@
num_ticks = 1
known_failure = true # https://github.com/ruffle-rs/ruffle/issues/12346

View File

@ -0,0 +1,18 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
package MultipleCatchBlocksArgument
{
public class ArgumentErrors
{
var a:Number;
public function MyArgumentError(a):Number
{
return 6;
}
}
}

View File

@ -0,0 +1,52 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
package {
import flash.display.MovieClip;
public class Test extends MovieClip {}
}
import MultipleCatchBlocksArgument.*;
import com.adobe.test.Assert;
// var SECTION = "Definitions"; // provide a document reference (ie, ECMA section)
// var VERSION = "AS3"; // Version of JavaScript or ECMA
// var TITLE = "Testing try block with multiple catch blocks"; // Provide ECMA section title or a description
var BUGNUMBER = "";
var z = new ArgumentErrors();
thisError = "no error";
try{
z.MyArgumentError();
}catch(e:ReferenceError){
thisError=e.toString();
}catch(e1:TypeError){
thisError=e1.toString();
}catch(e2:ArgumentError){
thisError=(e2.toString()).substr(0,26);//print(thisError);
}catch(e3:URIError){
thisError=e3.toString()
}catch(e4:UninitializedError){
thisError=e4.toString();
}catch(e5:EvalError){
thisError=e5.toString();
}catch(e6:RangeError){
thisError=e6.toString();
}catch(e7:DefinitionError){
thisError="This is Definition Error";
}catch(e8:SyntaxError){
thisError="This is Syntax Error";
}catch(e9:VerifyError){
thisError="This is Verify Error";
}catch(e10:Error){
thisError=e7.toString();
}finally{
Assert.expectEq( "Testing catch block with Argument Error", "ArgumentError: Error #1063",thisError);
}
// displays results.

View File

@ -0,0 +1,13 @@
<flex-config>
<compiler>
<source-path>
<path-element>.</path-element>
<path-element>../../../../lib</path-element>
</source-path>
<debug>false</debug>
<omit-trace-statements>false</omit-trace-statements>
<show-actionscript-warnings>false</show-actionscript-warnings>
<strict>false</strict>
</compiler>
<output>test.swf</output>
</flex-config>

View File

@ -0,0 +1 @@
Testing catch block with Argument Error PASSED!

View File

@ -0,0 +1,2 @@
num_ticks = 1
known_failure = true # https://github.com/ruffle-rs/ruffle/issues/12346

View File

@ -0,0 +1,17 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
package MultipleCatchBlocksEval
{
public class EvalErrors
{
var a:Number;
public function MyArgumentError(a):Number
{
throw new EvalError();
}
}
}

View File

@ -0,0 +1,52 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
package {
import flash.display.MovieClip;
public class Test extends MovieClip {}
}
import MultipleCatchBlocksEval.*;
import com.adobe.test.Assert;
// var SECTION = "Definitions"; // provide a document reference (ie, ECMA section)
// var VERSION = "AS3"; // Version of JavaScript or ECMA
// var TITLE = "Testing try block with multiple catch blocks"; // Provide ECMA section title or a description
var BUGNUMBER = "";
var z = new EvalErrors();
thisError = "no error";
try{
z.MyArgumentError(6);
}catch(e:ReferenceError){
thisError=e.toString();
}catch(e1:TypeError){
thisError=e1.toString();
}catch(e2:ArgumentError){
thisError=e2.toString();
}catch(e3:URIError){
thisError=e3.toString()
}catch(e4:UninitializedError){
thisError=e4.toString();
}catch(e5:EvalError){
thisError=e5.toString();
}catch(e6:RangeError){
thisError=e6.toString();
}catch(e7:DefinitionError){
thisError="This is Definition Error";
}catch(e8:SyntaxError){
thisError="This is Syntax Error";
}catch(e9:VerifyError){
thisError="This is Verify Error";
}catch(e10:Error){
thisError=e7.toString();
}finally{
Assert.expectEq( "Testing catch block with Eval Error", "EvalError",thisError);
}
// displays results.

View File

@ -0,0 +1,13 @@
<flex-config>
<compiler>
<source-path>
<path-element>.</path-element>
<path-element>../../../../lib</path-element>
</source-path>
<debug>false</debug>
<omit-trace-statements>false</omit-trace-statements>
<show-actionscript-warnings>false</show-actionscript-warnings>
<strict>false</strict>
</compiler>
<output>test.swf</output>
</flex-config>

View File

@ -0,0 +1 @@
Testing catch block with Eval Error PASSED!

View File

@ -0,0 +1,2 @@
num_ticks = 1
known_failure = true

View File

@ -0,0 +1,18 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
package MultipleCatchBlocksRange
{
public class RangeErrors
{
var a:Number;
public function MyArgumentError(a):Number
{
var arr = new Array(-10);
return 6;
}
}
}

View File

@ -0,0 +1,52 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
package {
import flash.display.MovieClip;
public class Test extends MovieClip {}
}
import MultipleCatchBlocksRange.*;
import com.adobe.test.Assert;
// var SECTION = "Definitions"; // provide a document reference (ie, ECMA section)
// var VERSION = "AS3"; // Version of JavaScript or ECMA
// var TITLE = "Testing try block with multiple catch blocks"; // Provide ECMA section title or a description
var BUGNUMBER = "";
var z = new RangeErrors();
thisError = "no error";
try{
z.MyArgumentError(6);
}catch(e:ReferenceError){
thisError=e.toString();
}catch(e1:TypeError){
thisError=e1.toString();
}catch(e2:ArgumentError){
thisError=e2.toString();
}catch(e3:URIError){
thisError=e3.toString()
}catch(e4:UninitializedError){
thisError=e4.toString();
}catch(e5:EvalError){
thisError=e5.toString();
}catch(e6:RangeError){
thisError=(e6.toString()).substring(0,10);
}catch(e7:DefinitionError){
thisError="This is Definition Error";
}catch(e8:SyntaxError){
thisError="This is Syntax Error";
}catch(e9:VerifyError){
thisError="This is Verify Error";
}catch(e10:Error){
thisError=e7.toString();
}finally{
Assert.expectEq( "Testing catch block with Range Error","RangeError",thisError);
}
// displays results.

View File

@ -0,0 +1,13 @@
<flex-config>
<compiler>
<source-path>
<path-element>.</path-element>
<path-element>../../../../lib</path-element>
</source-path>
<debug>false</debug>
<omit-trace-statements>false</omit-trace-statements>
<show-actionscript-warnings>false</show-actionscript-warnings>
<strict>false</strict>
</compiler>
<output>test.swf</output>
</flex-config>

View File

@ -0,0 +1 @@
Testing catch block with Range Error PASSED!

View File

@ -0,0 +1,2 @@
num_ticks = 1
known_failure = true

View File

@ -0,0 +1,41 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
package {
import flash.display.MovieClip;
public class Test extends MovieClip {}
}
import com.adobe.test.Assert;
// var SECTION = "Definitions"; // provide a document reference (ie, ECMA section)
// var VERSION = "AS3"; // Version of JavaScript or ECMA
// var TITLE = "Testing try block with multiple catch blocks, the catch block with parameter of type Error catching the reference error when there is no catch block with a parameter of type reference error"; // Provide ECMA section title or a description
var BUGNUMBER = "";
thisError = "no error";
try {
throw new ReferenceError();
}catch(e1:ArgumentError){
thisError="This is Argument Error";
}catch(e2:URIError){
thisError="This is URI Error";
}catch(e3:EvalError){
thisError="This is Eval Error";
}catch(e4:RangeError){
thisError="This is Range Error";
}catch(e4:TypeError){
thisError="This is Type Error";
}catch(e5:SecurityError){
thisError="This is security Error";
}catch(e6:Error){
thisError = e6.toString();
}finally{//print(thisError);
Assert.expectEq( "Testing try block with throw statement", "ReferenceError" ,thisError);
}
// displays results.

View File

@ -0,0 +1,13 @@
<flex-config>
<compiler>
<source-path>
<path-element>.</path-element>
<path-element>../../../../lib</path-element>
</source-path>
<debug>false</debug>
<omit-trace-statements>false</omit-trace-statements>
<show-actionscript-warnings>false</show-actionscript-warnings>
<strict>false</strict>
</compiler>
<output>test.swf</output>
</flex-config>

View File

@ -0,0 +1 @@
Testing try block with throw statement PASSED!

View File

@ -0,0 +1,19 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
package MultipleCatchBlocksReference
{
public class ReferenceErrors
{
var a:Number;
public function MyArgumentError(a):Number
{
m=m+1;
return 6;
}
}
}

View File

@ -0,0 +1,52 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
package {
import flash.display.MovieClip;
public class Test extends MovieClip {}
}
import MultipleCatchBlocksReference.*;
import com.adobe.test.Assert;
// var SECTION = "Definitions"; // provide a document reference (ie, ECMA section)
// var VERSION = "AS3"; // Version of JavaScript or ECMA
// var TITLE = "Testing try block with multiple catch blocks"; // Provide ECMA section title or a description
var BUGNUMBER = "";
var z = new ReferenceErrors();
thisError = "no error";
try{
z.MyArgumentError(6);
}catch(e:ReferenceError){
thisError=(e.toString()).substr(0,27);
}catch(e1:TypeError){
thisError=e1.toString();
}catch(e2:ArgumentError){
thisError=e2.toString();
}catch(e3:URIError){
thisError=e3.toString()
}catch(e4:UninitializedError){
thisError=e4.toString();
}catch(e5:EvalError){
thisError=e5.toString();
}catch(e6:RangeError){
thisError=e6.toString();
}catch(e7:DefinitionError){
thisError="This is Definition Error";
}catch(e8:SyntaxError){
thisError="This is Syntax Error";
}catch(e9:VerifyError){
thisError="This is Verify Error";
}catch(e10:Error){
thisError=e7.toString();
}finally{
Assert.expectEq( "Testing catch block with Reference Error", "ReferenceError: Error #1065",thisError);
}
// displays results.

View File

@ -0,0 +1,13 @@
<flex-config>
<compiler>
<source-path>
<path-element>.</path-element>
<path-element>../../../../lib</path-element>
</source-path>
<debug>false</debug>
<omit-trace-statements>false</omit-trace-statements>
<show-actionscript-warnings>false</show-actionscript-warnings>
<strict>false</strict>
</compiler>
<output>test.swf</output>
</flex-config>

View File

@ -0,0 +1 @@
Testing catch block with Reference Error PASSED!

View File

@ -0,0 +1,18 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
package MultipleCatchBlocksType
{
public class TypeErrors
{
public function MyArgumentError(a):int
{
throw new TypeError();
}
}
}

View File

@ -0,0 +1,57 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
package {
import flash.display.MovieClip;
public class Test extends MovieClip {}
}
import MultipleCatchBlocksType.*;
import com.adobe.test.Assert;
// var SECTION = "Definitions"; // provide a document reference (ie, ECMA section)
// var VERSION = "AS3"; // Version of JavaScript or ECMA
// var TITLE = "Testing try block with multiple catch blocks and using a catch block with parameter of type TypeError to catch the type error"; // Provide ECMA section title or a description
var BUGNUMBER = "";
var z = new TypeErrors();
thisError = "no error";
thisError1 = "no error";
try{
z.MyArgumentError("blah");
}catch(e:ReferenceError){
thisError=e.toString();
}catch(e1:TypeError){
thisError=(e1.toString()).substr(0,22);
}catch(e2:ArgumentError){
thisError=e2.toString();
}catch(e3:URIError){
thisError=e3.toString()
}catch(e4:UninitializedError){
thisError=e4.toString();
}catch(e5:EvalError){
thisError=e5.toString();
}catch(e6:RangeError){
thisError=e6.toString();
}catch(e7:DefinitionError){
thisError="This is Definition Error";
}catch(e8:SyntaxError){
thisError="This is Syntax Error";
}catch(e9:VerifyError){
thisError="This is Verify Error";
}catch(e10:Error){//print(e10.toString());
thisError=e10.toString();
}finally{
Assert.expectEq( "Testing catch block with Type Error", "TypeError" ,thisError);
}
// displays results.

View File

@ -0,0 +1,13 @@
<flex-config>
<compiler>
<source-path>
<path-element>.</path-element>
<path-element>../../../../lib</path-element>
</source-path>
<debug>false</debug>
<omit-trace-statements>false</omit-trace-statements>
<show-actionscript-warnings>false</show-actionscript-warnings>
<strict>false</strict>
</compiler>
<output>test.swf</output>
</flex-config>

View File

@ -0,0 +1 @@
Testing catch block with Type Error PASSED!

View File

@ -0,0 +1,43 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
package {
import flash.display.MovieClip;
public class Test extends MovieClip {}
}
import com.adobe.test.Assert;
// var SECTION = "Definitions"; // provide a document reference (ie, ECMA section)
// var VERSION = "AS3"; // Version of JavaScript or ECMA
// var TITLE = "Testing try block with multiple catch blocks, the first catch block catching the type error"; // Provide ECMA section title or a description
var BUGNUMBER = "";
thisError = "no error";
try {
throw new TypeError();
} catch(e:TypeError){
thisError="This is Type Error";
}catch(e1:ReferenceError){
thisError="This is Reference Error";
}catch(e2:ArgumentError){
thisError="This is Argument Error";
}catch(e3:URIError){
thisError="This is URI Error"
}catch(e4:EvalError){
thisError="This is Eval Error";
}catch(e5:RangeError){
thisError="This is Range Error";
}catch(e6:SecurityError){
thisError="This is Security Error!!!";
}catch(e7:Error){
thisError = "This is an error";
}finally{
Assert.expectEq( "Testing try block with throw statement", "This is Type Error" ,thisError);
}
// displays results.

View File

@ -0,0 +1,13 @@
<flex-config>
<compiler>
<source-path>
<path-element>.</path-element>
<path-element>../../../../lib</path-element>
</source-path>
<debug>false</debug>
<omit-trace-statements>false</omit-trace-statements>
<show-actionscript-warnings>false</show-actionscript-warnings>
<strict>false</strict>
</compiler>
<output>test.swf</output>
</flex-config>

View File

@ -0,0 +1 @@
Testing try block with throw statement PASSED!

View File

@ -0,0 +1,43 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
package {
import flash.display.MovieClip;
public class Test extends MovieClip {}
}
import com.adobe.test.Assert;
// var SECTION = "Definitions"; // provide a document reference (ie, ECMA section)
// var VERSION = "AS3"; // Version of JavaScript or ECMA
// var TITLE = "Testing try block with multiple catch blocks, the second catch block catching the type error"; // Provide ECMA section title or a description
var BUGNUMBER = "";
thisError = "no error";
try {
throw new TypeError();
} catch(e:ReferenceError){
thisError="This is Reference error";
}catch(e1:TypeError){
thisError="This is Type Error";
}catch(e2:ArgumentError){
thisError="This is Argument Error";
}catch(e3:URIError){
thisError="This is URI Error"
}catch(e4:EvalError){
thisError="This is Eval Error";
}catch(e5:RangeError){
thisError="This is Range Error";
}catch(e6:SecurityError){
thisError="This is Security Error!!!";
}catch(e7:Error){
thisError = "This is an error";
}finally{
Assert.expectEq( "Testing try block with throw statement", "This is Type Error" ,thisError);
}
// displays results.

View File

@ -0,0 +1,13 @@
<flex-config>
<compiler>
<source-path>
<path-element>.</path-element>
<path-element>../../../../lib</path-element>
</source-path>
<debug>false</debug>
<omit-trace-statements>false</omit-trace-statements>
<show-actionscript-warnings>false</show-actionscript-warnings>
<strict>false</strict>
</compiler>
<output>test.swf</output>
</flex-config>

View File

@ -0,0 +1 @@
Testing try block with throw statement PASSED!

View File

@ -0,0 +1,43 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
package {
import flash.display.MovieClip;
public class Test extends MovieClip {}
}
import com.adobe.test.Assert;
// var SECTION = "Definitions"; // provide a document reference (ie, ECMA section)
// var VERSION = "AS3"; // Version of JavaScript or ECMA
// var TITLE = "Testing try block with multiple catch blocks, the third catch block catching the type error"; // Provide ECMA section title or a description
var BUGNUMBER = "";
thisError = "no error";
try {
throw new TypeError();
} catch(e:ReferenceError){
thisError="This is Reference Error";
}catch(e1:ArgumentError){
thisError="This is Argument Error";
}catch(e2:TypeError){
thisError="This is Type Error";
}catch(e3:URIError){
thisError="This is URI Error"
}catch(e4:EvalError){
thisError="This is Eval Error";
}catch(e5:RangeError){
thisError="This is Range Error";
}catch(e6:SecurityError){
thisError="This is Security Error!!!";
}catch(e7:Error){
thisError = "This is an error";
}finally{
Assert.expectEq( "Testing try block with throw statement", "This is Type Error" ,thisError);
}
// displays results.

View File

@ -0,0 +1,13 @@
<flex-config>
<compiler>
<source-path>
<path-element>.</path-element>
<path-element>../../../../lib</path-element>
</source-path>
<debug>false</debug>
<omit-trace-statements>false</omit-trace-statements>
<show-actionscript-warnings>false</show-actionscript-warnings>
<strict>false</strict>
</compiler>
<output>test.swf</output>
</flex-config>

View File

@ -0,0 +1 @@
Testing try block with throw statement PASSED!

View File

@ -0,0 +1,43 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
package {
import flash.display.MovieClip;
public class Test extends MovieClip {}
}
import com.adobe.test.Assert;
// var SECTION = "Definitions"; // provide a document reference (ie, ECMA section)
// var VERSION = "AS3"; // Version of JavaScript or ECMA
// var TITLE = "Testing try block with multiple catch blocks, the fourth catch block catching the type error"; // Provide ECMA section title or a description
var BUGNUMBER = "";
thisError = "no error";
try {
throw new TypeError();
} catch(e:ReferenceError){
thisError="This is Reference Error";
}catch(e1:ArgumentError){
thisError="This is Argument Error";
}catch(e2:URIError){
thisError="This is URI Error";
}catch(e3:TypeError){
thisError="This is Type Error";
}catch(e4:EvalError){
thisError="This is Eval Error";
}catch(e5:RangeError){
thisError="This is Range Error";
}catch(e6:SecurityError){
thisError="This is Security Error!!!";
}catch(e7:Error){
thisError = "This is an error";
}finally{
Assert.expectEq( "Testing try block with throw statement", "This is Type Error" ,thisError);
}
// displays results.

View File

@ -0,0 +1,13 @@
<flex-config>
<compiler>
<source-path>
<path-element>.</path-element>
<path-element>../../../../lib</path-element>
</source-path>
<debug>false</debug>
<omit-trace-statements>false</omit-trace-statements>
<show-actionscript-warnings>false</show-actionscript-warnings>
<strict>false</strict>
</compiler>
<output>test.swf</output>
</flex-config>

View File

@ -0,0 +1 @@
Testing try block with throw statement PASSED!

View File

@ -0,0 +1,43 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
package {
import flash.display.MovieClip;
public class Test extends MovieClip {}
}
import com.adobe.test.Assert;
// var SECTION = "Definitions"; // provide a document reference (ie, ECMA section)
// var VERSION = "AS3"; // Version of JavaScript or ECMA
// var TITLE = "Testing try block with multiple catch blocks, the fifth catch block catching the type error"; // Provide ECMA section title or a description
var BUGNUMBER = "";
thisError = "no error";
try {
throw new TypeError();
} catch(e:ReferenceError){
thisError="This is Reference Error";
}catch(e1:ArgumentError){
thisError="This is Argument Error";
}catch(e2:URIError){
thisError="This is URI Error";
}catch(e3:EvalError){
thisError="This is Eval Error";
}catch(e4:TypeError){
thisError="This is Type Error";
}catch(e5:RangeError){
thisError="This is Range Error";
}catch(e6:SecurityError){
thisError="This is Security Error!!!";
}catch(e7:Error){
thisError = "This is an error";
}finally{
Assert.expectEq( "Testing try block with throw statement", "This is Type Error" ,thisError);
}
// displays results.

View File

@ -0,0 +1,13 @@
<flex-config>
<compiler>
<source-path>
<path-element>.</path-element>
<path-element>../../../../lib</path-element>
</source-path>
<debug>false</debug>
<omit-trace-statements>false</omit-trace-statements>
<show-actionscript-warnings>false</show-actionscript-warnings>
<strict>false</strict>
</compiler>
<output>test.swf</output>
</flex-config>

View File

@ -0,0 +1 @@
Testing try block with throw statement PASSED!

View File

@ -0,0 +1,43 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
package {
import flash.display.MovieClip;
public class Test extends MovieClip {}
}
import com.adobe.test.Assert;
// var SECTION = "Definitions"; // provide a document reference (ie, ECMA section)
// var VERSION = "AS3"; // Version of JavaScript or ECMA
// var TITLE = "Testing try block with multiple catch blocks, the sixth catch block catching the type error"; // Provide ECMA section title or a description
var BUGNUMBER = "";
thisError = "no error";
try {
throw new TypeError();
} catch(e:ReferenceError){
thisError="This is Reference Error";
}catch(e1:ArgumentError){
thisError="This is Argument Error";
}catch(e2:URIError){
thisError="This is URI Error";
}catch(e3:EvalError){
thisError="This is Eval Error";
}catch(e4:RangeError){
thisError="This is Range Error";
}catch(e5:TypeError){
thisError="This is Type Error";
}catch(e6:SecurityError){
thisError="This is Security Error!!!";
}catch(e7:Error){
thisError = "This is an error";
}finally{
Assert.expectEq( "Testing try block with throw statement", "This is Type Error" ,thisError);
}
// displays results.

View File

@ -0,0 +1,13 @@
<flex-config>
<compiler>
<source-path>
<path-element>.</path-element>
<path-element>../../../../lib</path-element>
</source-path>
<debug>false</debug>
<omit-trace-statements>false</omit-trace-statements>
<show-actionscript-warnings>false</show-actionscript-warnings>
<strict>false</strict>
</compiler>
<output>test.swf</output>
</flex-config>

View File

@ -0,0 +1 @@
Testing try block with throw statement PASSED!

View File

@ -0,0 +1,43 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
package {
import flash.display.MovieClip;
public class Test extends MovieClip {}
}
import com.adobe.test.Assert;
// var SECTION = "Definitions"; // provide a document reference (ie, ECMA section)
// var VERSION = "AS3"; // Version of JavaScript or ECMA
// var TITLE = "Testing try block with multiple catch blocks, the seventh catch block catching the type error"; // Provide ECMA section title or a description
var BUGNUMBER = "";
thisError = "no error";
try {
throw new TypeError();
} catch(e:ReferenceError){
thisError="This is Reference Error";
}catch(e1:ArgumentError){
thisError="This is Argument Error";
}catch(e2:URIError){
thisError="This is URI Error";
}catch(e3:EvalError){
thisError="This is Eval Error";
}catch(e4:RangeError){
thisError="This is Range Error";
}catch(e5:SecurityError){
thisError="This is security Error";
}catch(e6:TypeError){
thisError="This is Type Error";
}catch(e7:Error){
thisError = "This is an error";
}finally{
Assert.expectEq( "Testing try block with throw statement", "This is Type Error" ,thisError);
}
// displays results.

View File

@ -0,0 +1,13 @@
<flex-config>
<compiler>
<source-path>
<path-element>.</path-element>
<path-element>../../../../lib</path-element>
</source-path>
<debug>false</debug>
<omit-trace-statements>false</omit-trace-statements>
<show-actionscript-warnings>false</show-actionscript-warnings>
<strict>false</strict>
</compiler>
<output>test.swf</output>
</flex-config>

View File

@ -0,0 +1 @@
Testing try block with throw statement PASSED!

View File

@ -0,0 +1,19 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
package MultipleCatchBlocksURI
{
public class URIErrors
{
var a:Number;
public function MyArgumentError(a):Number
{
var k:String = decodeURI("!@#$%^&*()<>?");
return 6;
}
}
}

View File

@ -0,0 +1,52 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
package {
import flash.display.MovieClip;
public class Test extends MovieClip {}
}
import MultipleCatchBlocksURI.*;
import com.adobe.test.Assert;
// var SECTION = "Definitions"; // provide a document reference (ie, ECMA section)
// var VERSION = "AS3"; // Version of JavaScript or ECMA
// var TITLE = "Testing try block with multiple catch blocks"; // Provide ECMA section title or a description
var BUGNUMBER = "";
var z = new URIErrors();
thisError = "no error";
try{
z.MyArgumentError(6);
}catch(e:ReferenceError){
thisError=e.toString();
}catch(e1:TypeError){
thisError=e1.toString();
}catch(e2:ArgumentError){
thisError=e2.toString();
}catch(e3:URIError){
thisError=(e3.toString()).substr(0,21);
}catch(e4:UninitializedError){
thisError=e4.toString();
}catch(e5:EvalError){
thisError=e5.toString();
}catch(e6:RangeError){
thisError=e6.toString();
}catch(e7:DefinitionError){
thisError="This is Definition Error";
}catch(e8:SyntaxError){
thisError="This is Syntax Error";
}catch(e9:VerifyError){
thisError="This is Verify Error";
}catch(e10:Error){
thisError=e7.toString();
}finally{
Assert.expectEq( "Testing catch block with URI Error", "URIError: Error #1052",thisError);
}
// displays results.

View File

@ -0,0 +1,13 @@
<flex-config>
<compiler>
<source-path>
<path-element>.</path-element>
<path-element>../../../../lib</path-element>
</source-path>
<debug>false</debug>
<omit-trace-statements>false</omit-trace-statements>
<show-actionscript-warnings>false</show-actionscript-warnings>
<strict>false</strict>
</compiler>
<output>test.swf</output>
</flex-config>

View File

@ -0,0 +1 @@
Testing catch block with URI Error PASSED!

View File

@ -0,0 +1,51 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
package {
import flash.display.MovieClip;
public class Test extends MovieClip {}
}
import com.adobe.test.Assert;
// var SECTION = "Definitions"; // provide a document reference (ie, ECMA section)
// var VERSION = "AS3"; // Version of JavaScript or ECMA
// var TITLE = "Testing try block with multiple catch blocks, the catch block with parameter of type ArgumentError catching the Argument error "; // Provide ECMA section title or a description
var BUGNUMBER = "";
thisError = "no error";
try {
throw new ArgumentError();
} catch(e:ReferenceError){
thisError="This is Reference Error";
}catch(e1:ArgumentError){
thisError="This is Argument Error";
}catch(e2:URIError){
thisError="This is URI Error";
}catch(e3:EvalError){
thisError="This is Eval Error";
}catch(e4:RangeError){
thisError="This is Range Error";
}catch(e4:TypeError){
thisError="This is Type Error";
}catch(e5:SecurityError){
thisError="This is security Error";
}catch(e6:DefinitionError){
thisError="This is Definition Error";
}catch(e7:UninitializedError){
thisError="This is Uninitialized Error";
}catch(e8:SyntaxError){
thisError="This is Syntax Error";
}catch(e9:VerifyError){
thisError="This is Verify Error";
}catch(e10:Error){
thisError = e10.toString();
}finally{
Assert.expectEq( "Testing try block with throw statement", "This is Argument Error" ,thisError);
}
// displays results.

View File

@ -0,0 +1,13 @@
<flex-config>
<compiler>
<source-path>
<path-element>.</path-element>
<path-element>../../../../lib</path-element>
</source-path>
<debug>false</debug>
<omit-trace-statements>false</omit-trace-statements>
<show-actionscript-warnings>false</show-actionscript-warnings>
<strict>false</strict>
</compiler>
<output>test.swf</output>
</flex-config>

View File

@ -0,0 +1 @@
Testing try block with throw statement PASSED!

View File

@ -0,0 +1,49 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
package {
import flash.display.MovieClip;
public class Test extends MovieClip {}
}
import com.adobe.test.Assert;
// var SECTION = "Definitions"; // provide a document reference (ie, ECMA section)
// var VERSION = "AS3"; // Version of JavaScript or ECMA
// var TITLE = "Testing try block with multiple catch blocks, the catch block with parameter of type Error catching the Argument error when there is no catch block with parameter of type Argument Error"; // Provide ECMA section title or a description
var BUGNUMBER = "";
thisError = "no error";
try {
throw new ArgumentError();
} catch(e:ReferenceError){
thisError="This is Reference Error";
}catch(e2:URIError){
thisError="This is URI Error";
}catch(e3:EvalError){
thisError="This is Eval Error";
}catch(e4:RangeError){
thisError="This is Range Error";
}catch(e4:TypeError){
thisError="This is Type Error";
}catch(e5:SecurityError){
thisError="This is security Error";
}catch(e6:DefinitionError){
thisError="This is Definition Error";
}catch(e7:UninitializedError){
thisError="This is Uninitialized Error";
}catch(e8:SyntaxError){
thisError="This is Syntax Error";
}catch(e9:VerifyError){
thisError="This is Verify Error";
}catch(e10:Error){
thisError = e10.toString();
}finally{
Assert.expectEq( "Testing try block with throw statement", "Error: ArgumentError" ,Error(thisError)+"" );
}
// displays results.

View File

@ -0,0 +1,13 @@
<flex-config>
<compiler>
<source-path>
<path-element>.</path-element>
<path-element>../../../../lib</path-element>
</source-path>
<debug>false</debug>
<omit-trace-statements>false</omit-trace-statements>
<show-actionscript-warnings>false</show-actionscript-warnings>
<strict>false</strict>
</compiler>
<output>test.swf</output>
</flex-config>

View File

@ -0,0 +1 @@
Testing try block with throw statement PASSED!

View File

@ -0,0 +1,2 @@
num_ticks = 1
known_failure = true

View File

@ -0,0 +1,45 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
package {
import flash.display.MovieClip;
public class Test extends MovieClip {}
}
import com.adobe.test.Assert;
// var SECTION = "Definitions"; // provide a document reference (ie, ECMA section)
// var VERSION = "AS3"; // Version of JavaScript or ECMA
// var TITLE = "Testing try block with multiple catch blocks, the catch block with parameter of type DefinitionError catching the Definition error "; // Provide ECMA section title or a description
var BUGNUMBER = "";
thisError = "no error";
try {
throw new DefinitionError();
} catch(e:ReferenceError){
thisError="This is Reference Error";
}catch(e1:ArgumentError){
thisError="This is Argument Error";
}catch(e2:URIError){
thisError="This is URI Error";
}catch(e3:EvalError){
thisError="This is Eval Error";
}catch(e4:RangeError){
thisError="This is Range Error";
}catch(e4:TypeError){
thisError="This is Type Error";
}catch(e5:SecurityError){
thisError="This is security Error";
}catch(e6:DefinitionError){
thisError="This is Definition Error";
}catch(e7:Error){
thisError = e7.toString();
}finally{
Assert.expectEq( "Testing try block with throw statement", "This is Definition Error" ,thisError );
}
// displays results.

View File

@ -0,0 +1,13 @@
<flex-config>
<compiler>
<source-path>
<path-element>.</path-element>
<path-element>../../../../lib</path-element>
</source-path>
<debug>false</debug>
<omit-trace-statements>false</omit-trace-statements>
<show-actionscript-warnings>false</show-actionscript-warnings>
<strict>false</strict>
</compiler>
<output>test.swf</output>
</flex-config>

View File

@ -0,0 +1 @@
Testing try block with throw statement PASSED!

View File

@ -0,0 +1,43 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
package {
import flash.display.MovieClip;
public class Test extends MovieClip {}
}
import com.adobe.test.Assert;
// var SECTION = "Definitions"; // provide a document reference (ie, ECMA section)
// var VERSION = "AS3"; // Version of JavaScript or ECMA
// var TITLE = "Testing try block with multiple catch blocks, the catch block with parameter of type Error catching the Definition error when there is no catch block with parameter of type Definition Error"; // Provide ECMA section title or a description
var BUGNUMBER = "";
thisError = "no error";
try {
throw new DefinitionError();
} catch(e:ReferenceError){
thisError="This is Reference Error";
}catch(e1:ArgumentError){
thisError="This is Argument Error";
}catch(e2:URIError){
thisError="This is URI Error";
}catch(e3:EvalError){
thisError="This is Eval Error";
}catch(e4:RangeError){
thisError="This is Range Error";
}catch(e4:TypeError){
thisError="This is Type Error";
}catch(e5:SecurityError){
thisError="This is security Error";
}catch(e7:Error){
thisError = e7.toString();
}finally{
Assert.expectEq( "Testing try block with throw statement", "Error: DefinitionError" ,Error(thisError)+"" );
}
// displays results.

View File

@ -0,0 +1,13 @@
<flex-config>
<compiler>
<source-path>
<path-element>.</path-element>
<path-element>../../../../lib</path-element>
</source-path>
<debug>false</debug>
<omit-trace-statements>false</omit-trace-statements>
<show-actionscript-warnings>false</show-actionscript-warnings>
<strict>false</strict>
</compiler>
<output>test.swf</output>
</flex-config>

View File

@ -0,0 +1 @@
Testing try block with throw statement PASSED!

Some files were not shown because too many files have changed in this diff Show More