michael@0: // Binary: cache/js-dbg-32-5cfb73435e06-linux michael@0: // Flags: --ion-eager michael@0: // michael@0: var actual = ''; michael@0: function TestCase(n, d, e, a) { michael@0: this.reason = ''; michael@0: } michael@0: function inSection(x) {} michael@0: function reportCompare (expected, actual, description) { michael@0: var testcase = new TestCase("unknown-test-name", description, expected, actual); michael@0: testcase.reason = output; michael@0: } michael@0: var lfcode = new Array(); michael@0: lfcode.push("4"); michael@0: lfcode.push("function START(summary) {\ michael@0: }\ michael@0: function TEST(section, expected, actual) {\ michael@0: return reportCompare(expected, actual, inSection(section) + SUMMARY);\ michael@0: }\ michael@0: var expect = (1);\ michael@0: TEST(1,1 << this < assertEq++ < this, actual);\ michael@0: "); michael@0: lfcode.push("\ michael@0: gczeal(4);\ michael@0: data >>>= RunSingleBenchmark(data);\ michael@0: "); michael@0: lfcode.push("4"); michael@0: lfcode.push("\ michael@0: var BUGNUMBER = 345855;\ michael@0: var summary = 'Blank yield expressions are not syntax errors';\ michael@0: test();\ michael@0: function test() {\ michael@0: try {\ michael@0: eval('(function() {x = 12 + yield;})');\ michael@0: } catch(ex) {}\ michael@0: try { eval('(function() {x = 12 + yield 42})'); } catch(ex) {\ michael@0: status = inSection(4);\ michael@0: }\ michael@0: try {\ michael@0: eval('(function() {x = 12 + (yield);})');\ michael@0: } catch(ex) { }\ michael@0: try {\ michael@0: eval('(function () {foo((yield))})');\ michael@0: } catch(ex) { }\ michael@0: try {\ michael@0: eval('(function() {x = 12 + (yield 42)})');\ michael@0: } catch(ex) { }\ michael@0: reportCompare(expect, actual, summary + ': function() {x = 12 + (yield 42)}');\ michael@0: }\ michael@0: "); michael@0: while (true) { michael@0: var file = lfcode.shift(); if (file == undefined) { break; } michael@0: loadFile(file); michael@0: } michael@0: function loadFile(lfVarx) { michael@0: try { michael@0: if (lfVarx.substr(-3) == ".js") { michael@0: } else if (!isNaN(lfVarx)) { michael@0: lfRunTypeId = lfVarx; michael@0: } else { michael@0: switch (lfRunTypeId) { michael@0: case 1: eval(read(lfVarx)); break; michael@0: default: evaluate(lfVarx); michael@0: } michael@0: } michael@0: } catch (lfVare) { michael@0: print(lfVare); michael@0: } michael@0: }