#include "Compiler.hpp" #include "Node.hpp" #include TEST(IntegerTest, Literal) { auto compiler = new Compiler("1;", "main"); auto result = compiler->compile(); auto integer = std::any_cast(result); ASSERT_EQ(integer.getNodeType(), NODE_LITERAL); ASSERT_EQ(integer.getDataType(), DATATYPE_INTEGER); ASSERT_EQ(integer.getValue(), llvm::ConstantInt::get(llvm::Type::getInt64Ty(*compiler->getContext()), 1, true)); delete compiler; }