This is an automated email from the ASF dual-hosted git repository.

jadams pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/daffodil.git


The following commit(s) were added to refs/heads/master by this push:
     new 2e0586b  Enabled calendar tests that now work
2e0586b is described below

commit 2e0586b4711a531edc654e57616e440a9235e8a5
Author: Josh Adams <[email protected]>
AuthorDate: Thu Apr 1 13:44:37 2021 -0400

    Enabled calendar tests that now work
    
    Was able to verify that these test cases now work, even after changing
    user country/language via:
    
    export SBT_OPTS="-Xss2M -Xmx5G -Xms5G -Duser.country=DE
    -Duser.language=de"
    
    DAFFODIL-1945
---
 .../src/test/scala/org/apache/daffodil/IBMTests.scala     |  3 +--
 .../src/test/scala/org/apache/daffodil/IBMTests3.scala    |  2 --
 .../daffodil/section05/simple_types/SimpleTypes.tdml      | 15 +++++++++------
 .../daffodil/section05/simple_types/TestSimpleTypes.scala |  8 ++++----
 4 files changed, 14 insertions(+), 14 deletions(-)

diff --git 
a/daffodil-test-ibm1/src/test/scala/org/apache/daffodil/IBMTests.scala 
b/daffodil-test-ibm1/src/test/scala/org/apache/daffodil/IBMTests.scala
index cad694d..e912ed6 100644
--- a/daffodil-test-ibm1/src/test/scala/org/apache/daffodil/IBMTests.scala
+++ b/daffodil-test-ibm1/src/test/scala/org/apache/daffodil/IBMTests.scala
@@ -44,8 +44,7 @@ class IBMTestsThatPass {
   @Test def test_length_delimited_12_01(): Unit = { 
runner1.runOneTest("length_delimited_12_01") }
   @Test def test_length_delimited_12_04(): Unit = { 
runner1.runOneTest("length_delimited_12_04") }
 
-  // Doesn't work for a user, possible locale issue (DAFFODIL-1945)
-  // @Test def test_simple_type_properties_text_calendar_13_01() { 
runner2.runOneTest("simple_type_properties_text_calendar_13_01") }
+  @Test def test_simple_type_properties_text_calendar_13_01(): Unit = { 
runner2.runOneTest("simple_type_properties_text_calendar_13_01") }
   @Test def test_simple_type_properties_text_calendar_13_02(): Unit = { 
runner2.runOneTest("simple_type_properties_text_calendar_13_02") }
   @Test def test_simple_type_properties_text_calendar_13_03(): Unit = { 
runner2.runOneTest("simple_type_properties_text_calendar_13_03") }
   @Test def test_simple_type_properties_text_calendar_13_04(): Unit = { 
runner2.runOneTest("simple_type_properties_text_calendar_13_04") }
diff --git 
a/daffodil-test-ibm1/src/test/scala/org/apache/daffodil/IBMTests3.scala 
b/daffodil-test-ibm1/src/test/scala/org/apache/daffodil/IBMTests3.scala
index 59d087b..e5dd063 100644
--- a/daffodil-test-ibm1/src/test/scala/org/apache/daffodil/IBMTests3.scala
+++ b/daffodil-test-ibm1/src/test/scala/org/apache/daffodil/IBMTests3.scala
@@ -95,8 +95,6 @@ class IBMTestsThatPass2 {
   @Test def test_simple_type_properties_text_boolean_13_03(): Unit = { 
runner2.runOneTest("simple_type_properties_text_boolean_13_03") } // DFDL-462 
boolean type
   @Test def test_simple_type_properties_bin_boolean_13_01(): Unit = { 
runner2.runOneTest("simple_type_properties_bin_boolean_13_01") } // DFDL-461 
boolean type
 
-  @Test def test_simple_type_properties_text_calendar_13_01(): Unit = { 
runner2.runOneTest("simple_type_properties_text_calendar_13_01") } // 
DAFFODIL-1945
-
   @Test def test_sequences_separated_14_04(): Unit = { 
runner2.runOneTest("sequences_separated_14_04") } // left over data
 
 }
diff --git 
a/daffodil-test/src/test/resources/org/apache/daffodil/section05/simple_types/SimpleTypes.tdml
 
b/daffodil-test/src/test/resources/org/apache/daffodil/section05/simple_types/SimpleTypes.tdml
index 6185696..df20950 100644
--- 
a/daffodil-test/src/test/resources/org/apache/daffodil/section05/simple_types/SimpleTypes.tdml
+++ 
b/daffodil-test/src/test/resources/org/apache/daffodil/section05/simple_types/SimpleTypes.tdml
@@ -5900,7 +5900,7 @@
     <tdml:document><![CDATA[1 2012]]></tdml:document>
     <tdml:infoset>
       <tdml:dfdlInfoset>
-        <date17>2012-01-01+00:00</date17>
+        <date17>2012-01-01</date17>
       </tdml:dfdlInfoset>
     </tdml:infoset>
   </tdml:parserTestCase>
@@ -5932,15 +5932,18 @@
        Purpose: This test demonstrates the calendarDaysInFirstWeek property. 
calendarDaysInFirstWeek is set to 2,
                 which is the number of days in the first week of March, so the 
