olabusayoT commented on a change in pull request #334: Add a special unparser 
for empty choice branches
URL: https://github.com/apache/incubator-daffodil/pull/334#discussion_r395802607
 
 

 ##########
 File path: 
daffodil-test/src/test/resources/org/apache/daffodil/section15/choice_groups/choice-unparse2.tdml
 ##########
 @@ -216,4 +216,35 @@
     </tdml:infoset>
   </tdml:unparserTestCase>
 
+  <tdml:defineSchema name="c3" elementFormDefault="unqualified">
+
+    <xs:include 
schemaLocation="org/apache/daffodil/xsd/DFDLGeneralFormat.dfdl.xsd"/>
+    <dfdl:format ref="ex:GeneralFormat" lengthKind="delimited"/>
+
+    <xs:element name="choice" dfdl:terminator=";">
+      <xs:complexType>
+        <xs:choice>
+          <xs:sequence>
+            <xs:annotation>
+              <xs:appinfo source="http://www.ogf.org/dfdl/";>
+                <dfdl:assert>{ fn:true() eq fn:true() }</dfdl:assert>
+              </xs:appinfo>
+            </xs:annotation>
+          </xs:sequence>
+          <xs:element name="impossible" type="xs:int" />
+        </xs:choice>
+      </xs:complexType>
+    </xs:element>
+
+  </tdml:defineSchema>
+
+  <tdml:unparserTestCase name="choice_default_branch_is_empty" model="c3" 
root="choice">
+    <tdml:document>;</tdml:document>
+    <tdml:infoset>
+      <tdml:dfdlInfoset>
+        <ex:choice />
+      </tdml:dfdlInfoset>
+    </tdml:infoset>
 
 Review comment:
   Should this be switched to match the convention of input then output?

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to