From 1b19377446a14622ac5d05c3f8d7dd9c8e5ef15b Mon Sep 17 00:00:00 2001 From: Henri Yandell Date: Sat, 17 Feb 2007 08:41:20 +0000 Subject: [PATCH] Fixing LANG-320. I modified the tests to only check that the listed languages and countries are contained in the result, not that they exactly equal the result git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@508733 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/commons/lang/LocaleUtilsTest.java | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/test/org/apache/commons/lang/LocaleUtilsTest.java b/src/test/org/apache/commons/lang/LocaleUtilsTest.java index 48f01cfbf..185554471 100644 --- a/src/test/org/apache/commons/lang/LocaleUtilsTest.java +++ b/src/test/org/apache/commons/lang/LocaleUtilsTest.java @@ -391,7 +391,10 @@ public class LocaleUtilsTest extends TestCase { //----------------------------------------------------------------------- /** - * Make sure the language by country is correct. + * Make sure the language by country is correct. It checks that + * the LocaleUtils.languagesByCountry(country) call contains the + * array of languages passed in. It may contain more due to JVM + * variations. * * @param country * @param languages array of languages that should be returned @@ -401,7 +404,6 @@ public class LocaleUtilsTest extends TestCase { List list2 = LocaleUtils.languagesByCountry(country); assertNotNull(list); assertSame(list, list2); - assertEquals(languages.length, list.size()); //search through langauges for (int i = 0; i < languages.length; i++) { Iterator iterator = list.iterator(); @@ -438,7 +440,11 @@ public class LocaleUtilsTest extends TestCase { //----------------------------------------------------------------------- /** - * Make sure the country by language is correct. + * Make sure the country by language is correct. It checks that + * the LocaleUtils.countryByLanguage(language) call contains the + * array of countries passed in. It may contain more due to JVM + * variations. + * * * @param language * @param countries array of countries that should be returned @@ -448,7 +454,6 @@ public class LocaleUtilsTest extends TestCase { List list2 = LocaleUtils.countriesByLanguage(language); assertNotNull(list); assertSame(list, list2); - assertEquals(countries.length, list.size()); //search through langauges for (int i = 0; i < countries.length; i++) { Iterator iterator = list.iterator();