Thu, 15 Jan 2015 15:55:04 +0100
Back out 97036ab72558 which inappropriately compared turds to third parties.
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 //-----------------------------------------------------------------------------
7 var BUGNUMBER = 452498;
8 var summary = 'TM: upvar2 regression tests';
9 var actual = '';
10 var expect = '';
13 //-----------------------------------------------------------------------------
14 test();
15 //-----------------------------------------------------------------------------
17 function test()
18 {
19 enterFunc ('test');
20 printBugNumber(BUGNUMBER);
21 printStatus (summary);
23 // ------- Comment #102 From Gary Kwong [:nth10sd]
25 // =====
27 (function(){function x(){} function x()y})();
29 // Assertion failure: JOF_OPTYPE(op) == JOF_ATOM, at ../jsemit.cpp:1710
31 // =====
32 function f() {
33 "" + (function(){
34 for( ; [function(){}] ; x = 0)
35 with({x: ""})
36 const x = []
37 });
38 }
39 f();
41 // Assertion failure: ss->top - saveTop <= 1U, at ../jsopcode.cpp:2156
43 // =====
45 try
46 {
47 function f() {
48 var x;
49 eval("const x = [];");
50 }
51 f();
52 }
53 catch(ex)
54 {
55 }
56 // Assertion failure: regs.sp == StackBase(fp), at ../jsinterp.cpp:2984
58 // =====
59 try
60 {
61 do {x} while([[] for (x in []) ]);
62 }
63 catch(ex)
64 {
65 }
66 // Assertion failure: !(pnu->pn_dflags & PND_BOUND), at ../jsemit.cpp:1818
67 // =====
69 try
70 {
71 {x} ((x=[] for (x in []))); x;
72 }
73 catch(ex)
74 {
75 }
76 // Assertion failure: cg->staticLevel >= level, at ../jsemit.cpp:2014
77 // Crash [@ BindNameToSlot] in opt without -j
79 // =====
81 reportCompare(expect, actual, summary);
83 exitFunc ('test');
84 }