archives

« Bugzilla Issues Index

#103 — 15.5.4.20-2-48.js looks suspicious


This test case includes:
function testcase() {
var dateObj = new Date();
return String.prototype.trim.call(dateObj) === dateObj.toString();
}


ES5.1 states:
15.9.5.2 Date.prototype.toString ( )
This function returns a String value. The contents of the String are implementation-dependent, but are intended to represent the Date in the current time zone in a convenient, human-readable form.


Without diving into the definition of String.trim, I'd say it's possible that some implementations could fail this test and still adhere to the spec.


Ditto for 15.5.4.20-2-52.js.


Confirmed both of these test cases are invalid.


Fix added to Mercurial.