From 0ce37d50dc8aa5789321949b8c661c2070f71d83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gustav=20S=C3=B6rn=C3=A4s?= Date: Sun, 7 Mar 2021 16:38:22 +0100 Subject: add tests for constants declaration order --- progs/tests/constants_declaration_order.sy | 6 ++++++ progs/tests/constants_declaration_order_wrong.sy | 8 ++++++++ 2 files changed, 14 insertions(+) create mode 100644 progs/tests/constants_declaration_order.sy create mode 100644 progs/tests/constants_declaration_order_wrong.sy (limited to 'progs/tests') diff --git a/progs/tests/constants_declaration_order.sy b/progs/tests/constants_declaration_order.sy new file mode 100644 index 0000000..93e6117 --- /dev/null +++ b/progs/tests/constants_declaration_order.sy @@ -0,0 +1,6 @@ +b :: 1 +a :: b + 1 + +start :: fn { + a <=> b + 1 +} diff --git a/progs/tests/constants_declaration_order_wrong.sy b/progs/tests/constants_declaration_order_wrong.sy new file mode 100644 index 0000000..37f5050 --- /dev/null +++ b/progs/tests/constants_declaration_order_wrong.sy @@ -0,0 +1,8 @@ +a :: b + 1 +b :: 1 + +start :: fn { + a <=> b + 1 +} + +// errors: [ErrorKind::SyntaxError(1, _)] -- cgit v1.2.1