« Bugzilla Issues Index

#117 — Various String tests (15.5.4.*) fail by assuming built-in functions called with |undefined| as this instead receive the global object

These tests, in particular:

S15.5.4.11_A1_T3 Checking by using eval fail
S15.5.4.12_A1_T3 Checking by using eval fail
S15.5.4.13_A1_T3 Checking by using eval fail
S15.5.4.15_A1_T3 Checking by using eval fail
S15.5.4.7_A1_T3 Checking by using eval fail
S15.5.4.8_A1_T3 Checking by using eval fail
S15.5.4.4_A1_T3 Use numbers and strings as pos fail
S15.5.4.5_A1_T3 Use numbers and strings as pos fail
S15.5.4.6_A1_T3 Use numbers and function object as arguments fail

They do things like this:

var charAt = String.prototype.charAt;
assertEq(charAt(1), 'o');
assertEq(charAt(2), 'b');
assertEq(charAt(3), 'j');

assuming that the global object stringifies as "[object ...]" somehow. But these methods throw a TypeError if |this| is null or undefined, via CheckObjectCoercible, so the tests are buggy.

Mark, can I have your blessing on fixing these Sputnik tests directly in test262? Alternatively, you now have the power to make these changes as well:)

Hi David,

This quarter I'd like to work with you to resolve all remaining issues impeding the final integration of Sputnik into test262. However, until then, I'll will resolve such things by fixing first in Sputnik and then updating the Sputnik contribution to test262. I'll take care of these specific ones. Thanks.

I'm also changing the importance from "enhancement" to "normal" because fixing a real bug is not an "enhancement".

These were disabled on the live website yesterday.

Fixed at

Although all the files that Jeff lists are indeed incorrect (and have now been removed), most of these are incorrect for a different reason: The depend on the global "toString" binding, if present, being the same as Object.prototype.toString. This is not required and indeed some platforms validly do otherwise.