From f41a6aa1eabfaddd1c3bb978762ec7e878c9cbd0 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Sun, 8 Nov 2020 19:04:21 +0100 Subject: [PATCH] tests: check exponent VS. unary minus priority --- tests/testsuite.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/testsuite.c b/tests/testsuite.c index f382f17..2d62ed4 100644 --- a/tests/testsuite.c +++ b/tests/testsuite.c @@ -67,6 +67,7 @@ SUCCESS(ternary_associativity, 1 == 1 ? 1 : 0 == 0 ? 2 : 3) // Other operators Test(eval_string, power) { do_success("4 ** 3 ** 2", 262144); } Test(eval_string, power_explicit) { do_success("4 ** (3 ** 2)", 262144); } +Test(eval_string, power_priority) { do_success("- 2 ** 2", -4); } #pragma GCC diagnostic pop #define FAILURE(Name, Input) \