Question about the test /gnu/testlet/java/util/Currency/Taiwan.java

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Question about the test /gnu/testlet/java/util/Currency/Taiwan.java

Pavel Tisnovsky
Hi,

I think that the number of fraction digits for Taiwan (TWD) currency should be
set to 2, not to 0, according to (for example) these pages:

http://www.londonfx.co.uk/ccylist.html
http://en.wikipedia.org/wiki/ISO_4217

Can I fix it?

Cheers,
Pavel
Reply | Threaded
Open this post in threaded view
|

Re: Question about the test /gnu/testlet/java/util/Currency/Taiwan.java

Pavel Tisnovsky
ping:

> Hi,
>
> I think that the number of fraction digits for Taiwan (TWD) currency should be
> set to 2, not to 0, according to (for example) these pages:
>
> http://www.londonfx.co.uk/ccylist.html
> http://en.wikipedia.org/wiki/ISO_4217
>
> Can I fix it?
>
> Cheers,
> Pavel

Reply | Threaded
Open this post in threaded view
|

Re: Question about the test /gnu/testlet/java/util/Currency/Taiwan.java

Mark Wielaard
In reply to this post by Pavel Tisnovsky
On Fri, 2011-08-19 at 10:40 +0200, Pavel Tisnovsky wrote:
> Hi,
>
> I think that the number of fraction digits for Taiwan (TWD) currency should be
> set to 2, not to 0, according to (for example) these pages:
>
> http://www.londonfx.co.uk/ccylist.html
> http://en.wikipedia.org/wiki/ISO_4217
>
> Can I fix it?

Sure, do you have a patch?

Thanks,

Mark
Reply | Threaded
Open this post in threaded view
|

Re: Question about the test /gnu/testlet/java/util/Currency/Taiwan.java

Pavel Tisnovsky
Mark Wielaard wrote:

> On Fri, 2011-08-19 at 10:40 +0200, Pavel Tisnovsky wrote:
>> Hi,
>>
>> I think that the number of fraction digits for Taiwan (TWD) currency should be
>> set to 2, not to 0, according to (for example) these pages:
>>
>> http://www.londonfx.co.uk/ccylist.html
>> http://en.wikipedia.org/wiki/ISO_4217
>>
>> Can I fix it?
>
> Sure, do you have a patch?
>
> Thanks,
>
> Mark

Yes, here is:

diff -u /mauve-orig/mauve/gnu/testlet/java/util/Currency/Taiwan.java
/mauve/mauve/gnu/testlet/java/util/Currency/Taiwan.java
--- /mauve-orig/mauve/gnu/testlet/java/util/Currency/Taiwan.java 2008-07-24
18:02:14.000000000 +0200
+++ /mauve/mauve/gnu/testlet/java/util/Currency/Taiwan.java 2011-09-12
16:07:46.000000000 +0200
@@ -37,7 +37,7 @@
   private static final Locale TEST_LOCALE = Locale.TAIWAN;
   private static final String ISO4217_CODE = "TWD";
   private static final String CURRENCY_SYMBOL = "NT$";
-  private static final int FRACTION_DIGITS = 0;
+  private static final int FRACTION_DIGITS = 2;

   public void test(TestHarness harness)
   {
Reply | Threaded
Open this post in threaded view
|

Re: Question about the test /gnu/testlet/java/util/Currency/Taiwan.java

Mark Wielaard
On Mon, 2011-09-12 at 16:13 +0200, Pavel Tisnovsky wrote:

> Mark Wielaard wrote:
> > On Fri, 2011-08-19 at 10:40 +0200, Pavel Tisnovsky wrote:
> >> Hi,
> >>
> >> I think that the number of fraction digits for Taiwan (TWD) currency should be
> >> set to 2, not to 0, according to (for example) these pages:
> >>
> >> http://www.londonfx.co.uk/ccylist.html
> >> http://en.wikipedia.org/wiki/ISO_4217
> >>
> >> Can I fix it?
> >
> > Sure, do you have a patch?
> >
> Yes, here is:
>
> diff -u /mauve-orig/mauve/gnu/testlet/java/util/Currency/Taiwan.java
> /mauve/mauve/gnu/testlet/java/util/Currency/Taiwan.java
> --- /mauve-orig/mauve/gnu/testlet/java/util/Currency/Taiwan.java 2008-07-24
> 18:02:14.000000000 +0200
> +++ /mauve/mauve/gnu/testlet/java/util/Currency/Taiwan.java 2011-09-12
> 16:07:46.000000000 +0200
> @@ -37,7 +37,7 @@
>    private static final Locale TEST_LOCALE = Locale.TAIWAN;
>    private static final String ISO4217_CODE = "TWD";
>    private static final String CURRENCY_SYMBOL = "NT$";
> -  private static final int FRACTION_DIGITS = 0;
> +  private static final int FRACTION_DIGITS = 2;
>
>    public void test(TestHarness harness)
>    {

Yeah, based on those two documents, that seems the correct patch.

Thanks,

Mark