js/src/jit-test/tests/ion/bug878510.js

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/js/src/jit-test/tests/ion/bug878510.js	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,20 @@
     1.4 +function neg0(x) {
     1.5 +  return x===0 && (1/x)===-Infinity;
     1.6 +}
     1.7 +
     1.8 +function test(x,y) {
     1.9 +  if (x == 1.1)
    1.10 +    return 0;
    1.11 +  else if (x == "a")
    1.12 +    return 0;
    1.13 +  return x*y
    1.14 +}
    1.15 +
    1.16 +var t = 0;
    1.17 +for(var i=0; i<1005; i++) {
    1.18 +  test(1.1)
    1.19 +  test("a")
    1.20 +  t = test((i<1003)?i:-0, 0);
    1.21 +}
    1.22 +
    1.23 +assertEq(neg0(t), true);

mercurial