pkatlic commented on code in PR #1137:
URL: https://github.com/apache/daffodil/pull/1137#discussion_r1462381252
##########
daffodil-test/src/test/resources/org/apache/daffodil/section23/dfdl_functions/Functions.tdml:
##########
@@ -11390,6 +11417,110 @@
</tdml:infoset>
</tdml:unparserTestCase>
+ <!--
+ Test Name: count_12
+ Schema: XPathFunctions
+ Root: count07
+ Purpose: This test demonstrates the count() function works as
expected
+ when parsing an array of scalars
+ -->
+
+ <tdml:parserTestCase name="count_12" root="count07"
+ model="XPathFunctions" description="Section 23 - Functions - fn:count -
DFDL-23-122R">
+ <tdml:document>
+ <tdml:documentPart type="byte">00 00 00 01 00 00 00
02</tdml:documentPart>
+ </tdml:document>
+ <tdml:infoset>
+ <tdml:dfdlInfoset>
+ <ex:count07 xmlns:ex="http://example.com">
+ <ex:int>1</ex:int>
+ <ex:int>2</ex:int>
+ <ex:count>2</ex:count>
+ </ex:count07>
+ </tdml:dfdlInfoset>
+ </tdml:infoset>
+ </tdml:parserTestCase>
+
+ <!--
+ Test Name: count_13
+ Schema: XPathFunctions
+ Root: count08
+ Purpose: This test demonstrates the count() function works as
expected
+ when parsing a unique scalar element
+ -->
+
+ <tdml:parserTestCase name="count_13" root="count08" roundTrip="true"
+ model="XPathFunctions" description="Section 23 -
Functions - fn:count - DFDL-23-122R">
+ <tdml:document>
+ <tdml:documentPart type="byte">00 00 00 01</tdml:documentPart>
+ </tdml:document>
+ <tdml:errors>
+ <tdml:error>Schema Definition Error</tdml:error>
+ <tdml:error>fn:count</tdml:error>
+ <tdml:error>array</tdml:error>
+ </tdml:errors>
+ </tdml:parserTestCase>
+
+ <!--
+ Test Name: count_14
+ Schema: XPathFunctions
+ Root: count09
+ Purpose: This test demonstrates the count() function works as
expected
+ when parsing an optional element
+ -->
+
+ <tdml:parserTestCase name="count_14" root="count09" roundTrip="true"
+ model="XPathFunctions" description="Section 23 -
Functions - fn:count - DFDL-23-122R">
+ <tdml:document>
+ <tdml:documentPart type="byte">00 00 00 01</tdml:documentPart>
+ </tdml:document>
+ <tdml:errors>
+ <tdml:error>Schema Definition Error</tdml:error>
+ <tdml:error>fn:count</tdml:error>
+ <tdml:error>array</tdml:error>
+ </tdml:errors>
Review Comment:
This is fixed.
--
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]