commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject [lang] Make tests a little more bullet-proof.
Date Mon, 09 Oct 2017 20:53:34 GMT
Repository: commons-lang
Updated Branches:
  refs/heads/master 87eff4c78 -> 732ea5e94


Make tests a little more bullet-proof.

Project: http://git-wip-us.apache.org/repos/asf/commons-lang/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-lang/commit/732ea5e9
Tree: http://git-wip-us.apache.org/repos/asf/commons-lang/tree/732ea5e9
Diff: http://git-wip-us.apache.org/repos/asf/commons-lang/diff/732ea5e9

Branch: refs/heads/master
Commit: 732ea5e94fdf8fef42b5c21d001983fb24d2842a
Parents: 87eff4c
Author: Gary Gregory <ggregory@apache.org>
Authored: Mon Oct 9 14:53:32 2017 -0600
Committer: Gary Gregory <ggregory@apache.org>
Committed: Mon Oct 9 14:53:32 2017 -0600

----------------------------------------------------------------------
 .../commons/lang3/StringUtilsEqualsIndexOfTest.java       | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-lang/blob/732ea5e9/src/test/java/org/apache/commons/lang3/StringUtilsEqualsIndexOfTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/lang3/StringUtilsEqualsIndexOfTest.java b/src/test/java/org/apache/commons/lang3/StringUtilsEqualsIndexOfTest.java
index a9904e7..7172c0e 100644
--- a/src/test/java/org/apache/commons/lang3/StringUtilsEqualsIndexOfTest.java
+++ b/src/test/java/org/apache/commons/lang3/StringUtilsEqualsIndexOfTest.java
@@ -21,6 +21,8 @@ import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertThat;
 import static org.junit.Assert.assertTrue;
 
+import java.util.Locale;
+
 import org.apache.commons.lang3.test.SystemDefaultsSwitch;
 import org.hamcrest.core.IsNot;
 import org.junit.Rule;
@@ -166,7 +168,7 @@ public class StringUtilsEqualsIndexOfTest  {
         assertFalse(StringUtils.equalsAny(null, FOO, BAR, FOOBAR));
         assertFalse(StringUtils.equalsAny(FOO, null, BAR));
         assertTrue(StringUtils.equalsAny(FOO, BAR, null, "", FOO, BAR));
-        assertFalse(StringUtils.equalsAny(FOO, FOO.toUpperCase()));
+        assertFalse(StringUtils.equalsAny(FOO, FOO.toUpperCase(Locale.ROOT)));
 
         assertFalse(StringUtils.equalsAny(null, (CharSequence[]) null));
         assertTrue(StringUtils.equalsAny(FOO, new CustomCharSequence("foo")));
@@ -181,7 +183,7 @@ public class StringUtilsEqualsIndexOfTest  {
         assertFalse(StringUtils.equalsAnyIgnoreCase(FOO, new String[]{}));
 
         assertTrue(StringUtils.equalsAnyIgnoreCase(FOO, FOO));
-        assertTrue(StringUtils.equalsAnyIgnoreCase(FOO, FOO.toUpperCase()));
+        assertTrue(StringUtils.equalsAnyIgnoreCase(FOO, FOO.toUpperCase(Locale.ROOT)));
         assertTrue(StringUtils.equalsAnyIgnoreCase(FOO, FOO, new String(new char[]{'f', 'o',
'o'})));
         assertTrue(StringUtils.equalsAnyIgnoreCase(FOO, BAR, new String(new char[]{'f', 'O',
'O'})));
         assertFalse(StringUtils.equalsAnyIgnoreCase(FOO, BAR));
@@ -193,8 +195,8 @@ public class StringUtilsEqualsIndexOfTest  {
         assertTrue(StringUtils.equalsAnyIgnoreCase(null, null, null));
         assertFalse(StringUtils.equalsAnyIgnoreCase(null, FOO, BAR, FOOBAR));
         assertFalse(StringUtils.equalsAnyIgnoreCase(FOO, null, BAR));
-        assertTrue(StringUtils.equalsAnyIgnoreCase(FOO, BAR, null, "", FOO.toUpperCase(),
BAR));
-        assertTrue(StringUtils.equalsAnyIgnoreCase(FOO, FOO.toUpperCase()));
+        assertTrue(StringUtils.equalsAnyIgnoreCase(FOO, BAR, null, "", FOO.toUpperCase(Locale.ROOT),
BAR));
+        assertTrue(StringUtils.equalsAnyIgnoreCase(FOO, FOO.toUpperCase(Locale.ROOT)));
 
         assertFalse(StringUtils.equalsAnyIgnoreCase(null, (CharSequence[]) null));
         assertTrue(StringUtils.equalsAnyIgnoreCase(FOO, new CustomCharSequence("fOo")));


Mime
View raw message