From 7552b304fc6847c0558ae483647c93e4a08a445f Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Thu, 11 Nov 2021 17:07:41 -0800 Subject: more canonicalization tests, from old plan.txt --- tests/canonicalize.rs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'tests/canonicalize.rs') diff --git a/tests/canonicalize.rs b/tests/canonicalize.rs index 2db0161..b6d9c62 100644 --- a/tests/canonicalize.rs +++ b/tests/canonicalize.rs @@ -18,6 +18,11 @@ fn canonicalization() { ("(* (/ 2 3) (/ 3 2))", "1"), ("(^ (^ a 2) 3)", "(^ a 6)"), ("(^ (/ 1 3) -1)", "3"), + // TODO: ("(/ c (^ d 2))", "(* c (^ d -2))"), + ("(/ c (^ d 2))", "(* c (^ (^ d 2) -1))"), + ("(- a (* 2 b))", "(+ a (* -2 b))"), + ("(- a b)", "(+ a (* -1 b))"), + ("(* a (* b c))", "(* a b c)"), ]; for (input, output) in cases.iter() { -- cgit v1.2.3