summaryrefslogtreecommitdiff
path: root/libstdc++-v3
diff options
context:
space:
mode:
authorbkoz <bkoz@138bc75d-0d04-0410-961f-82ee72b054a4>2003-04-28 14:30:07 +0000
committerbkoz <bkoz@138bc75d-0d04-0410-961f-82ee72b054a4>2003-04-28 14:30:07 +0000
commita86ce74a63ac57989b4e4f7e303676dac4d94424 (patch)
tree24b916ac8690b587b509591cffa06a5bffa10275 /libstdc++-v3
parentc49500936c013140a0cb95dcc6d1dcd170c2c080 (diff)
downloadgcc-a86ce74a63ac57989b4e4f7e303676dac4d94424.tar.gz
2003-04-28 Benjamin Kosnik <bkoz@redhat.com>
* testsuite/22_locale/codecvt/unicode/char.cc: Remove bom usage. * testsuite/22_locale/codecvt/unicode/wchar_t.cc: Same. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@66170 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3')
-rw-r--r--libstdc++-v3/ChangeLog5
-rw-r--r--libstdc++-v3/testsuite/22_locale/codecvt/unicode/char.cc23
-rw-r--r--libstdc++-v3/testsuite/22_locale/codecvt/unicode/wchar_t.cc15
3 files changed, 21 insertions, 22 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index 1847d4f4852..597c68f300f 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,3 +1,8 @@
+2003-04-28 Benjamin Kosnik <bkoz@redhat.com>
+
+ * testsuite/22_locale/codecvt/unicode/char.cc: Remove bom usage.
+ * testsuite/22_locale/codecvt/unicode/wchar_t.cc: Same.
+
2003-04-27 Benjamin Kosnik <bkoz@redhat.com>
* include/std/std_fstream.h (basic_filebuf): _M_pback_destroy to
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/unicode/char.cc b/libstdc++-v3/testsuite/22_locale/codecvt/unicode/char.cc
index 51bf9b9600a..76f67b70aa3 100644
--- a/libstdc++-v3/testsuite/22_locale/codecvt/unicode/char.cc
+++ b/libstdc++-v3/testsuite/22_locale/codecvt/unicode/char.cc
@@ -1,6 +1,6 @@
// 2000-08-22 Benjamin Kosnik <bkoz@cygnus.com>
-// Copyright (C) 2000, 2001, 2002 Free Software Foundation
+// Copyright (C) 2000, 2001, 2002, 2003 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
@@ -19,12 +19,9 @@
// USA.
// 22.2.1.5 - Template class codecvt [lib.locale.codecvt]
-
#include <locale>
#include <testsuite_hooks.h>
-
-
#ifdef _GLIBCPP_USE___ENC_TRAITS
// Need some char_traits specializations for this to work.
@@ -156,7 +153,8 @@ void test01()
const unicode_codecvt& cvt = use_facet<unicode_codecvt>(loc);
// in
- unicode_codecvt::state_type state01("UCS-2BE", "ISO-8859-15", 0xfeff, 0);
+ // unicode_codecvt::state_type state01("UCS-2BE", "ISO-8859-15", 0xfeff, 0);
+ unicode_codecvt::state_type state01("UCS-2BE", "ISO-8859-15", 0, 0);
initialize_state(state01);
// internal encoding is bigger because of bom
result r1 = cvt.in(state01, e_lit, e_lit + size, efrom_next,
@@ -167,7 +165,7 @@ void test01()
VERIFY( ito_next == i_arr + size );
// out
- unicode_codecvt::state_type state02("UCS-2BE", "ISO-8859-15", 0xfeff, 0);
+ unicode_codecvt::state_type state02("UCS-2BE", "ISO-8859-15", 0, 0);
initialize_state(state02);
result r2 = cvt.out(state02, i_lit, i_lit + size, ifrom_next,
e_arr, e_arr + size, eto_next);
@@ -178,7 +176,7 @@ void test01()
// unshift
ext_traits::copy(e_arr, e_lit, size);
- unicode_codecvt::state_type state03("UCS-2BE", "ISO-8859-15", 0xfeff, 0);
+ unicode_codecvt::state_type state03("UCS-2BE", "ISO-8859-15", 0, 0);
initialize_state(state03);
result r3 = cvt.unshift(state03, e_arr, e_arr + size, eto_next);
VERIFY( r3 == codecvt_base::noconv );
@@ -190,7 +188,7 @@ void test01()
VERIFY( !cvt.always_noconv() );
- unicode_codecvt::state_type state04("UCS-2BE", "ISO-8859-15", 0xfeff, 0);
+ unicode_codecvt::state_type state04("UCS-2BE", "ISO-8859-15", 0, 0);
initialize_state(state04);
int j = cvt.length(state03, e_lit, e_lit + size, 5);
VERIFY( j == 5 );
@@ -244,7 +242,7 @@ void test02()
const unicode_codecvt& cvt = use_facet<unicode_codecvt>(loc);
// in
- unicode_codecvt::state_type state01("UCS-2LE", "ISO-8859-15", 0xfeff, 0);
+ unicode_codecvt::state_type state01("UCS-2LE", "ISO-8859-15", 0, 0);
initialize_state(state01);
// internal encoding is bigger because of bom
result r1 = cvt.in(state01, e_lit, e_lit + size, efrom_next,
@@ -255,7 +253,7 @@ void test02()
VERIFY( ito_next == i_arr + size );
// out
- unicode_codecvt::state_type state02("UCS-2LE", "ISO-8859-15", 0xfeff, 0);
+ unicode_codecvt::state_type state02("UCS-2LE", "ISO-8859-15", 0, 0);
initialize_state(state02);
result r2 = cvt.out(state02, i_lit, i_lit + size, ifrom_next,
e_arr, e_arr + size, eto_next);
@@ -266,7 +264,7 @@ void test02()
// unshift
ext_traits::copy(e_arr, e_lit, size);
- unicode_codecvt::state_type state03("UCS-2LE", "ISO-8859-15", 0xfeff, 0);
+ unicode_codecvt::state_type state03("UCS-2LE", "ISO-8859-15", 0, 0);
initialize_state(state03);
result r3 = cvt.unshift(state03, e_arr, e_arr + size, eto_next);
VERIFY( r3 == codecvt_base::noconv );
@@ -278,7 +276,7 @@ void test02()
VERIFY( !cvt.always_noconv() );
- unicode_codecvt::state_type state04("UCS-2LE", "ISO-8859-15", 0xfeff, 0);
+ unicode_codecvt::state_type state04("UCS-2LE", "ISO-8859-15", 0, 0);
initialize_state(state04);
int j = cvt.length(state03, e_lit, e_lit + size, 5);
VERIFY( j == 5 );
@@ -298,6 +296,5 @@ int main ()
test01();
test02();
#endif
-
return 0;
}
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/unicode/wchar_t.cc b/libstdc++-v3/testsuite/22_locale/codecvt/unicode/wchar_t.cc
index c944865b08f..a03ce95983f 100644
--- a/libstdc++-v3/testsuite/22_locale/codecvt/unicode/wchar_t.cc
+++ b/libstdc++-v3/testsuite/22_locale/codecvt/unicode/wchar_t.cc
@@ -1,6 +1,6 @@
// 2000-08-23 Benjamin Kosnik <bkoz@cygnus.com>
-// Copyright (C) 2000, 2001, 2002 Free Software Foundation
+// Copyright (C) 2000, 2001, 2002, 2003 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
@@ -24,7 +24,6 @@
#include <testsuite_hooks.h>
#ifdef _GLIBCPP_USE___ENC_TRAITS
-#ifdef _GLIBCPP_USE_WCHAR_T
// Need some char_traits specializations for this to work.
typedef unsigned short unicode_t;
@@ -142,7 +141,8 @@ void test01()
const unicode_codecvt& cvt = use_facet<unicode_codecvt>(loc);
// in
- unicode_codecvt::state_type state01("UCS-2BE", "UCS-4BE", 0xfeff, 0);
+ // unicode_codecvt::state_type state01("UCS-2BE", "UCS-4BE", 0xfeff, 0);
+ unicode_codecvt::state_type state01("UCS-2BE", "UCS-4BE", 0, 0);
initialize_state(state01);
result r1 = cvt.in(state01, e_lit, e_lit + size, efrom_next,
i_arr, i_arr + size + 1, ito_next);
@@ -152,7 +152,7 @@ void test01()
VERIFY( ito_next == i_arr + size );
// out
- unicode_codecvt::state_type state02("UCS-2BE", "UCS-4BE", 0xfeff, 0);
+ unicode_codecvt::state_type state02("UCS-2BE", "UCS-4BE", 0, 0);
initialize_state(state02);
result r2 = cvt.out(state02, i_lit, i_lit + size, ifrom_next,
e_arr, e_arr + size, eto_next);
@@ -163,7 +163,7 @@ void test01()
// unshift
ext_traits::copy(e_arr, e_lit, size);
- unicode_codecvt::state_type state03("UCS-2BE", "UCS-4BE", 0xfeff, 0);
+ unicode_codecvt::state_type state03("UCS-2BE", "UCS-4BE", 0, 0);
initialize_state(state03);
result r3 = cvt.unshift(state03, e_arr, e_arr + size, eto_next);
VERIFY( r3 == codecvt_base::noconv );
@@ -175,7 +175,7 @@ void test01()
VERIFY( !cvt.always_noconv() );
- unicode_codecvt::state_type state04("UCS-2BE", "UCS-4BE", 0xfeff, 0);
+ unicode_codecvt::state_type state04("UCS-2BE", "UCS-4BE", 0, 0);
initialize_state(state04);
int j = cvt.length(state03, e_lit, e_lit + size, 5);
VERIFY( j == 5 );
@@ -186,15 +186,12 @@ void test01()
delete [] e_arr;
delete [] i_arr;
}
-#endif // _GLIBCPP_USE_WCHAR_T
#endif // _GLIBCPP_USE___ENC_TRAITS
int main ()
{
#ifdef _GLIBCPP_USE___ENC_TRAITS
-#ifdef _GLIBCPP_USE_WCHAR_T
test01();
-#endif
#endif
return 0;
}