You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@stdcxx.apache.org by "Mark Brown (JIRA)" <ji...@apache.org> on 2007/05/13 00:14:16 UTC

[jira] Created: (STDCXX-413) 22.locale.money.get.cpp doesn'

22.locale.money.get.cpp doesn'
------------------------------

                 Key: STDCXX-413
                 URL: https://issues.apache.org/jira/browse/STDCXX-413
             Project: C++ Standard Library
          Issue Type: Bug
            Reporter: Mark Brown




-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (STDCXX-413) 22.locale.money.get.cpp doesn't test international monetary formats

Posted by "Martin Sebor (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/STDCXX-413?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martin Sebor closed STDCXX-413.
-------------------------------

    Resolution: Fixed

This is fine, thanks. Just confirming that the enhanced test actually exercises the bug.
Patch committed thus: http://svn.apache.org/viewvc?rev=572982&view=rev
Closed.

> 22.locale.money.get.cpp doesn't test international monetary formats
> -------------------------------------------------------------------
>
>                 Key: STDCXX-413
>                 URL: https://issues.apache.org/jira/browse/STDCXX-413
>             Project: C++ Standard Library
>          Issue Type: Bug
>          Components: Tests
>    Affects Versions: 4.1.3
>            Reporter: Mark Brown
>            Assignee: Travis Vitek
>             Fix For: 4.2
>
>         Attachments: money.get.patch
>
>
> The test 22.locale.money.get.cpp doesn't exercise international monetary formats. See:
> -----Original Message-----
> From: sebor@roguewave.com
> Sent: Sat, 12 May 2007 15:42:16 -0600
> To: stdcxx-dev@incubator.apache.org
> Subject: Re: svn commit: r537492 - /incubator/stdcxx/trunk/doc/stdlibref/money-get.html
> Mark Brown wrote:
> >> -----Original Message-----
> >> From: sebor@roguewave.com
> >> Sent: Sat, 12 May 2007 14:09:34 -0600
> >> To: stdcxx-dev@incubator.apache.org
> >> Subject: Re: svn commit: r537492 -
> >> /incubator/stdcxx/trunk/doc/stdlibref/money-get.html
> >>
> >> Mark Brown wrote:
> >>> Martin,
> >>>
> >>> Thanks for fixing it! I have a question about the new code: Could you
> >>> show an example of an international monetary string that would be
> >>> correctly parsed by the facet? I tried a few but none of them could be
> >>> parsed. For instance, "USD 1234" gives this output:
> >>> USD 1234 --> "" --> 0
> >>> The same happens with g++ and STLport so I suspect I must be doing
> >>> something wrong. Removing the space between the currency symbol and the
> >>> number didn't make a difference.
> >> Hmm, I guess I should have tested the internationalized behavior before
> >> I put it in. I think the code is correct as is and your input should be
> >> correctly parsed by the facet (and produce 1234 on output). I'm not sure
> >> what's going on. Stepping through the code it looks like the money_get
> >> facet ends up retrieving the wrong specialization of moneypunct, i.e.,
> >> moneypunct<char, false> when it needs moneypunct<char, true>. What's
> >> puzzling is that both libstdc++ and STLport behave the same. It seems
> >> like too much of a coincidence for all three implementations to suffer
> >> from the same bug.
> >>
> >> In any event, thanks for bringing it to our attention! Can you open an
> >> issue for this as well so we don't forget to investigate it in case I
> >> don't get around to it soon?
> > 
> > I can certainly do that. I should also mention that while investigating this problem I found a test that's supposed to test this functionality: 22.locale.money.get.cpp. The test fails 20 out of 1934 assertions but none of them look like they have anything to do with parsing international monetary values. It doesn't look like they are being tested at all...
> Yeah, I noticed it too. I'm in the process of enhancing the test to
> exercise the international formats as well. If you don't mind creating
> another issue for the test, just for tracking purposes, that would be
> swell!
> Martin

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (STDCXX-413) 22.locale.money.get.cpp doesn't test international monetary formats

Posted by "Martin Sebor (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/STDCXX-413?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martin Sebor reassigned STDCXX-413:
-----------------------------------

    Assignee: Martin Sebor

