tuxji commented on a change in pull request #676:
URL: https://github.com/apache/daffodil/pull/676#discussion_r745040659
##########
File path:
daffodil-runtime2/src/test/resources/org/apache/daffodil/runtime2/ex_nums.tdml
##########
@@ -37,62 +37,69 @@
</tdml:defineConfig>
<tdml:parserTestCase
- name="ex_nums_parse_runtime1"
model="ex_nums.dfdl.xsd"
+ name="ex_nums_runtime1"
config="config-runtime1">
<tdml:document>
- <tdml:documentPart type="file">ex_nums_parse.dat</tdml:documentPart>
+ <tdml:documentPart type="file">ex_nums.dat</tdml:documentPart>
</tdml:document>
<tdml:infoset>
- <tdml:dfdlInfoset
type="file">ex_nums_unparse_runtime1.xml</tdml:dfdlInfoset>
+ <tdml:dfdlInfoset type="file">ex_nums.dat.xml.runtime1</tdml:dfdlInfoset>
</tdml:infoset>
</tdml:parserTestCase>
- <tdml:unparserTestCase
- name="ex_nums_unparse_runtime1"
- model="ex_nums.dfdl.xsd"
- config="config-runtime1">
- <tdml:infoset>
- <tdml:dfdlInfoset
type="file">ex_nums_unparse_runtime1.xml</tdml:dfdlInfoset>
- </tdml:infoset>
- <tdml:document>
- <tdml:documentPart type="file">ex_nums_parse.dat</tdml:documentPart>
- </tdml:document>
- </tdml:unparserTestCase>
-
<tdml:parserTestCase
- name="ex_nums_parse_runtime2"
model="ex_nums.dfdl.xsd"
+ name="ex_nums_runtime2"
config="config-runtime2">
<tdml:document>
- <tdml:documentPart type="file">ex_nums_parse.dat</tdml:documentPart>
+ <tdml:documentPart type="file">ex_nums.dat</tdml:documentPart>
</tdml:document>
<tdml:infoset>
- <tdml:dfdlInfoset
type="file">ex_nums_unparse_runtime2.xml</tdml:dfdlInfoset>
+ <tdml:dfdlInfoset type="file">ex_nums.dat.xml.runtime2</tdml:dfdlInfoset>
</tdml:infoset>
</tdml:parserTestCase>
<tdml:unparserTestCase
- name="ex_nums_unparse_runtime2"
- model="ex_nums.dfdl.xsd"
- config="config-runtime2">
- <tdml:infoset>
- <tdml:dfdlInfoset
type="file">ex_nums_unparse_runtime2.xml</tdml:dfdlInfoset>
- </tdml:infoset>
- <tdml:document>
- <tdml:documentPart type="file">ex_nums_parse.dat</tdml:documentPart>
- </tdml:document>
- </tdml:unparserTestCase>
-
- <tdml:unparserTestCase
- name="ex_nums_unparse_errors"
model="ex_nums.dfdl.xsd"
+ name="ex_nums_runtime2_error"
config="config-runtime2">
<tdml:infoset>
- <tdml:dfdlInfoset
type="file">ex_nums_unparse_errors.xml</tdml:dfdlInfoset>
+ <tdml:dfdlInfoset
type="file">ex_nums.dat.xml.runtime2.error</tdml:dfdlInfoset>
</tdml:infoset>
<tdml:errors>
<tdml:error>value</tdml:error>
+ <tdml:error>boolean_false</tdml:error>
Review comment:
Yes, the TDML standard and TDMLRunner not supporting validation errors
for unparse feels like a bug to me. Even after I changed the test to a
parseTestCase, I still couldn't allow the test case to do a round trip (parse,
then unparse back to the same data file) because there was no way for
Runtime2DataProcessor to return validation errors inside its UnparseResult.
Both parse and unparse runtime2 code report the same validation errors so the
test case would have round-tripped fine with a document, an infoset, and the
same validation errors for both parse and unparse. However, I don't know the
process for making changes to the TDML standard (I believe the changes have to
be accepted by the IBM folks and others, correct?).
--
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]