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

Update ProperContains evaluator implementation #1393

Merged
merged 6 commits into from
Aug 1, 2024

Conversation

antvaset
Copy link
Contributor

@antvaset antvaset commented Jul 30, 2024

This PR includes the following changes related to ProperContains:

  1. Fix the ProperContainsNullRightFalse and ProperContainsNullRightTrue tests to make sure they are parsed as ProperContains(List<T>, T) (to match the test name/group). Without null as String, the expressions
{'s', 'u', 'n'} properly includes null
{'s', 'u', 'n', null} properly includes null

were parsed as ProperIncludes(List<T>, List<T>).

  1. Set the expected values of the library-based ProperContainsTimeNull and ProperInTimeNull tests to null to match those of the XML-based ProperContainsTimeNull (link) and ProperInTimeNull (link).

  2. Update implementation of ProperContains evaluator to match the spec (link).

  3. Add tests covering the edge cases in the ProperContains logic.

Copy link

github-actions bot commented Jul 30, 2024

Formatting check succeeded!

Copy link

codecov bot commented Jul 30, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 63.73%. Comparing base (0670c4a) to head (f2095cb).

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #1393      +/-   ##
============================================
+ Coverage     63.70%   63.73%   +0.03%     
+ Complexity     2666     2665       -1     
============================================
  Files           493      493              
  Lines         27750    27774      +24     
  Branches       5513     5521       +8     
============================================
+ Hits          17677    17703      +26     
  Misses         7830     7830              
+ Partials       2243     2241       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@antvaset antvaset marked this pull request as ready for review July 30, 2024 06:42
@brynrhodes
Copy link
Member

This looks good @antvaset , my only question is is there a corresponding PR against the cql-tests repository to update these tests?

@antvaset
Copy link
Contributor Author

Depends on cqframework/cql-tests#40

@antvaset
Copy link
Contributor Author

This looks good @antvaset , my only question is is there a corresponding PR against the cql-tests repository to update these tests?

Hi @brynrhodes, thanks for having a look! I've opened cqframework/cql-tests#40 in cql-tests to add the new tests for both ProperContains and ProperIn. The new tests for ProperIn in that PR all pass this updated implementation (see #1394).

@JPercival JPercival enabled auto-merge (squash) August 1, 2024 20:05
@JPercival JPercival merged commit 7e91478 into master Aug 1, 2024
5 checks passed
@JPercival JPercival deleted the update-proper-contains-evaluator-implementation branch August 1, 2024 20:11
@antvaset
Copy link
Contributor Author

Note also cqframework/cql-tests#48 and #1394.

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.

3 participants