Fix the infinite loop in ecma_date_year_from_time
JerryScript-DCO-1.0-Signed-off-by: Szilard Ledan szledan.u-szeged@partner.samsung.com
This commit is contained in:
committed by
László Langó
parent
9edae36b00
commit
7c1622855d
@@ -100,6 +100,7 @@ assert (isNaN (d.getTimezoneOffset()));
|
||||
|
||||
/* 5. test case */
|
||||
assert (new Date(2013, -1).getMonth() === 11);
|
||||
assert (new Date(-2, -2).getFullYear() === -3);
|
||||
assert (new Date(-1, -1).getFullYear() === -2);
|
||||
assert (new Date(-1, -1, -1).getMonth() === 10);
|
||||
assert (new Date(-1, -1, -1, -1).getDate() === 28);
|
||||
|
||||
@@ -81,6 +81,7 @@ main (int __attr_unused___ argc,
|
||||
JERRY_ASSERT (ecma_date_year_from_time (-1970 * MS_PER_YEAR) == 1);
|
||||
JERRY_ASSERT (ecma_date_year_from_time (START_OF_GREGORIAN_CALENDAR) == 0);
|
||||
JERRY_ASSERT (ecma_date_year_from_time (START_OF_GREGORIAN_CALENDAR - 1) == -1);
|
||||
JERRY_ASSERT (ecma_date_year_from_time (START_OF_GREGORIAN_CALENDAR - 3 * MS_PER_YEAR) == -3);
|
||||
|
||||
/* int ecma_date_day_within_year (time) */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user