diff options
author | David Fugate <dfugate@microsoft.com> | 2011-06-27 16:20:31 -0700 |
---|---|---|
committer | David Fugate <dfugate@microsoft.com> | 2011-06-27 16:20:31 -0700 |
commit | ed70f1a7a646d5fee7df05544fe21d635f55fd2f (patch) | |
tree | db6531a69d243b27116394e99bca7c6bc04f01b7 /test/suite/sputnik/Conformance/12_Statement/12.14_The_try_Statement/S12.14_A4.js | |
parent | d4a997996545ba4b7da90d5547b86ccc44d377d0 (diff) | |
download | test262-ed70f1a7a646d5fee7df05544fe21d635f55fd2f.tar.gz |
Ported Sputnik changes over from the 'external' directory to 'test/suite/sputnik'. Still need to convert
the tests over to test262 format.
Diffstat (limited to 'test/suite/sputnik/Conformance/12_Statement/12.14_The_try_Statement/S12.14_A4.js')
-rw-r--r-- | test/suite/sputnik/Conformance/12_Statement/12.14_The_try_Statement/S12.14_A4.js | 71 |
1 files changed, 36 insertions, 35 deletions
diff --git a/test/suite/sputnik/Conformance/12_Statement/12.14_The_try_Statement/S12.14_A4.js b/test/suite/sputnik/Conformance/12_Statement/12.14_The_try_Statement/S12.14_A4.js index 7f5a06707..e76809232 100644 --- a/test/suite/sputnik/Conformance/12_Statement/12.14_The_try_Statement/S12.14_A4.js +++ b/test/suite/sputnik/Conformance/12_Statement/12.14_The_try_Statement/S12.14_A4.js @@ -1,35 +1,36 @@ -// Copyright 2009 the Sputnik authors. All rights reserved.
-// This code is governed by the BSD license found in the LICENSE file.
-
-/**
- * @name: S12.14_A4;
- * @section: 12.14;
- * @assertion: Sanity test for "catch(Indetifier) statement";
- * @description: Checking if deleting an exception fails;
- */
-
-// CHECK#1
-try {
- throw "catchme";
- $ERROR('#1.1: throw "catchme" lead to throwing exception');
-}
-catch (e) {
- if (delete e){
- $ERROR('#1.2: Exception has DontDelete property');
- }
- if (e!=="catchme") {
- $ERROR('#1.3: Exception === "catchme". Actual: Exception ==='+ e );
- }
-}
-
-// CHECK#2
-try {
- throw "catchme";
- $ERROR('#2.1: throw "catchme" lead to throwing exception');
-}
-catch(e){}
-try{
- e;
- $ERROR('#2.2: Deleting catching exception after ending "catch" block');
-}
-catch(err){}
+// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S12.14_A4; + * @section: 12.14; + * @assertion: Sanity test for "catch(Indetifier) statement"; + * @description: Checking if deleting an exception fails; + * @strict_mode_negative SyntaxError; + */ + +// CHECK#1 +try { + throw "catchme"; + $ERROR('#1.1: throw "catchme" lead to throwing exception'); +} +catch (e) { + if (delete e){ + $ERROR('#1.2: Exception has DontDelete property'); + } + if (e!=="catchme") { + $ERROR('#1.3: Exception === "catchme". Actual: Exception ==='+ e ); + } +} + +// CHECK#2 +try { + throw "catchme"; + $ERROR('#2.1: throw "catchme" lead to throwing exception'); +} +catch(e){} +try{ + e; + $ERROR('#2.2: Deleting catching exception after ending "catch" block'); +} +catch(err){} |