harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From apetre...@apache.org
Subject svn commit: r488781 - /harmony/enhanced/classlib/trunk/modules/text/src/test/java/org/apache/harmony/text/tests/java/text/MessageFormatTest.java
Date Tue, 19 Dec 2006 19:39:49 GMT
Author: apetrenko
Date: Tue Dec 19 11:39:48 2006
New Revision: 488781

URL: http://svn.apache.org/viewvc?view=rev&rev=488781
Log:
Patch for HARMONY-910 "[classlib][text] Locale-dependent test in org.apache.harmony.text.tests.java.text.MessageFormatTest"

Modified:
    harmony/enhanced/classlib/trunk/modules/text/src/test/java/org/apache/harmony/text/tests/java/text/MessageFormatTest.java

Modified: harmony/enhanced/classlib/trunk/modules/text/src/test/java/org/apache/harmony/text/tests/java/text/MessageFormatTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/text/src/test/java/org/apache/harmony/text/tests/java/text/MessageFormatTest.java?view=diff&rev=488781&r1=488780&r2=488781
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/text/src/test/java/org/apache/harmony/text/tests/java/text/MessageFormatTest.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/text/src/test/java/org/apache/harmony/text/tests/java/text/MessageFormatTest.java
Tue Dec 19 11:39:48 2006
@@ -44,6 +44,8 @@
 
     private MessageFormat format1, format2, format3;
 
+    private Locale defaultLocale;
+    
     private void checkSerialization(MessageFormat format) {
         try {
             ByteArrayOutputStream ba = new ByteArrayOutputStream();
@@ -712,6 +714,9 @@
      * is called before a test is executed.
      */
     protected void setUp() {
+    	defaultLocale = Locale.getDefault();
+    	Locale.setDefault(Locale.US);
+    	
         // test with repeating formats and max argument index < max offset
         String pattern = "A {3, number, currency} B {2, time} C {0, number, percent} D {4}
 E {1,choice,0#off|1#on} F {0, date}";
         format1 = new MessageFormat(pattern);
@@ -730,6 +735,7 @@
      * method is called after a test is executed.
      */
     protected void tearDown() {
+    	Locale.setDefault(defaultLocale);
     }
     
     



Mime
View raw message