-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix bug introduced by
EpochNanoseconds
+ adjust tests to catch bett…
…er (#128) This fixes a bug that was introduced by #116. General gist is that the in the proposal [`5.5.4 ISODateTimeWithinLimits ( isoDateTime )`](https://tc39.es/proposal-temporal/#sec-temporal-isodatetimewithinlimits) there is a call to `GetUTCEpochNanoseconds`. However, this value is not checked to be valid, and instead of constraining to the NS_MAX_INSTANT/NS_MIN_INSTANT +/- NS_PER_DAY, respectively, we were constraining to NS_MAX_INSTANT/NS_MIN_INSTANT. There was a limit test on datetime, but we were only asserting the negative case, not the positive case, so the regression was not caught. So adjusted to handle the potentially invalid value, adjusted the preexisting datetime test, and added a date limit test based off the test262 limit test. EDIT: Potentially relevant context to #119
- Loading branch information
Showing
3 changed files
with
84 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters