| OLD | NEW |
| 1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // Flags: --stack-size=100 --harmony --harmony-reflect --harmony-arrays | 5 // Flags: --stack-size=100 --harmony --harmony-reflect --harmony-arrays |
| 6 // Flags: --harmony-regexps | 6 // Flags: --harmony-regexps |
| 7 | 7 |
| 8 function test(f, expected, type) { | 8 function test(f, expected, type) { |
| 9 try { | 9 try { |
| 10 f(); | 10 f(); |
| (...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 293 }, "Reflect.construct: Arguments list has wrong type", TypeError); | 293 }, "Reflect.construct: Arguments list has wrong type", TypeError); |
| 294 | 294 |
| 295 | 295 |
| 296 //=== SyntaxError === | 296 //=== SyntaxError === |
| 297 | 297 |
| 298 test(function() { | 298 test(function() { |
| 299 new Function(")", ""); | 299 new Function(")", ""); |
| 300 }, "Function arg string contains parenthesis", SyntaxError); | 300 }, "Function arg string contains parenthesis", SyntaxError); |
| 301 | 301 |
| 302 | 302 |
| 303 // === ReferenceError === |
| 304 |
| 305 test(function() { |
| 306 "use strict"; |
| 307 o; |
| 308 }, "o is not defined", ReferenceError); |
| 309 |
| 303 // === RangeError === | 310 // === RangeError === |
| 304 | 311 |
| 305 // kArrayLengthOutOfRange | 312 // kArrayLengthOutOfRange |
| 306 test(function() { | 313 test(function() { |
| 307 "use strict"; | 314 "use strict"; |
| 308 Object.defineProperty([], "length", { value: 1E100 }); | 315 Object.defineProperty([], "length", { value: 1E100 }); |
| 309 }, "defineProperty() array length out of range", RangeError); | 316 }, "defineProperty() array length out of range", RangeError); |
| 310 | 317 |
| 311 // kInvalidArrayBufferLength | 318 // kInvalidArrayBufferLength |
| 312 test(function() { | 319 test(function() { |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 363 Number(1).toString(100); | 370 Number(1).toString(100); |
| 364 }, "toString() radix argument must be between 2 and 36", RangeError); | 371 }, "toString() radix argument must be between 2 and 36", RangeError); |
| 365 | 372 |
| 366 | 373 |
| 367 // === URIError === | 374 // === URIError === |
| 368 | 375 |
| 369 // kURIMalformed | 376 // kURIMalformed |
| 370 test(function() { | 377 test(function() { |
| 371 decodeURI("%%"); | 378 decodeURI("%%"); |
| 372 }, "URI malformed", URIError); | 379 }, "URI malformed", URIError); |
| OLD | NEW |