Add operational mode for jerry_gc API call. (#2385)
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
This commit is contained in:
@@ -1014,7 +1014,7 @@ main (void)
|
||||
jerry_release_value (global_obj_val);
|
||||
|
||||
/* Test: run gc. */
|
||||
jerry_gc ();
|
||||
jerry_gc (JERRY_GC_SEVERITY_LOW);
|
||||
|
||||
/* Test: spaces */
|
||||
eval_code_src_p = "\x0a \x0b \x0c \xc2\xa0 \xe2\x80\xa8 \xe2\x80\xa9 \xef\xbb\xbf 4321";
|
||||
|
||||
@@ -99,7 +99,7 @@ main (void)
|
||||
jerry_release_value (object);
|
||||
|
||||
/* Collect garbage. */
|
||||
jerry_gc ();
|
||||
jerry_gc (JERRY_GC_SEVERITY_LOW);
|
||||
|
||||
/* Attempt to retrieve the object by its native pointer again. */
|
||||
TEST_ASSERT (!jerry_objects_foreach_by_native_info (&test_info, find_test_object_by_data, &found_object));
|
||||
@@ -124,7 +124,7 @@ main (void)
|
||||
jerry_release_value (args[1]);
|
||||
|
||||
/* Collect garbage. */
|
||||
jerry_gc ();
|
||||
jerry_gc (JERRY_GC_SEVERITY_LOW);
|
||||
|
||||
/* Attempt to retrieve the object by the presence of its property again. */
|
||||
args[0] = property_name;
|
||||
|
||||
@@ -57,7 +57,7 @@ main (void)
|
||||
|
||||
native_free_cb_call_count = 0;
|
||||
test_autorelease_val ();
|
||||
jerry_gc ();
|
||||
jerry_gc (JERRY_GC_SEVERITY_HIGH);
|
||||
TEST_ASSERT (native_free_cb_call_count == 1);
|
||||
|
||||
jerry_cleanup ();
|
||||
|
||||
Reference in New Issue
Block a user