From d4dd873ba41239f366e187ac00f2ec47acb61288 Mon Sep 17 00:00:00 2001 From: Anton Vasetenkov Date: Fri, 21 Jun 2024 18:40:37 +1200 Subject: [PATCH] Enable Boolean and null literal tests --- .../src/test/java/org/hl7/fhirpath/CQLOperationsR4Test.java | 3 --- .../src/test/java/org/hl7/fhirpath/TestFhirPath.java | 4 +++- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/Src/java/engine-fhir/src/test/java/org/hl7/fhirpath/CQLOperationsR4Test.java b/Src/java/engine-fhir/src/test/java/org/hl7/fhirpath/CQLOperationsR4Test.java index b092e863f..abece9051 100644 --- a/Src/java/engine-fhir/src/test/java/org/hl7/fhirpath/CQLOperationsR4Test.java +++ b/Src/java/engine-fhir/src/test/java/org/hl7/fhirpath/CQLOperationsR4Test.java @@ -134,15 +134,12 @@ public static Object[][] dataMethod() { "cql/CqlTypeOperatorsTest/ToTime/ToTime4", "cql/CqlTypesTest/DateTime/DateTimeUncertain", "cql/CqlTypesTest/Time/TimeUpperBoundMillis", - "cql/ValueLiteralsAndSelectors/Boolean/BooleanFalse", - "cql/ValueLiteralsAndSelectors/Boolean/BooleanTrue", "cql/ValueLiteralsAndSelectors/Decimal/Decimal10Pow28", "cql/ValueLiteralsAndSelectors/Decimal/DecimalNeg10Pow28", "cql/ValueLiteralsAndSelectors/Decimal/DecimalNegTenthStep", "cql/ValueLiteralsAndSelectors/Decimal/DecimalPos10Pow28", "cql/ValueLiteralsAndSelectors/Decimal/DecimalPosTenthStep", "cql/ValueLiteralsAndSelectors/Decimal/DecimalTenthStep", - "cql/ValueLiteralsAndSelectors/Null/Null", "r4/tests-fhir-r4/from-Zulip/(true and 'foo').empty()", "r4/tests-fhir-r4/from-Zulip/(true | 'foo').allTrue()", "r4/tests-fhir-r4/testAggregate/testAggregate1", diff --git a/Src/java/engine-fhir/src/test/java/org/hl7/fhirpath/TestFhirPath.java b/Src/java/engine-fhir/src/test/java/org/hl7/fhirpath/TestFhirPath.java index 9e640dbd3..1da32c586 100644 --- a/Src/java/engine-fhir/src/test/java/org/hl7/fhirpath/TestFhirPath.java +++ b/Src/java/engine-fhir/src/test/java/org/hl7/fhirpath/TestFhirPath.java @@ -141,8 +141,10 @@ protected void runTest( String outputExpression = test.getOutput().get(0).getValue(); if ("null".equals(outputExpression)) { cql = String.format("%s (%s) is %s", cql, testExpression, outputExpression); + } else if ("null".equals(testExpression)) { + cql = String.format("%s (%s) is %s", cql, outputExpression, testExpression); } else { - cql = String.format("%s (%s) = %s", cql, testExpression, outputExpression); + cql = String.format("%s (%s) = (%s)", cql, testExpression, outputExpression); } } else { cql = String.format("%s %s", cql, testExpression);