> 22.locale.money.get.cpp doesn't test international monetary formats
> -------------------------------------------------------------------
>
>                 Key: STDCXX-413
>                 URL: https://issues.apache.org/jira/browse/STDCXX-413
>             Project: C++ Standard Library
>          Issue Type: Bug
>          Components: Tests
>    Affects Versions: 4.1.3
>            Reporter: Mark Brown
>         Assigned To: Martin Sebor
>
> The test 22.locale.money.get.cpp doesn't exercise international monetary formats. See:
> -----Original Message-----
> From: sebor@roguewave.com
> Sent: Sat, 12 May 2007 15:42:16 -0600
> To: stdcxx-dev@incubator.apache.org
> Subject: Re: svn commit: r537492 - /incubator/stdcxx/trunk/doc/stdlibref/money-get.html
> Mark Brown wrote:
> >> -----Original Message-----
> >> From: sebor@roguewave.com
> >> Sent: Sat, 12 May 2007 14:09:34 -0600
> >> To: stdcxx-dev@incubator.apache.org
> >> Subject: Re: svn commit: r537492 -
> >> /incubator/stdcxx/trunk/doc/stdlibref/money-get.html
> >>
> >> Mark Brown wrote:
> >>> Martin,
> >>>
> >>> Thanks for fixing it! I have a question about the new code: Could you
> >>> show an example of an international monetary string that would be
> >>> correctly parsed by the facet? I tried a few but none of them could be
> >>> parsed. For instance, "USD 1234" gives this output:
> >>> USD 1234 --> "" --> 0
> >>> The same happens with g++ and STLport so I suspect I must be doing
> >>> something wrong. Removing the space between the currency symbol and the
> >>> number didn't make a difference.
> >> Hmm, I guess I should have tested the internationalized behavior before
> >> I put it in. I think the code is correct as is and your input should be
> >> correctly parsed by the facet (and produce 1234 on output). I'm not sure
> >> what's going on. Stepping through the code it looks like the money_get
> >> facet ends up retrieving the wrong specialization of moneypunct, i.e.,
> >> moneypunct<char, false> when it needs moneypunct<char, true>. What's
> >> puzzling is that both libstdc++ and STLport behave the same. It seems
> >> like too much of a coincidence for all three implementations to suffer
> >> from the same bug.
> >>
> >> In any event, thanks for bringing it to our attention! Can you open an
> >> issue for this as well so we don't forget to investigate it in case I
> >> don't get around to it soon?
> > 
> > I can certainly do that. I should also mention that while investigating this problem I found a test that's supposed to test this functionality: 22.locale.money.get.cpp. The test fails 20 out of 1934 assertions but none of them look like they have anything to do with parsing international monetary values. It doesn't look like they are being tested at all...
> Yeah, I noticed it too. I'm in the process of enhancing the test to
> exercise the international formats as well. If you don't mind creating
> another issue for the test, just for tracking purposes, that would be
> swell!
> Martin

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (STDCXX-413) 22.locale.money.get.cpp doesn't test international monetary formats

Posted by "Travis Vitek (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/STDCXX-413?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Travis Vitek updated STDCXX-413:
--------------------------------

    Attachment: money.get.patch

2007-08-28 Travis Vitek <vi...@roguewave.com>

	STDCXX-413
	22.locale.money.get (do_test): move intl param to front of param
	list to avoid modifying many lines of code unnecessarily.
	(test_get): update to support testing international money format,
	add overload to test both local and international money formats.



> 22.locale.money.get.cpp doesn't test international monetary formats
> -------------------------------------------------------------------
>
>                 Key: STDCXX-413
>                 URL: https://issues.apache.org/jira/browse/STDCXX-413
>             Project: C++ Standard Library
>          Issue Type: Bug
>          Components: Tests
>    Affects Versions: 4.1.3
>            Reporter: Mark Brown
>            Assignee: Travis Vitek
>             Fix For: 4.2
>
>         Attachments: money.get.patch
>
>
> The test 22.locale.money.get.cpp doesn't exercise international monetary formats. See:
> -----Original Message-----
> From: sebor@roguewave.com
> Sent: Sat, 12 May 2007 15:42:16 -0600
> To: stdcxx-dev@incubator.apache.org
> Subject: Re: svn commit: r537492 - /incubator/stdcxx/trunk/doc/stdlibref/money-get.html
> Mark Brown wrote:
> >> -----Original Message-----
> >> From: sebor@roguewave.com
> >> Sent: Sat, 12 May 2007 14:09:34 -0600
> >> To: stdcxx-dev@incubator.apache.org
> >> Subject: Re: svn commit: r537492 -
> >> /incubator/stdcxx/trunk/doc/stdlibref/money-get.html
> >>
> >> Mark Brown wrote:
> >>> Martin,
> >>>
> >>> Thanks for fixing it! I have a question about the new code: Could you
> >>> show an example of an international monetary string that would be
> >>> correctly parsed by the facet? I tried a few but none of them could be
> >>> parsed. For instance, "USD 1234" gives this output:
> >>> USD 1234 --> "" --> 0
> >>> The same happens with g++ and STLport so I suspect I must be doing
> >>> something wrong. Removing the space between the currency symbol and the
> >>> number didn't make a difference.
> >> Hmm, I guess I should have tested the internationalized behavior before
> >> I put it in. I think the code is correct as is and your input should be
> >> correctly parsed by the facet (and produce 1234 on output). I'm not sure
> >> what's going on. Stepping through the code it looks like the money_get
> >> facet ends up retrieving the wrong specialization of moneypunct, i.e.,
> >> moneypunct<char, false> when it needs moneypunct<char, true>. What's
> >> puzzling is that both libstdc++ and STLport behave the same. It seems
> >> like too much of a coincidence for all three implementations to suffer
> >> from the same bug.
> >>
> >> In any event, thanks for bringing it to our attention! Can you open an
> >> issue for this as well so we don't forget to investigate it in case I
> >> don't get around to it soon?
> > 
> > I can certainly do that. I should also mention that while investigating this problem I found a test that's supposed to test this functionality: 22.locale.money.get.cpp. The test fails 20 out of 1934 assertions but none of them look like they have anything to do with parsing international monetary values. It doesn't look like they are being tested at all...
> Yeah, I noticed it too. I'm in the process of enhancing the test to
> exercise the international formats as well. If you don't mind creating
> another issue for the test, just for tracking purposes, that would be
> swell!
> Martin

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (STDCXX-413) 22.locale.money.get.cpp doesn't test international monetary formats

