| 1 |
// Copyright 2009 the Sputnik authors. All rights reserved. |
| 2 |
// This code is governed by the BSD license found in the LICENSE file. |
| 3 |
|
| 4 |
/*--- |
| 5 |
info: | |
| 6 |
Since calling Object as a function is identical to calling a function, |
| 7 |
list of arguments bracketing is allowed |
| 8 |
es5id: 15.2.2.1_A6_T2 |
| 9 |
description: Creating an object with "new Object(null,2,3)" |
| 10 |
---*/ |
| 11 |
|
| 12 |
var obj = new Object(null, 2, 3); |
| 13 |
|
| 14 |
//CHECK#1 |
| 15 |
if (obj.constructor !== Object) { |
| 16 |
$ERROR('#1: Since Object as a function calling is the same as function calling list of arguments can appears in braces;'); |
| 17 |
} |
| 18 |
|
| 19 |
//CHECK#2 |
| 20 |
if (typeof obj !== "object") { |
| 21 |
$ERROR('#2: Since Object as a function calling is the same as function calling list of arguments can appears in braces;'); |
| 22 |
} |