mirror of https://github.com/tc39/test262.git
35 lines
948 B
JavaScript
35 lines
948 B
JavaScript
// Copyright 2009 the Sputnik authors. All rights reserved.
|
|
// This code is governed by the BSD license found in the LICENSE file.
|
|
|
|
/*---
|
|
info: |
|
|
The PropertyName is undefined, ToString(BooleanLiteral),
|
|
ToString(nullLiteral)
|
|
es5id: 11.1.5_A4.3
|
|
description: "Creating properties with following names: undefined, 'true', 'null'"
|
|
---*/
|
|
|
|
//CHECK#1
|
|
var object = {undefined : true};
|
|
if (object.undefined !== true) {
|
|
$ERROR('#1: var object = {undefined : true}; object.undefined === true');
|
|
}
|
|
|
|
//CHECK#2
|
|
var object = {undefined : true};
|
|
if (object["undefined"] !== true) {
|
|
$ERROR('#2: var object = {undefined : true}; object["undefined"] === true');
|
|
}
|
|
|
|
//CHECK#3
|
|
var object = {"true" : true};
|
|
if (object["true"] !== true) {
|
|
$ERROR('#3: var object = {"true" : true}; object["true"] === true');
|
|
}
|
|
|
|
//CHECK#4
|
|
var object = {"null" : true};
|
|
if (object["null"] !== true) {
|
|
$ERROR('#4: var object = {"null" : true}; object["null"] === true');
|
|
}
|