test/Simplify: don't crash on divide by zero
authorMichal Terepeta <michal.terepeta@gmail.com>
Sun, 5 Jul 2015 12:43:42 +0000 (14:43 +0200)
committerMichal Terepeta <michal.terepeta@gmail.com>
Sun, 12 Jul 2015 15:02:52 +0000 (17:02 +0200)
commit4dccb47429c9bb7a41cb735e572d27182061e87e
tree21b0df69a2a2ac063b454826e4828c7f8caa7a02
parent782ffec38719d723be775eb00a5d527f81b75a7b
test/Simplify: don't crash on divide by zero

Currently test/Simplify would not check for 0 before trying to do
constant folding, which is quite bad since it simply crashes the
program.

The fix is to simply avoid evaluating the expression if there is a
division by zero.
testing/Main.hs
testing/Simplify.hs
testing/tests/test7 [new file with mode: 0644]
testing/tests/test7.expected [new file with mode: 0644]