File tree Expand file tree Collapse file tree 1 file changed +7
-10
lines changed Expand file tree Collapse file tree 1 file changed +7
-10
lines changed Original file line number Diff line number Diff line change @@ -83,17 +83,14 @@ SCENARIO("Unary eval on intervals", "[core][analyses][interval][eval]")
83
83
REQUIRE (five_to_eight.eval (ID_unary_plus) == five_to_eight);
84
84
}
85
85
86
- THEN (" When we apply unary subtraction to it, it should be negated" )
86
+ THEN (" When we apply unary minus to it, it should be negated" )
87
87
{
88
- auto negated_val = numeric_cast<mp_integer>(
89
- five_to_eight.eval (ID_unary_minus).get_lower ());
90
- REQUIRE (negated_val.has_value ());
91
- REQUIRE (negated_val.value () == -8 );
92
-
93
- auto upper_value = numeric_cast<mp_integer>(
94
- five_to_eight.eval (ID_unary_minus).get_upper ());
95
- REQUIRE (upper_value.has_value ());
96
- REQUIRE (upper_value.value () == -5 );
88
+ const constant_interval_exprt &negated_value =
89
+ five_to_eight.eval (ID_unary_minus);
90
+ REQUIRE (
91
+ negated_value ==
92
+ constant_interval_exprt{from_integer (-8 , signedbv_typet (32 )),
93
+ from_integer (-5 , signedbv_typet (32 ))});
97
94
}
98
95
99
96
THEN (" When we apply bitwise negation to it, is should be bitwise negated" )
You can’t perform that action at this time.
0 commit comments