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

Add notes explaining why certain tests are excluded #1384

Closed
Closed
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -231,9 +231,14 @@ public static Object[][] dataMethod() {
"r4/tests-fhir-r4/testSuperSetOf/testSuperSetOf2",
"r4/tests-fhir-r4/testTail/testTail1",
"r4/tests-fhir-r4/testTail/testTail2",

// These tests do not pass in CQL because the `=` operator takes precedence over `|` due to the order of
// rules in CQL's grammar.
// The order of operations can be forced by using parentheses.
"r4/tests-fhir-r4/testTake/testTake2",
"r4/tests-fhir-r4/testTake/testTake3",
"r4/tests-fhir-r4/testTake/testTake4",

"r4/tests-fhir-r4/testTimeOfDay/testTimeOfDay1",
"r4/tests-fhir-r4/testToChars/testToChars1",
"r4/tests-fhir-r4/testToInteger/testToInteger4",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -548,9 +548,25 @@

<group name="testTake">
<test name="testTake1" inputfile="patient-example.xml"><expression>(0 | 1 | 2).take(1) = 0</expression><output type="boolean">true</output></test>
<test name="testTake2" inputfile="patient-example.xml"><expression>(0 | 1 | 2).take(2) = 0 | 1</expression><output type="boolean">true</output></test>
<test name="testTake3" inputfile="patient-example.xml"><expression>Patient.name.take(1).given = 'Peter' | 'James'</expression><output type="boolean">true</output></test>
<test name="testTake4" inputfile="patient-example.xml"><expression>Patient.name.take(2).given = 'Peter' | 'James' | 'Jim'</expression><output type="boolean">true</output></test>
<test name="testTake2" inputfile="patient-example.xml">
<expression>(0 | 1 | 2).take(2) = 0 | 1</expression>
<output type="boolean">true</output>
<!-- This test does not pass in CQL because the `=` operator takes precedence over `|` due to the order
of rules in CQL's grammar. -->
<!-- The order of operations can be forced by using `(0 | 1 | 2).take(2) = (0 | 1)`. -->
</test>
<test name="testTake3" inputfile="patient-example.xml">
<expression>Patient.name.take(1).given = 'Peter' | 'James'</expression>
<output type="boolean">true</output>
<!-- Same as above. -->
<!-- The order of operations can be forced by using `Patient.name.take(1).given = ('Peter' | 'James')`. -->
</test>
<test name="testTake4" inputfile="patient-example.xml">
<expression>Patient.name.take(2).given = 'Peter' | 'James' | 'Jim'</expression>
<output type="boolean">true</output>
<!-- Same as above. -->
<!-- The order of operations can be forced by using `Patient.name.take(2).given = ('Peter' | 'James' | 'Jim')`. -->
</test>
<test name="testTake5" inputfile="patient-example.xml"><expression>Patient.name.take(3).given.count() = 5</expression><output type="boolean">true</output></test>
<test name="testTake6" inputfile="patient-example.xml"><expression>Patient.name.take(4).given.count() = 5</expression><output type="boolean">true</output></test>
<test name="testTake7" inputfile="patient-example.xml"><expression>Patient.name.take(0).given.exists() = false</expression><output type="boolean">true</output></test>
Expand Down
Loading