js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A1_T11.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 LeftHandSideExpression and "@=" or between "@=" and AssignmentExpression are allowed
     6  *
     7  * @path ch11/11.13/11.13.2/S11.13.2_A1_T11.js
     8  * @description Checking by using eval, check operator is x |= y
     9  */
    11 //CHECK#1
    12 x = 0;
    13 if ((eval("x\u0009|=\u00091")) !== 1) {
    14   $ERROR('#1: x = 0; (x\\u0009|=\\u00091) === 1');
    15 }
    17 //CHECK#2
    18 x = 0;
    19 if ((eval("x\u000B|=\u000B1")) !== 1) {
    20   $ERROR('#2: x = 0; (x\\u000B|=\\u000B1) === 1');  
    21 }
    23 //CHECK#3
    24 x = 0;
    25 if ((eval("x\u000C|=\u000C1")) !== 1) {
    26   $ERROR('#3: x = 0; (x\\u000C|=\\u000C1) === 1');
    27 }
    29 //CHECK#4
    30 x = 0;
    31 if ((eval("x\u0020|=\u00201")) !== 1) {
    32   $ERROR('#4: x = 0; (x\\u0020|=\\u00201) === 1');
    33 }
    35 //CHECK#5
    36 x = 0;
    37 if ((eval("x\u00A0|=\u00A01")) !== 1) {
    38   $ERROR('#5: x = 0; (x\\u00A0|=\\u00A01) === 1');
    39 }
    41 //CHECK#6
    42 x = 0;
    43 if ((eval("x\u000A|=\u000A1")) !== 1) {
    44   $ERROR('#6: x = 0; (x\\u000A|=\\u000A1) === 1');  
    45 }
    47 //CHECK#7
    48 x = 0;
    49 if ((eval("x\u000D|=\u000D1")) !== 1) {
    50   $ERROR('#7: x = 0; (x\\u000D|=\\u000D1) === 1');
    51 }
    53 //CHECK#8
    54 x = 0;
    55 if ((eval("x\u2028|=\u20281")) !== 1) {
    56   $ERROR('#8: x = 0; (x\\u2028|=\\u20281) === 1');
    57 }
    59 //CHECK#9
    60 x = 0;
    61 if ((eval("x\u2029|=\u20291")) !== 1) {
    62   $ERROR('#9: x = 0; (x\\u2029|=\\u20291) === 1');
    63 }
    66 //CHECK#10
    67 x = 0;
    68 if ((eval("x\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u2029|=\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u20291")) !== 1) {
    69   $ERROR('#10: x = 0; (x\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029|=\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u20291) === 1');
    70 }

mercurial