This test fails because it expects new Boolean(false) to return false, as it did in JS 1.2.
Comparison to other JS engines without having a version set:
JS 1.6 (Firefox 188.8.131.52 / Windows)
* Returns False
JScript 5.6 (Internet Explorer 6 SP2 / Windows)
* Returns False
Should we follow this old behavior since JScript and JS both do this?
It looks like new Boolean(false) is supposed to return false in JS 1.5:
184.108.40.206 new Boolean(value)
The [[Prototype]] property of the newly constructed object is set to the original Boolean prototype object, the one that is the initial value of Boolean.prototype (220.127.116.11).
The [[Class]] property of the newly constructed Boolean object is set to "Boolean".
The [[Value]] property of the newly constructed Boolean object is set to ToBoolean(value).
*** Bug 11579 has been marked as a duplicate of this bug. ***
The real cause that failed the test was IF statement.
var variable = new Boolean(false);
if (variable == false) print("EqualityExpression == RelationalExpression will be true");
if (variable) print("RelationalExpression will apply ToBollean operator on this Boolean 'object'"); // js1.2 sample use this, and expect the result of IF statement will be 'false'
In the sample above, JSCore and other JS engines are acting the same, both these two IF statements will be true, since 'variable' is a Boolean 'object' not a 'boolean' value, so the second IF statement will apply ToBollean(Object) and return true.
If you check js1_3/Boolean/boolean-001.js, you will see they already fixed this issue. (http://bugs.webkit.org/show_bug.cgi?id=11579#c7)
We don't support language versions in JSC (other than strict / non-strict), and al behaviour seems ES5 compliant. I don't think we need change anything here - the test documents our deliberate non-compliance with JS1.2.