From a2af710a4db6e47759aa1c3346c3336730d18204 Mon Sep 17 00:00:00 2001 From: Aymeric Wibo Date: Wed, 4 Sep 2024 19:06:02 +0200 Subject: [PATCH] tests: Test of operator precedence --- tests/precedence.fl | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 tests/precedence.fl diff --git a/tests/precedence.fl b/tests/precedence.fl new file mode 100644 index 0000000..9ce9084 --- /dev/null +++ b/tests/precedence.fl @@ -0,0 +1,7 @@ +# XXX This is pretty inexaustive, but it's fine for now. +# I'll add more asserts here when regressions happen. + +assert 1 + 2 * 3 == 7 +assert (1 + 2) * 3 == 9 +assert 1 * 2 + 3 == 5 +assert 1 + 2 + 3 == 6