summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>2008-06-24 16:31:06 +0000
committerpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>2008-06-24 16:31:06 +0000
commit2ee3d047ec3ef45121f00c3c5c3859ff61b7909f (patch)
treef605b8cc2e11425961788909d2b3bbf678c957af
parent000ba44200cacefdafb986824b8047e1308f0062 (diff)
downloadgcc-2ee3d047ec3ef45121f00c3c5c3859ff61b7909f.tar.gz
2008-06-24 Paolo Carlini <paolo.carlini@oracle.com>
PR libstdc++/36616 * testsuite/22_locale/money_put/put/char/9780-3.cc: Fix expected results for recent glibcs (2.8 and later). * testsuite/22_locale/time_put/put/wchar_t/4.cc: Likewise. * testsuite/22_locale/time_put/put/char/4.cc: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@137073 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--libstdc++-v3/testsuite/22_locale/money_put/put/char/9780-3.cc8
-rw-r--r--libstdc++-v3/testsuite/22_locale/time_put/put/char/4.cc19
-rw-r--r--libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/4.cc19
3 files changed, 38 insertions, 8 deletions
diff --git a/libstdc++-v3/testsuite/22_locale/money_put/put/char/9780-3.cc b/libstdc++-v3/testsuite/22_locale/money_put/put/char/9780-3.cc
index 723f98c817b..9e319437002 100644
--- a/libstdc++-v3/testsuite/22_locale/money_put/put/char/9780-3.cc
+++ b/libstdc++-v3/testsuite/22_locale/money_put/put/char/9780-3.cc
@@ -1,6 +1,6 @@
// { dg-require-namedlocale "" }
-// Copyright (C) 2004, 2005 Free Software Foundation, Inc.
+// Copyright (C) 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -38,8 +38,12 @@ int main()
long double ld = -1234567890;
mp.put(oss.rdbuf(), true, oss, ' ', ld); // -EUR 12.345.678,90
string res = oss.str();
-
+
+#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 7)
+ VERIFY( res == "-12.345.678,90 EUR " );
+#else
VERIFY( res == "-EUR 12.345.678,90" );
+#endif
return 0;
}
diff --git a/libstdc++-v3/testsuite/22_locale/time_put/put/char/4.cc b/libstdc++-v3/testsuite/22_locale/time_put/put/char/4.cc
index 33018395283..2fb6cf6ae74 100644
--- a/libstdc++-v3/testsuite/22_locale/time_put/put/char/4.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_put/put/char/4.cc
@@ -2,7 +2,8 @@
// 2001-09-17 Benjamin Kosnik <bkoz@redhat.com>
-// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
+// Free Software Foundation
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -48,12 +49,20 @@ void test04()
const time_put<char>& tim_put = use_facet<time_put<char> >(oss.getloc());
iterator_type os_it04 = tim_put.put(oss.rdbuf(), oss, '*', &time1, 'a');
string result4 = oss.str();
+#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 7)
+ VERIFY( result4 == "dim." );
+#else
VERIFY( result4 == "dim" );
+#endif
oss.str(empty); // "%d.%m.%Y"
iterator_type os_it27 = tim_put.put(oss.rdbuf(), oss, '*', &time1, 'x');
- string result27 = oss.str(); // "04.04.1971"
+ string result27 = oss.str();
+#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 7)
+ VERIFY( result27 == "04/04/1971" );
+#else
VERIFY( result27 == "04.04.1971" );
+#endif
oss.str(empty); // "%T"
iterator_type os_it28 = tim_put.put(oss.rdbuf(), oss, '*', &time1, 'X');
@@ -62,8 +71,12 @@ void test04()
oss.str(empty);
iterator_type os_it37 = tim_put.put(oss.rdbuf(), oss, '*', &time1, 'x', 'E');
- string result37 = oss.str(); // "04.04.1971"
+ string result37 = oss.str();
+#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 7)
+ VERIFY( result37 == "04/04/1971" );
+#else
VERIFY( result37 == "04.04.1971" );
+#endif
oss.str(empty);
iterator_type os_it38 = tim_put.put(oss.rdbuf(), oss, '*', &time1, 'X', 'E');
diff --git a/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/4.cc b/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/4.cc
index a3b469d67ce..09920521945 100644
--- a/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/4.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/4.cc
@@ -2,7 +2,8 @@
// 2001-09-17 Benjamin Kosnik <bkoz@redhat.com>
-// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
+// Free Software Foundation
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -48,12 +49,20 @@ void test04()
const time_put<wchar_t>& tim_put = use_facet<time_put<wchar_t> >(oss.getloc());
iterator_type os_it04 = tim_put.put(oss.rdbuf(), oss, L'*', &time1, 'a');
wstring result4 = oss.str();
+#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 7)
+ VERIFY( result4 == L"dim." );
+#else
VERIFY( result4 == L"dim" );
+#endif
oss.str(empty); // "%d.%m.%Y"
iterator_type os_it27 = tim_put.put(oss.rdbuf(), oss, L'*', &time1, 'x');
- wstring result27 = oss.str(); // "04.04.1971"
+ wstring result27 = oss.str();
+#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 7)
+ VERIFY( result27 == L"04/04/1971" );
+#else
VERIFY( result27 == L"04.04.1971" );
+#endif
oss.str(empty); // "%T"
iterator_type os_it28 = tim_put.put(oss.rdbuf(), oss, L'*', &time1, 'X');
@@ -62,8 +71,12 @@ void test04()
oss.str(empty);
iterator_type os_it37 = tim_put.put(oss.rdbuf(), oss, L'*', &time1, 'x', 'E');
- wstring result37 = oss.str(); // "04.04.1971"
+ wstring result37 = oss.str();
+#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 7)
+ VERIFY( result37 == L"04/04/1971" );
+#else
VERIFY( result37 == L"04.04.1971" );
+#endif
oss.str(empty);
iterator_type os_it38 = tim_put.put(oss.rdbuf(), oss, L'*', &time1, 'X', 'E');