clinical_quality_language icon indicating copy to clipboard operation
clinical_quality_language copied to clipboard

Merge Message operator tests

Open antvaset opened this issue 1 year ago • 1 comments

Merged tests from engine/.../CqlErrorsAndMessagingOperatorsTest.cql into CqlErrorsAndMessagingOperatorsTest.xml.

Keeping the CQL library with the following define's:

  1. These are used in Java tests to test the engine messages (logs) produced by the Message operator with the 'Message', 'Warning', and 'Trace' severities:
TestMessageInfo
TestMessageWarn
TestMessageTrace
  1. These are used in Java tests to test that the runtime throws when the severity is 'Error' (I also adjusted the Java tests for these define's so that they fail if the engine does not throw):
TestMessageError
TestErrorWithNullSource
TestErrorWithNullCode
TestErrorWithNullMessage

Note that TestErrorWithNullCondition defined as

define TestErrorWithNullCondition:
  Message(1, null, '1', 'Error', 'This is a message')

is not supposed to throw because the spec says, "If condition is true, the message is generated. Otherwise, the operation only returns the results and performs no processing at all."

At the moment this is a draft and depends on https://github.com/cqframework/clinical_quality_language/issues/1401. Once I'm sure we can have Message calls with nulls without casts, I'll raise a corresponding PR to update cql-tests.

antvaset avatar Aug 14 '24 22:08 antvaset

Formatting check succeeded!

github-actions[bot] avatar Aug 14 '24 22:08 github-actions[bot]