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

A draft PR to compare test changes in the Java test source content #81

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
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
4 changes: 2 additions & 2 deletions tests/cql/CqlArithmeticFunctionsTest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@
<!-- OBSOLETE: define QuantityMinValue: minimum Quantity -->
<test name="DateTimeMinValue">
<expression>minimum DateTime</expression>
<output>@0001-01-01T00:00:00.000</output>
<output>@0001-01-01T00:00:00.000Z</output>
</test>
<test name="DateMinValue">
<expression>minimum Date</expression>
Expand All @@ -348,7 +348,7 @@
<!-- OBSOLETE: define QuantityMaxValue: maximum Quantity -->
<test name="DateTimeMaxValue">
<expression>maximum DateTime</expression>
<output>@9999-12-31T23:59:59.999</output>
<output>@9999-12-31T23:59:59.999Z</output>
</test>
<test name="DateMaxValue">
<expression>maximum Date</expression>
Expand Down
20 changes: 0 additions & 20 deletions tests/cql/CqlComparisonOperatorsTest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -133,10 +133,6 @@
<expression>@2014-01-25T14:30:14.559+01:00 = @2014-01-25T14:30:14.559+01:00</expression>
<output>true</output>
</test>
<test name="DateTimeDayCompare">
<expression>@2022-02-22T00:00:00.000-05:00 same day as @2022-02-22T04:59:00.000Z</expression>
<output>true</output>
</test>
<test name="TimeEq10A10A">
<expression>@T10:00:00.000 = @T10:00:00.000</expression>
<output>true</output>
Expand Down Expand Up @@ -171,10 +167,6 @@
<expression>0.0 &gt; -1.0</expression>
<output>true</output>
</test>
<test name="GreaterDec1Int2">
<expression>1.0 &gt; 2</expression>
<output>false</output>
</test>
<test name="GreaterCM0CM0">
<expression>0'cm' &gt; 0'cm'</expression>
<output>false</output>
Expand Down Expand Up @@ -275,10 +267,6 @@
<expression>0.0 &gt;= -1.0</expression>
<output>true</output>
</test>
<test name="GreaterOrEqualDec1Int2">
<expression>1.0 &gt;= 2</expression>
<output>false</output>
</test>
<test name="GreaterOrEqualCM0CM0">
<expression>0'cm' &gt;= 0'cm'</expression>
<output>true</output>
Expand Down Expand Up @@ -387,10 +375,6 @@
<expression>0.0 &lt; -1.0</expression>
<output>false</output>
</test>
<test name="LessDec1Int2">
<expression>1.0 &lt; 2</expression>
<output>true</output>
</test>
<test name="LessCM0CM0">
<expression>0'cm' &lt; 0'cm'</expression>
<output>false</output>
Expand Down Expand Up @@ -491,10 +475,6 @@
<expression>0.0 &lt;= -1.0</expression>
<output>false</output>
</test>
<test name="LessOrEqualDec1Int2">
<expression>1.0 &lt;= 2</expression>
<output>true</output>
</test>
<test name="LessOrEqualCM0CM0">
<expression>0'cm' &lt;= 0'cm'</expression>
<output>true</output>
Expand Down
2 changes: 1 addition & 1 deletion tests/cql/CqlConditionalOperatorsTest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
<expression>
case
when 5 &gt; 10 then 5 + 10
when 5 = 10 then 5
when 5 = 10 then 10
else 10 - 5
end
</expression>
Expand Down
30 changes: 7 additions & 23 deletions tests/cql/CqlIntervalOperatorsTest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@
<group name="Collapse">
<test name="TestCollapseNull">
<expression>collapse {Interval(null, null)}</expression>
<output>null</output>
<output>{ }</output>
</test>
<test name="IntegerIntervalCollapse">
<expression>collapse { Interval[1,5], Interval[3,7], Interval[12,19], Interval[7,10] }</expression>
Expand Down Expand Up @@ -246,7 +246,7 @@
</test>
<test name="ExpandPerHour">
<expression>expand { Interval[@T10:00, @T12:30] } per hour</expression>
<output>{ Interval[@T10, @T10], Interval[@T11, @T11], Interval[@T12, @T12] }</output>
<output>{ Interval[@T10:00, @T11:00), Interval[@T11:00, @T12:00) }</output>
</test>
<test name="ExpandPer1">
<expression>expand { Interval[10.0, 12.5] } per 1</expression>
Expand All @@ -263,11 +263,11 @@
<!-- Translation Error: Could not resolve call to operator Expand with signature (list<interval<System.Integer>>,System.Decimal). -->
</test>
<test name="ExpandInterval">
<expression>expand Interval[1, 10]</expression>
<expression>expand { Interval[1, 10] }</expression>
<output>{ Interval[1, 1], Interval[2, 2], Interval[3, 3], Interval[4, 4], Interval[5, 5], Interval[6, 6], Interval[7, 7], Interval[8, 8], Interval[9, 9], Interval[10, 10] }</output>
</test>
<test name="ExpandIntervalPer2">
<expression>expand Interval[1, 10] per 2</expression>
<expression>expand { Interval[1, 10] } per 2</expression>
<output>{ Interval[1, 2], Interval[3, 4], Interval[5, 6], Interval[7, 8], Interval[9, 10] }</output>
</test>
</group>
Expand Down Expand Up @@ -492,7 +492,7 @@
<group name="In">
<test name="TestInNullBoundaries">
<expression>5 in Interval[null, null]</expression>
<output>true</output>
<output>false</output>
</test>
<test name="IntegerIntervalInTrue">
<expression>5 in Interval[1, 10]</expression>
Expand Down Expand Up @@ -669,22 +669,6 @@
<output>null</output>
<!-- TODO: Fix CQL Engine to not throw a java.lang.NullPointerException -->
</test>
<test name="TestIntersectNull1">
<expression>end of (Interval[1, 10] intersect Interval[5, null)) &lt;= 10</expression>
<output>true</output>
</test>
<test name="TestIntersectNull2">
<expression>end of (Interval[1, 10] intersect Interval[5, null)) &gt;= 5</expression>
<output>true</output>
</test>
<test name="TestIntersectNull3">
<expression>end of (Interval[1, 10] intersect Interval[5, null)) &gt; 10</expression>
<output>false</output>
</test>
<test name="TestIntersectNull4">
<expression>end of (Interval[1, 10] intersect Interval[5, null)) &lt; 5</expression>
<output>false</output>
</test>
<test name="IntegerIntervalIntersectTest4to10">
<expression>Interval[1, 10] intersect Interval[4, 10]</expression>
<output>Interval [ 4, 10 ]</output>
Expand Down Expand Up @@ -1219,7 +1203,7 @@
<group name="ProperlyIncludes">
<test name="NullBoundariesProperlyIncludesIntegerInterval">
<expression>Interval[null as Integer, null as Integer] properly includes Interval[1, 10]</expression>
<output>true</output>
<output>null</output>
</test>
<test name="IntegerIntervalProperlyIncludesTrue">
<expression>Interval[1, 10] properly includes Interval[4, 10]</expression>
Expand Down Expand Up @@ -1265,7 +1249,7 @@
<group name="ProperlyIncludedIn">
<test name="IntegerIntervalProperlyIncludedInNullBoundaries">
<expression>Interval[1, 10] properly included in Interval[null, null]</expression>
<output>true</output>
<output>null</output>
</test>
<test name="IntegerIntervalProperlyIncludedInTrue">
<expression>Interval[4, 10] properly included in Interval[1, 10]</expression>
Expand Down
8 changes: 4 additions & 4 deletions tests/cql/CqlListOperatorsTest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
<group name="Contains">
<test name="ContainsABNullHasNull">
<expression>{ 'a', 'b', null } contains null</expression>
<output>true</output>
<output>null</output>
</test>
<test name="ContainsNullFirst">
<expression>{ null, 'b', 'c' } contains 'a'</expression>
Expand Down Expand Up @@ -129,7 +129,7 @@
<group name="Equal">
<test name="EqualNullNull">
<expression>{null} = {null}</expression>
<output>true</output>
<output>null</output>
</test>
<test name="EqualEmptyListNull">
<expression>{} as List&lt;String&gt; = null</expression>
Expand Down Expand Up @@ -279,11 +279,11 @@
<group name="In">
<test name="InNullEmpty">
<expression>null in {}</expression>
<output>false</output>
<output>null</output>
</test>
<test name="InNullAnd1Null">
<expression>null in { 1, null }</expression>
<output>true</output>
<output>null</output>
</test>
<test name="In1Null">
<expression>1 in null</expression>
Expand Down
4 changes: 2 additions & 2 deletions tests/cql/CqlStringOperatorsTest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
</test>
<test name="CombineEmptyList">
<expression>Combine({})</expression>
<output>null</output>
<output>''</output>
</test>
<test name="CombineABC">
<expression>Combine({'a', 'b', 'c'})</expression>
Expand Down Expand Up @@ -224,7 +224,7 @@
<output>'Who put the bang in the bang she bang she bang?'</output>
</test>
<test name="ReplaceMatchesSpaces">
<expression>ReplaceMatches('All that glitters is not gold', '\\s', '$$')</expression>
<expression>ReplaceMatches('All that glitters is not gold', '\\s', '\\$')</expression>
<output>'All$that$glitters$is$not$gold'</output>
</test>
</group>
Expand Down
8 changes: 0 additions & 8 deletions tests/cql/CqlTypeOperatorsTest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -96,14 +96,6 @@
<expression invalid="true">ToDateTime('2014/01/01T12:05:05.955Z')</expression>
<!-- EXPECT: Invalid format: "2014/01/01T12:05:05.955" is malformed at "/01/01T12:05:05.955" -->
</test>
<test name="ToDateTimeDate">
<expression>ToDateTime(@2014-01-01)</expression>
<output>@2014-01-01T</output>
</test>
<test name="ToDateTimeTimeUnspecified">
<expression>hour from ToDateTime(@2014-01-01) is null</expression>
<output>true</output>
</test>
</group>
<group name="ToDecimal">
<test name="String25D5ToDecimal">
Expand Down
4 changes: 0 additions & 4 deletions tests/cql/CqlTypesTest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,6 @@
<expression>DateTime(9999, 12, 31, 23, 59, 59, 999)</expression>
<output>@9999-12-31T23:59:59.999</output>
</test>
<test name="DateTimeTimeUnspecified">
<expression>hour from @2015-02-10T is null</expression>
<output>true</output>
</test>
</group>
<group name="Decimal">
<!-- REPLACED BY TestIsolatedCqlExprs : ValueLiteralsAndSelectors.xml
Expand Down