js/src/tests/test262/ch09/9.9/S9.9_A2.js

Wed, 31 Dec 2014 07:53:36 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 07:53:36 +0100
branch
TOR_BUG_3246
changeset 5
4ab42b5ab56c
permissions
-rw-r--r--

Correct small whitespace inconsistency, lost while renaming variables.

     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  * ToObject conversion from null value must throw TypeError
     6  *
     7  * @path ch09/9.9/S9.9_A2.js
     8  * @description Trying to convert null to Object
     9  * @noStrict
    10  */
    12 // CHECK#1
    13 try{
    14   null['foo'];
    15   $ERROR('#1.1: null[\'foo\'] throw TypeError. Actual: ' + (null['foo']));
    16 }
    17 catch(e){
    18   if((e instanceof TypeError) !== true){
    19     $ERROR('#1.2: null[\'foo\'] must throw TypeError. Actual: ' + (e));
    20   }
    21 }
    23 // CHECK#2
    24 try{
    25   with(null) x = 2;
    26   $ERROR('#2.1: with(null) x = 2 must throw TypeError. Actual: x === . Actual: ' + (x));
    27 }
    28 catch(e){
    29   if((e instanceof TypeError) !== true){
    30     $ERROR('#2.2: with(null) x = 2 must throw TypeError. Actual: ' + (e));
    31   }
    32 }

mercurial