summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorLeo Tenenbaum <pommicket@gmail.com>2020-03-01 14:19:31 -0500
committerLeo Tenenbaum <pommicket@gmail.com>2020-03-01 14:19:31 -0500
commit825c98523b8a03733579df33247ab87dae4e3408 (patch)
tree00d908bd7cc0b36607cf9e97ef6062336dbb5db8 /tests
parent88e7c92e76ce771e7a1efd4824060e3905194070 (diff)
improved command line arguments for compiler (added -no-color)
Diffstat (limited to 'tests')
-rw-r--r--tests/arr/arr.toc4
-rw-r--r--tests/bf/bf.toc6
-rw-r--r--tests/params/params.toc2
3 files changed, 6 insertions, 6 deletions
diff --git a/tests/arr/arr.toc b/tests/arr/arr.toc
index a682283..eee514a 100644
--- a/tests/arr/arr.toc
+++ b/tests/arr/arr.toc
@@ -4,14 +4,14 @@ puti ::= fn(x: int) {
extern int printf(const char *fmt, ...);
#endif
");
- #C("printf(\"%ld\\n\", (long)x)");
+ #C("printf(\"%ld\\n\", (long)x);");
};
putf ::= fn(x: float) {
#C("#ifndef __TINYC__
extern int printf(const char *fmt, ...);
#endif
");
- #C("printf(\"%f\\n\", (double)x)");
+ #C("printf(\"%f\\n\", (double)x);");
};
// it would be nice if Arr.data.len == Arr.len (: but this will require some C code...
diff --git a/tests/bf/bf.toc b/tests/bf/bf.toc
index a3f731a..2331467 100644
--- a/tests/bf/bf.toc
+++ b/tests/bf/bf.toc
@@ -36,11 +36,11 @@ puti ::= fn(x: int) {
extern int printf(const char *fmt, ...);
#endif
");
- #C("printf(\"%ld\\n\", x)");
+ #C("printf(\"%ld\\n\", x);");
};
main ::= fn() {
- #C("extern int putchar(int c)");
+ #C("extern int putchar(int c);");
code := getstdin();
tape_sz := 3;
tape := new(int, tape_sz);
@@ -102,7 +102,7 @@ main ::= fn() {
}
} elif code[i] == '.' {
c := tape[ptr] as char;
- #C("putchar(c)");
+ #C("putchar(c);");
} elif code[i] == ',' {
// Input doesn't really work, because you
// need to send an EOF to end the program.
diff --git a/tests/params/params.toc b/tests/params/params.toc
index 1946739..4d37cf1 100644
--- a/tests/params/params.toc
+++ b/tests/params/params.toc
@@ -11,7 +11,7 @@ puti ::= fn(x: int) {
extern int printf(const char *fmt, ...);
#endif
");
- #C("printf(\"%ld\\n\", x)");
+ #C("printf(\"%ld\\n\", x);");
};