summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/ch11/11.8/11.8.6/S11.8.6_A4_T2.js
blob: a4f1f3c02d55ab07f008d4127b645918d61f878f (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.

/**
 * Only constructor call (with "new" keyword) makes instance
 *
 * @path ch11/11.8/11.8.6/S11.8.6_A4_T2.js
 * @description Checking Number case
 */

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

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

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