diff --git a/source/tests/metacall_distributable_test/source/metacall_distributable_test.cpp b/source/tests/metacall_distributable_test/source/metacall_distributable_test.cpp index c701dc880..1d91f4027 100644 --- a/source/tests/metacall_distributable_test/source/metacall_distributable_test.cpp +++ b/source/tests/metacall_distributable_test/source/metacall_distributable_test.cpp @@ -133,7 +133,13 @@ TEST_F(metacall_distributable_test, DefaultConstructor) metacall_value_destroy(ret); - EXPECT_EQ((void *) NULL, (void *) metacall("say_null")); + ret = metacall("say_null"); + + EXPECT_NE((void *) NULL, (void *) ret); + + EXPECT_EQ((enum metacall_value_id) METACALL_NULL, (enum metacall_value_id) metacall_value_id(ret)); + + metacall_value_destroy(ret); ret = metacall("say_hello", "meta-programmer"); diff --git a/source/tests/metacall_ducktype_test/source/metacall_ducktype_test.cpp b/source/tests/metacall_ducktype_test/source/metacall_ducktype_test.cpp index 3c18cd1b2..1fe77a775 100644 --- a/source/tests/metacall_ducktype_test/source/metacall_ducktype_test.cpp +++ b/source/tests/metacall_ducktype_test/source/metacall_ducktype_test.cpp @@ -249,7 +249,13 @@ TEST_F(metacall_ducktype_test, DefaultConstructor) METACALL_INVALID }; - EXPECT_EQ((void *) NULL, (void *) metacallt("say_null", say_null_invalid_ids)); + ret = metacallt("say_null", say_null_invalid_ids); + + EXPECT_NE((void *) NULL, (void *) ret); + + EXPECT_EQ((enum metacall_value_id) METACALL_NULL, (enum metacall_value_id) metacall_value_id(ret)); + + metacall_value_destroy(ret); const enum metacall_value_id say_hello_str_ids[] = { diff --git a/source/tests/metacall_load_configuration_test/source/metacall_load_configuration_test.cpp b/source/tests/metacall_load_configuration_test/source/metacall_load_configuration_test.cpp index 16d1f5357..9f5879a72 100644 --- a/source/tests/metacall_load_configuration_test/source/metacall_load_configuration_test.cpp +++ b/source/tests/metacall_load_configuration_test/source/metacall_load_configuration_test.cpp @@ -215,7 +215,13 @@ TEST_F(metacall_load_configuration_test, DefaultConstructor) metacall_value_destroy(ret); - EXPECT_EQ((void *) NULL, (void *) metacall("say_null")); + ret = metacall("say_null"); + + EXPECT_NE((void *) NULL, (void *) ret); + + EXPECT_EQ((enum metacall_value_id) METACALL_NULL, (enum metacall_value_id) metacall_value_id(ret)); + + metacall_value_destroy(ret); ret = metacall("say_hello", "meta-programmer"); diff --git a/source/tests/metacall_test/source/metacall_test.cpp b/source/tests/metacall_test/source/metacall_test.cpp index 8775d94bb..e4e59a78b 100644 --- a/source/tests/metacall_test/source/metacall_test.cpp +++ b/source/tests/metacall_test/source/metacall_test.cpp @@ -300,7 +300,13 @@ TEST_F(metacall_test, DefaultConstructor) metacall_value_destroy(ret); - EXPECT_EQ((void *) NULL, (void *) metacall("say_null")); + ret = metacall("say_null"); + + EXPECT_NE((void *) NULL, (void *) ret); + + EXPECT_EQ((enum metacall_value_id) METACALL_NULL, (enum metacall_value_id) metacall_value_id(ret)); + + metacall_value_destroy(ret); ret = metacall("say_hello", "meta-programmer"); diff --git a/source/tests/metacall_test/source/metacall_test_split.cpp b/source/tests/metacall_test/source/metacall_test_split.cpp index 855b64a73..792ab0e71 100644 --- a/source/tests/metacall_test/source/metacall_test_split.cpp +++ b/source/tests/metacall_test/source/metacall_test_split.cpp @@ -155,7 +155,13 @@ class metacall_loader_test : public testing::Test value_destroy(ret); - EXPECT_EQ((void *) NULL, (void *) metacall("say_null")); + ret = metacall("say_null"); + + EXPECT_NE((void *) NULL, (void *) ret); + + EXPECT_EQ((enum metacall_value_id) METACALL_NULL, (enum metacall_value_id) metacall_value_id(ret)); + + metacall_value_destroy(ret); ret = metacall("say_hello", "meta-programmer"); diff --git a/source/tests/py_loader_port_test/source/py_loader_port_test.cpp b/source/tests/py_loader_port_test/source/py_loader_port_test.cpp index 2db1e2ea8..c14633b96 100644 --- a/source/tests/py_loader_port_test/source/py_loader_port_test.cpp +++ b/source/tests/py_loader_port_test/source/py_loader_port_test.cpp @@ -75,7 +75,13 @@ TEST_F(py_loader_port_test, DefaultConstructor) metacall_value_destroy(ret); - EXPECT_EQ((void *) NULL, (void *) metacall("say_null")); + ret = metacall("say_null"); + + EXPECT_NE((void *) NULL, (void *) ret); + + EXPECT_EQ((enum metacall_value_id) METACALL_NULL, (enum metacall_value_id) metacall_value_id(ret)); + + metacall_value_destroy(ret); ret = metacall("say_hello", "meta-programmer"); diff --git a/source/tests/rb_loader_parser_integration_test/source/rb_loader_parser_integration_test.cpp b/source/tests/rb_loader_parser_integration_test/source/rb_loader_parser_integration_test.cpp index 2c81f8056..d403f9038 100644 --- a/source/tests/rb_loader_parser_integration_test/source/rb_loader_parser_integration_test.cpp +++ b/source/tests/rb_loader_parser_integration_test/source/rb_loader_parser_integration_test.cpp @@ -49,9 +49,21 @@ TEST_F(rb_loader_parser_integration_test, DefaultConstructor) EXPECT_EQ((int) 0, (int) metacall_load_from_file("rb", rb_scripts, sizeof(rb_scripts) / sizeof(rb_scripts[0]), NULL)); - EXPECT_EQ((void *) NULL, (void *) metacall("cache_initialize")); + ret = metacall("cache_initialize"); - EXPECT_EQ((void *) NULL, (void *) metacall("cache_set", "meta", "call")); + EXPECT_NE((void *) NULL, (void *) ret); + + EXPECT_EQ((enum metacall_value_id) METACALL_NULL, (enum metacall_value_id) metacall_value_id(ret)); + + metacall_value_destroy(ret); + + ret = metacall("cache_set", "meta", "call"); + + EXPECT_NE((void *) NULL, (void *) ret); + + EXPECT_EQ((enum metacall_value_id) METACALL_NULL, (enum metacall_value_id) metacall_value_id(ret)); + + metacall_value_destroy(ret); ret = metacall("cache_has_key","meta");