From b515250962ac0a2b6051f265fe14ca57a7257056 Mon Sep 17 00:00:00 2001 From: lyon1998 <645275593@qq.com> Date: Thu, 14 Oct 2021 15:52:01 +0800 Subject: [PATCH] add VM_test --- port/linux/test/VM-test.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 port/linux/test/VM-test.cpp diff --git a/port/linux/test/VM-test.cpp b/port/linux/test/VM-test.cpp new file mode 100644 index 000000000..8176bd309 --- /dev/null +++ b/port/linux/test/VM-test.cpp @@ -0,0 +1,17 @@ +#include "gtest/gtest.h" +extern "C" { +#include "BaseObj.h" +#include "PikaParser.h" +#include "PikaVM.h" +#include "dataMemory.h" +#include "dataStrs.h" +} + +TEST(VM, a_1) { + char* line = (char*)"a = 1"; + Args* buffs = New_strBuff(); + char* pikaAsm = pikaParseToAsm(buffs, line); + printf("%s", pikaAsm); + args_deinit(buffs); + EXPECT_EQ(pikaMemNow(), 0); +} \ No newline at end of file