summaryrefslogtreecommitdiff
path: root/libstdc++-v3/testsuite
diff options
context:
space:
mode:
authorBenjamin Kosnik <bkoz@redhat.com>2003-09-25 16:37:24 +0000
committerBenjamin Kosnik <bkoz@gcc.gnu.org>2003-09-25 16:37:24 +0000
commit465ad0c7120cda4a1215c14f30e3b418ab89b1a4 (patch)
tree2fac0f31f5522326e93dba0228ecf56f4a5cf306 /libstdc++-v3/testsuite
parent6cbaf0385b0bc1ccb27362a569ad668460c2ed2d (diff)
downloadgcc-465ad0c7120cda4a1215c14f30e3b418ab89b1a4.tar.gz
ctype_members.cc (ctype<wchar_t>::do_is): Fix.
2003-09-25 Benjamin Kosnik <bkoz@redhat.com> * config/locale/gnu/ctype_members.cc (ctype<wchar_t>::do_is): Fix. * config/locale/generic/ctype_members.cc: Same. * testsuite/22_locale/ctype/is/char/1.cc: Initialize mask. * testsuite/22_locale/ctype/is/wchar_t/1.cc: Same. * config/os/generic/ctype_inline.h: Update. From-SVN: r71780
Diffstat (limited to 'libstdc++-v3/testsuite')
-rw-r--r--libstdc++-v3/testsuite/22_locale/ctype/is/char/1.cc12
-rw-r--r--libstdc++-v3/testsuite/22_locale/ctype/is/wchar_t/1.cc17
2 files changed, 16 insertions, 13 deletions
diff --git a/libstdc++-v3/testsuite/22_locale/ctype/is/char/1.cc b/libstdc++-v3/testsuite/22_locale/ctype/is/char/1.cc
index 523044f6d32..4900665eb55 100644
--- a/libstdc++-v3/testsuite/22_locale/ctype/is/char/1.cc
+++ b/libstdc++-v3/testsuite/22_locale/ctype/is/char/1.cc
@@ -97,9 +97,8 @@ void test01()
const char_type* cc2 = NULL;
cc0 = strlit00;
- m01[0] = m00;
- m01[1] = m00;
- m01[2] = m00;
+ for (std::size_t i = 0; i < 3; ++i)
+ m01[i] = m00;
cc1 = gctype.is(cc0, cc0, m01);
VERIFY( cc1 == strlit00 );
VERIFY( m01[0] == m00 );
@@ -107,9 +106,8 @@ void test01()
VERIFY( m01[2] == m00 );
cc0 = strlit00;
- m01[0] = m00;
- m01[1] = m00;
- m01[2] = m00;
+ for (std::size_t i = 0; i < 3; ++i)
+ m01[i] = m00;
cc2 = gctype.is(cc0, cc0 + 3, m01);
VERIFY( cc2 == strlit00 + 3);
VERIFY( m01[0] != m00 );
@@ -120,6 +118,8 @@ void test01()
VERIFY( gctype.is(m01[2], cc0[2]) );
cc0 = strlit01;
+ for (std::size_t i = 0; i < 13; ++i)
+ m02[i] = m00;
cc1 = gctype.is(cc0, cc0 + 13, m02);
VERIFY( cc1 == strlit01 + 13);
VERIFY( m02[6] != m00 );
diff --git a/libstdc++-v3/testsuite/22_locale/ctype/is/wchar_t/1.cc b/libstdc++-v3/testsuite/22_locale/ctype/is/wchar_t/1.cc
index 29fdfe97c7e..48cd849d622 100644
--- a/libstdc++-v3/testsuite/22_locale/ctype/is/wchar_t/1.cc
+++ b/libstdc++-v3/testsuite/22_locale/ctype/is/wchar_t/1.cc
@@ -94,30 +94,34 @@ void test01()
std::ctype_base::mask m02[13];
const char_type* cc0 = strlit00;
const char_type* cc1 = NULL;
+ const char_type* cc2 = NULL;
cc0 = strlit00;
- m01[0] = m00;
- m01[1] = m00;
- m01[2] = m00;
+ for (std::size_t i = 0; i < 3; ++i)
+ m01[i] = m00;
cc1 = gctype.is(cc0, cc0, m01);
VERIFY( cc1 == strlit00 );
VERIFY( m01[0] == m00 );
VERIFY( m01[1] == m00 );
VERIFY( m01[2] == m00 );
-#if 0
+ cc0 = strlit00;
+ for (std::size_t i = 0; i < 3; ++i)
+ m01[i] = m00;
+ cc2 = gctype.is(cc0, cc0 + 3, m01);
+ VERIFY( cc2 == strlit00 + 3);
VERIFY( m01[0] != m00 );
VERIFY( m01[1] != m00 );
VERIFY( m01[2] != m00 );
VERIFY( gctype.is(m01[0], cc0[0]) );
VERIFY( gctype.is(m01[1], cc0[1]) );
VERIFY( gctype.is(m01[2], cc0[2]) );
-#endif
cc0 = strlit01;
+ for (std::size_t i = 0; i < 13; ++i)
+ m02[i] = m00;
cc1 = gctype.is(cc0, cc0 + 13, m02);
VERIFY( cc1 == strlit01 + 13);
-#if 0
VERIFY( m02[6] != m00 );
VERIFY( m02[7] != m00 );
VERIFY( m02[8] != m00 );
@@ -131,7 +135,6 @@ void test01()
VERIFY( gctype.is(m02[6], cc0[6]) );
VERIFY( gctype.is(m02[7], cc0[7]) );
VERIFY( gctype.is(m02[8], cc0[8]) );
-#endif
}
int main()