You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@juneau.apache.org by ja...@apache.org on 2017/09/24 18:33:20 UTC
incubator-juneau git commit: Fix false testcase failures from date
localization issues in IBM JVM.
Repository: incubator-juneau
Updated Branches:
refs/heads/master 23e888cb2 -> b89cb9823
Fix false testcase failures from date localization issues in IBM JVM.
Project: http://git-wip-us.apache.org/repos/asf/incubator-juneau/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-juneau/commit/b89cb982
Tree: http://git-wip-us.apache.org/repos/asf/incubator-juneau/tree/b89cb982
Diff: http://git-wip-us.apache.org/repos/asf/incubator-juneau/diff/b89cb982
Branch: refs/heads/master
Commit: b89cb9823643b2ce1ed27c34a1594d96350f5abc
Parents: 23e888c
Author: JamesBognar <ja...@apache.org>
Authored: Sun Sep 24 14:33:18 2017 -0400
Committer: JamesBognar <ja...@apache.org>
Committed: Sun Sep 24 14:33:18 2017 -0400
----------------------------------------------------------------------
.../java/org/apache/juneau/transforms/LocalizedDatesTest.java | 4 ++++
1 file changed, 4 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/b89cb982/juneau-core/juneau-core-test/src/test/java/org/apache/juneau/transforms/LocalizedDatesTest.java
----------------------------------------------------------------------
diff --git a/juneau-core/juneau-core-test/src/test/java/org/apache/juneau/transforms/LocalizedDatesTest.java b/juneau-core/juneau-core-test/src/test/java/org/apache/juneau/transforms/LocalizedDatesTest.java
index 3964bca..a808709 100644
--- a/juneau-core/juneau-core-test/src/test/java/org/apache/juneau/transforms/LocalizedDatesTest.java
+++ b/juneau-core/juneau-core-test/src/test/java/org/apache/juneau/transforms/LocalizedDatesTest.java
@@ -642,9 +642,13 @@ public class LocalizedDatesTest {
public void test() {
BeanSession session = ps.getBeanContext().createSession(new BeanSessionArgs(null, sessionLocale, sessionTimeZone, null));
String actual = session.convertToType(calendar, String.class);
+ if (expected.indexOf('(') == -1)
+ actual = actual.replaceAll("\\([^\\)]+\\) ", "").replaceAll(" \\([^\\)]+\\)", ""); // Fix Windows-specific formatting difference
assertEquals(expected, actual);
Object c2 = session.convertToType(actual, calendar.getClass());
String actual2 = session.convertToType(c2, String.class);
+ if (expected.indexOf('(') == -1)
+ actual2 = actual2.replaceAll("\\([^\\)]+\\) ", "").replaceAll(" \\([^\\)]+\\)", ""); // Fix Windows-specific formatting difference
assertEquals(expected, actual2);
}
}
\ No newline at end of file