Commit 51502ebc by Benjamin Kosnik Committed by Benjamin Kosnik

static_members.cc (test02): Less provincial.


2002-10-14  Benjamin Kosnik  <bkoz@redhat.com>

	* testsuite/22_locale/static_members.cc (test02): Less provincial.

From-SVN: r58144
parent 9fead1f5
2002-10-14 Benjamin Kosnik <bkoz@redhat.com>
* testsuite/22_locale/static_members.cc (test02): Less provincial.
2002-10-14 Benjamin Kosnik <bkoz@redhat.com>
* testsuite/22_locale/static_members.cc (test02): Disable for
systems without named locale support.
* testsuite/22_locale/ctor_copy_dtor.cc (test04): Don't assume
......
......@@ -67,13 +67,18 @@ void test02()
using namespace std;
bool test = true;
// If the underlying locale doesn't support these names, setlocale
// won't be reset. Therefore, disable unless we know named locales work.
#if _GLIBCPP_C_LOCALE_GNU
const string ph("en_PH");
const string mx("es_MX");
const char* orig = setlocale(LC_ALL, NULL);
const char* testph = setlocale(LC_ALL, ph.c_str());
const char* testmx = setlocale(LC_ALL, mx.c_str());
setlocale(LC_ALL, orig);
// If the underlying locale doesn't support these names, setlocale
// won't be reset. Therefore, disable unless we know these specific
// named locales work.
if (testph && testmx)
{
const locale loc_ph(ph.c_str());
const locale loc_mx(mx.c_str());
......@@ -94,7 +99,7 @@ void test02()
// Restore global settings.
locale::global(global_orig);
#endif
}
}
// Static counter for use in checking ctors/dtors.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment