|
419 | 419 | for (var i = 0; i < e.length; i++) { |
420 | 420 | var message = pst.opera10a(e[i]); |
421 | 421 | //equals(message.join("\n"), 'debug', 'debug'); |
422 | | - equals(message.length, 7, 'number of stack entries'); |
423 | | - equals(message[0].indexOf('this.undef()') >= 0, true, 'this.undef() is at the top of stack'); |
| 422 | + // NOTE: the important thing here is that the user sees calls to bar and foo in the correct order |
| 423 | + // We cannot test the size of the stack because it's inconsistent |
| 424 | + equals(message[message.length - 3].indexOf('bar(') >= 0, true, 'bar is 3nd from the bottom of stack'); |
| 425 | + equals(message[message.length - 2].indexOf('bar(2)') >= 0, true, 'bar is 2nd from the bottom of stack'); |
424 | 426 | equals(message[message.length - 1].indexOf('foo()') >= 0, true, 'foo() is at the bottom of stack'); |
425 | 427 | } |
426 | 428 | }); |
|
686 | 688 | for (var i = 0; i < results.length; ++i) { |
687 | 689 | //equals((results[i]), '', 'debug'); |
688 | 690 | var functions = p.guessAnonymousFunctions(results[i]); |
689 | | - //equals(functions.join("\n"), '', 'debug'); |
| 691 | + equals(functions.join("\n"), '', 'debug'); |
690 | 692 | equals(functions[2].indexOf('f2()'), 0, 'guessed f2 in ' + functions[2]); |
691 | 693 | } |
692 | 694 | }); |
|
0 commit comments