summaryrefslogtreecommitdiff
path: root/libstdc++-v3
diff options
context:
space:
mode:
authorpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>2002-05-13 10:58:14 +0000
committerpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>2002-05-13 10:58:14 +0000
commit8da1cc811ae24d43f2e2d071c180f5cde35c05b8 (patch)
treebfb9066baa00d34ebe8219b9450d7ae7728aa06a /libstdc++-v3
parentdcf2c31e5533dadf9d7862871a4330cc91f59d45 (diff)
downloadgcc-8da1cc811ae24d43f2e2d071c180f5cde35c05b8.tar.gz
2002-05-13 Paolo Carlini <pcarlini@unitus.it>
* testsuite/22_locale/codecvt_members_char_char.cc (test03): Robustify wrt localedata. * testsuite/22_locale/codecvt_members_wchar_t_char.cc (test03): Likewise. * testsuite/22_locale/collate_members_char.cc (test04): Likewise. * testsuite/22_locale/collate_members_wchar_t.cc (test04): Likewise. * testsuite/22_locale/ctype_members_char.cc (test05): Likewise. * testsuite/22_locale/ctype_members_wchar_t.cc (test04): Likewise. * testsuite/22_locale/messages_members_char.cc (test03): Likewise. * testsuite/22_locale/money_get_members_char.cc (test08): Likewise. * testsuite/22_locale/money_get_members_wchar_t.cc (test08): Likewise. * testsuite/22_locale/money_put_members_char.cc (test07): Likewise. * testsuite/22_locale/money_put_members_wchar_t.cc (test07): Likewise. * testsuite/22_locale/moneypunct_members_char.cc (test03): Likewise. * testsuite/22_locale/moneypunct_members_wchar_t.cc (test03): Likewise. * testsuite/22_locale/num_get_members_char.cc (test06): Likewise. * testsuite/22_locale/num_get_members_wchar_t.cc (test06): Likewise. * testsuite/22_locale/num_put_members_char.cc (test04): Add comment. * testsuite/22_locale/num_put_members_wchar_t.cc (test04): Likewise. * testsuite/22_locale/numpunct_members_char.cc (test03): Likewise. * testsuite/22_locale/numpunct_members_wchar_t.cc (test03): Likewise. * testsuite/22_locale/time_get_members_char.cc (test08): Likewise. * testsuite/22_locale/time_get_members_wchar_t.cc (test08): Likewise. * testsuite/22_locale/time_put_members_char.cc (test04): Likewise. * testsuite/22_locale/time_put_members_wchar_t.cc (test04): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@53419 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3')
-rw-r--r--libstdc++-v3/ChangeLog27
-rw-r--r--libstdc++-v3/testsuite/22_locale/codecvt_members_char_char.cc12
-rw-r--r--libstdc++-v3/testsuite/22_locale/codecvt_members_wchar_t_char.cc12
-rw-r--r--libstdc++-v3/testsuite/22_locale/collate_members_char.cc14
-rw-r--r--libstdc++-v3/testsuite/22_locale/collate_members_wchar_t.cc14
-rw-r--r--libstdc++-v3/testsuite/22_locale/ctype_members_char.cc16
-rw-r--r--libstdc++-v3/testsuite/22_locale/ctype_members_wchar_t.cc12
-rw-r--r--libstdc++-v3/testsuite/22_locale/messages_members_char.cc12
-rw-r--r--libstdc++-v3/testsuite/22_locale/money_get_members_char.cc22
-rw-r--r--libstdc++-v3/testsuite/22_locale/money_get_members_wchar_t.cc22
-rw-r--r--libstdc++-v3/testsuite/22_locale/money_put_members_char.cc20
-rw-r--r--libstdc++-v3/testsuite/22_locale/money_put_members_wchar_t.cc20
-rw-r--r--libstdc++-v3/testsuite/22_locale/moneypunct_members_char.cc12
-rw-r--r--libstdc++-v3/testsuite/22_locale/moneypunct_members_wchar_t.cc12
-rw-r--r--libstdc++-v3/testsuite/22_locale/num_get_members_char.cc18
-rw-r--r--libstdc++-v3/testsuite/22_locale/num_get_members_wchar_t.cc18
-rw-r--r--libstdc++-v3/testsuite/22_locale/num_put_members_char.cc14
-rw-r--r--libstdc++-v3/testsuite/22_locale/num_put_members_wchar_t.cc14
-rw-r--r--libstdc++-v3/testsuite/22_locale/numpunct_members_char.cc12
-rw-r--r--libstdc++-v3/testsuite/22_locale/numpunct_members_wchar_t.cc12
-rw-r--r--libstdc++-v3/testsuite/22_locale/time_get_members_char.cc22
-rw-r--r--libstdc++-v3/testsuite/22_locale/time_get_members_wchar_t.cc22
-rw-r--r--libstdc++-v3/testsuite/22_locale/time_put_members_char.cc14
-rw-r--r--libstdc++-v3/testsuite/22_locale/time_put_members_wchar_t.cc14
24 files changed, 253 insertions, 134 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index 6f09d63878f..c8ff8db2c6d 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,3 +1,30 @@
+2002-05-13 Paolo Carlini <pcarlini@unitus.it>
+
+ * testsuite/22_locale/codecvt_members_char_char.cc
+ (test03): Robustify wrt localedata.
+ * testsuite/22_locale/codecvt_members_wchar_t_char.cc (test03): Likewise.
+ * testsuite/22_locale/collate_members_char.cc (test04): Likewise.
+ * testsuite/22_locale/collate_members_wchar_t.cc (test04): Likewise.
+ * testsuite/22_locale/ctype_members_char.cc (test05): Likewise.
+ * testsuite/22_locale/ctype_members_wchar_t.cc (test04): Likewise.
+ * testsuite/22_locale/messages_members_char.cc (test03): Likewise.
+ * testsuite/22_locale/money_get_members_char.cc (test08): Likewise.
+ * testsuite/22_locale/money_get_members_wchar_t.cc (test08): Likewise.
+ * testsuite/22_locale/money_put_members_char.cc (test07): Likewise.
+ * testsuite/22_locale/money_put_members_wchar_t.cc (test07): Likewise.
+ * testsuite/22_locale/moneypunct_members_char.cc (test03): Likewise.
+ * testsuite/22_locale/moneypunct_members_wchar_t.cc (test03): Likewise.
+ * testsuite/22_locale/num_get_members_char.cc (test06): Likewise.
+ * testsuite/22_locale/num_get_members_wchar_t.cc (test06): Likewise.
+ * testsuite/22_locale/num_put_members_char.cc (test04): Add comment.
+ * testsuite/22_locale/num_put_members_wchar_t.cc (test04): Likewise.
+ * testsuite/22_locale/numpunct_members_char.cc (test03): Likewise.
+ * testsuite/22_locale/numpunct_members_wchar_t.cc (test03): Likewise.
+ * testsuite/22_locale/time_get_members_char.cc (test08): Likewise.
+ * testsuite/22_locale/time_get_members_wchar_t.cc (test08): Likewise.
+ * testsuite/22_locale/time_put_members_char.cc (test04): Likewise.
+ * testsuite/22_locale/time_put_members_wchar_t.cc (test04): Likewise.
+
2002-05-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* config/os/irix/irix5.2/bits/os_defines.h: Revert 2002-05-06
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt_members_char_char.cc b/libstdc++-v3/testsuite/22_locale/codecvt_members_char_char.cc
index 397c489c8d9..38764d43795 100644
--- a/libstdc++-v3/testsuite/22_locale/codecvt_members_char_char.cc
+++ b/libstdc++-v3/testsuite/22_locale/codecvt_members_char_char.cc
@@ -102,10 +102,14 @@ void test03()
{
bool test = true;
- std::string loc1 = setlocale(LC_ALL, "ja_JP.eucjp");
- test01();
- std::string loc2 = setlocale(LC_ALL, NULL);
- VERIFY( loc1 == loc2 );
+ const char* tentLANG = setlocale(LC_ALL, "ja_JP.eucjp");
+ if (tentLANG != NULL)
+ {
+ std::string preLANG = tentLANG;
+ test01();
+ std::string postLANG = setlocale(LC_ALL, NULL);
+ VERIFY( preLANG == postLANG );
+ }
}
int main ()
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt_members_wchar_t_char.cc b/libstdc++-v3/testsuite/22_locale/codecvt_members_wchar_t_char.cc
index 4041c2e722d..3d82fc5e4e9 100644
--- a/libstdc++-v3/testsuite/22_locale/codecvt_members_wchar_t_char.cc
+++ b/libstdc++-v3/testsuite/22_locale/codecvt_members_wchar_t_char.cc
@@ -134,10 +134,14 @@ void test03()
{
bool test = true;
- std::string loc1 = setlocale(LC_ALL, "ja_JP.eucjp");
- test01();
- std::string loc2 = setlocale(LC_ALL, NULL);
- VERIFY( loc1 == loc2 );
+ const char* tentLANG = setlocale(LC_ALL, "ja_JP.eucjp");
+ if (tentLANG != NULL)
+ {
+ std::string preLANG = tentLANG;
+ test01();
+ std::string postLANG = setlocale(LC_ALL, NULL);
+ VERIFY( preLANG == postLANG );
+ }
}
#endif /* !defined(_GLIBCPP_USE_WCHAR_T) */
diff --git a/libstdc++-v3/testsuite/22_locale/collate_members_char.cc b/libstdc++-v3/testsuite/22_locale/collate_members_char.cc
index 7ec42c685c7..0a2b29b6ebf 100644
--- a/libstdc++-v3/testsuite/22_locale/collate_members_char.cc
+++ b/libstdc++-v3/testsuite/22_locale/collate_members_char.cc
@@ -166,11 +166,15 @@ void test04()
{
bool test = true;
- std::string loc1 = setlocale(LC_ALL, "ja_JP.eucjp");
- test01();
- test03();
- std::string loc2 = setlocale(LC_ALL, NULL);
- VERIFY( loc1 == loc2 );
+ const char* tentLANG = setlocale(LC_ALL, "ja_JP.eucjp");
+ if (tentLANG != NULL)
+ {
+ std::string preLANG = tentLANG;
+ test01();
+ test03();
+ std::string postLANG = setlocale(LC_ALL, NULL);
+ VERIFY( preLANG == postLANG );
+ }
}
int main()
diff --git a/libstdc++-v3/testsuite/22_locale/collate_members_wchar_t.cc b/libstdc++-v3/testsuite/22_locale/collate_members_wchar_t.cc
index 496dffe6490..b120397a649 100644
--- a/libstdc++-v3/testsuite/22_locale/collate_members_wchar_t.cc
+++ b/libstdc++-v3/testsuite/22_locale/collate_members_wchar_t.cc
@@ -166,11 +166,15 @@ void test04()
{
bool test = true;
- std::string loc1 = setlocale(LC_ALL, "ja_JP.eucjp");
- test01();
- test03();
- std::string loc2 = setlocale(LC_ALL, NULL);
- VERIFY( loc1 == loc2 );
+ const char* tentLANG = setlocale(LC_ALL, "ja_JP.eucjp");
+ if (tentLANG != NULL)
+ {
+ std::string preLANG = tentLANG;
+ test01();
+ test03();
+ std::string postLANG = setlocale(LC_ALL, NULL);
+ VERIFY( preLANG == postLANG );
+ }
}
#endif
diff --git a/libstdc++-v3/testsuite/22_locale/ctype_members_char.cc b/libstdc++-v3/testsuite/22_locale/ctype_members_char.cc
index da0786fc6b5..b61dabf56e3 100644
--- a/libstdc++-v3/testsuite/22_locale/ctype_members_char.cc
+++ b/libstdc++-v3/testsuite/22_locale/ctype_members_char.cc
@@ -285,12 +285,16 @@ void test05()
{
bool test = true;
- std::string loc1 = setlocale(LC_ALL, "ja_JP.eucjp");
- test01();
- test02();
- test03();
- std::string loc2 = setlocale(LC_ALL, NULL);
- VERIFY( loc1 == loc2 );
+ const char* tentLANG = setlocale(LC_ALL, "ja_JP.eucjp");
+ if (tentLANG != NULL)
+ {
+ std::string preLANG = tentLANG;
+ test01();
+ test02();
+ test03();
+ std::string postLANG = setlocale(LC_ALL, NULL);
+ VERIFY( preLANG == postLANG );
+ }
}
int main()
diff --git a/libstdc++-v3/testsuite/22_locale/ctype_members_wchar_t.cc b/libstdc++-v3/testsuite/22_locale/ctype_members_wchar_t.cc
index f4db4f12f7d..405cddc4eb3 100644
--- a/libstdc++-v3/testsuite/22_locale/ctype_members_wchar_t.cc
+++ b/libstdc++-v3/testsuite/22_locale/ctype_members_wchar_t.cc
@@ -120,10 +120,14 @@ void test04()
{
bool test = true;
- std::string loc1 = setlocale(LC_ALL, "ja_JP.eucjp");
- test01();
- std::string loc2 = setlocale(LC_ALL, NULL);
- VERIFY( loc1 == loc2 );
+ const char* tentLANG = setlocale(LC_ALL, "ja_JP.eucjp");
+ if (tentLANG != NULL)
+ {
+ std::string preLANG = tentLANG;
+ test01();
+ std::string postLANG = setlocale(LC_ALL, NULL);
+ VERIFY( preLANG == postLANG );
+ }
}
#endif /* !defined(_GLIBCPP_USE_WCHAR_T) */
diff --git a/libstdc++-v3/testsuite/22_locale/messages_members_char.cc b/libstdc++-v3/testsuite/22_locale/messages_members_char.cc
index 81004b9473a..eeb6ef30679 100644
--- a/libstdc++-v3/testsuite/22_locale/messages_members_char.cc
+++ b/libstdc++-v3/testsuite/22_locale/messages_members_char.cc
@@ -104,10 +104,14 @@ void test03()
{
bool test = true;
- std::string loc1 = setlocale(LC_ALL, "ja_JP.eucjp");
- test01();
- std::string loc2 = setlocale(LC_ALL, NULL);
- VERIFY( loc1 == loc2 );
+ const char* tentLANG = setlocale(LC_ALL, "ja_JP.eucjp");
+ if (tentLANG != NULL)
+ {
+ std::string preLANG = tentLANG;
+ test01();
+ std::string postLANG = setlocale(LC_ALL, NULL);
+ VERIFY( preLANG == postLANG );
+ }
}
int main()
diff --git a/libstdc++-v3/testsuite/22_locale/money_get_members_char.cc b/libstdc++-v3/testsuite/22_locale/money_get_members_char.cc
index 2dec7ef60d7..4bc3e45c127 100644
--- a/libstdc++-v3/testsuite/22_locale/money_get_members_char.cc
+++ b/libstdc++-v3/testsuite/22_locale/money_get_members_char.cc
@@ -551,15 +551,19 @@ void test08()
{
bool test = true;
- std::string loc1 = setlocale(LC_ALL, "ja_JP.eucjp");
- test01();
- test02();
- test03();
- test05();
- test06();
- test07();
- std::string loc2 = setlocale(LC_ALL, NULL);
- VERIFY( loc1 == loc2 );
+ const char* tentLANG = setlocale(LC_ALL, "ja_JP.eucjp");
+ if (tentLANG != NULL)
+ {
+ std::string preLANG = tentLANG;
+ test01();
+ test02();
+ test03();
+ test05();
+ test06();
+ test07();
+ std::string postLANG = setlocale(LC_ALL, NULL);
+ VERIFY( preLANG == postLANG );
+ }
}
int main()
diff --git a/libstdc++-v3/testsuite/22_locale/money_get_members_wchar_t.cc b/libstdc++-v3/testsuite/22_locale/money_get_members_wchar_t.cc
index 8809d58d0c3..3d2371993a0 100644
--- a/libstdc++-v3/testsuite/22_locale/money_get_members_wchar_t.cc
+++ b/libstdc++-v3/testsuite/22_locale/money_get_members_wchar_t.cc
@@ -552,15 +552,19 @@ void test08()
{
bool test = true;
- std::string loc1 = setlocale(LC_ALL, "ja_JP.eucjp");
- test01();
- test02();
- test03();
- test05();
- test06();
- test07();
- std::string loc2 = setlocale(LC_ALL, NULL);
- VERIFY( loc1 == loc2 );
+ const char* tentLANG = setlocale(LC_ALL, "ja_JP.eucjp");
+ if (tentLANG != NULL)
+ {
+ std::string preLANG = tentLANG;
+ test01();
+ test02();
+ test03();
+ test05();
+ test06();
+ test07();
+ std::string postLANG = setlocale(LC_ALL, NULL);
+ VERIFY( preLANG == postLANG );
+ }
}
#endif
diff --git a/libstdc++-v3/testsuite/22_locale/money_put_members_char.cc b/libstdc++-v3/testsuite/22_locale/money_put_members_char.cc
index 02558becf0f..573893545a7 100644
--- a/libstdc++-v3/testsuite/22_locale/money_put_members_char.cc
+++ b/libstdc++-v3/testsuite/22_locale/money_put_members_char.cc
@@ -373,14 +373,18 @@ void test07()
{
bool test = true;
- std::string loc1 = setlocale(LC_ALL, "ja_JP.eucjp");
- test01();
- test02();
- test03();
- test05();
- test06();
- std::string loc2 = setlocale(LC_ALL, NULL);
- VERIFY( loc1 == loc2 );
+ const char* tentLANG = setlocale(LC_ALL, "ja_JP.eucjp");
+ if (tentLANG != NULL)
+ {
+ std::string preLANG = tentLANG;
+ test01();
+ test02();
+ test03();
+ test05();
+ test06();
+ std::string postLANG = setlocale(LC_ALL, NULL);
+ VERIFY( preLANG == postLANG );
+ }
}
int main()
diff --git a/libstdc++-v3/testsuite/22_locale/money_put_members_wchar_t.cc b/libstdc++-v3/testsuite/22_locale/money_put_members_wchar_t.cc
index 63880a2ae7a..9143fb6f9ad 100644
--- a/libstdc++-v3/testsuite/22_locale/money_put_members_wchar_t.cc
+++ b/libstdc++-v3/testsuite/22_locale/money_put_members_wchar_t.cc
@@ -373,14 +373,18 @@ void test07()
{
bool test = true;
- std::string loc1 = setlocale(LC_ALL, "ja_JP.eucjp");
- test01();
- test02();
- test03();
- test05();
- test06();
- std::string loc2 = setlocale(LC_ALL, NULL);
- VERIFY( loc1 == loc2 );
+ const char* tentLANG = setlocale(LC_ALL, "ja_JP.eucjp");
+ if (tentLANG != NULL)
+ {
+ std::string preLANG = tentLANG;
+ test01();
+ test02();
+ test03();
+ test05();
+ test06();
+ std::string postLANG = setlocale(LC_ALL, NULL);
+ VERIFY( preLANG == postLANG );
+ }
}
#endif
diff --git a/libstdc++-v3/testsuite/22_locale/moneypunct_members_char.cc b/libstdc++-v3/testsuite/22_locale/moneypunct_members_char.cc
index 930b4f5192e..5beb5ee9fb0 100644
--- a/libstdc++-v3/testsuite/22_locale/moneypunct_members_char.cc
+++ b/libstdc++-v3/testsuite/22_locale/moneypunct_members_char.cc
@@ -128,10 +128,14 @@ void test03()
{
bool test = true;
- std::string loc1 = setlocale(LC_ALL, "ja_JP.eucjp");
- test01();
- std::string loc2 = setlocale(LC_ALL, NULL);
- VERIFY( loc1 == loc2 );
+ const char* tentLANG = setlocale(LC_ALL, "ja_JP.eucjp");
+ if (tentLANG != NULL)
+ {
+ std::string preLANG = tentLANG;
+ test01();
+ std::string postLANG = setlocale(LC_ALL, NULL);
+ VERIFY( preLANG == postLANG );
+ }
}
int main()
diff --git a/libstdc++-v3/testsuite/22_locale/moneypunct_members_wchar_t.cc b/libstdc++-v3/testsuite/22_locale/moneypunct_members_wchar_t.cc
index 752a0e92409..c79e170de40 100644
--- a/libstdc++-v3/testsuite/22_locale/moneypunct_members_wchar_t.cc
+++ b/libstdc++-v3/testsuite/22_locale/moneypunct_members_wchar_t.cc
@@ -129,10 +129,14 @@ void test03()
{
bool test = true;
- std::string loc1 = setlocale(LC_ALL, "ja_JP.eucjp");
- test01();
- std::string loc2 = setlocale(LC_ALL, NULL);
- VERIFY( loc1 == loc2 );
+ const char* tentLANG = setlocale(LC_ALL, "ja_JP.eucjp");
+ if (tentLANG != NULL)
+ {
+ std::string preLANG = tentLANG;
+ test01();
+ std::string postLANG = setlocale(LC_ALL, NULL);
+ VERIFY( preLANG == postLANG );
+ }
}
#endif
diff --git a/libstdc++-v3/testsuite/22_locale/num_get_members_char.cc b/libstdc++-v3/testsuite/22_locale/num_get_members_char.cc
index c852f33f120..b65e1013fc4 100644
--- a/libstdc++-v3/testsuite/22_locale/num_get_members_char.cc
+++ b/libstdc++-v3/testsuite/22_locale/num_get_members_char.cc
@@ -418,13 +418,17 @@ void test06()
{
bool test = true;
- std::string loc1 = setlocale(LC_ALL, "ja_JP.eucjp");
- test01();
- test02();
- test04();
- test05();
- std::string loc2 = setlocale(LC_ALL, NULL);
- VERIFY( loc1 == loc2 );
+ const char* tentLANG = setlocale(LC_ALL, "ja_JP.eucjp");
+ if (tentLANG != NULL)
+ {
+ std::string preLANG = tentLANG;
+ test01();
+ test02();
+ test04();
+ test05();
+ std::string postLANG = setlocale(LC_ALL, NULL);
+ VERIFY( preLANG == postLANG );
+ }
}
int main()
diff --git a/libstdc++-v3/testsuite/22_locale/num_get_members_wchar_t.cc b/libstdc++-v3/testsuite/22_locale/num_get_members_wchar_t.cc
index 6a59d9d6cba..5585c4389ae 100644
--- a/libstdc++-v3/testsuite/22_locale/num_get_members_wchar_t.cc
+++ b/libstdc++-v3/testsuite/22_locale/num_get_members_wchar_t.cc
@@ -420,13 +420,17 @@ void test06()
{
bool test = true;
- std::string loc1 = setlocale(LC_ALL, "ja_JP.eucjp");
- test01();
- test02();
- test04();
- test05();
- std::string loc2 = setlocale(LC_ALL, NULL);
- VERIFY( loc1 == loc2 );
+ const char* tentLANG = setlocale(LC_ALL, "ja_JP.eucjp");
+ if (tentLANG != NULL)
+ {
+ std::string preLANG = tentLANG;
+ test01();
+ test02();
+ test04();
+ test05();
+ std::string postLANG = setlocale(LC_ALL, NULL);
+ VERIFY( preLANG == postLANG );
+ }
}
#endif
diff --git a/libstdc++-v3/testsuite/22_locale/num_put_members_char.cc b/libstdc++-v3/testsuite/22_locale/num_put_members_char.cc
index 185cc9ded24..7966fb51c11 100644
--- a/libstdc++-v3/testsuite/22_locale/num_put_members_char.cc
+++ b/libstdc++-v3/testsuite/22_locale/num_put_members_char.cc
@@ -315,11 +315,15 @@ void test04()
{
bool test = true;
- std::string loc1 = setlocale(LC_ALL, "ja_JP.eucjp");
- test01();
- test02();
- std::string loc2 = setlocale(LC_ALL, NULL);
- VERIFY( loc1 == loc2 );
+ const char* tentLANG = setlocale(LC_ALL, "ja_JP.eucjp");
+ if (tentLANG != NULL)
+ {
+ std::string preLANG = tentLANG;
+ test01();
+ test02();
+ std::string postLANG = setlocale(LC_ALL, NULL);
+ VERIFY( preLANG == postLANG );
+ }
}
int main()
diff --git a/libstdc++-v3/testsuite/22_locale/num_put_members_wchar_t.cc b/libstdc++-v3/testsuite/22_locale/num_put_members_wchar_t.cc
index 8479b1bb590..86a7b25e0ca 100644
--- a/libstdc++-v3/testsuite/22_locale/num_put_members_wchar_t.cc
+++ b/libstdc++-v3/testsuite/22_locale/num_put_members_wchar_t.cc
@@ -315,11 +315,15 @@ void test04()
{
bool test = true;
- std::string loc1 = setlocale(LC_ALL, "ja_JP.eucjp");
- test01();
- test02();
- std::string loc2 = setlocale(LC_ALL, NULL);
- VERIFY( loc1 == loc2 );
+ const char* tentLANG = setlocale(LC_ALL, "ja_JP.eucjp");
+ if (tentLANG != NULL)
+ {
+ std::string preLANG = tentLANG;
+ test01();
+ test02();
+ std::string postLANG = setlocale(LC_ALL, NULL);
+ VERIFY( preLANG == postLANG );
+ }
}
#endif
diff --git a/libstdc++-v3/testsuite/22_locale/numpunct_members_char.cc b/libstdc++-v3/testsuite/22_locale/numpunct_members_char.cc
index 13bda1fa4ff..df1835707f6 100644
--- a/libstdc++-v3/testsuite/22_locale/numpunct_members_char.cc
+++ b/libstdc++-v3/testsuite/22_locale/numpunct_members_char.cc
@@ -106,10 +106,14 @@ void test03()
{
bool test = true;
- std::string loc1 = setlocale(LC_ALL, "ja_JP.eucjp");
- test01();
- std::string loc2 = setlocale(LC_ALL, NULL);
- VERIFY( loc1 == loc2 );
+ const char* tentLANG = setlocale(LC_ALL, "ja_JP.eucjp");
+ if (tentLANG != NULL)
+ {
+ std::string preLANG = tentLANG;
+ test01();
+ std::string postLANG = setlocale(LC_ALL, NULL);
+ VERIFY( preLANG == postLANG );
+ }
}
int main()
diff --git a/libstdc++-v3/testsuite/22_locale/numpunct_members_wchar_t.cc b/libstdc++-v3/testsuite/22_locale/numpunct_members_wchar_t.cc
index 39025b16d2b..8b98ff90f8a 100644
--- a/libstdc++-v3/testsuite/22_locale/numpunct_members_wchar_t.cc
+++ b/libstdc++-v3/testsuite/22_locale/numpunct_members_wchar_t.cc
@@ -104,10 +104,14 @@ void test03()
{
bool test = true;
- std::string loc1 = setlocale(LC_ALL, "ja_JP.eucjp");
- test01();
- std::string loc2 = setlocale(LC_ALL, NULL);
- VERIFY( loc1 == loc2 );
+ const char* tentLANG = setlocale(LC_ALL, "ja_JP.eucjp");
+ if (tentLANG != NULL)
+ {
+ std::string preLANG = tentLANG;
+ test01();
+ std::string postLANG = setlocale(LC_ALL, NULL);
+ VERIFY( preLANG == postLANG );
+ }
}
#endif
diff --git a/libstdc++-v3/testsuite/22_locale/time_get_members_char.cc b/libstdc++-v3/testsuite/22_locale/time_get_members_char.cc
index e0aaeec262a..74b358bd294 100644
--- a/libstdc++-v3/testsuite/22_locale/time_get_members_char.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_get_members_char.cc
@@ -704,15 +704,19 @@ void test08()
{
bool test = true;
- std::string loc1 = setlocale(LC_ALL, "ja_JP.eucjp");
- test01();
- test02();
- test03();
- test04();
- test05();
- test06();
- std::string loc2 = setlocale(LC_ALL, NULL);
- VERIFY( loc1 == loc2 );
+ const char* tentLANG = setlocale(LC_ALL, "ja_JP.eucjp");
+ if (tentLANG != NULL)
+ {
+ std::string preLANG = tentLANG;
+ test01();
+ test02();
+ test03();
+ test04();
+ test05();
+ test06();
+ std::string postLANG = setlocale(LC_ALL, NULL);
+ VERIFY( preLANG == postLANG );
+ }
}
int main()
diff --git a/libstdc++-v3/testsuite/22_locale/time_get_members_wchar_t.cc b/libstdc++-v3/testsuite/22_locale/time_get_members_wchar_t.cc
index d4f0632e3eb..d8c568d29c4 100644
--- a/libstdc++-v3/testsuite/22_locale/time_get_members_wchar_t.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_get_members_wchar_t.cc
@@ -704,15 +704,19 @@ void test08()
{
bool test = true;
- std::string loc1 = setlocale(LC_ALL, "ja_JP.eucjp");
- test01();
- test02();
- test03();
- test04();
- test05();
- test06();
- std::string loc2 = setlocale(LC_ALL, NULL);
- VERIFY( loc1 == loc2 );
+ const char* tentLANG = setlocale(LC_ALL, "ja_JP.eucjp");
+ if (tentLANG != NULL)
+ {
+ std::string preLANG = tentLANG;
+ test01();
+ test02();
+ test03();
+ test04();
+ test05();
+ test06();
+ std::string postLANG = setlocale(LC_ALL, NULL);
+ VERIFY( preLANG == postLANG );
+ }
}
#endif
diff --git a/libstdc++-v3/testsuite/22_locale/time_put_members_char.cc b/libstdc++-v3/testsuite/22_locale/time_put_members_char.cc
index 6f17df5dbf9..09a4d4f500d 100644
--- a/libstdc++-v3/testsuite/22_locale/time_put_members_char.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_put_members_char.cc
@@ -255,11 +255,15 @@ void test04()
{
bool test = true;
- std::string loc1 = setlocale(LC_ALL, "ja_JP.eucjp");
- test01();
- test02();
- std::string loc2 = setlocale(LC_ALL, NULL);
- VERIFY( loc1 == loc2 );
+ const char* tentLANG = setlocale(LC_ALL, "ja_JP.eucjp");
+ if (tentLANG != NULL)
+ {
+ std::string preLANG = tentLANG;
+ test01();
+ test02();
+ std::string postLANG = setlocale(LC_ALL, NULL);
+ VERIFY( preLANG == postLANG );
+ }
}
int main()
diff --git a/libstdc++-v3/testsuite/22_locale/time_put_members_wchar_t.cc b/libstdc++-v3/testsuite/22_locale/time_put_members_wchar_t.cc
index 251d1749670..fa576be970a 100644
--- a/libstdc++-v3/testsuite/22_locale/time_put_members_wchar_t.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_put_members_wchar_t.cc
@@ -257,11 +257,15 @@ void test04()
{
bool test = true;
- std::string loc1 = setlocale(LC_ALL, "ja_JP.eucjp");
- test01();
- test02();
- std::string loc2 = setlocale(LC_ALL, NULL);
- VERIFY( loc1 == loc2 );
+ const char* tentLANG = setlocale(LC_ALL, "ja_JP.eucjp");
+ if (tentLANG != NULL)
+ {
+ std::string preLANG = tentLANG;
+ test01();
+ test02();
+ std::string postLANG = setlocale(LC_ALL, NULL);
+ VERIFY( preLANG == postLANG );
+ }
}
#endif