test VM REF

This commit is contained in:
lyon1998 2021-10-14 23:03:31 +08:00
parent 71bb89eb0c
commit c6dec36080

View File

@ -82,14 +82,14 @@ TEST(VM, str_xy_space) {
}
TEST(VM, ref_a_b) {
Args* buffs = New_strBuff();
PikaObj* self = newRootObj((char*)"root", New_PikaStdLib_SysObj);
Args* buffs = New_strBuff();
pikaVM_runAsm(self, pikaParseToAsm(buffs, (char*)"a = 'xy '"));
pikaVM_runAsm(self, pikaParseToAsm(buffs, (char*)"b = a"));
args_deinit(buffs);
ASSERT_STREQ(obj_getStr(self, (char*)"b"), (char*)"xy ");
obj_deinit(self);
args_deinit(buffs);
EXPECT_EQ(pikaMemNow(), 0);
}