Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
michael@0 | 1 | // Binary: cache/js-dbg-32-5cfb73435e06-linux |
michael@0 | 2 | // Flags: --ion-eager |
michael@0 | 3 | // |
michael@0 | 4 | var actual = ''; |
michael@0 | 5 | function TestCase(n, d, e, a) { |
michael@0 | 6 | this.reason = ''; |
michael@0 | 7 | } |
michael@0 | 8 | function inSection(x) {} |
michael@0 | 9 | function reportCompare (expected, actual, description) { |
michael@0 | 10 | var testcase = new TestCase("unknown-test-name", description, expected, actual); |
michael@0 | 11 | testcase.reason = output; |
michael@0 | 12 | } |
michael@0 | 13 | var lfcode = new Array(); |
michael@0 | 14 | lfcode.push("4"); |
michael@0 | 15 | lfcode.push("function START(summary) {\ |
michael@0 | 16 | }\ |
michael@0 | 17 | function TEST(section, expected, actual) {\ |
michael@0 | 18 | return reportCompare(expected, actual, inSection(section) + SUMMARY);\ |
michael@0 | 19 | }\ |
michael@0 | 20 | var expect = (1);\ |
michael@0 | 21 | TEST(1,1 << this < assertEq++ < this, actual);\ |
michael@0 | 22 | "); |
michael@0 | 23 | lfcode.push("\ |
michael@0 | 24 | gczeal(4);\ |
michael@0 | 25 | data >>>= RunSingleBenchmark(data);\ |
michael@0 | 26 | "); |
michael@0 | 27 | lfcode.push("4"); |
michael@0 | 28 | lfcode.push("\ |
michael@0 | 29 | var BUGNUMBER = 345855;\ |
michael@0 | 30 | var summary = 'Blank yield expressions are not syntax errors';\ |
michael@0 | 31 | test();\ |
michael@0 | 32 | function test() {\ |
michael@0 | 33 | try {\ |
michael@0 | 34 | eval('(function() {x = 12 + yield;})');\ |
michael@0 | 35 | } catch(ex) {}\ |
michael@0 | 36 | try { eval('(function() {x = 12 + yield 42})'); } catch(ex) {\ |
michael@0 | 37 | status = inSection(4);\ |
michael@0 | 38 | }\ |
michael@0 | 39 | try {\ |
michael@0 | 40 | eval('(function() {x = 12 + (yield);})');\ |
michael@0 | 41 | } catch(ex) { }\ |
michael@0 | 42 | try {\ |
michael@0 | 43 | eval('(function () {foo((yield))})');\ |
michael@0 | 44 | } catch(ex) { }\ |
michael@0 | 45 | try {\ |
michael@0 | 46 | eval('(function() {x = 12 + (yield 42)})');\ |
michael@0 | 47 | } catch(ex) { }\ |
michael@0 | 48 | reportCompare(expect, actual, summary + ': function() {x = 12 + (yield 42)}');\ |
michael@0 | 49 | }\ |
michael@0 | 50 | "); |
michael@0 | 51 | while (true) { |
michael@0 | 52 | var file = lfcode.shift(); if (file == undefined) { break; } |
michael@0 | 53 | loadFile(file); |
michael@0 | 54 | } |
michael@0 | 55 | function loadFile(lfVarx) { |
michael@0 | 56 | try { |
michael@0 | 57 | if (lfVarx.substr(-3) == ".js") { |
michael@0 | 58 | } else if (!isNaN(lfVarx)) { |
michael@0 | 59 | lfRunTypeId = lfVarx; |
michael@0 | 60 | } else { |
michael@0 | 61 | switch (lfRunTypeId) { |
michael@0 | 62 | case 1: eval(read(lfVarx)); break; |
michael@0 | 63 | default: evaluate(lfVarx); |
michael@0 | 64 | } |
michael@0 | 65 | } |
michael@0 | 66 | } catch (lfVare) { |
michael@0 | 67 | print(lfVare); |
michael@0 | 68 | } |
michael@0 | 69 | } |