js/src/tests/test262/ch11/11.4/11.4.3/S11.4.3_A1.js

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     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  * White Space and Line Terminator between "typeof" and UnaryExpression are allowed
     6  *
     7  * @path ch11/11.4/11.4.3/S11.4.3_A1.js
     8  * @description Checking by using eval
     9  */
    11 //CHECK#1
    12 if (eval("var x = 0; typeof\u0009x") !== "number") {
    13   $ERROR('#1: var x = 0; typeof\\u0009x; x === "number". Actual: ' + (x));
    14 }
    16 //CHECK#2
    17 if (eval("var x = 0; typeof\u000Bx") !== "number") {
    18   $ERROR('#2: var x = 0; typeof\\u000Bx; x === "number". Actual: ' + (x));  
    19 }
    21 //CHECK#3
    22 if (eval("var x = 0; typeof\u000Cx") !== "number") {
    23   $ERROR('#3: var x = 0; typeof\\u000Cx; x === "number". Actual: ' + (x));
    24 }
    26 //CHECK#4
    27 if (eval("var x = 0; typeof\u0020x") !== "number") {
    28   $ERROR('#4: var x = 0; typeof\\u0020x; x === "number". Actual: ' + (x));
    29 }
    31 //CHECK#5
    32 if (eval("var x = 0; typeof\u00A0x") !== "number") {
    33   $ERROR('#5: var x = 0; typeof\\u00A0x; x === "number". Actual: ' + (x));
    34 }
    36 //CHECK#6
    37 if (eval("var x = 0; typeof\u000Ax") !== "number") {
    38   $ERROR('#6: var x = 0; typeof\\u000Ax; x === "number". Actual: ' + (x));  
    39 }
    41 //CHECK#7
    42 if (eval("var x = 0; typeof\u000Dx") !== "number") {
    43   $ERROR('#7: var x = 0; typeof\\u000Dx; x === "number". Actual: ' + (x));
    44 }
    46 //CHECK#8
    47 if (eval("var x = 0; typeof\u2028x") !== "number") {
    48   $ERROR('#8: var x = 0; typeof\\u2028x; x === "number". Actual: ' + (x));
    49 }
    51 //CHECK#9
    52 if (eval("var x = 0; typeof\u2029x") !== "number") {
    53   $ERROR('#9: var x = 0; typeof\\u2029x; x === "number". Actual: ' + (x));
    54 }
    56 //CHECK#10
    57 if (eval("var x = 0; typeof\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u2029x") !== "number") {
    58   $ERROR('#10: var x = 0; typeof\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029x; x === "number". Actual: ' + (x));
    59 }

mercurial