Posted by "Mark Brown (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/STDCXX-413?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mark Brown updated STDCXX-413:
------------------------------

          Component/s: Tests
          Description: 
The test 22.locale.money.get.cpp doesn't exercise international monetary formats. See:

-----Original Message-----
From: sebor@roguewave.com
Sent: Sat, 12 May 2007 15:42:16 -0600
To: stdcxx-dev@incubator.apache.org
Subject: Re: svn commit: r537492 - /incubator/stdcxx/trunk/doc/stdlibref/money-get.html

Mark Brown wrote:
>> -----Original Message-----
>> From: sebor@roguewave.com
>> Sent: Sat, 12 May 2007 14:09:34 -0600
>> To: stdcxx-dev@incubator.apache.org
>> Subject: Re: svn commit: r537492 -
>> /incubator/stdcxx/trunk/doc/stdlibref/money-get.html
>>
>> Mark Brown wrote:
>>> Martin,
>>>
>>> Thanks for fixing it! I have a question about the new code: Could you
>>> show an example of an international monetary string that would be
>>> correctly parsed by the facet? I tried a few but none of them could be
>>> parsed. For instance, "USD 1234" gives this output:
>>> USD 1234 --> "" --> 0
>>> The same happens with g++ and STLport so I suspect I must be doing
>>> something wrong. Removing the space between the currency symbol and the
>>> number didn't make a difference.
>> Hmm, I guess I should have tested the internationalized behavior before
>> I put it in. I think the code is correct as is and your input should be
>> correctly parsed by the facet (and produce 1234 on output). I'm not sure
>> what's going on. Stepping through the code it looks like the money_get
>> facet ends up retrieving the wrong specialization of moneypunct, i.e.,
>> moneypunct<char, false> when it needs moneypunct<char, true>. What's
>> puzzling is that both libstdc++ and STLport behave the same. It seems
>> like too much of a coincidence for all three implementations to suffer
>> from the same bug.
>>
>> In any event, thanks for bringing it to our attention! Can you open an
>> issue for this as well so we don't forget to investigate it in case I
>> don't get around to it soon?
> 
> I can certainly do that. I should also mention that while investigating this problem I found a test that's supposed to test this functionality: 22.locale.money.get.cpp. The test fails 20 out of 1934 assertions but none of them look like they have anything to do with parsing international monetary values. It doesn't look like they are being tested at all...

Yeah, I noticed it too. I'm in the process of enhancing the test to
exercise the international formats as well. If you don't mind creating
another issue for the test, just for tracking purposes, that would be
swell!

Martin

    Affects Version/s: 4.1.3
              Summary: 22.locale.money.get.cpp doesn't test international monetary formats  (was: 22.locale.money.get.cpp doesn')

Finishing an accidentally submitted incomplete issue.

