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

Thu, 15 Jan 2015 15:55:04 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 15:55:04 +0100
branch
TOR_BUG_9701
changeset 9
a63d609f5ebe
permissions
-rw-r--r--

Back out 97036ab72558 which inappropriately compared turds to third parties.

     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