From 967be9e750221ab2ab783f95df79bb26d290a45e Mon Sep 17 00:00:00 2001 From: Martial Simon Date: Mon, 15 Sep 2025 01:07:58 +0200 Subject: add: added projects --- tiger-compiler/tests/unit/parse/test_hello.cc | 36 +++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 tiger-compiler/tests/unit/parse/test_hello.cc (limited to 'tiger-compiler/tests/unit/parse/test_hello.cc') diff --git a/tiger-compiler/tests/unit/parse/test_hello.cc b/tiger-compiler/tests/unit/parse/test_hello.cc new file mode 100644 index 0000000..5828ca2 --- /dev/null +++ b/tiger-compiler/tests/unit/parse/test_hello.cc @@ -0,0 +1,36 @@ +#include +#include +#include +#include +#include +#include +#include + +Test(Basic, SimpleBody) +{ + std::cout << "----- basicTests -----"; + ast::PrettyPrinter print(std::cout); + ast::Exp* boiiiiiii = parse::parse("let " + " var i := 3 " + " in " + " i + 1 " + " end"); + cr_assert_not_null(boiiiiiii); + print(boiiiiiii); + cr_assert_eq(1, 1); +} + +Test(Basic, ChunkList) +{ + ast::PrettyPrinter print(std::cout); + ast::Exp* test = parse::parse("let " + " var i := 1 " + " var j := 2 " + " var k := 3 " + " in " + " i + j + k " + " end"); + cr_assert_not_null(test); + print(test); + cr_assert_eq(1, 1); +} -- cgit v1.2.3