diff options
author | bkoz <bkoz@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-04-15 02:06:26 +0000 |
---|---|---|
committer | bkoz <bkoz@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-04-15 02:06:26 +0000 |
commit | c4ffdcdf45caadc3d0c905d22f326e89c4972eaa (patch) | |
tree | d277bbc9b90693315d38e9618610929caedcdec3 /libstdc++-v3/testsuite/22_locale | |
parent | 9ee94b75a1793d1fb6d3fa013d6f62413c8d7f78 (diff) | |
download | gcc-c4ffdcdf45caadc3d0c905d22f326e89c4972eaa.tar.gz |
2005-04-14 Benjamin Kosnik <bkoz@redhat.com>
* include/ext/pod_char_traits.h (__gnu_cxx::character): Add char_type.
(character::to): New.
(character::from): New.
(operator==): Add state parameter.
(operator<): Same.
(char_traits::copy): Use std::copy.
(char_traits::assign): Use std::fill_n.
(char_traits::to_char_type): Use character::from.
(char_traits::to_int_type): Use character::to.
* testsuite/testsuite_character.h (__gnu_test::character): Remove.
(__gnu_test::conversion_state): Remove.
(__gnu_test::pod_char): Remove.
(pod_char): New typedef.
(pod_uchar): New typedef.
(pod_ushort): New typedef.
* testsuite/testsuite_character.cc: Fixups.
* testsuite/21_strings/basic_string/inserters_extractors/pod/
10081-in.cc: Same.
* testsuite/21_strings/basic_string/inserters_extractors/pod/
10081-out.cc: Same.
* testsuite/22_locale/numpunct/members/pod/1.cc: Same.
* testsuite/22_locale/numpunct/members/pod/2.cc: Same.
* testsuite/27_io/basic_filebuf/close/12790-1.cc: Same.
* testsuite/27_io/basic_filebuf/open/12790-1.cc: Same.
* testsuite/27_io/basic_filebuf/seekoff/12790-1.cc: Same.
* testsuite/27_io/basic_filebuf/seekoff/12790-2.cc: Same.
* testsuite/27_io/basic_filebuf/seekoff/12790-3.cc: Same.
* testsuite/27_io/basic_filebuf/seekoff/12790-4.cc: Same.
* testsuite/27_io/basic_filebuf/seekpos/12790-1.cc: Same.
* testsuite/27_io/basic_filebuf/seekpos/12790-2.cc: Same.
* testsuite/27_io/basic_filebuf/seekpos/12790-3.cc: Same.
* testsuite/27_io/basic_ios/imbue/14072.cc: Same.
* testsuite/27_io/basic_istream/extractors_arithmetic/pod/
3983-1.cc: Same.
* testsuite/27_io/basic_istream/extractors_character/pod/
3983-2.cc: Same.
* testsuite/27_io/basic_istream/extractors_other/pod/3983-3.cc: Same.
* testsuite/27_io/basic_istream/sentry/pod/1.cc: Same.
* testsuite/27_io/basic_ostream/sentry/pod/1.cc: Same.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@98165 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/testsuite/22_locale')
-rw-r--r-- | libstdc++-v3/testsuite/22_locale/numpunct/members/pod/1.cc | 30 | ||||
-rw-r--r-- | libstdc++-v3/testsuite/22_locale/numpunct/members/pod/2.cc | 12 |
2 files changed, 21 insertions, 21 deletions
diff --git a/libstdc++-v3/testsuite/22_locale/numpunct/members/pod/1.cc b/libstdc++-v3/testsuite/22_locale/numpunct/members/pod/1.cc index 1410b959fe9..a4d88bc0e44 100644 --- a/libstdc++-v3/testsuite/22_locale/numpunct/members/pod/1.cc +++ b/libstdc++-v3/testsuite/22_locale/numpunct/members/pod/1.cc @@ -30,42 +30,42 @@ void test01() { using namespace std; - using __gnu_test::pod_type; - using __gnu_test::value_type; - typedef numpunct<pod_type>::string_type string_type; - typedef basic_stringbuf<pod_type> stringbuf_type; - typedef basic_ostream<pod_type> ostream_type; + using __gnu_test::pod_ushort; + typedef pod_ushort::value_type value_type; + typedef numpunct<pod_ushort>::string_type string_type; + typedef basic_stringbuf<pod_ushort> stringbuf_type; + typedef basic_ostream<pod_ushort> ostream_type; bool test __attribute__((unused)) = true; // Pre-cache sanity check. - const locale loc(locale::classic(), new numpunct<pod_type>); - const numpunct<pod_type>& np = use_facet<numpunct<pod_type> >(loc); + const locale loc(locale::classic(), new numpunct<pod_ushort>); + const numpunct<pod_ushort>& np = use_facet<numpunct<pod_ushort> >(loc); - pod_type dp = np.decimal_point(); - pod_type ts = np.thousands_sep(); + pod_ushort dp = np.decimal_point(); + pod_ushort ts = np.thousands_sep(); string g = np.grouping(); string_type strue = np.truename(); string_type sfalse = np.falsename(); - pod_type basedp = { value_type('.') }; - pod_type basets = { value_type(',') }; + pod_ushort basedp = { value_type('.') }; + pod_ushort basets = { value_type(',') }; - string_type basetrue(4, pod_type()); + string_type basetrue(4, pod_ushort()); basetrue[0].value = value_type('t'); basetrue[1].value = value_type('r'); basetrue[2].value = value_type('u'); basetrue[3].value = value_type('e'); - string_type basefalse(5, pod_type()); + string_type basefalse(5, pod_ushort()); basefalse[0].value = value_type('f'); basefalse[1].value = value_type('a'); basefalse[2].value = value_type('l'); basefalse[3].value = value_type('s'); basefalse[4].value = value_type('e'); - VERIFY( char_traits<pod_type>::eq(dp, basedp) ); - VERIFY( char_traits<pod_type>::eq(ts, basets) ); + VERIFY( char_traits<pod_ushort>::eq(dp, basedp) ); + VERIFY( char_traits<pod_ushort>::eq(ts, basets) ); VERIFY( g == "" ); VERIFY( strue == basetrue ); VERIFY( sfalse == basefalse ); diff --git a/libstdc++-v3/testsuite/22_locale/numpunct/members/pod/2.cc b/libstdc++-v3/testsuite/22_locale/numpunct/members/pod/2.cc index d0d380cd2d4..a6c6d3fcae0 100644 --- a/libstdc++-v3/testsuite/22_locale/numpunct/members/pod/2.cc +++ b/libstdc++-v3/testsuite/22_locale/numpunct/members/pod/2.cc @@ -30,10 +30,10 @@ void test01() { using namespace std; - using __gnu_test::pod_type; + using __gnu_test::pod_ushort; - typedef numpunct<pod_type>::string_type string_type; - typedef basic_ostringstream<pod_type> ostream_type; + typedef numpunct<pod_ushort>::string_type string_type; + typedef basic_ostringstream<pod_ushort> ostream_type; bool test = true; @@ -58,7 +58,7 @@ void test01() VERIFY( test ); // 2: fail, no ctype - const locale loc2(loc, new num_put<pod_type>); + const locale loc2(loc, new num_put<pod_ushort>); os.clear(); os.imbue(loc2); try @@ -74,7 +74,7 @@ void test01() VERIFY( test ); // 3: fail, no numpunct - const locale loc3(loc2, new ctype<pod_type>); + const locale loc3(loc2, new ctype<pod_ushort>); os.clear(); os.imbue(loc3); try @@ -90,7 +90,7 @@ void test01() VERIFY( test ); // 4: works. - const locale loc4(loc3, new numpunct<pod_type>); + const locale loc4(loc3, new numpunct<pod_ushort>); os.clear(); os.imbue(loc4); try |