git.net

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GitHub] efinnegan commented on a change in pull request #70: Adding property binaryCalendarRep with values "binarySeconds" and "bi…


efinnegan commented on a change in pull request #70: Adding property binaryCalendarRep with values "binarySeconds" and "bi…
URL: https://github.com/apache/incubator-daffodil/pull/70#discussion_r190990261
 
 

 ##########
 File path: daffodil-test/src/test/resources/org/apache/daffodil/section05/simple_types/SimpleTypes.tdml
 ##########
 @@ -1951,6 +1970,236 @@
     </tdml:infoset>
   </tdml:parserTestCase>
 
+  <!-- xs:dateTime with binaryCalendarRep='binarySeconds' -->
+  <tdml:parserTestCase name="dateTimeBin" root="dateTimeBin"
+    model="SimpleTypes-binary" description="Section 5 Schema types-dateTime - DFDL-5-016R"
+    roundTrip="true">
+
+    <tdml:document>
+      <tdml:documentPart type="bits">00000000 00000000 00000000 00111110</tdml:documentPart>
+    </tdml:document>
+    <tdml:infoset>
+      <tdml:dfdlInfoset>
+        <dateTimeBin>1977-01-01T00:01:09.000000+00:00</dateTimeBin>
+      </tdml:dfdlInfoset>
+    </tdml:infoset>
+  </tdml:parserTestCase>
+
+  <tdml:parserTestCase name="dateTimeBin2" root="dateTimeBin2"
+    model="SimpleTypes-binary" description="Section 5 Schema types-dateTime - DFDL-5-016R"
+    roundTrip="false">
+
+    <tdml:document>
+      <tdml:documentPart type="bits">00000000 00000000 00000000 00111101</tdml:documentPart>
+    </tdml:document>
+    <tdml:errors>
+      <tdml:error>Schema Definition Error: lengthUnits must be 'bytes' when binaryCalendarRep='binarySeconds'</tdml:error>
+    </tdml:errors>
+  </tdml:parserTestCase>
+
+  <tdml:parserTestCase name="dateTimeBin3" root="dateTimeBin3"
+    model="SimpleTypes-binary" description="Section 5 Schema types-dateTime - DFDL-5-016R"
+    roundTrip="false">
+
+    <tdml:document>
+      <tdml:documentPart type="bits">00000000 00000000 00000000 00111101</tdml:documentPart>
+    </tdml:document>
+    <tdml:errors>
+      <tdml:error>Schema Definition Error: binary xs:dateTime must be 32 bits when binaryCalendarRep='binarySeconds'</tdml:error>
+    </tdml:errors>
+  </tdml:parserTestCase>
+
+  <!-- xs:dateTime with binaryCalendarRep='binarySeconds' with implicit length -->
+  <tdml:parserTestCase name="dateTimeBin4" root="dateTimeBin4"
+    model="SimpleTypes-binary" description="Section 5 Schema types-dateTime - DFDL-5-016R"
+    roundTrip="true">
+
+    <tdml:document>
+      <tdml:documentPart type="bits">11111111 11111110 10101110 10000000</tdml:documentPart>
+    </tdml:document>
+    <tdml:infoset>
+      <tdml:dfdlInfoset>
+        <dateTimeBin4>1869-12-31T00:05:00.000000+00:00</dateTimeBin4>
+      </tdml:dfdlInfoset>
+    </tdml:infoset>
+  </tdml:parserTestCase>
+
+  <!-- xs:dateTime with binaryCalendarRep='binaryMillieconds' -->
+  <tdml:parserTestCase name="dateTimeBin5" root="dateTimeBin5"
+    model="SimpleTypes-binary" description="Section 5 Schema types-dateTime - DFDL-5-016R"
+    roundTrip="true">
+
+    <tdml:document>
+      <tdml:documentPart type="bits">00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000001</tdml:documentPart>
+    </tdml:document>
+    <tdml:infoset>
+      <tdml:dfdlInfoset>
+        <dateTimeBin5>1985-11-21T10:37:04.001000+00:00</dateTimeBin5>
+      </tdml:dfdlInfoset>
+    </tdml:infoset>
+  </tdml:parserTestCase>
+
+  <!-- xs:dateTime with binaryCalendarRep='binaryMillieconds' -->
+  <tdml:parserTestCase name="dateTimeBin6" root="dateTimeBin6"
+    model="SimpleTypes-binary" description="Section 5 Schema types-dateTime - DFDL-5-016R"
+    roundTrip="true">
+
+    <tdml:document>
+      <tdml:documentPart type="bits">00000000 00000000 00000000 00000000 11111111 11111111 11111111 11111111</tdml:documentPart>
+    </tdml:document>
+    <tdml:infoset>
+      <tdml:dfdlInfoset>
+        <dateTimeBin6>2000-08-03T20:28:06.295000+00:00</dateTimeBin6>
+      </tdml:dfdlInfoset>
+    </tdml:infoset>
+  </tdml:parserTestCase>
+
+  <tdml:parserTestCase name="dateTimeBin7" root="dateTimeBin7"
+    model="SimpleTypes-binary" description="Section 5 Schema types-dateTime - DFDL-5-016R"
+    roundTrip="true">
+
+    <tdml:document>
+      <tdml:documentPart type="bits">11111111 11111111 11111111 11111111 11111010 11011001 10100100 00000000</tdml:documentPart>
+    </tdml:document>
+    <tdml:infoset>
+      <tdml:dfdlInfoset>
+        <dateTimeBin7>1869-12-31T00:05:00.000000+00:00</dateTimeBin7>
+      </tdml:dfdlInfoset>
+    </tdml:infoset>
+  </tdml:parserTestCase>
+
+  <!-- xs:dateTime with binaryCalendarRep='binaryMillieconds' -->
+  <tdml:parserTestCase name="dateTimeBin8" root="dateTimeBin6"
+    model="SimpleTypes-binary" description="Section 5 Schema types-dateTime - DFDL-5-016R"
+    roundTrip="true">
+
+    <tdml:document>
+      <tdml:documentPart type="bits">00000000 00000001 00000010 01001110 11010001 10100111 00001000 00000000</tdml:documentPart>
+    </tdml:document>
+    <tdml:infoset>
+      <tdml:dfdlInfoset>
+        <dateTimeBin6>11000-06-15T03:25:19.000000+00:00</dateTimeBin6>
+      </tdml:dfdlInfoset>
+    </tdml:infoset>
+  </tdml:parserTestCase>
+
+  <!-- xs:dateTime with binaryCalendarRep='binaryMillieconds' -->
+  <tdml:parserTestCase name="dateTimeBin9" root="dateTimeBin6"
+    model="SimpleTypes-binary" description="Section 5 Schema types-dateTime - DFDL-5-016R"
+    roundTrip="true">
+
+    <tdml:document>
+      <tdml:documentPart type="bits">00000000 00000000 11100101 10011000 00001111 10110100 10001110 11100111</tdml:documentPart>
+    </tdml:document>
+    <tdml:infoset>
+      <tdml:dfdlInfoset>
+        <dateTimeBin6>9999-12-31T23:59:59.999000+00:00</dateTimeBin6>
+      </tdml:dfdlInfoset>
+    </tdml:infoset>
+  </tdml:parserTestCase>
+
+  <!-- xs:dateTime with binaryCalendarRep='binaryMillieconds' -->
+  <tdml:parserTestCase name="dateTimeBin10" root="dateTimeBin6"
+    model="SimpleTypes-binary" description="Section 5 Schema types-dateTime - DFDL-5-016R"
+    roundTrip="true">
+
+    <tdml:document>
+      <tdml:documentPart type="bits">00000000 00000000 11100101 10011000 00001111 10110100 10001110 11101000</tdml:documentPart>
+    </tdml:document>
+    <tdml:infoset>
+      <tdml:dfdlInfoset>
+        <dateTimeBin6>10000-01-01T00:00:00.000000+00:00</dateTimeBin6>
+      </tdml:dfdlInfoset>
+    </tdml:infoset>
+  </tdml:parserTestCase>
+
+  <tdml:parserTestCase name="dateTimeBin11" root="dateTimeBin6"
+    model="SimpleTypes-binary" description="Section 5 Schema types-dateTime - DFDL-5-016R"
+    roundTrip="true">
+
+    <tdml:document>
+      <tdml:documentPart type="bits">01111111 11111111 11111111 11111111 11111111 11111111 11111111 11111111</tdml:documentPart>
+    </tdml:document>
+    <tdml:errors>
+      <tdml:error>Parse Error</tdml:error>
+      <tdml:error>millis value less than lower bounds for a Calendar</tdml:error>
 
 Review comment:
   No it doesn't show the range, just what it tried to set so I can look at including the range.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@xxxxxxxxxxxxxxxx


With regards,
Apache Git Services