Files
interpreter-cpp/test/evaluator/integer.cpp
Karma Riuk 47379c6635 implemented simple evaluator for program,
statements and integer literals, together with
tests
2025-07-19 15:03:38 +02:00

21 lines
492 B
C++

#include "doctest.h"
#include "utils.hpp"
TEST_SUITE("Eval: integers") {
TEST_CASE_FIXTURE(
test::utils::EvalFixture,
"Simple integer expression statements"
) {
struct test_struct {
std::string input;
int expected;
};
struct test_struct tests[]{{"5", 5}, {"10", 10}};
for (auto& t : tests) {
setup(t.input);
test::utils::test_integer_object(result.get(), t.expected);
}
}
}