This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[v3] Fix basic_filebuf/overflow/wchar_t testcases


Hi,

some time ago I changed by mistake these testcases: in this
form they are essentially useless.

Fixed with the below, checked on i686-pc-linux-gnu and
x86_64-unknown-linux-gnu.

Paolo.

P.S. The fixed testcases may fail on glibc2.2.x platforms, which
are missing __uselocale and therefore do not properly implement
codecvt::do_max_length()

////////////
2003-11-13  Paolo Carlini  <pcarlini@suse.de>

	* testsuite/27_io/basic_filebuf/overflow/wchar_t/11305-1:
	Fix, closely following the testcase included in the PR.
	* testsuite/27_io/basic_filebuf/overflow/wchar_t/11305-2: Ditto.
	* testsuite/27_io/basic_filebuf/overflow/wchar_t/11305-3: Ditto.
	* testsuite/27_io/basic_filebuf/overflow/wchar_t/11305-4: Ditto.
diff -urN libstdc++-v3-1/testsuite/27_io/basic_filebuf/overflow/wchar_t/11305-1.cc libstdc++-v3/testsuite/27_io/basic_filebuf/overflow/wchar_t/11305-1.cc
--- libstdc++-v3-1/testsuite/27_io/basic_filebuf/overflow/wchar_t/11305-1.cc	2003-09-23 22:02:56.000000000 +0200
+++ libstdc++-v3/testsuite/27_io/basic_filebuf/overflow/wchar_t/11305-1.cc	2003-11-13 15:00:11.000000000 +0100
@@ -32,7 +32,7 @@
   fb.pubimbue(loc);
   fb.pubsetbuf(0, 0);
   fb.open("tmp_11305-1", ios_base::out);
-  wfilebuf::int_type n1 = fb.sputc(L'e');
+  wfilebuf::int_type n1 = fb.sputc(0x20000000);
   wfilebuf* f = fb.close();
   
   VERIFY( n1 != wfilebuf::traits_type::eof() );
diff -urN libstdc++-v3-1/testsuite/27_io/basic_filebuf/overflow/wchar_t/11305-2.cc libstdc++-v3/testsuite/27_io/basic_filebuf/overflow/wchar_t/11305-2.cc
--- libstdc++-v3-1/testsuite/27_io/basic_filebuf/overflow/wchar_t/11305-2.cc	2003-09-23 22:02:56.000000000 +0200
+++ libstdc++-v3/testsuite/27_io/basic_filebuf/overflow/wchar_t/11305-2.cc	2003-11-13 15:00:51.000000000 +0100
@@ -32,8 +32,8 @@
   fb.pubimbue(loc);
   fb.pubsetbuf(0, 0);
   fb.open("tmp_11305-2", ios_base::out);
-  wfilebuf::int_type n1 = fb.sputc(L'n');
-  wfilebuf::int_type n2 = fb.sputc(L'e');
+  wfilebuf::int_type n1 = fb.sputc(0x20000000);
+  wfilebuf::int_type n2 = fb.sputc(0x40000000);
   wfilebuf* f = fb.close();
   
   VERIFY( n1 != wfilebuf::traits_type::eof() );
diff -urN libstdc++-v3-1/testsuite/27_io/basic_filebuf/overflow/wchar_t/11305-3.cc libstdc++-v3/testsuite/27_io/basic_filebuf/overflow/wchar_t/11305-3.cc
--- libstdc++-v3-1/testsuite/27_io/basic_filebuf/overflow/wchar_t/11305-3.cc	2003-09-23 22:02:56.000000000 +0200
+++ libstdc++-v3/testsuite/27_io/basic_filebuf/overflow/wchar_t/11305-3.cc	2003-11-13 15:01:12.000000000 +0100
@@ -31,7 +31,7 @@
   locale loc(__gnu_test::try_named_locale("en_US.UTF-8"));
   fb.pubimbue(loc);
   fb.open("tmp_11305-3", ios_base::out);
-  wfilebuf::int_type n1 = fb.sputc(L'a');
+  wfilebuf::int_type n1 = fb.sputc(0x20000000);
   wfilebuf* f = fb.close();
 	
   VERIFY( n1 != wfilebuf::traits_type::eof() );
diff -urN libstdc++-v3-1/testsuite/27_io/basic_filebuf/overflow/wchar_t/11305-4.cc libstdc++-v3/testsuite/27_io/basic_filebuf/overflow/wchar_t/11305-4.cc
--- libstdc++-v3-1/testsuite/27_io/basic_filebuf/overflow/wchar_t/11305-4.cc	2003-09-23 22:02:56.000000000 +0200
+++ libstdc++-v3/testsuite/27_io/basic_filebuf/overflow/wchar_t/11305-4.cc	2003-11-13 15:01:39.000000000 +0100
@@ -31,8 +31,8 @@
   locale loc(__gnu_test::try_named_locale("en_US.UTF-8"));
   fb.pubimbue(loc);
   fb.open("tmp_11405-4", ios_base::out);
-  wfilebuf::int_type n1 = fb.sputc(L'i');
-  wfilebuf::int_type n2 = fb.sputc(L'a');
+  wfilebuf::int_type n1 = fb.sputc(0x20000000);
+  wfilebuf::int_type n2 = fb.sputc(0x40000000);
   wfilebuf* f = fb.close();
   
   VERIFY( n1 != wfilebuf::traits_type::eof() );

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]