Do not look at "DataStyleTest.java:87" - file contents in my IDE is not the same as in GitHub.
2014-03-03 16:36 GMT+02:00 Антон Мацюк <denixx.bay...@gmail.com>: > If I leave Locale.FRANCE I get this: > > testDays(org.jopendocument.dom.style.data.DataStyleTest) Time elapsed: > 0.172 sec <<< FAILURE! > junit.framework.AssertionFailedError: > expected:<java.util.GregorianCalendar[time=1393803027854,areFieldsSet=true,areAllFieldsSet=false,lenient=true,zone=sun.util.calendar.ZoneInfo[id="Europe/Kiev",offset=10800000,dstSavings=0,useDaylight=false,transitions=67,lastRule=null],firstDayOfWeek=2,minimalDaysInFirstWeek=4,ERA=1,YEAR=2014,MONTH=2,WEEK_OF_YEAR=10,WEEK_OF_MONTH=1,DAY_OF_MONTH=3,DAY_OF_YEAR=62,DAY_OF_WEEK=2,DAY_OF_WEEK_IN_MONTH=1,AM_PM=0,HOUR=2,HOUR_OF_DAY=2,MINUTE=30,SECOND=27,MILLISECOND=854,ZONE_OFFSET=10800000,DST_OFFSET=0]> > but > was:<java.util.GregorianCalendar[time=?,areFieldsSet=false,areAllFieldsSet=false,lenient=true,zone=sun.util.calendar.ZoneInfo[id="Europe/Kiev",offset=10800000,dstSavings=0,useDaylight=false,transitions=67,lastRule=null],firstDayOfWeek=2,minimalDaysInFirstWeek=1,ERA=?,YEAR=2014,MONTH=?,WEEK_OF_YEAR=?,WEEK_OF_MONTH=?,DAY_OF_MONTH=?,DAY_OF_YEAR=62,DAY_OF_WEEK=?,DAY_OF_WEEK_IN_MONTH=?,AM_PM=?,HOUR=?,HOUR_OF_DAY=2,MINUTE=30,SECOND=27,MILLISECOND=854,ZONE_OFFSET=?,DST_OFFSET=?]> > at junit.framework.Assert.fail(Assert.java:57) > at junit.framework.Assert.failNotEquals(Assert.java:329) > at junit.framework.Assert.assertEquals(Assert.java:78) > at junit.framework.Assert.assertEquals(Assert.java:86) > at junit.framework.TestCase.assertEquals(TestCase.java:253) > at > org.jopendocument.dom.style.data.DataStyleTest.testDays(DataStyleTest.java:87) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:597) > at junit.framework.TestCase.runTest(TestCase.java:176) > at junit.framework.TestCase.runBare(TestCase.java:141) > at junit.framework.TestResult$1.protect(TestResult.java:122) > at junit.framework.TestResult.runProtected(TestResult.java:142) > at junit.framework.TestResult.run(TestResult.java:125) > at junit.framework.TestCase.run(TestCase.java:129) > at junit.framework.TestSuite.runTest(TestSuite.java:255) > at junit.framework.TestSuite.run(TestSuite.java:250) > at > org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:84) > at > org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:252) > at > org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:141) > at > org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:112) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:597) > at > org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189) > at > org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165) > at > org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85) > at > org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115) > at > org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75) > > > 2014-03-03 11:30 GMT+02:00 Sylvain Cuaz <sylv...@ilm-informatique.fr>: > > Le 02/03/2014 16:37, Антон Мацюк a écrit : >> >> Though, take a look at this: >>> https://github.com/denixx/jOpenDocument-1.3/blob/master/ >>> src/test/java/org/jopendocument/dom/style/data/DataStyleTest.java#L81 >>> >> >> The locale must be France since I want to test that the round trip from >> getDays() and back with getDate() works even for the skipped hour. I.e. I >> know that in France the hour from 2 to 3 AM will be skipped. >> To answer the second question, precisely because I pass Locale.FRANCE, >> this test will succeed on any computer. >> >> Cheers, >> Sylvain >> >> >> -- >> >> --- You received this message because you are subscribed to the Google >> Groups "jOpenDocument" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to jopendocument+unsubscr...@googlegroups.com. >> For more options, visit https://groups.google.com/groups/opt_out. >> > > -- --- You received this message because you are subscribed to the Google Groups "jOpenDocument" group. To unsubscribe from this group and stop receiving emails from it, send an email to jopendocument+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.