Skip to content

Commit 481f181

Browse files
author
Thomas Kiley
committed
Adapt test for bitwise not on a range
Currently this returns top rather than the actual range
1 parent b62d567 commit 481f181

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

unit/util/interval/eval.cpp

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -98,15 +98,8 @@ SCENARIO("Unary eval on intervals", "[core][analyses][interval][eval]")
9898

9999
THEN("When we apply bitwise negation to it, is should be bitwise negated")
100100
{
101-
auto bitwise_negated_val =
102-
numeric_cast<mp_integer>(five_to_eight.eval(ID_bitnot).get_lower());
103-
REQUIRE(bitwise_negated_val.has_value());
104-
REQUIRE(bitwise_negated_val.value() == (-9 /* ~5 */));
105-
106-
auto upper_value =
107-
numeric_cast<mp_integer>(five_to_eight.eval(ID_bitnot).get_upper());
108-
REQUIRE(bitwise_negated_val.has_value());
109-
REQUIRE(bitwise_negated_val.value() == (-6 /* ~8 */));
101+
// For intervals, bitwise not returns top
102+
REQUIRE(five_to_eight.eval(ID_bitnot).is_top());
110103
}
111104
}
112105
}

0 commit comments

Comments
 (0)