-
Notifications
You must be signed in to change notification settings - Fork 163
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix corner cases of combine_selection. #1038
Conversation
@@ -591,3 +591,54 @@ TEST_CASE("select_multiple_ors", "[hyperslab]") { | |||
} | |||
} | |||
} | |||
|
|||
TEST_CASE("select_multiple_ors_edge_cases", "[hyperslab]") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is the test here expecting not throw?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, these were to hunt down ways we can encounter a:
H5Scombine_select(lhs, Op::Or, rhs);
with invalid values for lhs
and rhs
. Note that only hyperslabs are valid. Critically, neither NONE
nor ALL
are considered a hyperslabs. There seems to be two ways we can end up with NONE
selection by combining hyperslabs:
- We set the counts to
{0, 0}
. - We use
AND
with two hyperslabs that have an empty intersection.
Case 1 can happen for lhs
and rhs
. Case 2 can only happen to lhs
(but never rhs
) when we combine a long chain with the existing slab.
I've been unable to create an ALL
from RegularHyperSlab
.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1038 +/- ##
==========================================
+ Coverage 86.88% 86.99% +0.10%
==========================================
Files 101 101
Lines 6008 6058 +50
==========================================
+ Hits 5220 5270 +50
Misses 788 788 ☔ View full report in Codecov by Sentry. |
No description provided.