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-regexps | 5 // Flags: --stack-size=100 --harmony --harmony-reflect --harmony-regexps |
6 // Flags: --harmony-simd --strong-mode | 6 // Flags: --harmony-simd --strong-mode |
7 | 7 |
8 function test(f, expected, type) { | 8 function test(f, expected, type) { |
9 try { | 9 try { |
10 f(); | 10 f(); |
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
249 | 249 |
250 // kPropertyDescObject | 250 // kPropertyDescObject |
251 test(function() { | 251 test(function() { |
252 Object.defineProperty({}, "x", 1); | 252 Object.defineProperty({}, "x", 1); |
253 }, "Property description must be an object: 1", TypeError); | 253 }, "Property description must be an object: 1", TypeError); |
254 | 254 |
255 // kPropertyNotFunction | 255 // kPropertyNotFunction |
256 test(function() { | 256 test(function() { |
257 Set.prototype.add = 0; | 257 Set.prototype.add = 0; |
258 new Set(1); | 258 new Set(1); |
259 }, "Property 'add' of object #<Set> is not a function", TypeError); | 259 }, "'0' returned for property 'add' of object '#<Set>' is not a function", TypeE
rror); |
260 | 260 |
261 // kProtoObjectOrNull | 261 // kProtoObjectOrNull |
262 test(function() { | 262 test(function() { |
263 Object.setPrototypeOf({}, 1); | 263 Object.setPrototypeOf({}, 1); |
264 }, "Object prototype may only be an Object or null: 1", TypeError); | 264 }, "Object prototype may only be an Object or null: 1", TypeError); |
265 | 265 |
266 // kRedefineDisallowed | 266 // kRedefineDisallowed |
267 test(function() { | 267 test(function() { |
268 "use strict"; | 268 "use strict"; |
269 var o = {}; | 269 var o = {}; |
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
458 Number(1).toString(100); | 458 Number(1).toString(100); |
459 }, "toString() radix argument must be between 2 and 36", RangeError); | 459 }, "toString() radix argument must be between 2 and 36", RangeError); |
460 | 460 |
461 | 461 |
462 // === URIError === | 462 // === URIError === |
463 | 463 |
464 // kURIMalformed | 464 // kURIMalformed |
465 test(function() { | 465 test(function() { |
466 decodeURI("%%"); | 466 decodeURI("%%"); |
467 }, "URI malformed", URIError); | 467 }, "URI malformed", URIError); |
OLD | NEW |