From 2314b99bac058e9014f04cb382972bdc6100a1c5 Mon Sep 17 00:00:00 2001 From: Andreas Woess Date: Wed, 15 Sep 2021 17:57:45 +0200 Subject: [PATCH] Fix incorrect tests: new Date(-0).valueOf() and new Date(-1.23e-15).valueOf() should return +0. (#3201) --- test/built-ins/Date/prototype/valueOf/S9.4_A3_T1.js | 2 +- test/built-ins/Date/prototype/valueOf/S9.4_A3_T2.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/built-ins/Date/prototype/valueOf/S9.4_A3_T1.js b/test/built-ins/Date/prototype/valueOf/S9.4_A3_T1.js index 5dccae285a..71bd2f22c6 100644 --- a/test/built-ins/Date/prototype/valueOf/S9.4_A3_T1.js +++ b/test/built-ins/Date/prototype/valueOf/S9.4_A3_T1.js @@ -56,4 +56,4 @@ assert.sameValue(d11.valueOf(), 0, 'd11.valueOf() must return 0'); // CHECK#12 var d12 = new Date(-1.23e-15); -assert.sameValue(d12.valueOf(), -0, 'd12.valueOf() must return -0'); +assert.sameValue(d12.valueOf(), 0, 'd12.valueOf() must return 0'); diff --git a/test/built-ins/Date/prototype/valueOf/S9.4_A3_T2.js b/test/built-ins/Date/prototype/valueOf/S9.4_A3_T2.js index 8a5ee0c4af..42e02b6f67 100644 --- a/test/built-ins/Date/prototype/valueOf/S9.4_A3_T2.js +++ b/test/built-ins/Date/prototype/valueOf/S9.4_A3_T2.js @@ -30,4 +30,4 @@ assert.sameValue(d4.valueOf(), 0, 'd4.valueOf() must return 0'); // CHECK#5 var d5 = new Date(-0); -assert.sameValue(d5.valueOf(), -0, 'd5.valueOf() must return -0'); +assert.sameValue(d5.valueOf(), 0, 'd5.valueOf() must return 0');