OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 // Some surrounding cases which already worked, for good measure |
| 6 assertTrue(new Date('275760-10-14') == 'Invalid Date'); |
| 7 assertTrue(new Date('275760-09-23') == 'Invalid Date'); |
| 8 assertTrue(new Date('+275760-09-24') == 'Invalid Date'); |
| 9 assertTrue(new Date('+275760-10-13') == 'Invalid Date'); |
| 10 |
| 11 // The following cases used to throw "illegal access" |
| 12 assertTrue(new Date('275760-09-24') == 'Invalid Date'); |
| 13 assertTrue(new Date('275760-10-13') == 'Invalid Date'); |
| 14 assertTrue(new Date('+275760-10-13 ') == 'Invalid Date'); |
| 15 |
| 16 // However, dates within the range or valid |
| 17 assertTrue(new Date('100000-10-13') != 'Invalid Date'); |
| 18 assertTrue(new Date('+100000-10-13') != 'Invalid Date'); |
| 19 assertTrue(new Date('+100000-10-13 ') != 'Invalid Date'); |
OLD | NEW |