first day of the first week is selected,
                 which is Feb 24th.
--->
+        NOTE: This test is set to roundTrip="twoPass" as ICU normalizes the 
date to "5 03 2013", which is functionally
+              equivalent to "1 03 2013". Parsing either of those values will 
result in the date "2013-02-24".
+  -->
   
   <tdml:parserTestCase name="dateCalendarDaysInFirstWeek5" root="date20"
-    model="dateTimeSchema" description="Section 13 Simple Types - 
calendarDaysInFirstWeek - DFDL-13-143R">
+    model="dateTimeSchema" description="Section 13 Simple Types - 
calendarDaysInFirstWeek - DFDL-13-143R"
+    roundTrip="twoPass">
 
     <tdml:document><![CDATA[1 03 2013]]></tdml:document>
     <tdml:infoset>
       <tdml:dfdlInfoset>
-        <date20>2013-02-24+00:00</date20>
+        <date20>2013-02-24</date20>
       </tdml:dfdlInfoset>
     </tdml:infoset>
   </tdml:parserTestCase>
@@ -6244,7 +6247,7 @@
     <tdml:document><![CDATA[day 1 of the week, month 02 year 
2013]]></tdml:document>
     <tdml:infoset>
       <tdml:dfdlInfoset>
-        <date06>2013-02-03+00:00</date06>
+        <date06>2013-02-03</date06>
       </tdml:dfdlInfoset>
     </tdml:infoset>
   </tdml:parserTestCase>
@@ -6265,7 +6268,7 @@
     <tdml:document><![CDATA[day 2 of the week, month 02 year 
2013]]></tdml:document>
     <tdml:infoset>
       <tdml:dfdlInfoset>
-        <date06>2013-02-04+00:00</date06>
+        <date06>2013-02-04</date06>
       </tdml:dfdlInfoset>
     </tdml:infoset>
   </tdml:parserTestCase>
diff --git 
a/daffodil-test/src/test/scala/org/apache/daffodil/section05/simple_types/TestSimpleTypes.scala
 
b/daffodil-test/src/test/scala/org/apache/daffodil/section05/simple_types/TestSimpleTypes.scala
index 7460fd7..1e8470a 100644
--- 
a/daffodil-test/src/test/scala/org/apache/daffodil/section05/simple_types/TestSimpleTypes.scala
+++ 
b/daffodil-test/src/test/scala/org/apache/daffodil/section05/simple_types/TestSimpleTypes.scala
@@ -116,9 +116,9 @@ class TestSimpleTypes {
 
   @Test def test_dateCalendarDaysInFirstWeek(): Unit = { 
runner.runOneTest("dateCalendarDaysInFirstWeek") }
   @Test def test_dateCalendarDaysInFirstWeek2(): Unit = { 
runner.runOneTest("dateCalendarDaysInFirstWeek2") }
-  //DAFFODIL-1945 @Test def test_dateCalendarDaysInFirstWeek3() { 
runner.runOneTest("dateCalendarDaysInFirstWeek3") }
+  @Test def test_dateCalendarDaysInFirstWeek3(): Unit =  { 
runner.runOneTest("dateCalendarDaysInFirstWeek3") }
   @Test def test_dateCalendarDaysInFirstWeek4(): Unit = { 
runner.runOneTest("dateCalendarDaysInFirstWeek4") }
-  //DAFFODIL-1945 @Test def test_dateCalendarDaysInFirstWeek5() { 
runner.runOneTest("dateCalendarDaysInFirstWeek5") }
+  @Test def test_dateCalendarDaysInFirstWeek5(): Unit =  { 
runner.runOneTest("dateCalendarDaysInFirstWeek5") }
 
   @Test def test_timeSymbols(): Unit = { runner.runOneTest("timeSymbols") }
   @Test def test_timeSymbols2(): Unit = { runner.runOneTest("timeSymbols2") }
@@ -178,8 +178,8 @@ class TestSimpleTypes {
 
   @Test def test_dateCalendarFirstDayOfWeek01(): Unit = { 
runner.runOneTest("dateCalendarFirstDayOfWeek01") }
   @Test def test_dateCalendarFirstDayOfWeek02(): Unit = { 
runner.runOneTest("dateCalendarFirstDayOfWeek02") }
-  //DAFFODIL-1945 @Test def test_dateCalendarFirstDayOfWeek03() { 
runner.runOneTest("dateCalendarFirstDayOfWeek03") }
-  //DAFFODIL-1945 @Test def test_dateCalendarFirstDayOfWeek04() { 
runner.runOneTest("dateCalendarFirstDayOfWeek04") }
+  @Test def test_dateCalendarFirstDayOfWeek03(): Unit = { 
runner.runOneTest("dateCalendarFirstDayOfWeek03") }
+  @Test def test_dateCalendarFirstDayOfWeek04(): Unit = { 
runner.runOneTest("dateCalendarFirstDayOfWeek04") }
   @Test def test_timeFractionalSeconds01(): Unit = { 
runner.runOneTest("timeFractionalSeconds01") }
   @Test def test_dateText(): Unit = { runner.runOneTest("dateText") }
   @Test def test_dateTextInvalid(): Unit = { 
runner.runOneTest("dateTextInvalid") }

Reply via email to