summaryrefslogtreecommitdiff
path: root/external/contributions/Google/sputnik_conformance_modified/11_Expressions/11.8_Relational_Operators/11.8.7_The_in_operator/S11.8.7_A2.4_T3.js
blob: 9f26cf12e979cf37f6bec679aaa37d0a5c683914 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// Copyright 2009 the Sputnik authors.  All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.

/**
 * @name: S11.8.7_A2.4_T3;
 * @section: 11.8.7;
 * @assertion: First expression is evaluated first, and then second expression;
 * @description: Checking with undeclarated variables;
*/

//CHECK#1
try {
  max_value in (max_value = "MAX_VALUE", Number);
  $ERROR('#1.1: max_value in (max_value = "MAX_VALUE", Number) throw ReferenceError. Actual: ' + (max_value in (max_value = "MAX_VALUE", Number)));  
}
catch (e) {
  if ((e instanceof ReferenceError) !== true) {
    $ERROR('#1.2: max_value in (max_value = "MAX_VALUE", Number) throw ReferenceError. Actual: ' + (e));  
  }
}

//CHECK#2
if ((NUMBER = Number, "MAX_VALUE") in NUMBER !== true) {
  $ERROR('#2: (NUMBER = Number, "MAX_VALUE") in NUMBER !== true');
}