32 eval("var x = [ 23 34 ]"); |
32 eval("var x = [ 23 34 ]"); |
33 } catch (e) { |
33 } catch (e) { |
34 if (! (e instanceof SyntaxError)) { |
34 if (! (e instanceof SyntaxError)) { |
35 fail("syntax error expected here got " + e); |
35 fail("syntax error expected here got " + e); |
36 } |
36 } |
37 print(e.toString().replace(/\\/g, '/')); |
37 printError(e); |
38 } |
38 } |
39 |
39 |
40 try { |
40 try { |
41 eval("var x = { foo: 33 bar: 'hello' }"); |
41 eval("var x = { foo: 33 bar: 'hello' }"); |
42 } catch (e) { |
42 } catch (e) { |
43 if (! (e instanceof SyntaxError)) { |
43 if (! (e instanceof SyntaxError)) { |
44 fail("syntax error expected here got " + e); |
44 fail("syntax error expected here got " + e); |
45 } |
45 } |
46 print(e.toString().replace(/\\/g, '/')); |
46 printError(e); |
47 } |
47 } |