mirror of
https://github.com/jerryscript-project/jerryscript.git
synced 2025-12-15 16:29:21 +00:00
Primitive value of Date.prototype should be NaN
JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
This commit is contained in:
parent
122e5c47c9
commit
9c559216b7
@ -159,7 +159,7 @@ ecma_builtin_init_object (ecma_builtin_id_t obj_builtin_id, /**< built-in ID */
|
||||
case ECMA_BUILTIN_ID_DATE_PROTOTYPE:
|
||||
{
|
||||
ecma_number_t *prim_prop_num_value_p = ecma_alloc_number ();
|
||||
*prim_prop_num_value_p = ECMA_NUMBER_ZERO;
|
||||
*prim_prop_num_value_p = ecma_number_make_nan ();
|
||||
|
||||
ecma_property_t *prim_value_prop_p;
|
||||
prim_value_prop_p = ecma_create_internal_property (object_obj_p,
|
||||
|
||||
@ -29,6 +29,8 @@ catch (e)
|
||||
assert (e.message === "foo");
|
||||
}
|
||||
|
||||
assert (isNaN(Date.prototype.valueOf.call(Date.prototype)));
|
||||
|
||||
d = Date("abcd");
|
||||
assert (isNaN(d.valueOf()));
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user