summaryrefslogtreecommitdiff
path: root/external/contributions/Google/sputnik_conformance_modified/11_Expressions/11.8_Relational_Operators/11.8.6_The_instanceof_operator/S11.8.6_A4_T3.js
blob: 197d72c004185abd1413ec6018a9599740514264 (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
// 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_A4_T3;
* @section: 11.8.6;
* @assertion: Only constructor call (with "new" keyword) makes instance;
* @description: Checking String case;
*/

//CHECK#1
if ("" instanceof String) {
	$ERROR('#1: "" is not instanceof String');
}

//CHECK#2
if (String("") instanceof String) {
	$ERROR('#2: String("") is not instanceof String');
}

//CHECK#3
if (new String instanceof String !== true) {
	$ERROR('#3: new String instanceof String');
}