Details
-
Bug
-
Status: Closed
-
Trivial
-
Resolution: Fixed
-
5.0.3
-
None
Description
DecimalFormat is localized, so the test against a string with the US decimal separator fails, the following patch changes this:
Index: src/test/java/org/apache/tapestry/corelib/components/OutputTest.java
===================================================================
— src/test/java/org/apache/tapestry/corelib/components/OutputTest.java
(revision 511630)
+++ src/test/java/org/apache/tapestry/corelib/components/OutputTest.java
(working copy)
@@ -18,18 +18,26 @@
import java.text.FieldPosition;
import java.text.Format;
import java.text.ParsePosition;
+import java.util.Locale;
import org.apache.tapestry.ComponentResources;
import org.apache.tapestry.MarkupWriter;
import org.apache.tapestry.test.TapestryTestCase;
import org.testng.annotations.Test;
+import org.testng.annotations.BeforeClass;
public class OutputTest extends TapestryTestCase
{
- private final Number _value = new Double(22.7d);
+ private final Number _value = 22.7d;
- private final Format _format = new DecimalFormat("0.00");
+ private final Format _format = DecimalFormat.getInstance(Locale.US);
+ @BeforeClass
+ public void setUp()
+
+
@Test
public void simple_output()
{