You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@stdcxx.apache.org by "Travis Vitek (JIRA)" <ji...@apache.org> on 2007/09/26 23:29:50 UTC
[jira] Created: (STDCXX-571) 22.locale.numpunct.mt fails
unexpectedly because of
22.locale.numpunct.mt fails unexpectedly because of
----------------------------------------------------
Key: STDCXX-571
URL: https://issues.apache.org/jira/browse/STDCXX-571
Project: C++ Standard Library
Issue Type: Improvement
Components: Tests
Affects Versions: 4.2
Reporter: Travis Vitek
Priority: Minor
Fix For: 4.2.1
The current numpunct.mt test fails on at least one platform because the initialization code and the test code use two different methods for retrieving the numpunct data. The run_test function uses std::localeconv(), and thread_func uses the C++ locale numpunct facet. In most situations this isn't a problem.
Unfortunately, due to incompatibilities between the C and C++ locale details, the thousands seperator is different with the "C" locale. For C++ it is ',' and for C it is the empty string. Here is a quick test to show the problem that the test sees.
#include <clocale>
#include <locale>
int main()
{
if (!std::setlocale (LC_ALL, "C"))
return 1;
const std::lconv* const pconv = std::localeconv ();
// test against the specialization directly
const std::numpunct<char> np(0);
assert (*pconv->decimal_point == np.decimal_point ());
assert (*pconv->thousands_sep == np.thousands_sep ());
return 0;
}
The test should be enhanced to use the C++ locale for both run_test and thread_func.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (STDCXX-571) 22.locale.numpunct.mt fails
unexpectedly because of
Posted by "Martin Sebor (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/STDCXX-571?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12530628 ]
Martin Sebor commented on STDCXX-571:
-------------------------------------
Thanks, Travis. It looks like you attached the modified file instead of a patch. Also, your Change Log doesn't mention the new command line options. Could you please attach a patch instead and add a note about the new options to the Change Log?
Btw., is the rest of the Summary supposed to be left as an exercise for the reader or are you still wordsmithing? ;-)
> 22.locale.numpunct.mt fails unexpectedly because of
> ----------------------------------------------------
>
> Key: STDCXX-571
> URL: https://issues.apache.org/jira/browse/STDCXX-571
> Project: C++ Standard Library
> Issue Type: Improvement
> Components: Tests
> Affects Versions: 4.2
> Reporter: Travis Vitek
> Priority: Minor
> Fix For: 4.2.1
>
> Attachments: 22.locale.numpunct.mt.cpp
>
>
> The current numpunct.mt test fails on at least one platform because the initialization code and the test code use two different methods for retrieving the numpunct data. The run_test function uses std::localeconv(), and thread_func uses the C++ locale numpunct facet. In most situations this isn't a problem.
> Unfortunately, due to incompatibilities between the C and C++ locale details, the thousands seperator is different with the "C" locale. For C++ it is ',' and for C it is the empty string. Here is a quick test to show the problem that the test sees.
> #include <clocale>
> #include <locale>
> int main()
> {
> if (!std::setlocale (LC_ALL, "C"))
> return 1;
> const std::lconv* const pconv = std::localeconv ();
> // test against the specialization directly
> const std::numpunct<char> np(0);
> assert (*pconv->decimal_point == np.decimal_point ());
> assert (*pconv->thousands_sep == np.thousands_sep ());
> return 0;
> }
> The test should be enhanced to use the C++ locale for both run_test and thread_func.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Issue Comment Edited: (STDCXX-571) 22.locale.numpunct.mt
fails unexpectedly because of
Posted by "Travis Vitek (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/STDCXX-571?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12530561 ]
vitek edited comment on STDCXX-571 at 9/27/07 9:23 AM:
--------------------------------------------------------------
2007-09-26 Travis Vitek <vi...@roguewave.com>
STDCXX-571
* 22.locale.numpunct.mt.cpp (run_test): Use C++ locale to
generate test data. This is to avoid any incompatibilities
between C and C++ locales.
(thread_func): Updated to use changed test data types.
(main): add support for command line options nlocales and
shared-locale for consistency with other multithreaded locale
tests.
was (Author: vitek):
2007-09-26 Travis Vitek <vi...@roguewave.com>
STDCXX-571
* 22.locale.numpunct.mt.cpp (run_test): Use C++ locale to
generate test data. This is to avoid any incompatibilities
between C and C++ locales.
(thread_func): Updated to use changed test data types.
> 22.locale.numpunct.mt fails unexpectedly because of
> ----------------------------------------------------
>
> Key: STDCXX-571
> URL: https://issues.apache.org/jira/browse/STDCXX-571
> Project: C++ Standard Library
> Issue Type: Improvement
> Components: Tests
> Affects Versions: 4.2
> Reporter: Travis Vitek
> Priority: Minor
> Fix For: 4.2.1
>
> Attachments: 22.locale.numpunct.mt.cpp
>
>
> The current numpunct.mt test fails on at least one platform because the initialization code and the test code use two different methods for retrieving the numpunct data. The run_test function uses std::localeconv(), and thread_func uses the C++ locale numpunct facet. In most situations this isn't a problem.
> Unfortunately, due to incompatibilities between the C and C++ locale details, the thousands seperator is different with the "C" locale. For C++ it is ',' and for C it is the empty string. Here is a quick test to show the problem that the test sees.
> #include <clocale>
> #include <locale>
> int main()
> {
> if (!std::setlocale (LC_ALL, "C"))
> return 1;
> const std::lconv* const pconv = std::localeconv ();
> // test against the specialization directly
> const std::numpunct<char> np(0);
> assert (*pconv->decimal_point == np.decimal_point ());
> assert (*pconv->thousands_sep == np.thousands_sep ());
> return 0;
> }
> The test should be enhanced to use the C++ locale for both run_test and thread_func.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (STDCXX-571) 22.locale.numpunct.mt fails because of
inconsistencies between C and C++ locales
Posted by "Travis Vitek (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/STDCXX-571?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Travis Vitek updated STDCXX-571:
--------------------------------
Summary: 22.locale.numpunct.mt fails because of inconsistencies between C and C++ locales (was: 22.locale.numpunct.mt fails unexpectedly because of )
Fixed title. I dunno what happened there, but it's fixed now.
> 22.locale.numpunct.mt fails because of inconsistencies between C and C++ locales
> --------------------------------------------------------------------------------
>
> Key: STDCXX-571
> URL: https://issues.apache.org/jira/browse/STDCXX-571
> Project: C++ Standard Library
> Issue Type: Improvement
> Components: Tests
> Affects Versions: 4.2
> Reporter: Travis Vitek
> Priority: Minor
> Fix For: 4.2.1
>
> Attachments: 22.locale.numpunct.mt.cpp, stdcxx-571.patch
>
>
> The current numpunct.mt test fails on at least one platform because the initialization code and the test code use two different methods for retrieving the numpunct data. The run_test function uses std::localeconv(), and thread_func uses the C++ locale numpunct facet. In most situations this isn't a problem.
> Unfortunately, due to incompatibilities between the C and C++ locale details, the thousands seperator is different with the "C" locale. For C++ it is ',' and for C it is the empty string. Here is a quick test to show the problem that the test sees.
> #include <clocale>
> #include <locale>
> int main()
> {
> if (!std::setlocale (LC_ALL, "C"))
> return 1;
> const std::lconv* const pconv = std::localeconv ();
> // test against the specialization directly
> const std::numpunct<char> np(0);
> assert (*pconv->decimal_point == np.decimal_point ());
> assert (*pconv->thousands_sep == np.thousands_sep ());
> return 0;
> }
> The test should be enhanced to use the C++ locale for both run_test and thread_func.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Closed: (STDCXX-571) 22.locale.numpunct.mt fails because of
inconsistencies between C and C++ locales
Posted by "Martin Sebor (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/STDCXX-571?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Martin Sebor closed STDCXX-571.
-------------------------------
Resolution: Fixed
Fix Version/s: (was: 4.2.1)
4.2
Assignee: Travis Vitek
Done.
> 22.locale.numpunct.mt fails because of inconsistencies between C and C++ locales
> --------------------------------------------------------------------------------
>
> Key: STDCXX-571
> URL: https://issues.apache.org/jira/browse/STDCXX-571
> Project: C++ Standard Library
> Issue Type: Improvement
> Components: Tests
> Affects Versions: 4.2
> Reporter: Travis Vitek
> Assignee: Travis Vitek
> Priority: Minor
> Fix For: 4.2
>
> Attachments: 22.locale.numpunct.mt.cpp, stdcxx-571.patch
>
>
> The current numpunct.mt test fails on at least one platform because the initialization code and the test code use two different methods for retrieving the numpunct data. The run_test function uses std::localeconv(), and thread_func uses the C++ locale numpunct facet. In most situations this isn't a problem.
> Unfortunately, due to incompatibilities between the C and C++ locale details, the thousands seperator is different with the "C" locale. For C++ it is ',' and for C it is the empty string. Here is a quick test to show the problem that the test sees.
> #include <clocale>
> #include <locale>
> int main()
> {
> if (!std::setlocale (LC_ALL, "C"))
> return 1;
> const std::lconv* const pconv = std::localeconv ();
> // test against the specialization directly
> const std::numpunct<char> np(0);
> assert (*pconv->decimal_point == np.decimal_point ());
> assert (*pconv->thousands_sep == np.thousands_sep ());
> return 0;
> }
> The test should be enhanced to use the C++ locale for both run_test and thread_func.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (STDCXX-571) 22.locale.numpunct.mt fails
unexpectedly because of
Posted by "Travis Vitek (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/STDCXX-571?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Travis Vitek updated STDCXX-571:
--------------------------------
Attachment: 22.locale.numpunct.mt.cpp
2007-09-26 Travis Vitek <vi...@roguewave.com>
STDCXX-571
* 22.locale.numpunct.mt.cpp (run_test): Use C++ locale to
generate test data. This is to avoid any incompatibilities
between C and C++ locales.
(thread_func): Updated to use changed test data types.
> 22.locale.numpunct.mt fails unexpectedly because of
> ----------------------------------------------------
>
> Key: STDCXX-571
> URL: https://issues.apache.org/jira/browse/STDCXX-571
> Project: C++ Standard Library
> Issue Type: Improvement
> Components: Tests
> Affects Versions: 4.2
> Reporter: Travis Vitek
> Priority: Minor
> Fix For: 4.2.1
>
> Attachments: 22.locale.numpunct.mt.cpp
>
>
> The current numpunct.mt test fails on at least one platform because the initialization code and the test code use two different methods for retrieving the numpunct data. The run_test function uses std::localeconv(), and thread_func uses the C++ locale numpunct facet. In most situations this isn't a problem.
> Unfortunately, due to incompatibilities between the C and C++ locale details, the thousands seperator is different with the "C" locale. For C++ it is ',' and for C it is the empty string. Here is a quick test to show the problem that the test sees.
> #include <clocale>
> #include <locale>
> int main()
> {
> if (!std::setlocale (LC_ALL, "C"))
> return 1;
> const std::lconv* const pconv = std::localeconv ();
> // test against the specialization directly
> const std::numpunct<char> np(0);
> assert (*pconv->decimal_point == np.decimal_point ());
> assert (*pconv->thousands_sep == np.thousands_sep ());
> return 0;
> }
> The test should be enhanced to use the C++ locale for both run_test and thread_func.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (STDCXX-571) 22.locale.numpunct.mt fails
unexpectedly because of
Posted by "Travis Vitek (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/STDCXX-571?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Travis Vitek updated STDCXX-571:
--------------------------------
Attachment: stdcxx-571.patch
Attach patch instead of modified source.
> 22.locale.numpunct.mt fails unexpectedly because of
> ----------------------------------------------------
>
> Key: STDCXX-571
> URL: https://issues.apache.org/jira/browse/STDCXX-571
> Project: C++ Standard Library
> Issue Type: Improvement
> Components: Tests
> Affects Versions: 4.2
> Reporter: Travis Vitek
> Priority: Minor
> Fix For: 4.2.1
>
> Attachments: 22.locale.numpunct.mt.cpp, stdcxx-571.patch
>
>
> The current numpunct.mt test fails on at least one platform because the initialization code and the test code use two different methods for retrieving the numpunct data. The run_test function uses std::localeconv(), and thread_func uses the C++ locale numpunct facet. In most situations this isn't a problem.
> Unfortunately, due to incompatibilities between the C and C++ locale details, the thousands seperator is different with the "C" locale. For C++ it is ',' and for C it is the empty string. Here is a quick test to show the problem that the test sees.
> #include <clocale>
> #include <locale>
> int main()
> {
> if (!std::setlocale (LC_ALL, "C"))
> return 1;
> const std::lconv* const pconv = std::localeconv ();
> // test against the specialization directly
> const std::numpunct<char> np(0);
> assert (*pconv->decimal_point == np.decimal_point ());
> assert (*pconv->thousands_sep == np.thousands_sep ());
> return 0;
> }
> The test should be enhanced to use the C++ locale for both run_test and thread_func.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.