OLD | NEW |
1 // Copyright 2008 the V8 project authors. All rights reserved. | 1 // Copyright 2008 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 for (var i in fromJSON.properties) { | 69 for (var i in fromJSON.properties) { |
70 var p = fromJSON.properties[i]; | 70 var p = fromJSON.properties[i]; |
71 print(p.name); | 71 print(p.name); |
72 if (p.name == 'message') { | 72 if (p.name == 'message') { |
73 assertEquals(e.message, refs.lookup(p.ref).value); | 73 assertEquals(e.message, refs.lookup(p.ref).value); |
74 found_message = true; | 74 found_message = true; |
75 } | 75 } |
76 } | 76 } |
77 assertTrue(found_message, 'Property message not found'); | 77 assertTrue(found_message, 'Property message not found'); |
78 } | 78 } |
79 | 79 |
80 // Check the formatted text (regress 1231579). | 80 // Check the formatted text (regress 1231579). |
81 assertEquals(fromJSON.text, e.toString(), 'toString'); | 81 assertEquals(fromJSON.text, e.toString(), 'toString'); |
82 } | 82 } |
83 | 83 |
84 | 84 |
85 // Test Date values. | 85 // Test Date values. |
86 testErrorMirror(new Error()); | 86 testErrorMirror(new Error()); |
87 testErrorMirror(new Error('This does not work')); | 87 testErrorMirror(new Error('This does not work')); |
88 testErrorMirror(new Error(123+456)); | 88 testErrorMirror(new Error(123+456)); |
89 testErrorMirror(new EvalError('EvalError')); | 89 testErrorMirror(new EvalError('EvalError')); |
90 testErrorMirror(new RangeError('RangeError')); | 90 testErrorMirror(new RangeError('RangeError')); |
91 testErrorMirror(new ReferenceError('ReferenceError')); | 91 testErrorMirror(new ReferenceError('ReferenceError')); |
92 testErrorMirror(new SyntaxError('SyntaxError')); | 92 testErrorMirror(new SyntaxError('SyntaxError')); |
93 testErrorMirror(new TypeError('TypeError')); | 93 testErrorMirror(new TypeError('TypeError')); |
94 testErrorMirror(new URIError('URIError')); | 94 testErrorMirror(new URIError('URIError')); |
OLD | NEW |