Add Date.UTC(+/-Infinity) single arg test variants to infinity-make-day.js

Signed-off-by: Rick Waldron <waldron.rick@gmail.com>
This commit is contained in:
Rick Waldron 2017-01-19 12:00:10 -05:00
parent 1163e1a6ff
commit 8178b763dc
1 changed files with 5 additions and 1 deletions

View File

@ -6,7 +6,7 @@ es6id: 20.3.3.4
description: Infinite values specified to MakeDay produce NaN
info: |
[...]
9. Return TimeClip(MakeDate(MakeDay(yr, m, dt), MakeTime(h, min, s, milli))).
9. Return TimeClip(MakeDate(MakeDay(yr, m, dt), MakeTime(h, min, s, milli))).
MakeDay (year, month, date)
@ -14,6 +14,9 @@ info: |
NaN.
---*/
assert.sameValue(Date.UTC(Infinity), NaN, 'year: Infinity - single arg');
assert.sameValue(Date.UTC(-Infinity), NaN, 'year: -Infinity - single arg');
assert.sameValue(Date.UTC(Infinity, 0), NaN, 'year: Infinity');
assert.sameValue(Date.UTC(-Infinity, 0), NaN, 'year: -Infinity');
@ -22,3 +25,4 @@ assert.sameValue(Date.UTC(0, -Infinity), NaN, 'month: -Infinity');
assert.sameValue(Date.UTC(0, 0, Infinity), NaN, 'date: Infinity');
assert.sameValue(Date.UTC(0, 0, -Infinity), NaN, 'date: -Infinity');