js/src/jit-test/tests/baseline/bug842326.js

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/js/src/jit-test/tests/baseline/bug842326.js	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,16 @@
     1.4 +function TestCase(n, d, e, a)
     1.5 +this.passed = getTestCaseResult(e, a);
     1.6 +function getTestCaseResult(expected, actual) {
     1.7 +    if (actual != actual)
     1.8 +	return gTestcases;
     1.9 +}
    1.10 +gczeal(4);
    1.11 +try {
    1.12 +    var TEST_STRING = new String("");
    1.13 +    new TestCase(null, 0,eval("x = new Boolean(true); x.charCodeAt=String.prototype.charCodeAt;x.charCodeAt(0)") );
    1.14 +    new TestCase(null, null, 0, eval("x.charCodeAt=String.prototype.charCodeAt;x.charCodeAt(1)"));
    1.15 +    new TestCase(null, null, 0, eval("x.charCodeAt=String.prototype.charCodeAt;x.charCodeAt(2)"));
    1.16 +    new TestCase(null, null, 0, eval("x.charCodeAt=String.prototype.charCodeAt;x.charCodeAt(3)"));
    1.17 +    new TestCase(null, null, Number.NaN, eval("x.charCodeAt=String.prototype.charCodeAt;x.charCodeAt(4)"));
    1.18 +    new new let (r) (function () {}) ();
    1.19 +} catch(e) {}

mercurial