Skip to content
Snippets Groups Projects
Commit ff4f1309 authored by Rick Waldron's avatar Rick Waldron Committed by Leo Balter
Browse files

built-ins/Infinity, NaN, undefined: make all indentation consistent (depth & character) (#1439)

parent 6e7ba506
No related branches found
No related tags found
No related merge requests found
Showing
with 20 additions and 20 deletions
...@@ -8,7 +8,7 @@ description: > ...@@ -8,7 +8,7 @@ description: >
(false) (false)
---*/ ---*/
var desc = Object.getOwnPropertyDescriptor(this, 'Infinity'); var desc = Object.getOwnPropertyDescriptor(this, 'Infinity');
assert.sameValue(desc.writable, false, 'desc.writable'); assert.sameValue(desc.writable, false, 'desc.writable');
assert.sameValue(desc.enumerable, false, 'desc.enumerable'); assert.sameValue(desc.enumerable, false, 'desc.enumerable');
......
...@@ -9,21 +9,21 @@ description: Use typeof, isNaN, isFinite ...@@ -9,21 +9,21 @@ description: Use typeof, isNaN, isFinite
// CHECK#1 // CHECK#1
if (typeof(Infinity) !== "number") { if (typeof(Infinity) !== "number") {
$ERROR('#1: typeof(Infinity) === "number". Actual: ' + (typeof(Infinity))); $ERROR('#1: typeof(Infinity) === "number". Actual: ' + (typeof(Infinity)));
} }
// CHECK#2 // CHECK#2
if (isFinite(Infinity) !== false) { if (isFinite(Infinity) !== false) {
$ERROR('#2: Infinity === Not-a-Finite. Actual: ' + (Infinity)); $ERROR('#2: Infinity === Not-a-Finite. Actual: ' + (Infinity));
} }
// CHECK#3 // CHECK#3
if (isNaN(Infinity) !== false) { if (isNaN(Infinity) !== false) {
$ERROR('#3: Infinity === Not-a-Number. Actual: ' + (Infinity)); $ERROR('#3: Infinity === Not-a-Number. Actual: ' + (Infinity));
} }
// CHECK#4 // CHECK#4
if (Infinity !== Number.POSITIVE_INFINITY) { 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] ...@@ -11,5 +11,5 @@ includes: [propertyHelper.js]
// CHECK#1 // CHECK#1
verifyNotWritable(this, "Infinity", null, true); verifyNotWritable(this, "Infinity", null, true);
if (typeof(Infinity) === "boolean") { 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] ...@@ -11,5 +11,5 @@ flags: [noStrict]
// CHECK#1 // CHECK#1
Infinity = true; Infinity = true;
if (typeof(Infinity) === "boolean") { 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] ...@@ -10,5 +10,5 @@ flags: [noStrict]
// CHECK#1 // CHECK#1
if (delete Infinity !== false) { 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 ...@@ -10,6 +10,6 @@ description: Use for-in statement
// CHECK#1 // CHECK#1
for (var prop in this) { for (var prop in this) {
if (prop === "Infinity") { 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 ...@@ -6,7 +6,7 @@ es5id: 15.1.1.1-0
description: Global.NaN is a data property with default attribute values (false) 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.writable, false, 'desc.writable');
assert.sameValue(desc.enumerable, false, 'desc.enumerable'); assert.sameValue(desc.enumerable, false, 'desc.enumerable');
......
...@@ -11,5 +11,5 @@ includes: [propertyHelper.js] ...@@ -11,5 +11,5 @@ includes: [propertyHelper.js]
// CHECK#1 // CHECK#1
verifyNotWritable(this, "NaN", null, true); verifyNotWritable(this, "NaN", null, true);
if (typeof(NaN) === "boolean") { 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] ...@@ -11,5 +11,5 @@ flags: [noStrict]
// CHECK#1 // CHECK#1
NaN = true; NaN = true;
if (typeof(NaN) === "boolean") { 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] ...@@ -10,5 +10,5 @@ flags: [noStrict]
// CHECK#1 // CHECK#1
if (delete NaN !== false) { 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 ...@@ -10,6 +10,6 @@ description: Use for-in statement
// CHECK#1 // CHECK#1
for (var prop in this) { for (var prop in this) {
if (prop === "NaN") { if (prop === "NaN") {
$ERROR('#1: The NaN is DontEnum'); $ERROR('#1: The NaN is DontEnum');
} }
} }
...@@ -12,7 +12,7 @@ flags: [onlyStrict] ...@@ -12,7 +12,7 @@ flags: [onlyStrict]
var global = this; var global = this;
assert.throws(TypeError, function() { 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(global["undefined"], void 0);
assert.sameValue(undefined, void 0); assert.sameValue(undefined, void 0);
...@@ -11,15 +11,15 @@ description: Use typeof, isNaN, isFinite ...@@ -11,15 +11,15 @@ description: Use typeof, isNaN, isFinite
// CHECK#1 // CHECK#1
if (typeof(undefined) !== "undefined") { if (typeof(undefined) !== "undefined") {
$ERROR('#1: typeof(undefined) === "undefined". Actual: ' + (typeof(undefined))); $ERROR('#1: typeof(undefined) === "undefined". Actual: ' + (typeof(undefined)));
} }
// CHECK#2 // CHECK#2
if (undefined !== void 0) { if (undefined !== void 0) {
$ERROR('#2: undefined === void 0. Actual: ' + (undefined)); $ERROR('#2: undefined === void 0. Actual: ' + (undefined));
} }
// CHECK#3 // CHECK#3
if (undefined !== eval("var x")) { 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] ...@@ -12,5 +12,5 @@ flags: [noStrict]
// CHECK#1 // CHECK#1
if (delete undefined !== false) { 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 ...@@ -12,6 +12,6 @@ description: Use for-in statement
// CHECK#1 // CHECK#1
for (var prop in this) { for (var prop in this) {
if (prop === "undefined") { if (prop === "undefined") {
$ERROR('#1: The undefined is DontEnum'); $ERROR('#1: The undefined is DontEnum');
} }
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment