From 27ce75bb0b469c8008d42eba5896b81aa29a0c82 Mon Sep 17 00:00:00 2001 From: fennecdjay Date: Sat, 8 Jun 2019 11:09:06 +0200 Subject: [PATCH] :wrench: Fix test for global var --- tests/import/global_var.c | 5 +++-- tests/import/static_string.c | 6 +++--- 2 files changed, 6 insertions(+), 5 deletions(-) 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; } -- 2.43.0