js/src/tests/test262/ch11/11.14/S11.14_A2.1_T1.js

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/js/src/tests/test262/ch11/11.14/S11.14_A2.1_T1.js	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,54 @@
     1.4 +// Copyright 2009 the Sputnik authors.  All rights reserved.
     1.5 +// This code is governed by the BSD license found in the LICENSE file.
     1.6 +
     1.7 +/**
     1.8 + * Operator uses GetValue
     1.9 + *
    1.10 + * @path ch11/11.14/S11.14_A2.1_T1.js
    1.11 + * @description Either Expression is not Reference or GetBase is not null
    1.12 + */
    1.13 +
    1.14 +//CHECK#1
    1.15 +if ((1,2) !== 2) {
    1.16 +  $ERROR('#1: (1,2) === 2. Actual: ' + ((1,2)));
    1.17 +}
    1.18 +
    1.19 +//CHECK#2
    1.20 +var x = 1;
    1.21 +if ((x, 2) !== 2) {
    1.22 +  $ERROR('#2: var x = 1; (x, 2) === 2. Actual: ' + ((x, 2)));
    1.23 +}
    1.24 +
    1.25 +//CHECK#3
    1.26 +var y = 2;
    1.27 +if ((1, y) !== 2) {
    1.28 +  $ERROR('#3: var y = 2; (1, y) === 2. Actual: ' + ((1, y)));
    1.29 +}
    1.30 +
    1.31 +//CHECK#4
    1.32 +var x = 1;
    1.33 +var y = 2;
    1.34 +if ((x, y) !== 2) {
    1.35 +  $ERROR('#4: var x = 1; var y = 2; (x, y) === 2. Actual: ' + ((x, y)));
    1.36 +}
    1.37 +
    1.38 +//CHECK#5
    1.39 +var x = 1;
    1.40 +if ((x, x) !== 1) {
    1.41 +  $ERROR('#5: var x = 1; (x, x) === 1. Actual: ' + ((x, x)));
    1.42 +}
    1.43 +
    1.44 +//CHECK#6
    1.45 +var objectx = new Object();
    1.46 +var objecty = new Object();
    1.47 +objectx.prop = true;
    1.48 +objecty.prop = 1.1;
    1.49 +if ((objectx.prop = false, objecty.prop) !== objecty.prop) {
    1.50 +  $ERROR('#6: var objectx = new Object(); var objecty = new Object(); objectx.prop = true; objecty.prop = 1; (objectx.prop = false, objecty.prop) === objecty.prop. Actual: ' + ((objectx.prop = false, objecty.prop)));
    1.51 +} else {
    1.52 +  if (objectx.prop !== false) {
    1.53 +    $ERROR('#6: var objectx = new Object(); var objecty = new Object(); objectx.prop = true; objecty.prop = 1; objectx.prop = false, objecty.prop; objectx.prop === false');
    1.54 +  } 
    1.55 +}
    1.56 +
    1.57 +

mercurial