From 8a7326f3117ffeb89a3aa8ab9a9f13689e61fb34 Mon Sep 17 00:00:00 2001 From: Zachary Whitley Date: Sat, 7 Nov 2026 07:38:43 -0500 Subject: [PATCH] fix(tests): correct five DateTime-uncertainty oracle values to match CQF reference-engine assertions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Correct five `` oracle values in tests/cql/CqlTypesTest.xml and tests/cql/CqlDateTimeOperatorsTest.xml whose current values contradict the first-party CQF reference-engine Kotlin unit tests at engine/src/jvmTest/kotlin/org/opencds/cqf/cql/engine/execution/*.kt. Every corrected value is the value the Kotlin engine already asserts by direct unit test; the fixture oracles were originally authored to a stricter-than-spec rule that expanded the same-precision operand to a sub-precision range, and the drift has been latent while the Kotlin tests served as the de-facto oracle and the fixtures as a secondary check. Per-case diff: - tests/cql/CqlTypesTest.xml:128 DateTimeUncertain Interval [ 18, 49 ] -> Interval [ 19, 49 ] Kotlin oracle: CqlTypesTest.kt:163-165 - tests/cql/CqlDateTimeOperatorsTest.xml:880 DateTimeDurationBetweenUncertainInterval2 Interval[ 4, 16 ] -> Interval[ 5, 16 ] Kotlin oracle: CqlDateTimeOperatorsTest.kt:45-48 - tests/cql/CqlDateTimeOperatorsTest.xml:891 DateTimeDurationBetweenUncertainAdd Interval[ 32, 88 ] -> Interval[ 34, 88 ] Kotlin oracle: CqlDateTimeOperatorsTest.kt:52-55 - tests/cql/CqlDateTimeOperatorsTest.xml:902 DateTimeDurationBetweenUncertainSubtract Interval[ 0, 40 ] -> Interval[ 12, 28 ] Kotlin oracle: CqlDateTimeOperatorsTest.kt:57-60 - tests/cql/CqlDateTimeOperatorsTest.xml:913 DateTimeDurationBetweenUncertainMultiply Interval[ 256, 1936 ] -> Interval[ 289, 1936 ] Kotlin oracle: CqlDateTimeOperatorsTest.kt:62-65 Normative basis: CQL 1.5.2 §5.5.2 "Determining Difference and Duration" (strict-less-than admissibility rule, encoded at DateTime.kt:197-205) and §5.5.3 "Uncertainty Propagation" (endpoint-pairwise interval arithmetic, encoded at AddEvaluator.kt:96-102, SubtractEvaluator.kt:140-148, MultiplyEvaluator.kt:85-93). --- tests/cql/CqlDateTimeOperatorsTest.xml | 8 ++++---- tests/cql/CqlTypesTest.xml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/cql/CqlDateTimeOperatorsTest.xml b/tests/cql/CqlDateTimeOperatorsTest.xml index d00dc8d..67f5424 100644 --- a/tests/cql/CqlDateTimeOperatorsTest.xml +++ b/tests/cql/CqlDateTimeOperatorsTest.xml @@ -877,7 +877,7 @@ months between DateTime(2005) and DateTime(2006, 5) - Interval[ 4, 16 ] + Interval[ 5, 16 ]