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

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

michael@0 1 function printStatus (msg) {
michael@0 2 var lines = msg.split ("");
michael@0 3 }
michael@0 4 function printBugNumber (num) {
michael@0 5 var digits = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F"];
michael@0 6 }
michael@0 7 var lfcode = new Array();
michael@0 8 lfcode.push("gczeal(4);");
michael@0 9 lfcode.push("jsTestDriverEnd();");
michael@0 10 lfcode.push("");
michael@0 11 lfcode.push("var BUGNUMBER = \"(none)\";\
michael@0 12 var summary = \"gen.close(); gen.throw(ex) throws ex forever\";\
michael@0 13 var actual, expect;\
michael@0 14 printBugNumber(BUGNUMBER);\
michael@0 15 printStatus(summary);\
michael@0 16 function gen() {\
michael@0 17 var x = 5, y = 7;\
michael@0 18 yield z;\
michael@0 19 }\
michael@0 20 var failed = false;\
michael@0 21 var it = gen();\
michael@0 22 try {\
michael@0 23 it.close();\
michael@0 24 var doThrow = true;\
michael@0 25 var thrown = \"foobar\";\
michael@0 26 try { } catch (e) { }\
michael@0 27 try { } catch (e) { }\
michael@0 28 throw \"it.throw(\\\"\" + thrown + \"\\\") failed\";\
michael@0 29 var stopPassed = false;\
michael@0 30 try { } catch (e) {\
michael@0 31 if (\"1234\")\
michael@0 32 stopPassed = true;\
michael@0 33 }\
michael@0 34 } catch (e) {}\
michael@0 35 ");
michael@0 36 var lfRunTypeId = -1;
michael@0 37 while (true) {
michael@0 38 var file = lfcode.shift(); if (file == undefined) { break; }
michael@0 39 if (file == "evaluate") {
michael@0 40 } else {
michael@0 41 loadFile(file);
michael@0 42 }
michael@0 43 }
michael@0 44 function loadFile(lfVarx) {
michael@0 45 try {
michael@0 46 if (lfVarx.substr(-3) == ".js") {
michael@0 47 } else {
michael@0 48 switch (lfRunTypeId) {
michael@0 49 default: evaluate(lfVarx);
michael@0 50 }
michael@0 51 }
michael@0 52 } catch (lfVare) {
michael@0 53 print(lfVare);
michael@0 54 }
michael@0 55 }

mercurial