js/src/tests/test262/ch12/12.14/S12.14_A4.js

Wed, 31 Dec 2014 13:27:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 13:27:57 +0100
branch
TOR_BUG_3246
changeset 6
8bccb770b82d
permissions
-rw-r--r--

Ignore runtime configuration files generated during quality assurance.

     1 // Copyright 2009 the Sputnik authors.  All rights reserved.
     2 // This code is governed by the BSD license found in the LICENSE file.
     4 /**
     5  * Sanity test for "catch(Indetifier) statement"
     6  *
     7  * @path ch12/12.14/S12.14_A4.js
     8  * @description Checking if deleting an exception fails
     9  * @noStrict
    10  */
    12 // CHECK#1
    13 try {
    14   throw "catchme";
    15   $ERROR('#1.1: throw "catchme" lead to throwing exception');
    16 }
    17 catch (e) {
    18   if (delete e){
    19     $ERROR('#1.2: Exception has DontDelete property');
    20   }
    21   if (e!=="catchme") {
    22     $ERROR('#1.3: Exception === "catchme". Actual:  Exception ==='+ e  );
    23   }
    24 }
    26 // CHECK#2
    27 try {
    28   throw "catchme";
    29   $ERROR('#2.1: throw "catchme" lead to throwing exception');
    30 }
    31 catch(e){}
    32 try{
    33   e;
    34   $ERROR('#2.2: Deleting catching exception after ending "catch" block');
    35 }
    36 catch(err){}

mercurial