diff options
Diffstat (limited to 'external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.8_Relational_Operators/11.8.6_The_instanceof_operator/S11.8.6_A2.1_T3.js')
-rw-r--r-- | external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.8_Relational_Operators/11.8.6_The_instanceof_operator/S11.8.6_A2.1_T3.js | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.8_Relational_Operators/11.8.6_The_instanceof_operator/S11.8.6_A2.1_T3.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.8_Relational_Operators/11.8.6_The_instanceof_operator/S11.8.6_A2.1_T3.js new file mode 100644 index 000000000..87352bc41 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.8_Relational_Operators/11.8.6_The_instanceof_operator/S11.8.6_A2.1_T3.js @@ -0,0 +1,20 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** +* @name: S11.8.6_A2.1_T3; +* @section: 11.8.6; +* @assertion: Operator "instanceof" uses GetValue; +* @description: If GetBase(ShiftExpression) is null, throw ReferenceError; +*/ + +//CHECK#1 +try { + ({}) instanceof OBJECT; + $ERROR('#1.1: ({}) instanceof OBJECT throw ReferenceError. Actual: ' + (({}) instanceof OBJECT)); +} +catch (e) { + if ((e instanceof ReferenceError) !== true) { + $ERROR('#1.2: ({}) instanceof OBJECT throw ReferenceError. Actual: ' + (e)); + } +} |