olabusayoT commented on code in PR #1204:
URL: https://github.com/apache/daffodil/pull/1204#discussion_r1757382675
##########
daffodil-tdml-lib/src/main/scala/org/apache/daffodil/tdml/TDMLRunner.scala:
##########
@@ -959,32 +990,45 @@ abstract class TestCase(testCaseXML: NodeSeq, val parent:
DFDLTestSuite) {
protected def checkDiagnosticMessages(
diagnostics: Seq[Diagnostic],
- errors: ExpectedErrors,
- optWarnings: Option[ExpectedWarnings],
+ errors: Seq[ExpectedErrors],
Review Comment:
I think so, in verifyParseResult for example, it looks like we check
validation errors separate from warnings
```
(shouldValidate, expectsValidationError) match {
case (_, true) => {
// Note that even if shouldValidate is false, we still need to check
// for validation diagnostics because failed assertions with
// failureType="recoverableError" are treated as validation errors
checkDiagnosticMessages(
actual.getDiagnostics,
None,
None,
optExpectedValidationErrors,
implString
)
Assert.invariant(actual.isValidationError)
}
case (true, false) => {
VerifyTestCase.verifyNoValidationErrorsFound(
actual,
implString
) // Verify no validation errors from parser
Assert.invariant(!actual.isValidationError)
}
case (false, false) => // Nothing to do here.
}
val allDiags = compileWarnings ++ actual.getDiagnostics
checkDiagnosticMessages(
allDiags,
None,
optExpectedWarnings,
None,
implString
)
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]