Bugfix: The unittest which test the API has failed in case of disabled error-messages (#1470)
and disabled snapshot_exec options. JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
This commit is contained in:
@@ -794,6 +794,8 @@ main (void)
|
|||||||
TEST_ASSERT (test_api_is_free_callback_was_called);
|
TEST_ASSERT (test_api_is_free_callback_was_called);
|
||||||
|
|
||||||
/* Test: parser error location */
|
/* Test: parser error location */
|
||||||
|
if (jerry_is_feature_enabled (JERRY_FEATURE_ERROR_MESSAGES))
|
||||||
|
{
|
||||||
jerry_init (JERRY_INIT_SHOW_OPCODES);
|
jerry_init (JERRY_INIT_SHOW_OPCODES);
|
||||||
|
|
||||||
const char *parser_err_src_p = "b = 'hello';\nvar a = (;";
|
const char *parser_err_src_p = "b = 'hello';\nvar a = (;";
|
||||||
@@ -810,10 +812,11 @@ main (void)
|
|||||||
|
|
||||||
jerry_release_value (err_str_val);
|
jerry_release_value (err_str_val);
|
||||||
jerry_release_value (parsed_code_val);
|
jerry_release_value (parsed_code_val);
|
||||||
|
|
||||||
TEST_ASSERT (!strcmp ((char *) err_str_buf,
|
TEST_ASSERT (!strcmp ((char *) err_str_buf,
|
||||||
"SyntaxError: Primary expression expected. [line: 2, column: 10]"));
|
"SyntaxError: Primary expression expected. [line: 2, column: 10]"));
|
||||||
|
|
||||||
jerry_cleanup ();
|
jerry_cleanup ();
|
||||||
|
}
|
||||||
|
|
||||||
/* External Magic String */
|
/* External Magic String */
|
||||||
jerry_init (JERRY_INIT_SHOW_OPCODES);
|
jerry_init (JERRY_INIT_SHOW_OPCODES);
|
||||||
@@ -863,7 +866,7 @@ main (void)
|
|||||||
jerry_cleanup ();
|
jerry_cleanup ();
|
||||||
|
|
||||||
/* Dump / execute snapshot */
|
/* Dump / execute snapshot */
|
||||||
if (true)
|
if (jerry_is_feature_enabled (JERRY_FEATURE_SNAPSHOT_EXEC))
|
||||||
{
|
{
|
||||||
static uint8_t global_mode_snapshot_buffer[1024];
|
static uint8_t global_mode_snapshot_buffer[1024];
|
||||||
static uint8_t eval_mode_snapshot_buffer[1024];
|
static uint8_t eval_mode_snapshot_buffer[1024];
|
||||||
|
|||||||
Reference in New Issue
Block a user