> 22.locale.money.get.cpp doesn't test international monetary formats
> -------------------------------------------------------------------
>
>                 Key: STDCXX-413
>                 URL: https://issues.apache.org/jira/browse/STDCXX-413
>             Project: C++ Standard Library
>          Issue Type: Bug
>          Components: Tests
>    Affects Versions: 4.1.3
>            Reporter: Mark Brown
>
> The test 22.locale.money.get.cpp doesn't exercise international monetary formats. See:
> -----Original Message-----
> From: sebor@roguewave.com
> Sent: Sat, 12 May 2007 15:42:16 -0600
> To: stdcxx-dev@incubator.apache.org
> Subject: Re: svn commit: r537492 - /incubator/stdcxx/trunk/doc/stdlibref/money-get.html
> Mark Brown wrote:
> >> -----Original Message-----
> >> From: sebor@roguewave.com
> >> Sent: Sat, 12 May 2007 14:09:34 -0600
> >> To: stdcxx-dev@incubator.apache.org
> >> Subject: Re: svn commit: r537492 -
> >> /incubator/stdcxx/trunk/doc/stdlibref/money-get.html
> >>
> >> Mark Brown wrote:
> >>> Martin,
> >>>
> >>> Thanks for fixing it! I have a question about the new code: Could you
> >>> show an example of an international monetary string that would be
> >>> correctly parsed by the facet? I tried a few but none of them could be
> >>> parsed. For instance, "USD 1234" gives this output:
> >>> USD 1234 --> "" --> 0
> >>> The same happens with g++ and STLport so I suspect I must be doing
> >>> something wrong. Removing the space between the currency symbol and the
> >>> number didn't make a difference.
> >> Hmm, I guess I should have tested the internationalized behavior before
> >> I put it in. I think the code is correct as is and your input should be
> >> correctly parsed by the facet (and produce 1234 on output). I'm not sure
> >> what's going on. Stepping through the code it looks like the money_get
> >> facet ends up retrieving the wrong specialization of moneypunct, i.e.,
> >> moneypunct<char, false> when it needs moneypunct<char, true>. What's
> >> puzzling is that both libstdc++ and STLport behave the same. It seems
> >> like too much of a coincidence for all three implementations to suffer
> >> from the same bug.
> >>
> >> In any event, thanks for bringing it to our attention! Can you open an
> >> issue for this as well so we don't forget to investigate it in case I
> >> don't get around to it soon?
> > 
> > I can certainly do that. I should also mention that while investigating this problem I found a test that's supposed to test this functionality: 22.locale.money.get.cpp. The test fails 20 out of 1934 assertions but none of them look like they have anything to do with parsing international monetary values. It doesn't look like they are being tested at all...
> Yeah, I noticed it too. I'm in the process of enhancing the test to
> exercise the international formats as well. If you don't mind creating
> another issue for the test, just for tracking purposes, that would be
> swell!
> Martin

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Reopened: (STDCXX-413) 22.locale.money.get.cpp doesn't test international monetary formats

Posted by "Martin Sebor (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/STDCXX-413?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martin Sebor reopened STDCXX-413:
---------------------------------


Reopened until the patch has been committed.

I have rerun the test with the patch and I see twice as many active assertions as before but I note that the test simply runs the same number of test cases twice (toggling the Intl flag between the runs). Travis, can you confirm that with the patch applied the test exercises STDCXX-412?

> 22.locale.money.get.cpp doesn't test international monetary formats
> -------------------------------------------------------------------
>
>                 Key: STDCXX-413
>                 URL: https://issues.apache.org/jira/browse/STDCXX-413
>             Project: C++ Standard Library
>          Issue Type: Bug
>          Components: Tests
>    Affects Versions: 4.1.3
>            Reporter: Mark Brown
>            Assignee: Travis Vitek
>             Fix For: 4.2
>
>         Attachments: money.get.patch
>
>
> The test 22.locale.money.get.cpp doesn't exercise international monetary formats. See:
> -----Original Message-----
> From: sebor@roguewave.com
> Sent: Sat, 12 May 2007 15:42:16 -0600
> To: stdcxx-dev@incubator.apache.org
> Subject: Re: svn commit: r537492 - /incubator/stdcxx/trunk/doc/stdlibref/money-get.html
> Mark Brown wrote:
> >> -----Original Message-----
> >> From: sebor@roguewave.com
> >> Sent: Sat, 12 May 2007 14:09:34 -0600
> >> To: stdcxx-dev@incubator.apache.org
> >> Subject: Re: svn commit: r537492 -
> >> /incubator/stdcxx/trunk/doc/stdlibref/money-get.html
> >>
> >> Mark Brown wrote:
> >>> Martin,
> >>>
> >>> Thanks for fixing it! I have a question about the new code: Could you
> >>> show an example of an international monetary string that would be
> >>> correctly parsed by the facet? I tried a few but none of them could be
> >>> parsed. For instance, "USD 1234" gives this output:
> >>> USD 1234 --> "" --> 0
> >>> The same happens with g++ and STLport so I suspect I must be doing
> >>> something wrong. Removing the space between the currency symbol and the
> >>> number didn't make a difference.
> >> Hmm, I guess I should have tested the internationalized behavior before
> >> I put it in. I think the code is correct as is and your input should be
> >> correctly parsed by the facet (and produce 1234 on output). I'm not sure
> >> what's going on. Stepping through the code it looks like the money_get
> >> facet ends up retrieving the wrong specialization of moneypunct, i.e.,
> >> moneypunct<char, false> when it needs moneypunct<char, true>. What's
> >> puzzling is that both libstdc++ and STLport behave the same. It seems
> >> like too much of a coincidence for all three implementations to suffer
> >> from the same bug.
> >>
> >> In any event, thanks for bringing it to our attention! Can you open an
> >> issue for this as well so we don't forget to investigate it in case I
> >> don't get around to it soon?
> > 
> > I can certainly do that. I should also mention that while investigating this problem I found a test that's supposed to test this functionality: 22.locale.money.get.cpp. The test fails 20 out of 1934 assertions but none of them look like they have anything to do with parsing international monetary values. It doesn't look like they are being tested at all...
> Yeah, I noticed it too. I'm in the process of enhancing the test to
> exercise the international formats as well. If you don't mind creating
> another issue for the test, just for tracking purposes, that would be
> swell!
> Martin

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (STDCXX-413) 22.locale.money.get.cpp doesn't test international monetary formats

