From: fennecdjay Date: Sat, 8 Jun 2019 09:09:06 +0000 (+0200) Subject: :wrench: Fix test for global var X-Git-Tag: nightly~2443^2~14 X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=27ce75bb0b469c8008d42eba5896b81aa29a0c82;p=gwion.git :wrench: Fix test for global var --- diff --git a/tests/import/global_var.c b/tests/import/global_var.c index 221e98d6..ba04afb8 100644 --- a/tests/import/global_var.c +++ b/tests/import/global_var.c @@ -13,8 +13,9 @@ GWION_IMPORT(global_var_test) { // ALLOC_PTR(i, m_uint, 1); - const M_Object i = gwion_new_string(gwi->gwion, "test"); + const M_Object obj = new_object(gwi->gwion->mp, NULL, t_string); + STRING(obj) = s_name(insert_symbol(gwi->gwion->st, "test")); CHECK_BB(gwi_item_ini(gwi,"string", "i")) - CHECK_BB(gwi_item_end(gwi, 0, i)) + CHECK_BB(gwi_item_end(gwi, 0, obj)) return GW_OK; } diff --git a/tests/import/static_string.c b/tests/import/static_string.c index 486d0563..879eb451 100644 --- a/tests/import/static_string.c +++ b/tests/import/static_string.c @@ -12,9 +12,9 @@ #include "gwi.h" GWION_IMPORT(static_string_test) { - const M_Object obj = gwion_new_string(gwi->gwion, "test static string"); + const M_Object obj = new_object(gwi->gwion->mp, NULL, t_string); + STRING(obj) = s_name(insert_symbol(gwi->gwion->st, "test static string")); CHECK_BB(gwi_item_ini(gwi, "string", "self")) -// CHECK_BB(gwi_item_end(gwi, ae_flag_global, obj)) - CHECK_BB(gwi_item_end(gwi, 0, obj)) + CHECK_BB(gwi_item_end(gwi, ae_flag_global, obj)) return GW_OK; }