mirror of https://github.com/tc39/test262.git
built-ins/Infinity, NaN, undefined: make all indentation consistent (depth & character) (#1439)
This commit is contained in:
parent
6e7ba5060c
commit
ff4f13099c
|
@ -8,7 +8,7 @@ description: >
|
|||
(false)
|
||||
---*/
|
||||
|
||||
var desc = Object.getOwnPropertyDescriptor(this, 'Infinity');
|
||||
var desc = Object.getOwnPropertyDescriptor(this, 'Infinity');
|
||||
|
||||
assert.sameValue(desc.writable, false, 'desc.writable');
|
||||
assert.sameValue(desc.enumerable, false, 'desc.enumerable');
|
||||
|
|
|
@ -9,21 +9,21 @@ description: Use typeof, isNaN, isFinite
|
|||
|
||||
// CHECK#1
|
||||
if (typeof(Infinity) !== "number") {
|
||||
$ERROR('#1: typeof(Infinity) === "number". Actual: ' + (typeof(Infinity)));
|
||||
$ERROR('#1: typeof(Infinity) === "number". Actual: ' + (typeof(Infinity)));
|
||||
}
|
||||
|
||||
// CHECK#2
|
||||
if (isFinite(Infinity) !== false) {
|
||||
$ERROR('#2: Infinity === Not-a-Finite. Actual: ' + (Infinity));
|
||||
$ERROR('#2: Infinity === Not-a-Finite. Actual: ' + (Infinity));
|
||||
}
|
||||
|
||||
// CHECK#3
|
||||
if (isNaN(Infinity) !== false) {
|
||||
$ERROR('#3: Infinity === Not-a-Number. Actual: ' + (Infinity));
|
||||
$ERROR('#3: Infinity === Not-a-Number. Actual: ' + (Infinity));
|
||||
}
|
||||
|
||||
|
||||
// CHECK#4
|
||||
if (Infinity !== Number.POSITIVE_INFINITY) {
|
||||
$ERROR('#4: Infinity === Number.POSITIVE_INFINITY. Actual: ' + (Infinity));
|
||||
$ERROR('#4: Infinity === Number.POSITIVE_INFINITY. Actual: ' + (Infinity));
|
||||
}
|
||||
|
|
|
@ -11,5 +11,5 @@ includes: [propertyHelper.js]
|
|||
// CHECK#1
|
||||
verifyNotWritable(this, "Infinity", null, true);
|
||||
if (typeof(Infinity) === "boolean") {
|
||||
$ERROR('#1: Infinity = true; typeof(Infinity) !== "boolean". Actual: ' + (typeof(Infinity)));
|
||||
$ERROR('#1: Infinity = true; typeof(Infinity) !== "boolean". Actual: ' + (typeof(Infinity)));
|
||||
}
|
||||
|
|
|
@ -11,5 +11,5 @@ flags: [noStrict]
|
|||
// CHECK#1
|
||||
Infinity = true;
|
||||
if (typeof(Infinity) === "boolean") {
|
||||
$ERROR('#1: Infinity = true; typeof(Infinity) !== "boolean". Actual: ' + (typeof(Infinity)));
|
||||
$ERROR('#1: Infinity = true; typeof(Infinity) !== "boolean". Actual: ' + (typeof(Infinity)));
|
||||
}
|
||||
|
|
|
@ -10,5 +10,5 @@ flags: [noStrict]
|
|||
|
||||
// CHECK#1
|
||||
if (delete Infinity !== false) {
|
||||
$ERROR('#1: delete Infinity === false. Actual: ' + (delete Infinity));
|
||||
$ERROR('#1: delete Infinity === false. Actual: ' + (delete Infinity));
|
||||
}
|
||||
|
|
|
@ -10,6 +10,6 @@ description: Use for-in statement
|
|||
// CHECK#1
|
||||
for (var prop in this) {
|
||||
if (prop === "Infinity") {
|
||||
$ERROR('#1: The Infinity is DontEnum');
|
||||
$ERROR('#1: The Infinity is DontEnum');
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,7 +6,7 @@ es5id: 15.1.1.1-0
|
|||
description: Global.NaN is a data property with default attribute values (false)
|
||||
---*/
|
||||
|
||||
var desc = Object.getOwnPropertyDescriptor(this, 'NaN');
|
||||
var desc = Object.getOwnPropertyDescriptor(this, 'NaN');
|
||||
|
||||
assert.sameValue(desc.writable, false, 'desc.writable');
|
||||
assert.sameValue(desc.enumerable, false, 'desc.enumerable');
|
||||
|
|
|
@ -11,5 +11,5 @@ includes: [propertyHelper.js]
|
|||
// CHECK#1
|
||||
verifyNotWritable(this, "NaN", null, true);
|
||||
if (typeof(NaN) === "boolean") {
|
||||
$ERROR('#1: NaN = true; typeof(NaN) !== "boolean". Actual: ' + (typeof(NaN)));
|
||||
$ERROR('#1: NaN = true; typeof(NaN) !== "boolean". Actual: ' + (typeof(NaN)));
|
||||
}
|
||||
|
|
|
@ -11,5 +11,5 @@ flags: [noStrict]
|
|||
// CHECK#1
|
||||
NaN = true;
|
||||
if (typeof(NaN) === "boolean") {
|
||||
$ERROR('#1: NaN = true; typeof(NaN) !== "boolean". Actual: ' + (typeof(NaN)));
|
||||
$ERROR('#1: NaN = true; typeof(NaN) !== "boolean". Actual: ' + (typeof(NaN)));
|
||||
}
|
||||
|
|
|
@ -10,5 +10,5 @@ flags: [noStrict]
|
|||
|
||||
// CHECK#1
|
||||
if (delete NaN !== false) {
|
||||
$ERROR('#1: delete NaN === false. Actual: ' + (delete NaN));
|
||||
$ERROR('#1: delete NaN === false. Actual: ' + (delete NaN));
|
||||
}
|
||||
|
|
|
@ -10,6 +10,6 @@ description: Use for-in statement
|
|||
// CHECK#1
|
||||
for (var prop in this) {
|
||||
if (prop === "NaN") {
|
||||
$ERROR('#1: The NaN is DontEnum');
|
||||
$ERROR('#1: The NaN is DontEnum');
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@ flags: [onlyStrict]
|
|||
var global = this;
|
||||
|
||||
assert.throws(TypeError, function() {
|
||||
global["undefined"] = 5; // Should throw a TypeError as per 8.12.5
|
||||
global["undefined"] = 5; // Should throw a TypeError as per 8.12.5
|
||||
});
|
||||
assert.sameValue(global["undefined"], void 0);
|
||||
assert.sameValue(undefined, void 0);
|
||||
|
|
|
@ -11,15 +11,15 @@ description: Use typeof, isNaN, isFinite
|
|||
|
||||
// CHECK#1
|
||||
if (typeof(undefined) !== "undefined") {
|
||||
$ERROR('#1: typeof(undefined) === "undefined". Actual: ' + (typeof(undefined)));
|
||||
$ERROR('#1: typeof(undefined) === "undefined". Actual: ' + (typeof(undefined)));
|
||||
}
|
||||
|
||||
// CHECK#2
|
||||
if (undefined !== void 0) {
|
||||
$ERROR('#2: undefined === void 0. Actual: ' + (undefined));
|
||||
$ERROR('#2: undefined === void 0. Actual: ' + (undefined));
|
||||
}
|
||||
|
||||
// CHECK#3
|
||||
if (undefined !== eval("var x")) {
|
||||
$ERROR('#3: undefined === eval("var x"). Actual: ' + (undefined));
|
||||
$ERROR('#3: undefined === eval("var x"). Actual: ' + (undefined));
|
||||
}
|
||||
|
|
|
@ -12,5 +12,5 @@ flags: [noStrict]
|
|||
|
||||
// CHECK#1
|
||||
if (delete undefined !== false) {
|
||||
$ERROR('#1: delete undefined === false. Actual: ' + (delete undefined));
|
||||
$ERROR('#1: delete undefined === false. Actual: ' + (delete undefined));
|
||||
}
|
||||
|
|
|
@ -12,6 +12,6 @@ description: Use for-in statement
|
|||
// CHECK#1
|
||||
for (var prop in this) {
|
||||
if (prop === "undefined") {
|
||||
$ERROR('#1: The undefined is DontEnum');
|
||||
$ERROR('#1: The undefined is DontEnum');
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue