Add new API function

Implemented 'jerry_is_array' and 'jerry_get_array_length' API functions.

JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
This commit is contained in:
László Langó
2016-06-17 15:49:04 +02:00
parent 4091444016
commit cfa0c94697
3 changed files with 52 additions and 0 deletions
+2
View File
@@ -583,6 +583,8 @@ main (void)
// Test: Array Object API
jerry_object_t *array_obj_p = jerry_create_array_object (10);
JERRY_ASSERT (jerry_is_array (array_obj_p));
JERRY_ASSERT (jerry_get_array_length (array_obj_p) == 10);
jerry_value_t v_in = jerry_create_number_value (10.5);
jerry_set_array_index_value (array_obj_p, 5, v_in);