From bffbde3be34ce854e169ad2296f44416414fbc75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edvard=20Th=C3=B6rnros?= Date: Sun, 7 Mar 2021 15:27:19 +0100 Subject: add failing tests --- progs/tests/global_collision.sy | 11 +++++++++++ progs/tests/global_constants_edgecase.sy | 11 +++++++++++ 2 files changed, 22 insertions(+) create mode 100644 progs/tests/global_collision.sy create mode 100644 progs/tests/global_constants_edgecase.sy (limited to 'progs') diff --git a/progs/tests/global_collision.sy b/progs/tests/global_collision.sy new file mode 100644 index 0000000..8dba295 --- /dev/null +++ b/progs/tests/global_collision.sy @@ -0,0 +1,11 @@ +// TODO(ed): Pure functions +fac :: fn a: int -> int { + if a < 1 { ret 1 } + ret a * fac! a - 1 +} + +a :: fac! 4 + +start :: fn { + a <=> 24 +} diff --git a/progs/tests/global_constants_edgecase.sy b/progs/tests/global_constants_edgecase.sy new file mode 100644 index 0000000..8dba295 --- /dev/null +++ b/progs/tests/global_constants_edgecase.sy @@ -0,0 +1,11 @@ +// TODO(ed): Pure functions +fac :: fn a: int -> int { + if a < 1 { ret 1 } + ret a * fac! a - 1 +} + +a :: fac! 4 + +start :: fn { + a <=> 24 +} -- cgit v1.2.1