Fix native error check (#4674)

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
This commit is contained in:
Zoltan Herczeg
2021-05-21 12:36:07 +02:00
committed by GitHub
parent 3c512d937b
commit 431a28b902
4 changed files with 24 additions and 56 deletions
+9
View File
@@ -72,5 +72,14 @@ main (void)
jerry_release_value (result);
char test_invalid_error[] = "Object.create(Error.prototype)";
result = jerry_eval ((const jerry_char_t *) test_invalid_error,
sizeof (test_invalid_error) - 1,
JERRY_PARSE_NO_OPTS);
TEST_ASSERT (!jerry_value_is_error (result) && jerry_value_is_object (result));
TEST_ASSERT (jerry_get_error_type (result) == JERRY_ERROR_NONE);
jerry_release_value (result);
jerry_cleanup ();
} /* main */