bytecode2 #2
@@ -10,7 +10,6 @@ namespace tyche {
|
||||
|
||||
struct BytecodePrototype {
|
||||
using ConstantValue = std::variant<int32_t, float, std::string>;
|
||||
using Value = std::variant<int32_t, float>;
|
||||
|
||||
struct Function {
|
||||
uint16_t n_pars;
|
||||
|
||||
@@ -10,18 +10,6 @@
|
||||
|
||||
using namespace tyche;
|
||||
|
||||
static void print(std::vector<uint8_t> const& data)
|
||||
{
|
||||
for (size_t i = 0; i < data.size(); ++i) {
|
||||
if (i % 16 == 0)
|
||||
printf("%04X : ", i);
|
||||
printf("%02X ", data.at(i));
|
||||
if (i % 16 == 15)
|
||||
printf("\n");
|
||||
}
|
||||
printf("\n");
|
||||
}
|
||||
|
||||
TEST(ByteArray, ByteArray)
|
||||
{
|
||||
auto test = [](std::function<void(ByteArray&)> const& f, std::vector<uint8_t> const& expected) {
|
||||
@@ -125,7 +113,6 @@ TEST(Bytecode, Code)
|
||||
};
|
||||
|
||||
ByteArray ba = Bytecode::generate(bp);
|
||||
// print(ba.data()); print(expected);
|
||||
ASSERT_EQ(ba.data(), expected);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user