| 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 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 163 var obj = {}; | 163 var obj = {}; |
| 164 obj[Symbol.iterator] = function() { return { next: function() { return 1 }}}; | 164 obj[Symbol.iterator] = function() { return { next: function() { return 1 }}}; |
| 165 Array.from(obj); | 165 Array.from(obj); |
| 166 }, "Iterator result 1 is not an object", TypeError); | 166 }, "Iterator result 1 is not an object", TypeError); |
| 167 | 167 |
| 168 // kIteratorValueNotAnObject | 168 // kIteratorValueNotAnObject |
| 169 test(function() { | 169 test(function() { |
| 170 new Map([1]); | 170 new Map([1]); |
| 171 }, "Iterator value 1 is not an entry object", TypeError); | 171 }, "Iterator value 1 is not an entry object", TypeError); |
| 172 | 172 |
| 173 // kNotAPromise | |
| 174 test(function() { | |
| 175 Promise.prototype.chain.call(1); | |
| 176 }, "1 is not a promise", TypeError); | |
| 177 | |
| 178 // kNotConstructor | 173 // kNotConstructor |
| 179 test(function() { | 174 test(function() { |
| 180 new Symbol(); | 175 new Symbol(); |
| 181 }, "Symbol is not a constructor", TypeError); | 176 }, "Symbol is not a constructor", TypeError); |
| 182 | 177 |
| 183 // kNotDateObject | 178 // kNotDateObject |
| 184 test(function() { | 179 test(function() { |
| 185 Date.prototype.setHours.call(1); | 180 Date.prototype.setHours.call(1); |
| 186 }, "this is not a Date object.", TypeError); | 181 }, "this is not a Date object.", TypeError); |
| 187 | 182 |
| (...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 458 Number(1).toString(100); | 453 Number(1).toString(100); |
| 459 }, "toString() radix argument must be between 2 and 36", RangeError); | 454 }, "toString() radix argument must be between 2 and 36", RangeError); |
| 460 | 455 |
| 461 | 456 |
| 462 // === URIError === | 457 // === URIError === |
| 463 | 458 |
| 464 // kURIMalformed | 459 // kURIMalformed |
| 465 test(function() { | 460 test(function() { |
| 466 decodeURI("%%"); | 461 decodeURI("%%"); |
| 467 }, "URI malformed", URIError); | 462 }, "URI malformed", URIError); |
| OLD | NEW |