Posted by "Travis Vitek (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/STDCXX-413?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Travis Vitek updated STDCXX-413:
--------------------------------

    Fix Version/s: 4.2

> 22.locale.money.get.cpp doesn't test international monetary formats
> -------------------------------------------------------------------
>
>                 Key: STDCXX-413
>                 URL: https://issues.apache.org/jira/browse/STDCXX-413
>             Project: C++ Standard Library
>          Issue Type: Bug
>          Components: Tests
>    Affects Versions: 4.1.3
>            Reporter: Mark Brown
>            Assignee: Travis Vitek
>             Fix For: 4.2
>
>
> The test 22.locale.money.get.cpp doesn't exercise international monetary formats. See:
> -----Original Message-----
> From: sebor@roguewave.com
> Sent: Sat, 12 May 2007 15:42:16 -0600
> To: stdcxx-dev@incubator.apache.org
> Subject: Re: svn commit: r537492 - /incubator/stdcxx/trunk/doc/stdlibref/money-get.html
> Mark Brown wrote:
> >> -----Original Message-----
> >> From: sebor@roguewave.com
> >> Sent: Sat, 12 May 2007 14:09:34 -0600
> >> To: stdcxx-dev@incubator.apache.org
> >> Subject: Re: svn commit: r537492 -
> >> /incubator/stdcxx/trunk/doc/stdlibref/money-get.html
> >>
> >> Mark Brown wrote:
> >>> Martin,
> >>>
> >>> Thanks for fixing it! I have a question about the new code: Could you
> >>> show an example of an international monetary string that would be
> >>> correctly parsed by the facet? I tried a few but none of them could be
> >>> parsed. For instance, "USD 1234" gives this output:
> >>> USD 1234 --> "" --> 0
> >>> The same happens with g++ and STLport so I suspect I must be doing
> >>> something wrong. Removing the space between the currency symbol and the
> >>> number didn't make a difference.
> >> Hmm, I guess I should have tested the internationalized behavior before
> >> I put it in. I think the code is correct as is and your input should be
> >> correctly parsed by the facet (and produce 1234 on output). I'm not sure
> >> what's going on. Stepping through the code it looks like the money_get
> >> facet ends up retrieving the wrong specialization of moneypunct, i.e.,
> >> moneypunct<char, false> when it needs moneypunct<char, true>. What's
> >> puzzling is that both libstdc++ and STLport behave the same. It seems
> >> like too much of a coincidence for all three implementations to suffer
> >> from the same bug.
> >>
> >> In any event, thanks for bringing it to our attention! Can you open an
> >> issue for this as well so we don't forget to investigate it in case I
> >> don't get around to it soon?
> > 
> > I can certainly do that. I should also mention that while investigating this problem I found a test that's supposed to test this functionality: 22.locale.money.get.cpp. The test fails 20 out of 1934 assertions but none of them look like they have anything to do with parsing international monetary values. It doesn't look like they are being tested at all...
> Yeah, I noticed it too. I'm in the process of enhancing the test to
> exercise the international formats as well. If you don't mind creating
> another issue for the test, just for tracking purposes, that would be
> swell!
> Martin

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (STDCXX-413) 22.locale.money.get.cpp doesn't test international monetary formats

