olabusayoT commented on code in PR #1313:
URL: https://github.com/apache/daffodil/pull/1313#discussion_r1775730034
##########
daffodil-tdml-lib/src/main/scala/org/apache/daffodil/tdml/TDMLRunner.scala:
##########
@@ -2262,6 +2262,7 @@ case class Document(d: NodeSeq, parent: TestCase) {
case "byte" => new ByteDocumentPart(child, this)
case "bits" => new BitsDocumentPart(child, this)
case "file" => new FileDocumentPart(child, this)
+ case "" => throw TDMLException("documentPart must have attribute
'type'", None)
Review Comment:
Good point...we only run into the assertion when call the Document method
directly! I guess I wonder if that is a valid use case of the TDMLRunner? If it
is, that bypasses the tdml.xsd and I think we ought to add in the empty case
check, but if that's not a valid usecase, then I agree this PR isn't really
necessary.
Per the ticket, we no longer get an Abort. But we do get an invariantFailed
error when calling the Document method with the invalid tdml.
--
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]