@@ -37,7 +37,7 @@ void simplifiesNegatedAdditionAndSubtraction() {
3737 assertSimplificationSteps (VCArithmeticSimplification ::apply , vc ("x - x == 0" ),
3838 chain (expect ("0 == 0" , "x - x == 0" )));
3939 assertSimplificationSteps (VCArithmeticSimplification ::apply , vc ("--x == x" ),
40- chain (expect ("x == x" , "--x == x" )));
40+ chain (expect ("x == x" , "-(-x) == x" )));
4141 assertSimplificationSteps (VCArithmeticSimplification ::apply , vc ("x + -y == 0" ),
4242 chain (expect ("x - y == 0" , "x + -y == 0" )));
4343 assertSimplificationSteps (VCArithmeticSimplification ::apply , vc ("x - -y == 0" ),
@@ -94,14 +94,13 @@ void recordsOriginWhenSimplifyingLaterImplication() {
9494 chain (expect ("x > 0" , "x > 0" ), expect ("y > x" , "y + 0 > x" )));
9595
9696 SimplifiedVCImplication simplifiedNext = assertInstanceOf (SimplifiedVCImplication .class , result .getNext ());
97- assertEquals ("y + 0 > x" , simplifiedNext .getOrigin ().getRefinement ().toString ());
97+ assertEquals ("y + 0 > x" , simplifiedNext .getOrigin ().getRefinement ().getExpression (). toDisplayString ());
9898 }
9999
100100 @ Test
101- void preservesOriginFromExistingSimplifiedImplication () {
101+ void recordsCurrentImplicationAsOriginWhenSimplifyingExistingSimplifiedImplication () {
102102 VCImplication substituted = VCSubstitution .apply (vc ("∀x:int. x == y + 0" , "x > 0" ));
103103
104- assertSimplificationSteps (VCArithmeticSimplification ::apply , substituted ,
105- chain (expect ("y > 0" , "∀x:int. x > 0" )));
104+ assertSimplificationSteps (VCArithmeticSimplification ::apply , substituted , chain (expect ("y > 0" , "y + 0 > 0" )));
106105 }
107106}
0 commit comments