From 6d3c04a90c35c4ef2608bec0b7626a004e57a3c8 Mon Sep 17 00:00:00 2001 From: Jonathan Percival Date: Tue, 31 Oct 2023 10:17:35 -0600 Subject: [PATCH] Test to validate 827 is fixed --- .../org/cqframework/cql/cql2elm/SemanticTests.java | 8 +++++++- .../resources/org/cqframework/cql/cql2elm/Issue827.cql | 10 ++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 Src/java/cql-to-elm/src/test/resources/org/cqframework/cql/cql2elm/Issue827.cql diff --git a/Src/java/cql-to-elm/src/test/java/org/cqframework/cql/cql2elm/SemanticTests.java b/Src/java/cql-to-elm/src/test/java/org/cqframework/cql/cql2elm/SemanticTests.java index 61641519b..c0093dc27 100644 --- a/Src/java/cql-to-elm/src/test/java/org/cqframework/cql/cql2elm/SemanticTests.java +++ b/Src/java/cql-to-elm/src/test/java/org/cqframework/cql/cql2elm/SemanticTests.java @@ -503,6 +503,12 @@ define function EncountersWithServiceType(encounters List, valueSet S assertThat(ivs.getValuesetExpression(), instanceOf(OperandRef.class)); } + @Test + public void testIssue827() throws IOException { + // https://github.com/cqframework/clinical_quality_language/issues/827 + TestUtils.runSemanticTest("Issue827.cql", 0); + } + @Test public void testIssueEmptySourceInterval() throws IOException { @@ -667,7 +673,7 @@ public void testCaseConditionalReturnTypes() throws IOException { } ExpressionDef caseDef = defs.get("Cases"); - + assertThat(caseDef.getResultType(), instanceOf(ChoiceType.class)); ChoiceType choiceType = (ChoiceType)caseDef.getResultType(); diff --git a/Src/java/cql-to-elm/src/test/resources/org/cqframework/cql/cql2elm/Issue827.cql b/Src/java/cql-to-elm/src/test/resources/org/cqframework/cql/cql2elm/Issue827.cql new file mode 100644 index 000000000..8f8fca83d --- /dev/null +++ b/Src/java/cql-to-elm/src/test/resources/org/cqframework/cql/cql2elm/Issue827.cql @@ -0,0 +1,10 @@ +library Issue827 + +// https://github.com/cqframework/clinical_quality_language/issues/827 + +// The problem was that the escaped identifier was not resolving correctly +define "Referencing Expression": + "This is the \"referenced\" expression" + +define "This is the \"referenced\" expression": + 'The reference resolved!' \ No newline at end of file