archives

« Bugzilla Issues Index

#27 — S15.1.1.1_A2_T1, S15.1.1.1_A2_T2, S15.1.1.2_A2_T1, S15.1.1.3_A2_T1, and S15.1.1.3_A2_T2 invalid (ES3 to ES5 change)


These test cases assert that NaN/Infinity/etc are *not* readonly via assertions similar to:
NaN = true;
if (typeof(NaN) !== "boolean") {
$ERROR('#1: NaN = true; typeof(NaN) === "boolean". Actual: ' + (typeof(NaN)));
}

While this might have been valid in ES3, it's not in ES5. E.g., 15.1.1.1 states:
15.1.1.1 NaN
The value of NaN is NaN (see 8.5). This property has the attributes { [[Writable]]: false, [[Enumerable]]: false, [[Configurable]]: false }.
meaning that NaN can no longer be reassigned.

Disabling these tests.


S15.1.1.3_A2_T2 also calls "ERROR()" instead of "$ERROR()". Not really worth fixing this bug since the complete test is currently disabled, but I thought to mention it nonetheless...
---
undefined = true;
if (typeof(undefined) !== "boolean") {
ERROR('#1: undefined = true; typeof(undefined) === "boolean". Actual: ' + (typeof(undefined)));
}
---


Fixed at http://hg.ecmascript.org/tests/test262/rev/7ee6fc6143d8