js/src/jit-test/tests/basic/testThrowingObjectEqUndefined.js

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/js/src/jit-test/tests/basic/testThrowingObjectEqUndefined.js	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,15 @@
     1.4 +function testThrowingObjectEqUndefined()
     1.5 +{
     1.6 +  try
     1.7 +  {
     1.8 +    var obj = { toString: function() { throw 0; } };
     1.9 +    for (var i = 0; i < 5; i++)
    1.10 +      "" + (obj == undefined);
    1.11 +    return i === 5;
    1.12 +  }
    1.13 +  catch (e)
    1.14 +  {
    1.15 +    return "" + e;
    1.16 +  }
    1.17 +}
    1.18 +assertEq(testThrowingObjectEqUndefined(), true);

mercurial