Closed antvaset closed 2 months ago
Formatting check succeeded!
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 63.73%. Comparing base (
dd98ccc
) to head (e905da9
). Report is 3 commits behind head on master.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
I copied all the tests from the engine's
CqlComparisonOperatorsTest.all_comparison_operators_tests
(CQL library-based) toCqlComparisonOperatorsTest.xml
(unless the same or equivalent tests were there already) and removed the library-based tests that test the same functionality as the XML tests.The
CqlComparisonOperatorsTest.all_comparison_operators_tests
method uses theengine/.../CqlComparisonOperatorsTest.cql
library. Note that there are also similar define's incql-to-elm/.../CqlComparisonOperators.cql
andcql-to-elm/.../ComparisonOperators.cql
. I went through all three and added the new tests toCqlComparisonOperatorsTest.xml
.Note also:
1) I renamed these tests:
to
TupleEqDateTimeTrue2
andDateTimeEqTrue
respectively because they both evaluate to true. They come fromcql-to-elm/.../CqlComparisonOperators.cql
which is only used in cql2elm tests that check translatability and not compare the results of the tests.2) These were already in
CqlListOperatorsTest.xml
:3) These were missing from
CqlListOperatorsTest.xml
:3) These or equivalent were already in
CqlIntervalOperatorsTest.xml
:4) These tests were skipped in
CqlComparisonOperatorsTest.all_comparison_operators_tests
:but they work as expected (throw a translation error), so I added them to
CqlComparisonOperatorsTest.xml
.Now that everything is synced into
CqlComparisonOperatorsTest.xml
, I could removeengine/.../CqlComparisonOperatorsTest.cql
which was only used by the engine'sCqlComparisonOperatorsTest
. I also removed thecql_comparison_test_suite_compiles
test from that class which made sure that the CQL library compiled with no errors. The test used the default options withoutDisableListDemotion
andDisableListPromotion
. The same compiler options are used when the XML tests are run (with the addition ofEnableDateRangeOptimization
which should not affect the translatability of the comparison operator tests in question), so they also test the same translation functionality.At this stage, we have to keep the other two CQL files because they are currently used in other tests (some cql2elm and cql-formatter tests). In the future, we can generate those CQL files dynamically from the XML content when we run the tests and not have to maintain the files separately?
There are corresponding PRs in the cql-tests repo: https://github.com/cqframework/cql-tests/pull/45 and https://github.com/cqframework/cql-tests/pull/46.