Fix handling of empty intervals in interval_template.h#8779
Merged
tautschnig merged 2 commits intodiffblue:developfrom Dec 2, 2025
Merged
Fix handling of empty intervals in interval_template.h#8779tautschnig merged 2 commits intodiffblue:developfrom
tautschnig merged 2 commits intodiffblue:developfrom
Conversation
kroening
approved these changes
Nov 30, 2025
These fixes ensure that empty intervals behave consistently in all comparison and union operations, preventing arbitrary behavior that could lead to bugs in downstream code. Fixes: diffblue#8144
Add unit tests to validate all changes in interval_template.h for empty interval handling. Tests cover: - is_less_than_eq() and is_less_than() methods with empty intervals - operator<=() and operator==() with empty intervals - approx_union_with() with empty intervals (identity property) - Edge cases: empty with empty, singleton, top, bounded intervals - Mathematical properties: empty set as subset, equality of empty sets - Regression tests for previously failing scenarios
af726cf to
2a8543e
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #8779 +/- ##
===========================================
+ Coverage 79.93% 79.99% +0.05%
===========================================
Files 1698 1699 +1
Lines 187698 188162 +464
Branches 73 73
===========================================
+ Hits 150034 150517 +483
+ Misses 37664 37645 -19 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
These fixes ensure that empty intervals behave consistently in all comparison and union operations, preventing arbitrary behavior that could lead to bugs in downstream code.
Fixes: #8144