[goalc] add a build system (#704)

* add first attempt at build system

* fix stupid bug

* try again
This commit is contained in:
water111
2021-07-15 21:37:15 -04:00
committed by GitHub
parent 77667d9185
commit ef011f4fe8
33 changed files with 2208 additions and 72 deletions
+14
View File
@@ -1319,3 +1319,17 @@ TEST(GoosBuiltins, Error) {
Interpreter i;
EXPECT_ANY_THROW(e(i, "(error \"hi\")"));
}
TEST(GoosBuiltins, Ash) {
Interpreter i;
EXPECT_EQ(e(i, "(ash 3 2)"), "12");
EXPECT_EQ(e(i, "(ash 3 -1)"), "1");
}
TEST(GoosBuiltins, StringUtils) {
Interpreter i;
EXPECT_EQ(e(i, "(string-ref \"test\" 2)"), "#\\s");
EXPECT_EQ(e(i, "(string-length \"test\")"), "4");
EXPECT_EQ(e(i, "(string-append \"hello\" \" \" \"world\")"), "\"hello world\"");
EXPECT_EQ(e(i, "(symbol->string 'test)"), "\"test\"");
}