Add overload / conversion-precedence test cases - #142
Open
bryantaustin13 wants to merge 2 commits into
Open
Conversation
… a single <expression>, as needed by the overload-matching test in PR cqframework#61.
Library-style tests exercising function-overload resolution and CQL conversion precedence (exact match vs implicit Integer->Decimal/Long, Decimal vs Quantity, and an ambiguous overload). Each is a self-contained CQL library with a unique name. Addresses cqframework#37. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds library-style tests exercising function-overload resolution and CQL
conversion precedence. Addresses #37.
These use the
<library>test format, so this depends on the schema change in#141 and requires the runner support in cqframework/cql-tests-runner#111 to
execute. It builds on the
CqlOverloadMatching.xmlfile introduced in #61.Tests added (each a self-contained
<library>+ one<output name="output">)A(Integer),A(Decimal)A(1)'IntegerOverload'A(Decimal)A(1)'DecimalOverload'A(Integer),A(Long)A(1L)'LongOverload'A(Long)A(1)'LongOverload'A(Decimal),A(Quantity)A(1.0)'DecimalOverload'A(Long),A(Decimal)A(1)<library invalid="semantic">)Expected outputs were validated against the reference CQL engine. Long tests
carry
<capability code="system.long"/>. Each library uses a unique name (theengine caches inline libraries by name+version).
Merge notes
library-test-support(the Add library-style test support to the test schema #141 schema branch), so the diff here isonly the test file. Once Add library-style test support to the test schema #141 merges, retarget the base to
main.CqlOverloadMatching.xml(final file = Add the overloads test back in #61's
SimpleOverloadMatching+ these 6).AmbiguousOverloadcurrently shows asskipin cql-tests-runner, which skips alloutput-less negative tests (pre-existing; tracked separately). The test itself is
spec-correct and produces the expected ambiguity error against the engine.
Depends on #141 · builds on #61 · addresses #37 · runner: cqframework/cql-tests-runner#111