Posted by "Travis Vitek (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/STDCXX-413?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Travis Vitek resolved STDCXX-413.
---------------------------------

    Resolution: Fixed

Ready for review.

Note that it might be useful to write a round trip test for money values in using various format flags, like we do in the money.mt test.

> 22.locale.money.get.cpp doesn't test international monetary formats
> -------------------------------------------------------------------
>
>                 Key: STDCXX-413
>                 URL: https://issues.apache.org/jira/browse/STDCXX-413
>             Project: C++ Standard Library
>          Issue Type: Bug
>          Components: Tests
>    Affects Versions: 4.1.3
>            Reporter: Mark Brown
>            Assignee: Travis Vitek
>             Fix For: 4.2
>
>         Attachments: money.get.patch
>
>
> The test 22.locale.money.get.cpp doesn't exercise international monetary formats. See:
> -----Original Message-----
> From: sebor@roguewave.com
> Sent: Sat, 12 May 2007 15:42:16 -0600
> To: stdcxx-dev@incubator.apache.org
> Subject: Re: svn commit: r537492 - /incubator/stdcxx/trunk/doc/stdlibref/money-get.html
> Mark Brown wrote:
> >> -----Original Message-----
> >> From: sebor@roguewave.com
> >> Sent: Sat, 12 May 2007 14:09:34 -0600
> >> To: stdcxx-dev@incubator.apache.org
> >> Subject: Re: svn commit: r537492 -
> >> /incubator/stdcxx/trunk/doc/stdlibref/money-get.html
> >>
> >> Mark Brown wrote:
> >>> Martin,
> >>>
> >>> Thanks for fixing it! I have a question about the new code: Could you
> >>> show an example of an international monetary string that would be
> >>> correctly parsed by the facet? I tried a few but none of them could be
> >>> parsed. For instance, "USD 1234" gives this output:
> >>> USD 1234 --> "" --> 0
> >>> The same happens with g++ and STLport so I suspect I must be doing
> >>> something wrong. Removing the space between the currency symbol and the
> >>> number didn't make a difference.
> >> Hmm, I guess I should have tested the internationalized behavior before
> >> I put it in. I think the code is correct as is and your input should be
> >> correctly parsed by the facet (and produce 1234 on output). I'm not sure
> >> what's going on. Stepping through the code it looks like the money_get
> >> facet ends up retrieving the wrong specialization of moneypunct, i.e.,
> >> moneypunct<char, false> when it needs moneypunct<char, true>. What's
> >> puzzling is that both libstdc++ and STLport behave the same. It seems
> >> like too much of a coincidence for all three implementations to suffer
> >> from the same bug.
> >>
> >> In any event, thanks for bringing it to our attention! Can you open an
> >> issue for this as well so we don't forget to investigate it in case I
> >> don't get around to it soon?
> > 
> > I can certainly do that. I should also mention that while investigating this problem I found a test that's supposed to test this functionality: 22.locale.money.get.cpp. The test fails 20 out of 1934 assertions but none of them look like they have anything to do with parsing international monetary values. It doesn't look like they are being tested at all...
> Yeah, I noticed it too. I'm in the process of enhancing the test to
> exercise the international formats as well. If you don't mind creating
> another issue for the test, just for tracking purposes, that would be
> swell!
> Martin

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (STDCXX-413) 22.locale.money.get.cpp doesn't test international monetary formats

Posted by "Martin Sebor (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/STDCXX-413?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12496190 ] 

Martin Sebor commented on STDCXX-413:
-------------------------------------

Cross-referencing the archive:
http://mail-archives.apache.org/mod_mbox/incubator-stdcxx-dev/200705.mbox/%3c2B7EBD40706.0000029Ambrown@inbox.com%3e

