Update Spec-Tests framework to support test cases marked as invalid

Open
#351 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
38/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Stale
Tech stack
javascript
Domain
testing-qa

Research direction

Start by locating the Spec-Tests handling for XML expressions marked invalid and review skip-list.txt. Determine from the existing examples whether runtime-invalid cases should expect exceptions or null results, and ensure semantic-invalid cases are not translated. Done means both invalid forms are handled by the framework without relying on the skip list.

Written by the indexing model from the issue text.

Description

Some test cases are marked as invalid. For example:

<test name="SuccessorOverflowDt">
  <expression invalid="true">successor of DateTime(9999, 12, 31, 23, 59, 59, 999)</expression>
  <!-- EXPECT: The result of the successor operation exceeds the maximum value allowed for the type -->
</test>

Since these don't have an output, our tests basically treat them like a no-op. We should consider if the correct behavior is to expect an exception (probably?) or a null result (maybe).

Some tests are marked as semantically invalid, like this one:

<test name="TimeUpperBoundHours">
  <expression invalid="semantic">@T24:59:59.999</expression>
  <!-- Translation Error: Invalid date-time input (T24:59:59.999). Use ISO 8601 date time representation (yyyy-MM-ddThh:mm:ss.mmmmZhh:mm). -->
</test>

We currently have to put these in the skip-list.txt file because the translator errors cause issues. But we should try to avoid translating these ones at all, if possible.

Dominant language
JavaScript
Stars
86
Forks
40
PR merge metrics
No merged PRs in 30d

Getting set up

  • No Dockerfile or Docker Compose file
  • Has a pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from cqframework/cql-execution

All issues in cqframework/cql-execution

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.