Reviewed-on: #4
This commit was merged in pull request #4.
This commit is contained in:
2026-04-29 14:44:33 -05:00
parent 54729c1e14
commit 148c98e642
13 changed files with 424 additions and 79 deletions

View File

@@ -1,5 +1,4 @@
#include "gtest/gtest.h"
#include "gmock/gmock.h"
#include <cstring>
#include <functional>
@@ -141,6 +140,8 @@ TEST(Bytecode, Parsing)
ASSERT_EQ(bc.n_constants(), 2);
ASSERT_EQ(bc.n_functions(), 2);
ASSERT_EQ(bc.get_function_sz(0), 2);
ASSERT_EQ(bc.get_function_sz(1), 1);
ASSERT_FLOAT_EQ(std::get<float>(bc.get_constant(0)), 3.14f);
ASSERT_EQ(std::get<std::string>(bc.get_constant(1)), "HELLO");