char.cc: Remove bom usage.
authorBenjamin Kosnik <bkoz@redhat.com>
Mon, 28 Apr 2003 14:30:07 +0000 (14:30 +0000)
committerBenjamin Kosnik <bkoz@gcc.gnu.org>
Mon, 28 Apr 2003 14:30:07 +0000 (14:30 +0000)
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.

From-SVN: r66170

libstdc++-v3/ChangeLog
libstdc++-v3/testsuite/22_locale/codecvt/unicode/char.cc
libstdc++-v3/testsuite/22_locale/codecvt/unicode/wchar_t.cc

index 1847d4f4852295d438e162c2431c2436de7f7058..597c68f300f7e2182e0429f3f1920b726a0a5618 100644 (file)
@@ -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
index 51bf9b9600ad4107c36c4ce497d4e9f1f3cea62b..76f67b70aa3e8a7ea5b00521cca475ee1312ffb0 100644 (file)
@@ -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
 // 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;
 }
index c944865b08fd7e7c2c697a57d212f3fe5411fdae..a03ce95983ff4b53d92572aab1f77001aa0851f9 100644 (file)
@@ -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;
 }