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

Conversation

brynrhodes
Copy link
Member

This adds a few edge case tests for the overlaps, overlaps before and overlaps after operators. These tests are related to the technical correction submitted to the specification here:

https://jira.hl7.org/browse/FHIR-46051

The author's guide is unclear about the intended interpretation of "overlaps before" and "overlaps after", whereas the reference and logical specification are both clear. These tests cover the edges of:

  1. overlaps for equal intervals (true)
  2. overlaps where the first interval starts at the end of the second (true)
  3. overlaps before for equal intervals (false)
  4. overlaps after for equal intervals (false)

@brynrhodes
Copy link
Member Author

These new tests have been run successfully on the Java engine (see Cooking with CQL session 83)

Copy link
Contributor

@suyashkumar suyashkumar left a comment

Choose a reason for hiding this comment

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

Thanks Bryn!

<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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants