Tests for 15.4.4.13, Array.prototype.unshift

Trevor Baker trbaker at adobe.com
Mon Apr 8 06:47:42 PDT 2013


Hi Paul, thanks for your detailed accounting!  It seems to me that your
findings belong in bug reports so they aren't lost to the ether.

https://bugs.ecmascript.org/enter_bug.cgi?product=Test262

Regards,
Trevor

On 4/7/13 4:00 PM, "Paul Ruizendaal" <pnr at planet.nl> wrote:

>
>Continuing the series, now for unshift. Browser results as before.
>
>Suggesting to add the following two tests to make sure that 'true' is
>passed to Put and Delete respectively:
>
>function test() {
>var a = [4,5,6];
>Object.defineProperty(a, '2', {value:6, writable:false});
>try {
>  a.unshift(1,2,3);
>  return false;
>} catch(e) {
>  if( e.name!=='TypeError' ) return false;
>  if( a.toString()!=='1,2,6,4,5,6' ) return false;
>  return true;
>}
>}
>
>function test() {
>var a = [4];
>Object.defineProperty(a, '2', {value:6, configurable:false});
>try {
>  a.unshift(1);
>  return false;
>} catch(e) {
>  if( e.name!=='TypeError' ) return false;
>  if( a.toString()!=='4,,6,6' ) return false;
>  return true;
>}
>}
>
>_______________________________________________
>test262-discuss mailing list
>test262-discuss at mozilla.org
>https://mail.mozilla.org/listinfo/test262-discuss



More information about the test262-discuss mailing list