mbeckerle commented on code in PR #1204:
URL: https://github.com/apache/daffodil/pull/1204#discussion_r1572706232
##########
daffodil-tdml-lib/src/main/scala/org/apache/daffodil/tdml/TDMLRunner.scala:
##########
@@ -1024,7 +1060,27 @@ case class ParserTestCase(ptc: NodeSeq, parentArg:
DFDLTestSuite)
}
}
- case (None, Some(errors)) => {
+ case (Some(_), Some(errors), Some("none")) => {
+ compileResult match {
+ case Left(diags) => throw TDMLException(diags, implString)
+ case Right((diags, proc)) => {
+ processor = proc
+ checkDiagnosticMessages(diags, errors, optExpectedWarnings,
implString)
+ runParseExpectSuccess(
+ dataToParse,
+ nBits,
+ optExpectedWarnings,
Review Comment:
I'm not seeing logic here about warnings i.e., how we control whether
warnings are tolerated at all.
##########
daffodil-lib/src/main/resources/org/apache/daffodil/xsd/tdml.xsd:
##########
@@ -349,6 +349,7 @@
<xs:restriction base="xs:string">
<xs:enumeration value="all"/>
<xs:enumeration value="any"/>
+ <xs:enumeration value="none"/>
Review Comment:
I think the goals of this bug were to allow us to express two things:
1) that a test should not create warnings at all - for an individual test
case, or for a whole suite of tests. This should eliminate the issue (over
time) where a schema seems to be working as far as TDML tests go, but when you
actually go to use it, thousands of warnings are created.
2) that a test can verify that a bug which is a faulty diagnostic message,
is fixed. Tests need to specify that the faulty message is not generated, and a
correct diagnostic IS generated.
I don't think we need more than those capabilities.
I suspect match="any" is not needed. Just match="all" and match="none". But
we also need some new default attributes on testSuite that allow us to specify
no-warnings (unless overridden) from any testCase.
--
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]