cqframework / cql-tests-runner

Test Runner for CQL Tests
Apache License 2.0
4 stars 1 forks source link

#3: Added cvl grammar (CQL Literals) to support expressing test resul… #19

Closed brynrhodes closed 6 months ago

brynrhodes commented 6 months ago

…ts as literals

This PR adds a "cvl" grammar that allows for CQL literals to be expressed. It uses the JavaScript ANTLR generated visitor from this grammar to then provide a JavaScript representation of any CQL literal expression.

There are still quite a few TODOs, but this covers a good 90% of the test cases in a way that doesn't involve changing the test cases, but does address the issue with having the same engine parse the expected result and produce the actual result.

With this in place, the CQF Ruler CQL Evaluation Service is up to: pass: 1162 skip: 38 fail: 325 error: 44

evan-gordon commented 6 months ago

One thought with going this route is that I don't think this grammar helps us achieve multi-statement tests. One of the reason we leaned towards the JSON representation is that each statement result in multi-statement CQL could be all asserted on.

brynrhodes commented 6 months ago

Agreed it doesn't support multi-statement tests in the $cql operation, but it should in the Library/$evaluate