> 22.locale.money.get.cpp doesn't test international monetary formats
> -------------------------------------------------------------------
>
>                 Key: STDCXX-413
>                 URL: https://issues.apache.org/jira/browse/STDCXX-413
>             Project: C++ Standard Library
>          Issue Type: Bug
>          Components: Tests
>    Affects Versions: 4.1.3
>            Reporter: Mark Brown
>
> The test 22.locale.money.get.cpp doesn't exercise international monetary formats. See:
> -----Original Message-----
> From: sebor@roguewave.com
> Sent: Sat, 12 May 2007 15:42:16 -0600
> To: stdcxx-dev@incubator.apache.org
> Subject: Re: svn commit: r537492 - /incubator/stdcxx/trunk/doc/stdlibref/money-get.html
> Mark Brown wrote:
> >> -----Original Message-----
> >> From: sebor@roguewave.com
> >> Sent: Sat, 12 May 2007 14:09:34 -0600
> >> To: stdcxx-dev@incubator.apache.org
> >> Subject: Re: svn commit: r537492 -
> >> /incubator/stdcxx/trunk/doc/stdlibref/money-get.html
> >>
> >> Mark Brown wrote:
> >>> Martin,
> >>>
> >>> Thanks for fixing it! I have a question about the new code: Could you
> >>> show an example of an international monetary string that would be
> >>> correctly parsed by the facet? I tried a few but none of them could be
> >>> parsed. For instance, "USD 1234" gives this output:
> >>> USD 1234 --> "" --> 0
> >>> The same happens with g++ and STLport so I suspect I must be doing
> >>> something wrong. Removing the space between the currency symbol and the
> >>> number didn't make a difference.
> >> Hmm, I guess I should have tested the internationalized behavior before
> >> I put it in. I think the code is correct as is and your input should be
> >> correctly parsed by the facet (and produce 1234 on output). I'm not sure
> >> what's going on. Stepping through the code it looks like the money_get
> >> facet ends up retrieving the wrong specialization of moneypunct, i.e.,
> >> moneypunct<char, false> when it needs moneypunct<char, true>. What's
> >> puzzling is that both libstdc++ and STLport behave the same. It seems
> >> like too much of a coincidence for all three implementations to suffer
> >> from the same bug.
> >>
> >> In any event, thanks for bringing it to our attention! Can you open an
> >> issue for this as well so we don't forget to investigate it in case I
> >> don't get around to it soon?
> > 
> > I can certainly do that. I should also mention that while investigating this problem I found a test that's supposed to test this functionality: 22.locale.money.get.cpp. The test fails 20 out of 1934 assertions but none of them look like they have anything to do with parsing international monetary values. It doesn't look like they are being tested at all...
> Yeah, I noticed it too. I'm in the process of enhancing the test to
> exercise the international formats as well. If you don't mind creating
> another issue for the test, just for tracking purposes, that would be
> swell!
> Martin

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (STDCXX-413) 22.locale.money.get.cpp doesn't test international monetary formats

Posted by "Travis Vitek (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/STDCXX-413?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12524967 ] 

Travis Vitek commented on STDCXX-413:
-------------------------------------

The patched test sets the moneypunct facet formatting information to a known state [for both local and international], and then attempts to extract values out of fixed strings for which the result is known. This is exactly what was being done previously for local money data. This patch just adds the ability to verify the international formatted data. i.e. the test essentially does this

  1. set currency symbol for local to "YEN"
  2. set currency symbol for international to NULL
  3. attempt to read local money from "YEN 10"
  4. set currency symbol for international to "YEN"
  5. set currency symbol for local to NULL
  6. attempt to read international money from "YEN 10"

If you would like me to add a new test, or expand the existing test, to do a round trip for money values for user provided locales, I would be happy to.


> 22.locale.money.get.cpp doesn't test international monetary formats
> -------------------------------------------------------------------
>
>                 Key: STDCXX-413
>                 URL: https://issues.apache.org/jira/browse/STDCXX-413
>             Project: C++ Standard Library
>          Issue Type: Bug
>          Components: Tests
>    Affects Versions: 4.1.3
>            Reporter: Mark Brown
>            Assignee: Travis Vitek
>             Fix For: 4.2
>
>         Attachments: money.get.patch
>
>
> The test 22.locale.money.get.cpp doesn't exercise international monetary formats. See:
> -----Original Message-----
> From: sebor@roguewave.com
> Sent: Sat, 12 May 2007 15:42:16 -0600
> To: stdcxx-dev@incubator.apache.org
> Subject: Re: svn commit: r537492 - /incubator/stdcxx/trunk/doc/stdlibref/money-get.html
> Mark Brown wrote:
> >> -----Original Message-----
> >> From: sebor@roguewave.com
> >> Sent: Sat, 12 May 2007 14:09:34 -0600
> >> To: stdcxx-dev@incubator.apache.org
> >> Subject: Re: svn commit: r537492 -
> >> /incubator/stdcxx/trunk/doc/stdlibref/money-get.html
> >>
> >> Mark Brown wrote:
> >>> Martin,
> >>>
> >>> Thanks for fixing it! I have a question about the new code: Could you
> >>> show an example of an international monetary string that would be
> >>> correctly parsed by the facet? I tried a few but none of them could be
> >>> parsed. For instance, "USD 1234" gives this output:
> >>> USD 1234 --> "" --> 0
> >>> The same happens with g++ and STLport so I suspect I must be doing
> >>> something wrong. Removing the space between the currency symbol and the
> >>> number didn't make a difference.
> >> Hmm, I guess I should have tested the internationalized behavior before
> >> I put it in. I think the code is correct as is and your input should be
> >> correctly parsed by the facet (and produce 1234 on output). I'm not sure
> >> what's going on. Stepping through the code it looks like the money_get
> >> facet ends up retrieving the wrong specialization of moneypunct, i.e.,
> >> moneypunct<char, false> when it needs moneypunct<char, true>. What's
> >> puzzling is that both libstdc++ and STLport behave the same. It seems
> >> like too much of a coincidence for all three implementations to suffer
> >> from the same bug.
> >>
> >> In any event, thanks for bringing it to our attention! Can you open an
> >> issue for this as well so we don't forget to investigate it in case I
> >> don't get around to it soon?
> > 
> > I can certainly do that. I should also mention that while investigating this problem I found a test that's supposed to test this functionality: 22.locale.money.get.cpp. The test fails 20 out of 1934 assertions but none of them look like they have anything to do with parsing international monetary values. It doesn't look like they are being tested at all...
> Yeah, I noticed it too. I'm in the process of enhancing the test to
> exercise the international formats as well. If you don't mind creating
> another issue for the test, just for tracking purposes, that would be
> swell!
> Martin

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (STDCXX-413) 22.locale.money.get.cpp doesn't test international monetary formats

