@@ -36,18 +36,21 @@ class SimplifierTests extends AnyFunSuite with Matchers {
3636 test(" div" ) {
3737 simplify(Div (0 , 0 )()) should be(Div (0 , 0 )())
3838 simplify(Div (8 , 2 )()) should be(4 : IntLit )
39+ simplify(Div (- 3 , 2 )()) should be(Div (- 3 , 2 )())
40+ simplify(Div (3 , 2 )()) should be(1 : IntLit )
41+ simplify(Div (3 , - 2 )()) should be(Div (3 , - 2 )())
3942 }
4043
4144 test(" mod" ) {
4245 simplify(Mod (0 , 0 )()) should be (Mod (0 , 0 )())
4346 simplify(Mod (8 , 3 )()) should be (2 : IntLit )
4447 simplify(Mod (3 , 8 )()) should be (3 : IntLit )
45- simplify(Mod (8 , - 3 )()) should be (2 : IntLit )
46- simplify(Mod (3 , - 8 )()) should be (3 : IntLit )
47- simplify(Mod (- 8 , 3 )()) should be (1 : IntLit )
48- simplify(Mod (- 3 , 8 )()) should be (5 : IntLit )
49- simplify(Mod (- 8 , - 3 )()) should be (1 : IntLit )
50- simplify(Mod (- 3 , - 8 )()) should be (5 : IntLit )
48+ simplify(Mod (8 , - 3 )()) should be (Mod ( 8 , - 3 )() )
49+ simplify(Mod (3 , - 8 )()) should be (Mod ( 3 , - 8 )() )
50+ simplify(Mod (- 8 , 3 )()) should be (Mod ( - 8 , 3 )() )
51+ simplify(Mod (- 3 , 8 )()) should be (Mod ( - 3 , 8 )() )
52+ simplify(Mod (- 8 , - 3 )()) should be (Mod ( - 8 , - 3 )() )
53+ simplify(Mod (- 3 , - 8 )()) should be (Mod ( - 3 , - 8 )() )
5154 }
5255
5356 test(" equality" ) {
0 commit comments