mirror of https://github.com/tc39/test262.git
[javascriptcore-test262-automation] Changes from https://github.com/webkit/webkit.git at sha b69d88687a on Fri Aug 10 2018 18:07:39 GMT+0000 (Coordinated Universal Time)
This commit is contained in:
parent
48d95ac3c4
commit
1804b13434
|
@ -0,0 +1,16 @@
|
|||
function shouldBe(actual, expected) {
|
||||
if (actual !== expected)
|
||||
throw new Error('bad value: ' + actual);
|
||||
}
|
||||
|
||||
for (var i = 0; i < 1e5; ++i) {
|
||||
shouldBe(Number.isNaN(Date.UTC()), true);
|
||||
shouldBe(Date.UTC(2018), 1514764800000);
|
||||
shouldBe(Date.UTC(2018, 1), 1517443200000);
|
||||
shouldBe(Date.UTC(2018, 1, 2), 1517529600000);
|
||||
shouldBe(Date.UTC(2018, 1, 2, 3), 1517540400000);
|
||||
shouldBe(Date.UTC(2018, 1, 2, 3, 4), 1517540640000);
|
||||
shouldBe(Date.UTC(2018, 1, 2, 3, 4, 5), 1517540645000);
|
||||
shouldBe(Date.UTC(2018, 1, 2, 3, 4, 5, 6), 1517540645006);
|
||||
shouldBe(Date.UTC(2018, 1, 2, 3, 4, 5, 6, 7), 1517540645006);
|
||||
}
|
Loading…
Reference in New Issue