1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/js/src/jit-test/tests/auto-regress/bug748119.js Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,95 @@ 1.4 +// Binary: cache/js-dbg-32-17af008937e3-linux 1.5 +// Flags: -m -n -a 1.6 +// 1.7 +var lfcode = new Array(); 1.8 +lfcode.push("\ 1.9 +var gTestcases = new Array();\ 1.10 +var gTc = gTestcases.length;\ 1.11 +function TestCase(n, d, e, a) {\ 1.12 + this.passed = getTestCaseResult(e, a);\ 1.13 + this.bugnumber = typeof(BUGNUMER) != 'undefined' ? BUGNUMBER : '';\ 1.14 + gTestcases[gTc++] = this;\ 1.15 +}\ 1.16 +for (var i=0; i<len; i++) {}\ 1.17 +function reportCompare (expected, actual, description) {\ 1.18 + var testcase = new TestCase(\"unknown-test-name\", description, expected, actual);\ 1.19 + if (testcase.passed)\ 1.20 + printStatus (\"Expected match to '\" + toPrinted(expectedRegExp) + \"' matched actual value '\" + toPrinted(actual) + \"'\");\ 1.21 +}\ 1.22 +function getTestCaseResult(expected, actual)\ 1.23 +function stopTest() {}\ 1.24 +"); 1.25 +lfcode.push("\ 1.26 +var UBound = 0;\ 1.27 +var TEST_PASSED = 'SyntaxError';\ 1.28 +var TEST_FAILED = 'Generated an error, but NOT a SyntaxError!';\ 1.29 +var statusitems = [];\ 1.30 +var actualvalues = [];\ 1.31 +var expectedvalues = [];\ 1.32 +testThis(' /a**/ ');\ 1.33 +testThis(' /a***/ ');\ 1.34 +testThis(' /a++/ ');\ 1.35 +testThis(' /a+++/ ');\ 1.36 +testThis(' /a???/ ');\ 1.37 +testThis(' /a????/ ');\ 1.38 +testThis(' /+a/ ');\ 1.39 +testThis(' /++a/ ');\ 1.40 +testThis(' /?a/ ');\ 1.41 +testThis(' /??a/ ');\ 1.42 +testThis(' /x{1}{1}/ ');\ 1.43 +testThis(' /x{1,}{1}/ ');\ 1.44 +testThis(' /x{1,2}{1}/ ');\ 1.45 +testThis(' /x{1}{1,}/ ');\ 1.46 +testThis(' /x{1,}{1,}/ ');\ 1.47 +testThis(' /x{1,2}{1,}/ ');\ 1.48 +testThis(' /x{1}{1,2}/ ');\ 1.49 +testThis(' /x{1,}{1,2}/ ');\ 1.50 +function testThis(sInvalidSyntax) {\ 1.51 + try {\ 1.52 + eval(sInvalidSyntax);\ 1.53 + } catch(e) {\ 1.54 + actual = TEST_PASSED;\ 1.55 + }\ 1.56 +}\ 1.57 +function checkThis(sAllowedSyntax) {}\ 1.58 +reportCompare(expectedvalues[i], actualvalues[i], statusitems[i]);\ 1.59 +exitFunc ('test');\ 1.60 +"); 1.61 +lfcode.push("gczeal(4);"); 1.62 +lfcode.push("\ 1.63 +var MSG_PATTERN = '\\nregexp = ';\ 1.64 +var MSG_STRING = '\\nstring = ';\ 1.65 +var MSG_EXPECT = '\\nExpect: ';\ 1.66 +var MSG_ACTUAL = '\\nActual: ';\ 1.67 +var TYPE_STRING = typeof 'abc';\ 1.68 +function testRegExp(statuses, patterns, strings, actualmatches, expectedmatches)\ 1.69 + lExpect = expectedmatch.length;\ 1.70 + lActual = actualmatch.length;\ 1.71 + var expected = formatArray(expectedmatch);\ 1.72 + reportCompare(expected, actual, state + ERR_MATCH + CHAR_NL );\ 1.73 +function getState(status, pattern, string) {\ 1.74 + var delim = CHAR_COMMA + CHAR_SPACE;\ 1.75 +"); 1.76 +lfcode.push("\ 1.77 +var gTestcases = new Array;\ 1.78 +function TestCase(n, d, e, a) {}\ 1.79 +function toPrinted(value) value=value.replace(/\\\\n/g, 'NL').replace(/[^\\x20-\\x7E]+/g, escapeString);\ 1.80 +"); 1.81 +lfcode.push("\ 1.82 +var summary = 'Regression test for bug 385393';\ 1.83 +var expect = 'No Crash';\ 1.84 + reportCompare(expect, actual, summary);\ 1.85 +"); 1.86 +while (true) { 1.87 + var file = lfcode.shift(); if (file == undefined) { break; } 1.88 + loadFile(file); 1.89 +} 1.90 +function loadFile(lfVarx) { 1.91 + try { 1.92 + if (lfVarx.substr(-3) == ".js") { 1.93 + switch (lfRunTypeId) { } 1.94 + } else { 1.95 + evaluate(lfVarx); 1.96 + } 1.97 + } catch (lfVare) { } 1.98 +}