Skip to content

Commit a0cff82

Browse files
author
Thomas Kiley
committed
Add missing tests for increment
1 parent 763b906 commit a0cff82

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

unit/util/interval/add.cpp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,17 @@ SCENARIO("add interval domain", "[core][analyses][interval][add]")
4343
REQUIRE(V(result.get_lower()) == 8);
4444
REQUIRE(V(result.get_upper()) == 12);
4545
}
46+
47+
AND_WHEN("Incrementing the interval")
48+
{
49+
const auto incremented = left.increment();
50+
51+
THEN("The result is correct")
52+
{
53+
REQUIRE(V(incremented.get_lower()) == 3);
54+
REQUIRE(V(incremented.get_upper()) == 5);
55+
}
56+
}
4657
}
4758

4859
WHEN("One contains infinite [2,4]+[6,INF]")

0 commit comments

Comments
 (0)