OSDN Git Service

Fix DecimalFormatTest#test_serializationHarmonyRICompatible.
authorBrett Chabot <brettchabot@android.com>
Fri, 8 Jan 2010 23:50:00 +0000 (15:50 -0800)
committerBrett Chabot <brettchabot@android.com>
Fri, 8 Jan 2010 23:50:00 +0000 (15:50 -0800)
Skip the test if required Locale is not present.

Bug 2343677

Change-Id: I0f2672bd4b56cc1685e7368921aaa1e9d4492cf0

libcore/text/src/test/java/org/apache/harmony/text/tests/java/text/DecimalFormatTest.java

index 144de72..e908e4a 100644 (file)
@@ -2443,8 +2443,12 @@ public class DecimalFormatTest extends TestCase {
         method = "!SerializationGolden",
         args = {}
     )
-    @KnownFailure("a regression. This didn't fail before")
     public void test_serializationHarmonyRICompatible() throws Exception {
+        Locale[] requiredLocales = {Locale.FRANCE};
+        if (!Support_Locale.areLocalesAvailable(requiredLocales)) {
+            // locale dependent test, bug 1943269
+            return;
+        }
         NumberFormat nf = NumberFormat.getInstance(Locale.FRANCE);
 
         DecimalFormat df = null;