cqframework / cqframework/cql-tests
Remove tests that don't match signatures defined in the spec
@raleigh-g-thompson is already working on this.
Since Oct 1, 2025.
- Dominant language
- No language data
- Stars
- 7
- Forks
- 8
- Avg merge
- 12d 5h
- Merged PRs (30d)
- 2
Description
Throughout the spec, specifically the Arithmetic tests, we have cases that are testing coercion of data types instead of the actual operation itself. For example:
<test name="Floor1">
<expression>Floor(1)</expression>
<output>1</output>
</test>
This test has no specific value to the Floor operator, which is defined this way:
Floor(argument Decimal) Integer
If we want to test type coercion, we should be doing so in a library that is purpose built, e.g.
define function "Takes decimal"(i System.Decimal): 42
define "Test": "Takes decimal"(1)
With an expectation that "Test" equals 42.
There are dozens of tests that are not materially different than other tests except that they coerce an integer to a decimal, e.g.:
<test name="Divide11">
<expression>1 / 1</expression>
<output>1.0</output>
</test>
<test name="Divide1d1d">
<expression>1.0 / 1.0</expression>
<output>1.0</output>
</test>
We should eliminate Divide11 and preserve only Divide1d1d. The signature of Divide is:
/(left Decimal, right Decimal) Decimal
/(left Quantity, right Quantity) Quantity
There is no integer overload. We should not be testing one.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.