Posted by "Travis Vitek (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/STDCXX-413?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Travis Vitek reassigned STDCXX-413:
-----------------------------------

    Assignee: Travis Vitek  (was: Martin Sebor)

> 22.locale.money.get.cpp doesn't test international monetary formats
> -------------------------------------------------------------------
>
>                 Key: STDCXX-413
>                 URL: https://issues.apache.org/jira/browse/STDCXX-413
>             Project: C++ Standard Library
>          Issue Type: Bug
>          Components: Tests
>    Affects Versions: 4.1.3
>            Reporter: Mark Brown
>            Assignee: Travis Vitek
>
> The test 22.locale.money.get.cpp doesn't exercise international monetary formats. See:
> -----Original Message-----
> From: sebor@roguewave.com
> Sent: Sat, 12 May 2007 15:42:16 -0600
> To: stdcxx-dev@incubator.apache.org
> Subject: Re: svn commit: r537492 - /incubator/stdcxx/trunk/doc/stdlibref/money-get.html
> Mark Brown wrote:
> >> -----Original Message-----
> >> From: sebor@roguewave.com
> >> Sent: Sat, 12 May 2007 14:09:34 -0600
> >> To: stdcxx-dev@incubator.apache.org
> >> Subject: Re: svn commit: r537492 -
> >> /incubator/stdcxx/trunk/doc/stdlibref/money-get.html
> >>
> >> Mark Brown wrote:
> >>> Martin,
> >>>
> >>> Thanks for fixing it! I have a question about the new code: Could you
> >>> show an example of an international monetary string that would be
> >>> correctly parsed by the facet? I tried a few but none of them could be
> >>> parsed. For instance, "USD 1234" gives this output:
> >>> USD 1234 --> "" --> 0
> >>> The same happens with g++ and STLport so I suspect I must be doing
> >>> something wrong. Removing the space between the currency symbol and the
> >>> number didn't make a difference.
> >> Hmm, I guess I should have tested the internationalized behavior before
> >> I put it in. I think the code is correct as is and your input should be
> >> correctly parsed by the facet (and produce 1234 on output). I'm not sure
> >> what's going on. Stepping through the code it looks like the money_get
> >> facet ends up retrieving the wrong specialization of moneypunct, i.e.,
> >> moneypunct<char, false> when it needs moneypunct<char, true>. What's
> >> puzzling is that both libstdc++ and STLport behave the same. It seems
> >> like too much of a coincidence for all three implementations to suffer
> >> from the same bug.
> >>
> >> In any event, thanks for bringing it to our attention! Can you open an
> >> issue for this as well so we don't forget to investigate it in case I
> >> don't get around to it soon?
> > 
> > I can certainly do that. I should also mention that while investigating this problem I found a test that's supposed to test this functionality: 22.locale.money.get.cpp. The test fails 20 out of 1934 assertions but none of them look like they have anything to do with parsing international monetary values. It doesn't look like they are being tested at all...
> Yeah, I noticed it too. I'm in the process of enhancing the test to
> exercise the international formats as well. If you don't mind creating
> another issue for the test, just for tracking purposes, that would be
> swell!
> Martin

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.