OLD | NEW |
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> | 1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <script src="resources/js-test-pre.js"></script> | 4 <script src="resources/js-test-pre.js"></script> |
5 </head> | 5 </head> |
6 <body> | 6 <body> |
7 <script> | 7 <script> |
8 | 8 |
9 description( | 9 description( |
10 "This test checks that toString() round-trip on a function that has a else c
lause directly \ | 10 "This test checks that toString() round-trip on a function that has a else c
lause directly \ |
11 followed by an else clause puts whitespace between the two on decompilation.
" | 11 followed by an else clause puts whitespace between the two on decompilation.
" |
12 ); | 12 ); |
13 | 13 |
14 | 14 |
15 function testTryElse() { if (x) {} else try {} finally {} } | 15 function testTryElse() { if (x) {} else try {} finally {} } |
16 | 16 |
17 unevalf = function(x) { return '(' + x.toString() + ')'; }; | 17 unevalf = function(x) { return '(' + x.toString() + ')'; }; |
18 | 18 |
19 // Test round trip. | 19 // Test round trip. |
20 shouldBe("unevalf(eval(unevalf(testTryElse)))", "unevalf(testTryElse)"); | 20 shouldBe("unevalf(eval(unevalf(testTryElse)))", "unevalf(testTryElse)"); |
21 </script> | 21 </script> |
22 <script src="resources/js-test-post.js"></script> | |
23 </body> | 22 </body> |
24 </html> | 23 </html> |
OLD | NEW |