Skip to content
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

Adding edge case tests for overlaps operators. #24

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions tests/cql/CqlIntervalOperatorsTest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1016,6 +1016,14 @@
<expression>Interval[1, 10] overlaps Interval[4, 10]</expression>
<output>true</output>
</test>
<test name="IntegerIntervalOverlapsTrue2">
<expression>Interval[4, 10] overlaps Interval[4, 10]</expression>
<output>true</output>
</test>
<test name="IntegerIntervalOverlapsTrue3">
<expression>Interval[10, 15] overlaps Interval[4, 10]</expression>
<output>true</output>
</test>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(non blocking thought): would it make sense to add a few tests here (in another PR) for intervals with exclusive boundaries for completeness? it essentially would test that folks are indeed implementing overlaps with the proper start/end semantics.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, I think that makes sense

<test name="IntegerIntervalOverlapsFalse">
<expression>Interval[1, 10] overlaps Interval[11, 20]</expression>
<output>false</output>
Expand Down Expand Up @@ -1066,6 +1074,10 @@
<expression>Interval[4, 10] overlaps before Interval[1, 10]</expression>
<output>false</output>
</test>
<test name="IntegerIntervalOverlapsBeforeFalse2">
<expression>Interval[4, 10] overlaps before Interval[4, 10]</expression>
<output>false</output>
</test>
<test name="DecimalIntervalOverlapsBeforeTrue">
<expression>Interval[1.0, 10.0] overlaps before Interval[4.0, 10.0]</expression>
<output>true</output>
Expand Down Expand Up @@ -1112,6 +1124,10 @@
<expression>Interval[4, 10] overlaps after Interval[1, 10]</expression>
<output>false</output>
</test>
<test name="IntegerIntervalOverlapsAfterFalse2">
<expression>Interval[4, 10] overlaps after Interval[4, 10]</expression>
<output>false</output>
</test>
<test name="DecimalIntervalOverlapsAfterTrue">
<expression>Interval[4.0, 15.0] overlaps after Interval[1.0, 10.0]</expression>
<output>true</output>
Expand Down