aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2021-11-11 17:07:41 -0800
committerBryan Newbold <bnewbold@robocracy.org>2021-11-11 17:07:41 -0800
commit7552b304fc6847c0558ae483647c93e4a08a445f (patch)
tree2da201ee5c19bbb8cb371ce4b5504b460b54fa47 /tests
parent445361d76bdd6139161c5d524eb1fca2e43b527e (diff)
downloadcasual-7552b304fc6847c0558ae483647c93e4a08a445f.tar.gz
casual-7552b304fc6847c0558ae483647c93e4a08a445f.zip
more canonicalization tests, from old plan.txt
Diffstat (limited to 'tests')
-rw-r--r--tests/canonicalize.rs5
1 files changed, 5 insertions, 0 deletions
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() {