OSDN Git Service

2003-01-21 Benjamin Kosnik <bkoz@redhat.com>
authorbkoz <bkoz@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 21 Jan 2003 15:29:19 +0000 (15:29 +0000)
committerbkoz <bkoz@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 21 Jan 2003 15:29:19 +0000 (15:29 +0000)
Reshuffle 22_locale testsuite.
* 22_locale/(codecvt.cc money_get.cc
codecvt_members_char_char.cc money_get_members_char.cc
codecvt_members_unicode_char.cc money_get_members_wchar_t.cc
codecvt_members_unicode_wchar_t.cc moneypunct_byname.cc
codecvt_members_wchar_t_char.cc moneypunct.cc collate_byname.cc
moneypunct_members_char.cc collate.cc moneypunct_members_wchar_t.cc
collate_members_char.cc money_put.cc collate_members_wchar_t.cc
money_put_members_char.cc ctor_copy_dtor.cc
money_put_members_wchar_t.cc ctype.cc num_get.cc ctype_is_char.cc
num_get_members_char.cc ctype_is_wchar_t.cc num_get_members_wchar_t.cc
ctype_members_char.cc numpunct_byname.cc ctype_members_wchar_t.cc
numpunct.cc ctype_narrow_char.cc numpunct_members_char.cc
ctype_narrow_wchar_t.cc numpunct_members_wchar_t.cc ctype_scan_char.cc
num_put.cc ctype_scan_wchar_t.cc num_put_members_char.cc
ctype_to_char.cc num_put_members_wchar_t.cc ctype_to_wchar_t.cc
operators.cc ctype_widen_char.cc static_members.cc
ctype_widen_wchar_t.cc time_get.cc facet.cc time_get_members_char.cc
global_templates.cc time_get_members_wchar_t.cc, members.cc,
time_put.cc, messages_byname.cc, time_put_members_char.cc,
messages.cc, time_put_members_wchar_t.cc, messages_members_char.cc):
Splint up into individual test cases...
* 22_locale/codecvt/1.cc: New.
* 22_locale/codecvt/2.cc: New.
* 22_locale/codecvt/always_noconv/char/1.cc: New.
* 22_locale/codecvt/always_noconv/char/wrapped_env.cc: New.
* 22_locale/codecvt/always_noconv/char/wrapped_locale.cc: New.
* 22_locale/codecvt/always_noconv/wchar_t/1.cc: New.
* 22_locale/codecvt/always_noconv/wchar_t/wrapped_env.cc: New.
* 22_locale/codecvt/always_noconv/wchar_t/wrapped_locale.cc: New.
* 22_locale/codecvt/encoding/char/1.cc: New.
* 22_locale/codecvt/encoding/char/wrapped_env.cc: New.
* 22_locale/codecvt/encoding/char/wrapped_locale.cc: New.
* 22_locale/codecvt/encoding/wchar_t/1.cc: New.
* 22_locale/codecvt/encoding/wchar_t/wrapped_env.cc: New.
* 22_locale/codecvt/encoding/wchar_t/wrapped_locale.cc: New.
* 22_locale/codecvt/in/char/1.cc: New.
* 22_locale/codecvt/in/char/wrapped_env.cc: New.
* 22_locale/codecvt/in/char/wrapped_locale.cc: New.
* 22_locale/codecvt/in/wchar_t/1.cc: New.
* 22_locale/codecvt/in/wchar_t/wrapped_env.cc: New.
* 22_locale/codecvt/in/wchar_t/wrapped_locale.cc: New.
* 22_locale/codecvt/length/char/1.cc: New.
* 22_locale/codecvt/length/char/wrapped_env.cc: New.
* 22_locale/codecvt/length/char/wrapped_locale.cc: New.
* 22_locale/codecvt/length/wchar_t/1.cc: New.
* 22_locale/codecvt/length/wchar_t/wrapped_env.cc: New.
* 22_locale/codecvt/length/wchar_t/wrapped_locale.cc: New.
* 22_locale/codecvt/max_length/char/1.cc: New.
* 22_locale/codecvt/max_length/char/wrapped_env.cc: New.
* 22_locale/codecvt/max_length/char/wrapped_locale.cc: New.
* 22_locale/codecvt/max_length/wchar_t/1.cc: New.
* 22_locale/codecvt/max_length/wchar_t/wrapped_env.cc: New.
* 22_locale/codecvt/max_length/wchar_t/wrapped_locale.cc: New.
* 22_locale/codecvt/out/char/1.cc: New.
* 22_locale/codecvt/out/char/wrapped_env.cc: New.
* 22_locale/codecvt/out/char/wrapped_locale.cc: New.
* 22_locale/codecvt/out/wchar_t/1.cc: New.
* 22_locale/codecvt/out/wchar_t/wrapped_env.cc: New.
* 22_locale/codecvt/out/wchar_t/wrapped_locale.cc: New.
* 22_locale/codecvt/unicode/char.cc: New.
* 22_locale/codecvt/unicode/wchar_t.cc: New.
* 22_locale/codecvt/unshift/char/1.cc: New.
* 22_locale/codecvt/unshift/char/wrapped_env.cc: New.
* 22_locale/codecvt/unshift/char/wrapped_locale.cc: New.
* 22_locale/codecvt/unshift/wchar_t/1.cc: New.
* 22_locale/codecvt/unshift/wchar_t/wrapped_env.cc: New.
* 22_locale/codecvt/unshift/wchar_t/wrapped_locale.cc: New.
* 22_locale/collate/1.cc: New.
* 22_locale/collate/2.cc: New.
* 22_locale/collate/compare/char/1.cc: New.
* 22_locale/collate/compare/char/2.cc: New.
* 22_locale/collate/compare/char/wrapped_env.cc: New.
* 22_locale/collate/compare/char/wrapped_locale.cc: New.
* 22_locale/collate/compare/wchar_t/1.cc: New.
* 22_locale/collate/compare/wchar_t/2.cc: New.
* 22_locale/collate/compare/wchar_t/wrapped_env.cc: New.
* 22_locale/collate/compare/wchar_t/wrapped_locale.cc: New.
* 22_locale/collate/hash/char/1.cc: New.
* 22_locale/collate/hash/char/2.cc: New.
* 22_locale/collate/hash/char/wrapped_env.cc: New.
* 22_locale/collate/hash/char/wrapped_locale.cc: New.
* 22_locale/collate/hash/wchar_t/1.cc: New.
* 22_locale/collate/hash/wchar_t/2.cc: New.
* 22_locale/collate/hash/wchar_t/wrapped_env.cc: New.
* 22_locale/collate/hash/wchar_t/wrapped_locale.cc: New.
* 22_locale/collate/transform/char/2.cc: New.
* 22_locale/collate/transform/char/wrapped_env.cc: New.
* 22_locale/collate/transform/char/wrapped_locale.cc: New.
* 22_locale/collate/transform/wchar_t/2.cc: New.
* 22_locale/collate/transform/wchar_t/wrapped_env.cc: New.
* 22_locale/collate/transform/wchar_t/wrapped_locale.cc: New.
* 22_locale/collate_byname/1.cc: New.
* 22_locale/ctype/1.cc: New.
* 22_locale/ctype/2.cc: New.
* 22_locale/ctype/cons/char/1.cc: New.
* 22_locale/ctype/cons/char/wrapped_env.cc: New.
* 22_locale/ctype/cons/char/wrapped_locale.cc: New.
* 22_locale/ctype/is/char/1.cc: New.
* 22_locale/ctype/is/char/2.cc: New.
* 22_locale/ctype/is/char/3.cc: New.
* 22_locale/ctype/is/char/wrapped_env.cc: New.
* 22_locale/ctype/is/char/wrapped_locale.cc: New.
* 22_locale/ctype/is/wchar_t/1.cc: New.
* 22_locale/ctype/is/wchar_t/2.cc: New.
* 22_locale/ctype/is/wchar_t/wrapped_env.cc: New.
* 22_locale/ctype/is/wchar_t/wrapped_locale.cc: New.
* 22_locale/ctype/narrow/char/1.cc: New.
* 22_locale/ctype/narrow/char/2.cc: New.
* 22_locale/ctype/narrow/char/wrapped_env.cc: New.
* 22_locale/ctype/narrow/char/wrapped_locale.cc: New.
* 22_locale/ctype/narrow/wchar_t/1.cc: New.
* 22_locale/ctype/narrow/wchar_t/2.cc: New.
* 22_locale/ctype/narrow/wchar_t/wrapped_env.cc: New.
* 22_locale/ctype/narrow/wchar_t/wrapped_locale.cc: New.
* 22_locale/ctype/scan/char/1.cc: New.
* 22_locale/ctype/scan/char/wrapped_env.cc: New.
* 22_locale/ctype/scan/char/wrapped_locale.cc: New.
* 22_locale/ctype/scan/wchar_t/1.cc: New.
* 22_locale/ctype/scan/wchar_t/wrapped_env.cc: New.
* 22_locale/ctype/scan/wchar_t/wrapped_locale.cc: New.
* 22_locale/ctype/to/char/1.cc: New.
* 22_locale/ctype/to/char/wrapped_env.cc: New.
* 22_locale/ctype/to/char/wrapped_locale.cc: New.
* 22_locale/ctype/to/wchar_t/1.cc: New.
* 22_locale/ctype/to/wchar_t/wrapped_env.cc: New.
* 22_locale/ctype/to/wchar_t/wrapped_locale.cc: New.
* 22_locale/ctype/widen/char/1.cc: New.
* 22_locale/ctype/widen/char/wrapped_env.cc: New.
* 22_locale/ctype/widen/char/wrapped_locale.cc: New.
* 22_locale/ctype/widen/wchar_t/1.cc: New.
* 22_locale/ctype/widen/wchar_t/wrapped_env.cc: New.
* 22_locale/ctype/widen/wchar_t/wrapped_locale.cc: New.
* 22_locale/facet/1.cc: New.
* 22_locale/facet/2.cc: New.
* 22_locale/global_templates/1.cc: New.
* 22_locale/locale/cons/1.cc: New.
* 22_locale/locale/cons/2.cc: New.
* 22_locale/locale/cons/3.cc: New.
* 22_locale/locale/cons/4.cc: New.
* 22_locale/locale/cons/5.cc: New.
* 22_locale/locale/cons/6.cc: New.
* 22_locale/locale/cons/7.cc: New.
* 22_locale/locale/global_locale_objects/1.cc: New.
* 22_locale/locale/global_locale_objects/2.cc: New.
* 22_locale/locale/global_locale_objects/3.cc: New.
* 22_locale/locale/operations/1.cc: New.
* 22_locale/locale/operations/2.cc: New.
* 22_locale/messages/1.cc: New.
* 22_locale/messages/2.cc: New.
* 22_locale/messages/members/char/1.cc: New.
* 22_locale/messages/members/char/2.cc: New.
* 22_locale/messages/members/char/3.cc: New.
* 22_locale/messages/members/char/wrapped_env.cc: New.
* 22_locale/messages/members/char/wrapped_locale.cc: New.
* 22_locale/messages_byname/1.cc: New.
* 22_locale/money_get/1.cc: New.
* 22_locale/money_get/2.cc: New.
* 22_locale/money_get/get/char/1.cc: New.
* 22_locale/money_get/get/char/2.cc: New.
* 22_locale/money_get/get/char/3.cc: New.
* 22_locale/money_get/get/char/4.cc: New.
* 22_locale/money_get/get/char/5.cc: New.
* 22_locale/money_get/get/char/6.cc: New.
* 22_locale/money_get/get/char/7.cc: New.
* 22_locale/money_get/get/char/8.cc: New.
* 22_locale/money_get/get/char/wrapped_env.cc: New.
* 22_locale/money_get/get/char/wrapped_locale.cc: New.
* 22_locale/money_get/get/wchar_t/1.cc: New.
* 22_locale/money_get/get/wchar_t/2.cc: New.
* 22_locale/money_get/get/wchar_t/3.cc: New.
* 22_locale/money_get/get/wchar_t/4.cc: New.
* 22_locale/money_get/get/wchar_t/5.cc: New.
* 22_locale/money_get/get/wchar_t/6.cc: New.
* 22_locale/money_get/get/wchar_t/7.cc: New.
* 22_locale/money_get/get/wchar_t/8.cc: New.
* 22_locale/money_get/get/wchar_t/wrapped_env.cc: New.
* 22_locale/money_get/get/wchar_t/wrapped_locale.cc: New.
* 22_locale/money_put/1.cc: New.
* 22_locale/money_put/2.cc: New.
* 22_locale/money_put/put/char/1.cc: New.
* 22_locale/money_put/put/char/2.cc: New.
* 22_locale/money_put/put/char/3.cc: New.
* 22_locale/money_put/put/char/4.cc: New.
* 22_locale/money_put/put/char/5.cc: New.
* 22_locale/money_put/put/char/6.cc: New.
* 22_locale/money_put/put/char/wrapped_env.cc: New.
* 22_locale/money_put/put/char/wrapped_locale.cc: New.
* 22_locale/money_put/put/wchar_t/1.cc: New.
* 22_locale/money_put/put/wchar_t/2.cc: New.
* 22_locale/money_put/put/wchar_t/3.cc: New.
* 22_locale/money_put/put/wchar_t/4.cc: New.
* 22_locale/money_put/put/wchar_t/5.cc: New.
* 22_locale/money_put/put/wchar_t/6.cc: New.
* 22_locale/money_put/put/wchar_t/wrapped_env.cc: New.
* 22_locale/money_put/put/wchar_t/wrapped_locale.cc: New.
* 22_locale/moneypunct/1.cc: New.
* 22_locale/moneypunct/2.cc: New.
* 22_locale/moneypunct/3.cc: New.
* 22_locale/moneypunct/members/char/1.cc: New.
* 22_locale/moneypunct/members/char/2.cc: New.
* 22_locale/moneypunct/members/char/wrapped_env.cc: New.
* 22_locale/moneypunct/members/char/wrapped_locale.cc: New.
* 22_locale/moneypunct/members/wchar_t/1.cc: New.
* 22_locale/moneypunct/members/wchar_t/2.cc: New.
* 22_locale/moneypunct/members/wchar_t/wrapped_env.cc: New.
* 22_locale/moneypunct/members/wchar_t/wrapped_locale.cc: New.
* 22_locale/moneypunct_byname/1.cc: New.
* 22_locale/num_get/1.cc: New.
* 22_locale/num_get/2.cc: New.
* 22_locale/num_get/get/char/1.cc: New.
* 22_locale/num_get/get/char/2.cc: New.
* 22_locale/num_get/get/char/3.cc: New.
* 22_locale/num_get/get/char/4.cc: New.
* 22_locale/num_get/get/char/5.cc: New.
* 22_locale/num_get/get/char/6.cc: New.
* 22_locale/num_get/get/char/wrapped_env.cc: New.
* 22_locale/num_get/get/char/wrapped_locale.cc: New.
* 22_locale/num_get/get/wchar_t/1.cc: New.
* 22_locale/num_get/get/wchar_t/2.cc: New.
* 22_locale/num_get/get/wchar_t/3.cc: New.
* 22_locale/num_get/get/wchar_t/4.cc: New.
* 22_locale/num_get/get/wchar_t/5.cc: New.
* 22_locale/num_get/get/wchar_t/6.cc: New.
* 22_locale/num_get/get/wchar_t/wrapped_env.cc: New.
* 22_locale/num_get/get/wchar_t/wrapped_locale.cc: New.
* 22_locale/num_put/1.cc: New.
* 22_locale/num_put/2.cc: New.
* 22_locale/num_put/put/char/1.cc: New.
* 22_locale/num_put/put/char/2.cc: New.
* 22_locale/num_put/put/char/3.cc: New.
* 22_locale/num_put/put/char/4.cc: New.
* 22_locale/num_put/put/char/5.cc: New.
* 22_locale/num_put/put/char/wrapped_env.cc: New.
* 22_locale/num_put/put/char/wrapped_locale.cc: New.
* 22_locale/num_put/put/wchar_t/1.cc: New.
* 22_locale/num_put/put/wchar_t/2.cc: New.
* 22_locale/num_put/put/wchar_t/3.cc: New.
* 22_locale/num_put/put/wchar_t/4.cc: New.
* 22_locale/num_put/put/wchar_t/5.cc: New.
* 22_locale/num_put/put/wchar_t/wrapped_env.cc: New.
* 22_locale/num_put/put/wchar_t/wrapped_locale.cc: New.
* 22_locale/numpunct/1.cc: New.
* 22_locale/numpunct/2.cc: New.
* 22_locale/numpunct/members/char/1.cc: New.
* 22_locale/numpunct/members/char/2.cc: New.
* 22_locale/numpunct/members/char/wrapped_env.cc: New.
* 22_locale/numpunct/members/char/wrapped_locale.cc: New.
* 22_locale/numpunct/members/wchar_t/1.cc: New.
* 22_locale/numpunct/members/wchar_t/2.cc: New.
* 22_locale/numpunct/members/wchar_t/wrapped_env.cc: New.
* 22_locale/numpunct/members/wchar_t/wrapped_locale.cc: New.
* 22_locale/numpunct_byname/1.cc: New.
* 22_locale/numpunct_byname/2.cc: New.
* 22_locale/time_get/1.cc: New.
* 22_locale/time_get/2.cc: New.
* 22_locale/time_get/date_order/char/1.cc: New.
* 22_locale/time_get/date_order/char/wrapped_env.cc: New.
* 22_locale/time_get/date_order/char/wrapped_locale.cc: New.
* 22_locale/time_get/date_order/wchar_t/1.cc: New.
* 22_locale/time_get/date_order/wchar_t/wrapped_env.cc: New.
* 22_locale/time_get/date_order/wchar_t/wrapped_locale.cc: New.
* 22_locale/time_get/get_date/char/1.cc: New.
* 22_locale/time_get/get_date/char/2.cc: New.
* 22_locale/time_get/get_date/char/3.cc: New.
* 22_locale/time_get/get_date/char/wrapped_env.cc: New.
* 22_locale/time_get/get_date/char/wrapped_locale.cc: New.
* 22_locale/time_get/get_date/wchar_t/1.cc: New.
* 22_locale/time_get/get_date/wchar_t/2.cc: New.
* 22_locale/time_get/get_date/wchar_t/3.cc: New.
* 22_locale/time_get/get_date/wchar_t/wrapped_env.cc: New.
* 22_locale/time_get/get_date/wchar_t/wrapped_locale.cc: New.
* 22_locale/time_get/get_monthname/char/1.cc: New.
* 22_locale/time_get/get_monthname/char/2.cc: New.
* 22_locale/time_get/get_monthname/char/3.cc: New.
* 22_locale/time_get/get_monthname/char/wrapped_env.cc: New.
* 22_locale/time_get/get_monthname/char/wrapped_locale.cc: New.
* 22_locale/time_get/get_monthname/wchar_t/1.cc: New.
* 22_locale/time_get/get_monthname/wchar_t/2.cc: New.
* 22_locale/time_get/get_monthname/wchar_t/3.cc: New.
* 22_locale/time_get/get_monthname/wchar_t/wrapped_env.cc: New.
* 22_locale/time_get/get_monthname/wchar_t/wrapped_locale.cc: New.
* 22_locale/time_get/get_time/char/1.cc: New.
* 22_locale/time_get/get_time/char/2.cc: New.
* 22_locale/time_get/get_time/char/3.cc: New.
* 22_locale/time_get/get_time/char/wrapped_env.cc: New.
* 22_locale/time_get/get_time/char/wrapped_locale.cc: New.
* 22_locale/time_get/get_time/wchar_t/1.cc: New.
* 22_locale/time_get/get_time/wchar_t/2.cc: New.
* 22_locale/time_get/get_time/wchar_t/3.cc: New.
* 22_locale/time_get/get_time/wchar_t/wrapped_env.cc: New.
* 22_locale/time_get/get_time/wchar_t/wrapped_locale.cc: New.
* 22_locale/time_get/get_weekday/char/1.cc: New.
* 22_locale/time_get/get_weekday/char/2.cc: New.
* 22_locale/time_get/get_weekday/char/3.cc: New.
* 22_locale/time_get/get_weekday/char/wrapped_env.cc: New.
* 22_locale/time_get/get_weekday/char/wrapped_locale.cc: New.
* 22_locale/time_get/get_weekday/wchar_t/1.cc: New.
* 22_locale/time_get/get_weekday/wchar_t/2.cc: New.
* 22_locale/time_get/get_weekday/wchar_t/3.cc: New.
* 22_locale/time_get/get_weekday/wchar_t/wrapped_env.cc: New.
* 22_locale/time_get/get_weekday/wchar_t/wrapped_locale.cc: New.
* 22_locale/time_get/get_year/char/1.cc: New.
* 22_locale/time_get/get_year/char/3.cc: New.
* 22_locale/time_get/get_year/char/wrapped_env.cc: New.
* 22_locale/time_get/get_year/char/wrapped_locale.cc: New.
* 22_locale/time_get/get_year/wchar_t/1.cc: New.
* 22_locale/time_get/get_year/wchar_t/3.cc: New.
* 22_locale/time_get/get_year/wchar_t/wrapped_env.cc: New.
* 22_locale/time_get/get_year/wchar_t/wrapped_locale.cc: New.
* 22_locale/time_put/1.cc: New.
* 22_locale/time_put/2.cc: New.
* 22_locale/time_put/put/char/1.cc: New.
* 22_locale/time_put/put/char/10.cc: New.
* 22_locale/time_put/put/char/2.cc: New.
* 22_locale/time_put/put/char/3.cc: New.
* 22_locale/time_put/put/char/4.cc: New.
* 22_locale/time_put/put/char/5.cc: New.
* 22_locale/time_put/put/char/6.cc: New.
* 22_locale/time_put/put/char/7.cc: New.
* 22_locale/time_put/put/char/8.cc: New.
* 22_locale/time_put/put/char/9.cc: New.
* 22_locale/time_put/put/char/wrapped_env.cc: New.
* 22_locale/time_put/put/char/wrapped_locale.cc: New.
* 22_locale/time_put/put/wchar_t/1.cc: New.
* 22_locale/time_put/put/wchar_t/10.cc: New.
* 22_locale/time_put/put/wchar_t/2.cc: New.
* 22_locale/time_put/put/wchar_t/3.cc: New.
* 22_locale/time_put/put/wchar_t/4.cc: New.
* 22_locale/time_put/put/wchar_t/5.cc: New.
* 22_locale/time_put/put/wchar_t/6.cc: New.
* 22_locale/time_put/put/wchar_t/7.cc: New.
* 22_locale/time_put/put/wchar_t/8.cc: New.
* 22_locale/time_put/put/wchar_t/9.cc: New.
* 22_locale/time_put/put/wchar_t/wrapped_env.cc: New.
* 22_locale/time_put/put/wchar_t/wrapped_locale.cc: New.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@61548 138bc75d-0d04-0410-961f-82ee72b054a4

328 files changed:
libstdc++-v3/ChangeLog
libstdc++-v3/testsuite/22_locale/codecvt/1.cc [moved from libstdc++-v3/testsuite/22_locale/codecvt.cc with 83% similarity]
libstdc++-v3/testsuite/22_locale/codecvt/2.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/codecvt/always_noconv/char/1.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/codecvt/always_noconv/char/wrapped_env.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/codecvt/always_noconv/char/wrapped_locale.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/codecvt/always_noconv/wchar_t/1.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/codecvt/always_noconv/wchar_t/wrapped_env.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/codecvt/always_noconv/wchar_t/wrapped_locale.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/codecvt/encoding/char/1.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/codecvt/encoding/char/wrapped_env.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/codecvt/encoding/char/wrapped_locale.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/codecvt/encoding/wchar_t/1.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/codecvt/encoding/wchar_t/wrapped_env.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/codecvt/encoding/wchar_t/wrapped_locale.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/codecvt/in/char/1.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/codecvt/in/char/wrapped_env.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/codecvt/in/char/wrapped_locale.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/1.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/wrapped_env.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/wrapped_locale.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/codecvt/length/char/1.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/codecvt/length/char/wrapped_env.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/codecvt/length/char/wrapped_locale.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/codecvt/length/wchar_t/1.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/codecvt/length/wchar_t/wrapped_env.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/codecvt/length/wchar_t/wrapped_locale.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/codecvt/max_length/char/1.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/codecvt/max_length/char/wrapped_env.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/codecvt/max_length/char/wrapped_locale.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/codecvt/max_length/wchar_t/1.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/codecvt/max_length/wchar_t/wrapped_env.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/codecvt/max_length/wchar_t/wrapped_locale.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/codecvt/out/char/1.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/codecvt/out/char/wrapped_env.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/codecvt/out/char/wrapped_locale.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/codecvt/out/wchar_t/1.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/codecvt/out/wchar_t/wrapped_env.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/codecvt/out/wchar_t/wrapped_locale.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/codecvt/unicode/char.cc [moved from libstdc++-v3/testsuite/22_locale/codecvt_members_unicode_char.cc with 100% similarity]
libstdc++-v3/testsuite/22_locale/codecvt/unicode/wchar_t.cc [moved from libstdc++-v3/testsuite/22_locale/codecvt_members_unicode_wchar_t.cc with 100% similarity]
libstdc++-v3/testsuite/22_locale/codecvt/unshift/char/1.cc [moved from libstdc++-v3/testsuite/22_locale/codecvt_members_char_char.cc with 71% similarity]
libstdc++-v3/testsuite/22_locale/codecvt/unshift/char/wrapped_env.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/codecvt/unshift/char/wrapped_locale.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/codecvt/unshift/wchar_t/1.cc [moved from libstdc++-v3/testsuite/22_locale/codecvt_members_wchar_t_char.cc with 70% similarity]
libstdc++-v3/testsuite/22_locale/codecvt/unshift/wchar_t/wrapped_env.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/codecvt/unshift/wchar_t/wrapped_locale.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/collate/1.cc [moved from libstdc++-v3/testsuite/22_locale/collate.cc with 87% similarity]
libstdc++-v3/testsuite/22_locale/collate/2.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/collate/compare/char/1.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/collate/compare/char/2.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/collate/compare/char/wrapped_env.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/collate/compare/char/wrapped_locale.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/collate/compare/wchar_t/1.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/collate/compare/wchar_t/2.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/collate/compare/wchar_t/wrapped_env.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/collate/compare/wchar_t/wrapped_locale.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/collate/hash/char/1.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/collate/hash/char/2.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/collate/hash/char/wrapped_env.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/collate/hash/char/wrapped_locale.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/collate/hash/wchar_t/1.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/collate/hash/wchar_t/2.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/collate/hash/wchar_t/wrapped_env.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/collate/hash/wchar_t/wrapped_locale.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/collate/transform/char/2.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/collate/transform/char/wrapped_env.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/collate/transform/char/wrapped_locale.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/collate/transform/wchar_t/2.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/collate/transform/wchar_t/wrapped_env.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/collate/transform/wchar_t/wrapped_locale.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/collate_byname/1.cc [moved from libstdc++-v3/testsuite/22_locale/collate_byname.cc with 97% similarity]
libstdc++-v3/testsuite/22_locale/collate_members_char.cc [deleted file]
libstdc++-v3/testsuite/22_locale/collate_members_wchar_t.cc [deleted file]
libstdc++-v3/testsuite/22_locale/ctype/1.cc [moved from libstdc++-v3/testsuite/22_locale/ctype.cc with 95% similarity]
libstdc++-v3/testsuite/22_locale/ctype/2.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/ctype/cons/char/1.cc [moved from libstdc++-v3/testsuite/22_locale/ctype_members_char.cc with 75% similarity]
libstdc++-v3/testsuite/22_locale/ctype/cons/char/wrapped_env.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/ctype/cons/char/wrapped_locale.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/ctype/is/char/1.cc [moved from libstdc++-v3/testsuite/22_locale/ctype_is_char.cc with 62% similarity]
libstdc++-v3/testsuite/22_locale/ctype/is/char/2.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/ctype/is/char/wrapped_env.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/ctype/is/wchar_t/1.cc [moved from libstdc++-v3/testsuite/22_locale/ctype_is_wchar_t.cc with 81% similarity]
libstdc++-v3/testsuite/22_locale/ctype/is/wchar_t/2.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/ctype/is/wchar_t/wrapped_env.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/ctype/is/wchar_t/wrapped_locale.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/ctype/narrow/char/1.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/ctype/narrow/char/2.cc [moved from libstdc++-v3/testsuite/22_locale/ctype_narrow_char.cc with 72% similarity]
libstdc++-v3/testsuite/22_locale/ctype/narrow/char/wrapped_env.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/ctype/narrow/char/wrapped_locale.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/ctype/narrow/wchar_t/1.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/ctype/narrow/wchar_t/2.cc [moved from libstdc++-v3/testsuite/22_locale/ctype_narrow_wchar_t.cc with 70% similarity]
libstdc++-v3/testsuite/22_locale/ctype/narrow/wchar_t/wrapped_env.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/ctype/narrow/wchar_t/wrapped_locale.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/ctype/scan/char/1.cc [moved from libstdc++-v3/testsuite/22_locale/ctype_scan_char.cc with 100% similarity]
libstdc++-v3/testsuite/22_locale/ctype/scan/char/wrapped_env.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/ctype/scan/char/wrapped_locale.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/ctype/scan/wchar_t/1.cc [moved from libstdc++-v3/testsuite/22_locale/ctype_scan_wchar_t.cc with 100% similarity]
libstdc++-v3/testsuite/22_locale/ctype/scan/wchar_t/wrapped_locale.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/ctype/to/char/1.cc [moved from libstdc++-v3/testsuite/22_locale/ctype_to_char.cc with 81% similarity]
libstdc++-v3/testsuite/22_locale/ctype/to/char/wrapped_env.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/ctype/to/char/wrapped_locale.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/ctype/to/wchar_t/1.cc [moved from libstdc++-v3/testsuite/22_locale/ctype_to_wchar_t.cc with 80% similarity]
libstdc++-v3/testsuite/22_locale/ctype/to/wchar_t/wrapped_env.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/ctype/to/wchar_t/wrapped_locale.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/ctype/widen/char/1.cc [moved from libstdc++-v3/testsuite/22_locale/ctype_widen_char.cc with 100% similarity]
libstdc++-v3/testsuite/22_locale/ctype/widen/char/wrapped_env.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/ctype/widen/char/wrapped_locale.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/ctype/widen/wchar_t/1.cc [moved from libstdc++-v3/testsuite/22_locale/ctype_widen_wchar_t.cc with 94% similarity]
libstdc++-v3/testsuite/22_locale/ctype/widen/wchar_t/wrapped_env.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/ctype/widen/wchar_t/wrapped_locale.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/ctype_members_wchar_t.cc [deleted file]
libstdc++-v3/testsuite/22_locale/facet/1.cc [moved from libstdc++-v3/testsuite/22_locale/facet.cc with 82% similarity]
libstdc++-v3/testsuite/22_locale/facet/2.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/global_templates/1.cc [moved from libstdc++-v3/testsuite/22_locale/global_templates.cc with 100% similarity]
libstdc++-v3/testsuite/22_locale/locale/cons/1.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/locale/cons/2.cc [moved from libstdc++-v3/testsuite/22_locale/ctor_copy_dtor.cc with 55% similarity]
libstdc++-v3/testsuite/22_locale/locale/cons/3.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/locale/cons/4.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/locale/cons/5.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/locale/cons/6.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/locale/cons/7.cc [moved from libstdc++-v3/testsuite/22_locale/members.cc with 72% similarity]
libstdc++-v3/testsuite/22_locale/locale/global_locale_objects/1.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/locale/global_locale_objects/2.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/locale/global_locale_objects/3.cc [moved from libstdc++-v3/testsuite/22_locale/static_members.cc with 58% similarity]
libstdc++-v3/testsuite/22_locale/locale/operations/1.cc [moved from libstdc++-v3/testsuite/22_locale/operators.cc with 80% similarity]
libstdc++-v3/testsuite/22_locale/locale/operations/2.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/messages/1.cc [moved from libstdc++-v3/testsuite/22_locale/messages.cc with 85% similarity]
libstdc++-v3/testsuite/22_locale/messages/2.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/messages/members/char/1.cc [moved from libstdc++-v3/testsuite/22_locale/messages_members_char.cc with 60% similarity]
libstdc++-v3/testsuite/22_locale/messages/members/char/2.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/messages/members/char/3.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/messages/members/char/wrapped_env.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/messages/members/char/wrapped_locale.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/messages_byname/1.cc [moved from libstdc++-v3/testsuite/22_locale/messages_byname.cc with 94% similarity]
libstdc++-v3/testsuite/22_locale/money_get/1.cc [moved from libstdc++-v3/testsuite/22_locale/money_get.cc with 84% similarity]
libstdc++-v3/testsuite/22_locale/money_get/2.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/money_get/get/char/1.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/money_get/get/char/2.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/money_get/get/char/3.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/money_get/get/char/4.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/money_get/get/char/5.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/money_get/get/char/6.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/money_get/get/char/7.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/money_get/get/char/8.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/money_get/get/char/wrapped_env.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/money_get/get/char/wrapped_locale.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/1.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/2.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/3.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/4.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/5.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/6.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/7.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/8.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/wrapped_env.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/wrapped_locale.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/money_get_members_char.cc [deleted file]
libstdc++-v3/testsuite/22_locale/money_get_members_wchar_t.cc [deleted file]
libstdc++-v3/testsuite/22_locale/money_put/1.cc [moved from libstdc++-v3/testsuite/22_locale/money_put.cc with 84% similarity]
libstdc++-v3/testsuite/22_locale/money_put/2.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/money_put/put/char/1.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/money_put/put/char/2.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/money_put/put/char/3.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/money_put/put/char/4.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/money_put/put/char/5.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/money_put/put/char/6.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/money_put/put/char/wrapped_env.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/money_put/put/char/wrapped_locale.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/1.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/2.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/3.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/4.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/5.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/6.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/wrapped_env.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/wrapped_locale.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/money_put_members_char.cc [deleted file]
libstdc++-v3/testsuite/22_locale/money_put_members_wchar_t.cc [deleted file]
libstdc++-v3/testsuite/22_locale/moneypunct/1.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/moneypunct/2.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/moneypunct/3.cc [moved from libstdc++-v3/testsuite/22_locale/moneypunct.cc with 62% similarity]
libstdc++-v3/testsuite/22_locale/moneypunct/members/char/1.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/moneypunct/members/char/2.cc [moved from libstdc++-v3/testsuite/22_locale/moneypunct_members_char.cc with 71% similarity]
libstdc++-v3/testsuite/22_locale/moneypunct/members/char/wrapped_env.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/moneypunct/members/char/wrapped_locale.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/moneypunct/members/wchar_t/1.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/moneypunct/members/wchar_t/2.cc [moved from libstdc++-v3/testsuite/22_locale/moneypunct_members_wchar_t.cc with 70% similarity]
libstdc++-v3/testsuite/22_locale/moneypunct/members/wchar_t/wrapped_env.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/moneypunct/members/wchar_t/wrapped_locale.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/moneypunct_byname/1.cc [moved from libstdc++-v3/testsuite/22_locale/moneypunct_byname.cc with 95% similarity]
libstdc++-v3/testsuite/22_locale/num_get/1.cc [moved from libstdc++-v3/testsuite/22_locale/num_get.cc with 84% similarity]
libstdc++-v3/testsuite/22_locale/num_get/2.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/num_get/get/char/1.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/num_get/get/char/2.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/num_get/get/char/3.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/num_get/get/char/4.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/num_get/get/char/5.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/num_get/get/char/6.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/num_get/get/char/wrapped_env.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/num_get/get/char/wrapped_locale.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/1.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/2.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/3.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/4.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/5.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/6.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/wrapped_env.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/wrapped_locale.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/num_get_members_char.cc [deleted file]
libstdc++-v3/testsuite/22_locale/num_get_members_wchar_t.cc [deleted file]
libstdc++-v3/testsuite/22_locale/num_put/1.cc [moved from libstdc++-v3/testsuite/22_locale/num_put.cc with 84% similarity]
libstdc++-v3/testsuite/22_locale/num_put/2.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/num_put/put/char/1.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/num_put/put/char/2.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/num_put/put/char/3.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/num_put/put/char/4.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/num_put/put/char/5.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/num_put/put/char/wrapped_env.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/num_put/put/char/wrapped_locale.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/1.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/2.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/3.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/4.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/5.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/wrapped_env.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/wrapped_locale.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/num_put_members_char.cc [deleted file]
libstdc++-v3/testsuite/22_locale/num_put_members_wchar_t.cc [deleted file]
libstdc++-v3/testsuite/22_locale/numpunct/1.cc [moved from libstdc++-v3/testsuite/22_locale/numpunct.cc with 82% similarity]
libstdc++-v3/testsuite/22_locale/numpunct/2.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/numpunct/members/char/1.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/numpunct/members/char/2.cc [moved from libstdc++-v3/testsuite/22_locale/numpunct_members_char.cc with 73% similarity]
libstdc++-v3/testsuite/22_locale/numpunct/members/char/wrapped_env.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/numpunct/members/char/wrapped_locale.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/numpunct/members/wchar_t/1.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/numpunct/members/wchar_t/2.cc [moved from libstdc++-v3/testsuite/22_locale/numpunct_members_wchar_t.cc with 70% similarity]
libstdc++-v3/testsuite/22_locale/numpunct/members/wchar_t/wrapped_env.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/numpunct/members/wchar_t/wrapped_locale.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/numpunct_byname/1.cc [moved from libstdc++-v3/testsuite/22_locale/numpunct_byname.cc with 84% similarity]
libstdc++-v3/testsuite/22_locale/numpunct_byname/2.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/time_get/1.cc [moved from libstdc++-v3/testsuite/22_locale/time_get.cc with 84% similarity]
libstdc++-v3/testsuite/22_locale/time_get/2.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/time_get/date_order/char/1.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/time_get/date_order/char/wrapped_env.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/time_get/date_order/char/wrapped_locale.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/time_get/date_order/wchar_t/1.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/time_get/date_order/wchar_t/wrapped_env.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/time_get/date_order/wchar_t/wrapped_locale.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/time_get/get_date/char/1.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/time_get/get_date/char/2.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/time_get/get_date/char/3.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/time_get/get_date/char/wrapped_env.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/time_get/get_date/char/wrapped_locale.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/time_get/get_date/wchar_t/1.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/time_get/get_date/wchar_t/2.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/time_get/get_date/wchar_t/3.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/time_get/get_date/wchar_t/wrapped_env.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/time_get/get_date/wchar_t/wrapped_locale.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/time_get/get_monthname/char/1.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/time_get/get_monthname/char/2.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/time_get/get_monthname/char/3.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/time_get/get_monthname/char/wrapped_env.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/time_get/get_monthname/char/wrapped_locale.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/time_get/get_monthname/wchar_t/1.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/time_get/get_monthname/wchar_t/2.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/time_get/get_monthname/wchar_t/3.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/time_get/get_monthname/wchar_t/wrapped_env.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/time_get/get_monthname/wchar_t/wrapped_locale.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/time_get/get_time/char/1.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/time_get/get_time/char/2.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/time_get/get_time/char/3.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/time_get/get_time/char/wrapped_env.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/time_get/get_time/char/wrapped_locale.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/time_get/get_time/wchar_t/1.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/time_get/get_time/wchar_t/2.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/time_get/get_time/wchar_t/3.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/time_get/get_time/wchar_t/wrapped_env.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/time_get/get_time/wchar_t/wrapped_locale.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/time_get/get_weekday/char/1.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/time_get/get_weekday/char/2.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/time_get/get_weekday/char/3.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/time_get/get_weekday/char/wrapped_env.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/time_get/get_weekday/char/wrapped_locale.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/time_get/get_weekday/wchar_t/1.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/time_get/get_weekday/wchar_t/2.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/time_get/get_weekday/wchar_t/3.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/time_get/get_weekday/wchar_t/wrapped_env.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/time_get/get_weekday/wchar_t/wrapped_locale.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/time_get/get_year/char/1.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/time_get/get_year/char/3.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/time_get/get_year/char/wrapped_env.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/time_get/get_year/char/wrapped_locale.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/time_get/get_year/wchar_t/1.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/time_get/get_year/wchar_t/3.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/time_get/get_year/wchar_t/wrapped_env.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/time_get/get_year/wchar_t/wrapped_locale.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/time_get_members_char.cc [deleted file]
libstdc++-v3/testsuite/22_locale/time_get_members_wchar_t.cc [deleted file]
libstdc++-v3/testsuite/22_locale/time_put/1.cc [moved from libstdc++-v3/testsuite/22_locale/time_put.cc with 84% similarity]
libstdc++-v3/testsuite/22_locale/time_put/2.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/time_put/put/char/1.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/time_put/put/char/10.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/time_put/put/char/2.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/time_put/put/char/3.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/time_put/put/char/4.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/time_put/put/char/5.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/time_put/put/char/6.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/time_put/put/char/7.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/time_put/put/char/8.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/time_put/put/char/9.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/time_put/put/char/wrapped_env.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/time_put/put/char/wrapped_locale.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/1.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/10.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/2.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/3.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/4.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/5.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/6.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/7.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/8.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/9.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/wrapped_env.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/wrapped_locale.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/time_put_members_char.cc [deleted file]
libstdc++-v3/testsuite/22_locale/time_put_members_wchar_t.cc [deleted file]
libstdc++-v3/testsuite/26_numerics/c99_classification_macros_c.cc

index 7b08511..091a336 100644 (file)
@@ -1,3 +1,342 @@
+2003-01-21  Benjamin Kosnik  <bkoz@redhat.com>
+
+       Reshuffle 22_locale testsuite.
+       * 22_locale/(codecvt.cc money_get.cc
+       codecvt_members_char_char.cc money_get_members_char.cc
+       codecvt_members_unicode_char.cc money_get_members_wchar_t.cc
+       codecvt_members_unicode_wchar_t.cc moneypunct_byname.cc
+       codecvt_members_wchar_t_char.cc moneypunct.cc collate_byname.cc
+       moneypunct_members_char.cc collate.cc moneypunct_members_wchar_t.cc
+       collate_members_char.cc money_put.cc collate_members_wchar_t.cc
+       money_put_members_char.cc ctor_copy_dtor.cc
+       money_put_members_wchar_t.cc ctype.cc num_get.cc ctype_is_char.cc
+       num_get_members_char.cc ctype_is_wchar_t.cc num_get_members_wchar_t.cc
+       ctype_members_char.cc numpunct_byname.cc ctype_members_wchar_t.cc
+       numpunct.cc ctype_narrow_char.cc numpunct_members_char.cc
+       ctype_narrow_wchar_t.cc numpunct_members_wchar_t.cc ctype_scan_char.cc
+       num_put.cc ctype_scan_wchar_t.cc num_put_members_char.cc
+       ctype_to_char.cc num_put_members_wchar_t.cc ctype_to_wchar_t.cc
+       operators.cc ctype_widen_char.cc static_members.cc
+       ctype_widen_wchar_t.cc time_get.cc facet.cc time_get_members_char.cc
+       global_templates.cc time_get_members_wchar_t.cc, members.cc,
+       time_put.cc, messages_byname.cc, time_put_members_char.cc,
+       messages.cc, time_put_members_wchar_t.cc, messages_members_char.cc): 
+       Splint up into individual test cases... 
+       * 22_locale/codecvt/1.cc: New.
+       * 22_locale/codecvt/2.cc: New.
+       * 22_locale/codecvt/always_noconv/char/1.cc: New.
+       * 22_locale/codecvt/always_noconv/char/wrapped_env.cc: New.
+       * 22_locale/codecvt/always_noconv/char/wrapped_locale.cc: New.
+       * 22_locale/codecvt/always_noconv/wchar_t/1.cc: New.
+       * 22_locale/codecvt/always_noconv/wchar_t/wrapped_env.cc: New.
+       * 22_locale/codecvt/always_noconv/wchar_t/wrapped_locale.cc: New.
+       * 22_locale/codecvt/encoding/char/1.cc: New.
+       * 22_locale/codecvt/encoding/char/wrapped_env.cc: New.
+       * 22_locale/codecvt/encoding/char/wrapped_locale.cc: New.
+       * 22_locale/codecvt/encoding/wchar_t/1.cc: New.
+       * 22_locale/codecvt/encoding/wchar_t/wrapped_env.cc: New.
+       * 22_locale/codecvt/encoding/wchar_t/wrapped_locale.cc: New.
+       * 22_locale/codecvt/in/char/1.cc: New.
+       * 22_locale/codecvt/in/char/wrapped_env.cc: New.
+       * 22_locale/codecvt/in/char/wrapped_locale.cc: New.
+       * 22_locale/codecvt/in/wchar_t/1.cc: New.
+       * 22_locale/codecvt/in/wchar_t/wrapped_env.cc: New.
+       * 22_locale/codecvt/in/wchar_t/wrapped_locale.cc: New.
+       * 22_locale/codecvt/length/char/1.cc: New.
+       * 22_locale/codecvt/length/char/wrapped_env.cc: New.
+       * 22_locale/codecvt/length/char/wrapped_locale.cc: New.
+       * 22_locale/codecvt/length/wchar_t/1.cc: New.
+       * 22_locale/codecvt/length/wchar_t/wrapped_env.cc: New.
+       * 22_locale/codecvt/length/wchar_t/wrapped_locale.cc: New.
+       * 22_locale/codecvt/max_length/char/1.cc: New.
+       * 22_locale/codecvt/max_length/char/wrapped_env.cc: New.
+       * 22_locale/codecvt/max_length/char/wrapped_locale.cc: New.
+       * 22_locale/codecvt/max_length/wchar_t/1.cc: New.
+       * 22_locale/codecvt/max_length/wchar_t/wrapped_env.cc: New.
+       * 22_locale/codecvt/max_length/wchar_t/wrapped_locale.cc: New.
+       * 22_locale/codecvt/out/char/1.cc: New.
+       * 22_locale/codecvt/out/char/wrapped_env.cc: New.
+       * 22_locale/codecvt/out/char/wrapped_locale.cc: New.
+       * 22_locale/codecvt/out/wchar_t/1.cc: New.
+       * 22_locale/codecvt/out/wchar_t/wrapped_env.cc: New.
+       * 22_locale/codecvt/out/wchar_t/wrapped_locale.cc: New.
+       * 22_locale/codecvt/unicode/char.cc: New.
+       * 22_locale/codecvt/unicode/wchar_t.cc: New.
+       * 22_locale/codecvt/unshift/char/1.cc: New.
+       * 22_locale/codecvt/unshift/char/wrapped_env.cc: New.
+       * 22_locale/codecvt/unshift/char/wrapped_locale.cc: New.
+       * 22_locale/codecvt/unshift/wchar_t/1.cc: New.
+       * 22_locale/codecvt/unshift/wchar_t/wrapped_env.cc: New.
+       * 22_locale/codecvt/unshift/wchar_t/wrapped_locale.cc: New.
+       * 22_locale/collate/1.cc: New.
+       * 22_locale/collate/2.cc: New.
+       * 22_locale/collate/compare/char/1.cc: New.
+       * 22_locale/collate/compare/char/2.cc: New.
+       * 22_locale/collate/compare/char/wrapped_env.cc: New.
+       * 22_locale/collate/compare/char/wrapped_locale.cc: New.
+       * 22_locale/collate/compare/wchar_t/1.cc: New.
+       * 22_locale/collate/compare/wchar_t/2.cc: New.
+       * 22_locale/collate/compare/wchar_t/wrapped_env.cc: New.
+       * 22_locale/collate/compare/wchar_t/wrapped_locale.cc: New.
+       * 22_locale/collate/hash/char/1.cc: New.
+       * 22_locale/collate/hash/char/2.cc: New.
+       * 22_locale/collate/hash/char/wrapped_env.cc: New.
+       * 22_locale/collate/hash/char/wrapped_locale.cc: New.
+       * 22_locale/collate/hash/wchar_t/1.cc: New.
+       * 22_locale/collate/hash/wchar_t/2.cc: New.
+       * 22_locale/collate/hash/wchar_t/wrapped_env.cc: New.
+       * 22_locale/collate/hash/wchar_t/wrapped_locale.cc: New.
+       * 22_locale/collate/transform/char/2.cc: New.
+       * 22_locale/collate/transform/char/wrapped_env.cc: New.
+       * 22_locale/collate/transform/char/wrapped_locale.cc: New.
+       * 22_locale/collate/transform/wchar_t/2.cc: New.
+       * 22_locale/collate/transform/wchar_t/wrapped_env.cc: New.
+       * 22_locale/collate/transform/wchar_t/wrapped_locale.cc: New.
+       * 22_locale/collate_byname/1.cc: New.
+       * 22_locale/ctype/1.cc: New.
+       * 22_locale/ctype/2.cc: New.
+       * 22_locale/ctype/cons/char/1.cc: New.
+       * 22_locale/ctype/cons/char/wrapped_env.cc: New.
+       * 22_locale/ctype/cons/char/wrapped_locale.cc: New.
+       * 22_locale/ctype/is/char/1.cc: New.
+       * 22_locale/ctype/is/char/2.cc: New.
+       * 22_locale/ctype/is/char/3.cc: New.
+       * 22_locale/ctype/is/char/wrapped_env.cc: New.
+       * 22_locale/ctype/is/char/wrapped_locale.cc: New.
+       * 22_locale/ctype/is/wchar_t/1.cc: New.
+       * 22_locale/ctype/is/wchar_t/2.cc: New.
+       * 22_locale/ctype/is/wchar_t/wrapped_env.cc: New.
+       * 22_locale/ctype/is/wchar_t/wrapped_locale.cc: New.
+       * 22_locale/ctype/narrow/char/1.cc: New.
+       * 22_locale/ctype/narrow/char/2.cc: New.
+       * 22_locale/ctype/narrow/char/wrapped_env.cc: New.
+       * 22_locale/ctype/narrow/char/wrapped_locale.cc: New.
+       * 22_locale/ctype/narrow/wchar_t/1.cc: New.
+       * 22_locale/ctype/narrow/wchar_t/2.cc: New.
+       * 22_locale/ctype/narrow/wchar_t/wrapped_env.cc: New.
+       * 22_locale/ctype/narrow/wchar_t/wrapped_locale.cc: New.
+       * 22_locale/ctype/scan/char/1.cc: New.
+       * 22_locale/ctype/scan/char/wrapped_env.cc: New.
+       * 22_locale/ctype/scan/char/wrapped_locale.cc: New.
+       * 22_locale/ctype/scan/wchar_t/1.cc: New.
+       * 22_locale/ctype/scan/wchar_t/wrapped_env.cc: New.
+       * 22_locale/ctype/scan/wchar_t/wrapped_locale.cc: New.
+       * 22_locale/ctype/to/char/1.cc: New.
+       * 22_locale/ctype/to/char/wrapped_env.cc: New.
+       * 22_locale/ctype/to/char/wrapped_locale.cc: New.
+       * 22_locale/ctype/to/wchar_t/1.cc: New.
+       * 22_locale/ctype/to/wchar_t/wrapped_env.cc: New.
+       * 22_locale/ctype/to/wchar_t/wrapped_locale.cc: New.
+       * 22_locale/ctype/widen/char/1.cc: New.
+       * 22_locale/ctype/widen/char/wrapped_env.cc: New.
+       * 22_locale/ctype/widen/char/wrapped_locale.cc: New.
+       * 22_locale/ctype/widen/wchar_t/1.cc: New.
+       * 22_locale/ctype/widen/wchar_t/wrapped_env.cc: New.
+       * 22_locale/ctype/widen/wchar_t/wrapped_locale.cc: New.
+       * 22_locale/facet/1.cc: New.
+       * 22_locale/facet/2.cc: New.
+       * 22_locale/global_templates/1.cc: New.
+       * 22_locale/locale/cons/1.cc: New.
+       * 22_locale/locale/cons/2.cc: New.
+       * 22_locale/locale/cons/3.cc: New.
+       * 22_locale/locale/cons/4.cc: New.
+       * 22_locale/locale/cons/5.cc: New.
+       * 22_locale/locale/cons/6.cc: New.
+       * 22_locale/locale/cons/7.cc: New.
+       * 22_locale/locale/global_locale_objects/1.cc: New.
+       * 22_locale/locale/global_locale_objects/2.cc: New.
+       * 22_locale/locale/global_locale_objects/3.cc: New.
+       * 22_locale/locale/operations/1.cc: New.
+       * 22_locale/locale/operations/2.cc: New.
+       * 22_locale/messages/1.cc: New.
+       * 22_locale/messages/2.cc: New.
+       * 22_locale/messages/members/char/1.cc: New.
+       * 22_locale/messages/members/char/2.cc: New.
+       * 22_locale/messages/members/char/3.cc: New.
+       * 22_locale/messages/members/char/wrapped_env.cc: New.
+       * 22_locale/messages/members/char/wrapped_locale.cc: New.
+       * 22_locale/messages_byname/1.cc: New.
+       * 22_locale/money_get/1.cc: New.
+       * 22_locale/money_get/2.cc: New.
+       * 22_locale/money_get/get/char/1.cc: New.
+       * 22_locale/money_get/get/char/2.cc: New.
+       * 22_locale/money_get/get/char/3.cc: New.
+       * 22_locale/money_get/get/char/4.cc: New.
+       * 22_locale/money_get/get/char/5.cc: New.
+       * 22_locale/money_get/get/char/6.cc: New.
+       * 22_locale/money_get/get/char/7.cc: New.
+       * 22_locale/money_get/get/char/8.cc: New.
+       * 22_locale/money_get/get/char/wrapped_env.cc: New.
+       * 22_locale/money_get/get/char/wrapped_locale.cc: New.
+       * 22_locale/money_get/get/wchar_t/1.cc: New.
+       * 22_locale/money_get/get/wchar_t/2.cc: New.
+       * 22_locale/money_get/get/wchar_t/3.cc: New.
+       * 22_locale/money_get/get/wchar_t/4.cc: New.
+       * 22_locale/money_get/get/wchar_t/5.cc: New.
+       * 22_locale/money_get/get/wchar_t/6.cc: New.
+       * 22_locale/money_get/get/wchar_t/7.cc: New.
+       * 22_locale/money_get/get/wchar_t/8.cc: New.
+       * 22_locale/money_get/get/wchar_t/wrapped_env.cc: New.
+       * 22_locale/money_get/get/wchar_t/wrapped_locale.cc: New.
+       * 22_locale/money_put/1.cc: New.
+       * 22_locale/money_put/2.cc: New.
+       * 22_locale/money_put/put/char/1.cc: New.
+       * 22_locale/money_put/put/char/2.cc: New.
+       * 22_locale/money_put/put/char/3.cc: New.
+       * 22_locale/money_put/put/char/4.cc: New.
+       * 22_locale/money_put/put/char/5.cc: New.
+       * 22_locale/money_put/put/char/6.cc: New.
+       * 22_locale/money_put/put/char/wrapped_env.cc: New.
+       * 22_locale/money_put/put/char/wrapped_locale.cc: New.
+       * 22_locale/money_put/put/wchar_t/1.cc: New.
+       * 22_locale/money_put/put/wchar_t/2.cc: New.
+       * 22_locale/money_put/put/wchar_t/3.cc: New.
+       * 22_locale/money_put/put/wchar_t/4.cc: New.
+       * 22_locale/money_put/put/wchar_t/5.cc: New.
+       * 22_locale/money_put/put/wchar_t/6.cc: New.
+       * 22_locale/money_put/put/wchar_t/wrapped_env.cc: New.
+       * 22_locale/money_put/put/wchar_t/wrapped_locale.cc: New.
+       * 22_locale/moneypunct/1.cc: New.
+       * 22_locale/moneypunct/2.cc: New.
+       * 22_locale/moneypunct/3.cc: New.
+       * 22_locale/moneypunct/members/char/1.cc: New.
+       * 22_locale/moneypunct/members/char/2.cc: New.
+       * 22_locale/moneypunct/members/char/wrapped_env.cc: New.
+       * 22_locale/moneypunct/members/char/wrapped_locale.cc: New.
+       * 22_locale/moneypunct/members/wchar_t/1.cc: New.
+       * 22_locale/moneypunct/members/wchar_t/2.cc: New.
+       * 22_locale/moneypunct/members/wchar_t/wrapped_env.cc: New.
+       * 22_locale/moneypunct/members/wchar_t/wrapped_locale.cc: New.
+       * 22_locale/moneypunct_byname/1.cc: New.
+       * 22_locale/num_get/1.cc: New.
+       * 22_locale/num_get/2.cc: New.
+       * 22_locale/num_get/get/char/1.cc: New.
+       * 22_locale/num_get/get/char/2.cc: New.
+       * 22_locale/num_get/get/char/3.cc: New.
+       * 22_locale/num_get/get/char/4.cc: New.
+       * 22_locale/num_get/get/char/5.cc: New.
+       * 22_locale/num_get/get/char/6.cc: New.
+       * 22_locale/num_get/get/char/wrapped_env.cc: New.
+       * 22_locale/num_get/get/char/wrapped_locale.cc: New.
+       * 22_locale/num_get/get/wchar_t/1.cc: New.
+       * 22_locale/num_get/get/wchar_t/2.cc: New.
+       * 22_locale/num_get/get/wchar_t/3.cc: New.
+       * 22_locale/num_get/get/wchar_t/4.cc: New.
+       * 22_locale/num_get/get/wchar_t/5.cc: New.
+       * 22_locale/num_get/get/wchar_t/6.cc: New.
+       * 22_locale/num_get/get/wchar_t/wrapped_env.cc: New.
+       * 22_locale/num_get/get/wchar_t/wrapped_locale.cc: New.
+       * 22_locale/num_put/1.cc: New.
+       * 22_locale/num_put/2.cc: New.
+       * 22_locale/num_put/put/char/1.cc: New.
+       * 22_locale/num_put/put/char/2.cc: New.
+       * 22_locale/num_put/put/char/3.cc: New.
+       * 22_locale/num_put/put/char/4.cc: New.
+       * 22_locale/num_put/put/char/5.cc: New.
+       * 22_locale/num_put/put/char/wrapped_env.cc: New.
+       * 22_locale/num_put/put/char/wrapped_locale.cc: New.
+       * 22_locale/num_put/put/wchar_t/1.cc: New.
+       * 22_locale/num_put/put/wchar_t/2.cc: New.
+       * 22_locale/num_put/put/wchar_t/3.cc: New.
+       * 22_locale/num_put/put/wchar_t/4.cc: New.
+       * 22_locale/num_put/put/wchar_t/5.cc: New.
+       * 22_locale/num_put/put/wchar_t/wrapped_env.cc: New.
+       * 22_locale/num_put/put/wchar_t/wrapped_locale.cc: New.
+       * 22_locale/numpunct/1.cc: New.
+       * 22_locale/numpunct/2.cc: New.
+       * 22_locale/numpunct/members/char/1.cc: New.
+       * 22_locale/numpunct/members/char/2.cc: New.
+       * 22_locale/numpunct/members/char/wrapped_env.cc: New.
+       * 22_locale/numpunct/members/char/wrapped_locale.cc: New.
+       * 22_locale/numpunct/members/wchar_t/1.cc: New.
+       * 22_locale/numpunct/members/wchar_t/2.cc: New.
+       * 22_locale/numpunct/members/wchar_t/wrapped_env.cc: New.
+       * 22_locale/numpunct/members/wchar_t/wrapped_locale.cc: New.
+       * 22_locale/numpunct_byname/1.cc: New.
+       * 22_locale/numpunct_byname/2.cc: New.
+       * 22_locale/time_get/1.cc: New.
+       * 22_locale/time_get/2.cc: New.
+       * 22_locale/time_get/date_order/char/1.cc: New.
+       * 22_locale/time_get/date_order/char/wrapped_env.cc: New.
+       * 22_locale/time_get/date_order/char/wrapped_locale.cc: New.
+       * 22_locale/time_get/date_order/wchar_t/1.cc: New.
+       * 22_locale/time_get/date_order/wchar_t/wrapped_env.cc: New.
+       * 22_locale/time_get/date_order/wchar_t/wrapped_locale.cc: New.
+       * 22_locale/time_get/get_date/char/1.cc: New.
+       * 22_locale/time_get/get_date/char/2.cc: New.
+       * 22_locale/time_get/get_date/char/3.cc: New.
+       * 22_locale/time_get/get_date/char/wrapped_env.cc: New.
+       * 22_locale/time_get/get_date/char/wrapped_locale.cc: New.
+       * 22_locale/time_get/get_date/wchar_t/1.cc: New.
+       * 22_locale/time_get/get_date/wchar_t/2.cc: New.
+       * 22_locale/time_get/get_date/wchar_t/3.cc: New.
+       * 22_locale/time_get/get_date/wchar_t/wrapped_env.cc: New.
+       * 22_locale/time_get/get_date/wchar_t/wrapped_locale.cc: New.
+       * 22_locale/time_get/get_monthname/char/1.cc: New.
+       * 22_locale/time_get/get_monthname/char/2.cc: New.
+       * 22_locale/time_get/get_monthname/char/3.cc: New.
+       * 22_locale/time_get/get_monthname/char/wrapped_env.cc: New.
+       * 22_locale/time_get/get_monthname/char/wrapped_locale.cc: New.
+       * 22_locale/time_get/get_monthname/wchar_t/1.cc: New.
+       * 22_locale/time_get/get_monthname/wchar_t/2.cc: New.
+       * 22_locale/time_get/get_monthname/wchar_t/3.cc: New.
+       * 22_locale/time_get/get_monthname/wchar_t/wrapped_env.cc: New.
+       * 22_locale/time_get/get_monthname/wchar_t/wrapped_locale.cc: New.
+       * 22_locale/time_get/get_time/char/1.cc: New.
+       * 22_locale/time_get/get_time/char/2.cc: New.
+       * 22_locale/time_get/get_time/char/3.cc: New.
+       * 22_locale/time_get/get_time/char/wrapped_env.cc: New.
+       * 22_locale/time_get/get_time/char/wrapped_locale.cc: New.
+       * 22_locale/time_get/get_time/wchar_t/1.cc: New.
+       * 22_locale/time_get/get_time/wchar_t/2.cc: New.
+       * 22_locale/time_get/get_time/wchar_t/3.cc: New.
+       * 22_locale/time_get/get_time/wchar_t/wrapped_env.cc: New.
+       * 22_locale/time_get/get_time/wchar_t/wrapped_locale.cc: New.
+       * 22_locale/time_get/get_weekday/char/1.cc: New.
+       * 22_locale/time_get/get_weekday/char/2.cc: New.
+       * 22_locale/time_get/get_weekday/char/3.cc: New.
+       * 22_locale/time_get/get_weekday/char/wrapped_env.cc: New.
+       * 22_locale/time_get/get_weekday/char/wrapped_locale.cc: New.
+       * 22_locale/time_get/get_weekday/wchar_t/1.cc: New.
+       * 22_locale/time_get/get_weekday/wchar_t/2.cc: New.
+       * 22_locale/time_get/get_weekday/wchar_t/3.cc: New.
+       * 22_locale/time_get/get_weekday/wchar_t/wrapped_env.cc: New.
+       * 22_locale/time_get/get_weekday/wchar_t/wrapped_locale.cc: New.
+       * 22_locale/time_get/get_year/char/1.cc: New.
+       * 22_locale/time_get/get_year/char/3.cc: New.
+       * 22_locale/time_get/get_year/char/wrapped_env.cc: New.
+       * 22_locale/time_get/get_year/char/wrapped_locale.cc: New.
+       * 22_locale/time_get/get_year/wchar_t/1.cc: New.
+       * 22_locale/time_get/get_year/wchar_t/3.cc: New.
+       * 22_locale/time_get/get_year/wchar_t/wrapped_env.cc: New.
+       * 22_locale/time_get/get_year/wchar_t/wrapped_locale.cc: New.
+       * 22_locale/time_put/1.cc: New.
+       * 22_locale/time_put/2.cc: New.
+       * 22_locale/time_put/put/char/1.cc: New.
+       * 22_locale/time_put/put/char/10.cc: New.
+       * 22_locale/time_put/put/char/2.cc: New.
+       * 22_locale/time_put/put/char/3.cc: New.
+       * 22_locale/time_put/put/char/4.cc: New.
+       * 22_locale/time_put/put/char/5.cc: New.
+       * 22_locale/time_put/put/char/6.cc: New.
+       * 22_locale/time_put/put/char/7.cc: New.
+       * 22_locale/time_put/put/char/8.cc: New.
+       * 22_locale/time_put/put/char/9.cc: New.
+       * 22_locale/time_put/put/char/wrapped_env.cc: New.
+       * 22_locale/time_put/put/char/wrapped_locale.cc: New.
+       * 22_locale/time_put/put/wchar_t/1.cc: New.
+       * 22_locale/time_put/put/wchar_t/10.cc: New.
+       * 22_locale/time_put/put/wchar_t/2.cc: New.
+       * 22_locale/time_put/put/wchar_t/3.cc: New.
+       * 22_locale/time_put/put/wchar_t/4.cc: New.
+       * 22_locale/time_put/put/wchar_t/5.cc: New.
+       * 22_locale/time_put/put/wchar_t/6.cc: New.
+       * 22_locale/time_put/put/wchar_t/7.cc: New.
+       * 22_locale/time_put/put/wchar_t/8.cc: New.
+       * 22_locale/time_put/put/wchar_t/9.cc: New.
+       * 22_locale/time_put/put/wchar_t/wrapped_env.cc: New.
+       * 22_locale/time_put/put/wchar_t/wrapped_locale.cc: New.
+
 2003-01-16  Jeffrey D. Oldham  <oldham@codesourcery.com>
 
        * config/locale/generic/messages_members.h
similarity index 83%
rename from libstdc++-v3/testsuite/22_locale/codecvt.cc
rename to libstdc++-v3/testsuite/22_locale/codecvt/1.cc
index a4670b7..fa28575 100644 (file)
@@ -1,6 +1,7 @@
+// { dg-do compile }
 // 2001-08-27  Benjamin Kosnik  <bkoz@redhat.com>
 
-// Copyright (C) 2001 Free Software Foundation
+// Copyright (C) 2001, 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
@@ -20,8 +21,6 @@
 
 // 22.2.1.5  Template class codecvt
 
-// { dg-do compile }
-
 #include <locale>
 
 void test01()
@@ -38,18 +37,8 @@ void test01()
   typedef test_type::state_type state_type;
 }
 
-// Should be able to instantiate this for other types besides char, wchar_t
-class gnu_codecvt: public std::codecvt<unsigned char, unsigned long, char> 
-{ };
-
-void test02()
-{ 
-  gnu_codecvt facet01;
-}
-
 int main()
 {
   test01();
-  test02();
   return 0;
 }
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/2.cc b/libstdc++-v3/testsuite/22_locale/codecvt/2.cc
new file mode 100644 (file)
index 0000000..9811239
--- /dev/null
@@ -0,0 +1,39 @@
+// { dg-do compile }
+// 2001-08-27  Benjamin Kosnik  <bkoz@redhat.com>
+
+// Copyright (C) 2001, 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// 22.2.1.5  Template class codecvt
+
+#include <locale>
+
+// Should be able to instantiate this for other types besides char, wchar_t
+class gnu_codecvt: public std::codecvt<unsigned char, unsigned long, char> 
+{ };
+
+void test02()
+{ 
+  gnu_codecvt facet01;
+}
+
+int main()
+{
+  test02();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/always_noconv/char/1.cc b/libstdc++-v3/testsuite/22_locale/codecvt/always_noconv/char/1.cc
new file mode 100644 (file)
index 0000000..523322e
--- /dev/null
@@ -0,0 +1,61 @@
+// 2000-08-17 Benjamin Kosnik <bkoz@cygnus.com>
+
+// Copyright (C) 2000, 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// 22.2.1.5 - Template class codecvt [lib.locale.codecvt]
+
+#include <locale>
+#include <testsuite_hooks.h>
+
+// Required instantiation, degenerate conversion.
+// codecvt<char, char, mbstate_t>
+void test01()
+{
+  using namespace std;
+  typedef codecvt_base::result                 result;
+  typedef codecvt<char, char, mbstate_t>       c_codecvt;
+
+  bool                         test = true;
+  const char*          c_lit = "black pearl jasmine tea";
+  const char*          from_next;
+  int                  size = 25;
+  char*                c_arr = new char[size];
+  char*                 c_ref = new char[size];
+  char*                        to_next;
+
+  locale               loc = locale::classic();
+  c_codecvt::state_type state;
+  const c_codecvt*     cvt = &use_facet<c_codecvt>(loc); 
+
+  // According to the resolution of DR19 (see also libstd++/9168), in
+  // case of degenerate conversion ('noconv'), "there are no changes to
+  // the values in [to, to_limit)."
+  memset(c_ref, 'X', size);
+
+  VERIFY( cvt->always_noconv() );
+
+  delete [] c_arr;
+  delete [] c_ref;
+}
+
+int main ()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/always_noconv/char/wrapped_env.cc b/libstdc++-v3/testsuite/22_locale/codecvt/always_noconv/char/wrapped_env.cc
new file mode 100644 (file)
index 0000000..b3d040e
--- /dev/null
@@ -0,0 +1,36 @@
+// 2001-08-15 Benjamin Kosnik  <bkoz@redhat.com>
+
+// Copyright (C) 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// 22.2.4.1.1 collate members
+
+#include <testsuite_hooks.h>
+
+#define main discard_main_1
+#include "1.cc"
+#undef main 
+
+int main()
+{
+  using namespace __gnu_cxx_test;
+  func_callback two;
+  two.push_back(&test01);
+  run_tests_wrapped_env("de_DE", "LANG", two);
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/always_noconv/char/wrapped_locale.cc b/libstdc++-v3/testsuite/22_locale/codecvt/always_noconv/char/wrapped_locale.cc
new file mode 100644 (file)
index 0000000..17d4d5d
--- /dev/null
@@ -0,0 +1,36 @@
+// 2001-08-15 Benjamin Kosnik  <bkoz@redhat.com>
+
+// Copyright (C) 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// 22.2.4.1.1 collate members
+
+#include <testsuite_hooks.h>
+
+#define main discard_main_1
+#include "1.cc"
+#undef main 
+
+int main()
+{
+  using namespace __gnu_cxx_test;
+  func_callback two;
+  two.push_back(&test01);
+  run_tests_wrapped_locale("ja_JP.eucjp", two);
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/always_noconv/wchar_t/1.cc b/libstdc++-v3/testsuite/22_locale/codecvt/always_noconv/wchar_t/1.cc
new file mode 100644 (file)
index 0000000..fb26741
--- /dev/null
@@ -0,0 +1,75 @@
+// 2000-08-17 Benjamin Kosnik <bkoz@cygnus.com>
+
+// Copyright (C) 2000, 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// 22.2.1.5 - Template class codecvt [lib.locale.codecvt]
+
+#include <locale>
+#include <testsuite_hooks.h>
+
+// Need to explicitly set the state(mbstate_t) to zero.
+// How to do this is not specified by the ISO C99 standard, so we
+// might need to add some operators to make the intuiative case
+// work:
+//   w_codecvt::state_type state00;
+//   state00 = 0;  
+// or, can use this explicit "C" initialization:
+//   w_codecvt::state_type state01 = {0, 0};
+// .. except Ulrich says: Use memset. Always use memset. Feel the force...
+void
+zero_state(std::mbstate_t& state)
+{ std::memset(&state, 0, sizeof(std::mbstate_t)); }
+
+// Required instantiation
+// codecvt<wchar_t, char, mbstate_t>
+void test01()
+{
+  using namespace std;
+  typedef codecvt<wchar_t, char, mbstate_t>    w_codecvt;
+  typedef codecvt_base::result                 result;
+  typedef wchar_t                              int_type;
+  typedef char                                 ext_type;
+  typedef char_traits<wchar_t>                 int_traits;
+  typedef char_traits<char>                    ext_traits;
+
+  bool                         test = true;
+  const ext_type*      e_lit = "black pearl jasmine tea";
+  const ext_type*       efrom_next;
+  const int_type*      i_lit = L"black pearl jasmine tea";
+  const int_type*       ifrom_next;
+  int                  size = strlen(e_lit);
+  ext_type*            e_arr = new ext_type[size + 1];
+  ext_type*            eto_next;
+  int_type*            i_arr = new int_type[size + 1];
+  int_type*            ito_next;
+
+  locale               loc;
+  const w_codecvt*     cvt = &use_facet<w_codecvt>(loc); 
+
+  VERIFY( !cvt->always_noconv() );
+
+  delete [] e_arr;
+  delete [] i_arr;
+}
+
+int main ()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/always_noconv/wchar_t/wrapped_env.cc b/libstdc++-v3/testsuite/22_locale/codecvt/always_noconv/wchar_t/wrapped_env.cc
new file mode 100644 (file)
index 0000000..b3d040e
--- /dev/null
@@ -0,0 +1,36 @@
+// 2001-08-15 Benjamin Kosnik  <bkoz@redhat.com>
+
+// Copyright (C) 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// 22.2.4.1.1 collate members
+
+#include <testsuite_hooks.h>
+
+#define main discard_main_1
+#include "1.cc"
+#undef main 
+
+int main()
+{
+  using namespace __gnu_cxx_test;
+  func_callback two;
+  two.push_back(&test01);
+  run_tests_wrapped_env("de_DE", "LANG", two);
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/always_noconv/wchar_t/wrapped_locale.cc b/libstdc++-v3/testsuite/22_locale/codecvt/always_noconv/wchar_t/wrapped_locale.cc
new file mode 100644 (file)
index 0000000..17d4d5d
--- /dev/null
@@ -0,0 +1,36 @@
+// 2001-08-15 Benjamin Kosnik  <bkoz@redhat.com>
+
+// Copyright (C) 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// 22.2.4.1.1 collate members
+
+#include <testsuite_hooks.h>
+
+#define main discard_main_1
+#include "1.cc"
+#undef main 
+
+int main()
+{
+  using namespace __gnu_cxx_test;
+  func_callback two;
+  two.push_back(&test01);
+  run_tests_wrapped_locale("ja_JP.eucjp", two);
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/encoding/char/1.cc b/libstdc++-v3/testsuite/22_locale/codecvt/encoding/char/1.cc
new file mode 100644 (file)
index 0000000..9ac07c5
--- /dev/null
@@ -0,0 +1,62 @@
+// 2000-08-17 Benjamin Kosnik <bkoz@cygnus.com>
+
+// Copyright (C) 2000, 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// 22.2.1.5 - Template class codecvt [lib.locale.codecvt]
+
+#include <locale>
+#include <testsuite_hooks.h>
+
+// Required instantiation, degenerate conversion.
+// codecvt<char, char, mbstate_t>
+void test01()
+{
+  using namespace std;
+  typedef codecvt_base::result                 result;
+  typedef codecvt<char, char, mbstate_t>       c_codecvt;
+
+  bool                         test = true;
+  const char*          c_lit = "black pearl jasmine tea";
+  const char*          from_next;
+  int                  size = 25;
+  char*                c_arr = new char[size];
+  char*                 c_ref = new char[size];
+  char*                        to_next;
+
+  locale               loc = locale::classic();
+  c_codecvt::state_type state;
+  const c_codecvt*     cvt = &use_facet<c_codecvt>(loc); 
+
+  // According to the resolution of DR19 (see also libstd++/9168), in
+  // case of degenerate conversion ('noconv'), "there are no changes to
+  // the values in [to, to_limit)."
+  memset(c_ref, 'X', size);
+
+  int i = cvt->encoding();
+  VERIFY( i == 1 );
+
+  delete [] c_arr;
+  delete [] c_ref;
+}
+
+int main ()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/encoding/char/wrapped_env.cc b/libstdc++-v3/testsuite/22_locale/codecvt/encoding/char/wrapped_env.cc
new file mode 100644 (file)
index 0000000..b3d040e
--- /dev/null
@@ -0,0 +1,36 @@
+// 2001-08-15 Benjamin Kosnik  <bkoz@redhat.com>
+
+// Copyright (C) 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// 22.2.4.1.1 collate members
+
+#include <testsuite_hooks.h>
+
+#define main discard_main_1
+#include "1.cc"
+#undef main 
+
+int main()
+{
+  using namespace __gnu_cxx_test;
+  func_callback two;
+  two.push_back(&test01);
+  run_tests_wrapped_env("de_DE", "LANG", two);
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/encoding/char/wrapped_locale.cc b/libstdc++-v3/testsuite/22_locale/codecvt/encoding/char/wrapped_locale.cc
new file mode 100644 (file)
index 0000000..17d4d5d
--- /dev/null
@@ -0,0 +1,36 @@
+// 2001-08-15 Benjamin Kosnik  <bkoz@redhat.com>
+
+// Copyright (C) 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// 22.2.4.1.1 collate members
+
+#include <testsuite_hooks.h>
+
+#define main discard_main_1
+#include "1.cc"
+#undef main 
+
+int main()
+{
+  using namespace __gnu_cxx_test;
+  func_callback two;
+  two.push_back(&test01);
+  run_tests_wrapped_locale("ja_JP.eucjp", two);
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/encoding/wchar_t/1.cc b/libstdc++-v3/testsuite/22_locale/codecvt/encoding/wchar_t/1.cc
new file mode 100644 (file)
index 0000000..0aefff3
--- /dev/null
@@ -0,0 +1,76 @@
+// 2000-08-17 Benjamin Kosnik <bkoz@cygnus.com>
+
+// Copyright (C) 2000, 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// 22.2.1.5 - Template class codecvt [lib.locale.codecvt]
+
+#include <locale>
+#include <testsuite_hooks.h>
+
+// Need to explicitly set the state(mbstate_t) to zero.
+// How to do this is not specified by the ISO C99 standard, so we
+// might need to add some operators to make the intuiative case
+// work:
+//   w_codecvt::state_type state00;
+//   state00 = 0;  
+// or, can use this explicit "C" initialization:
+//   w_codecvt::state_type state01 = {0, 0};
+// .. except Ulrich says: Use memset. Always use memset. Feel the force...
+void
+zero_state(std::mbstate_t& state)
+{ std::memset(&state, 0, sizeof(std::mbstate_t)); }
+
+// Required instantiation
+// codecvt<wchar_t, char, mbstate_t>
+void test01()
+{
+  using namespace std;
+  typedef codecvt<wchar_t, char, mbstate_t>    w_codecvt;
+  typedef codecvt_base::result                 result;
+  typedef wchar_t                              int_type;
+  typedef char                                 ext_type;
+  typedef char_traits<wchar_t>                 int_traits;
+  typedef char_traits<char>                    ext_traits;
+
+  bool                         test = true;
+  const ext_type*      e_lit = "black pearl jasmine tea";
+  const ext_type*       efrom_next;
+  const int_type*      i_lit = L"black pearl jasmine tea";
+  const int_type*       ifrom_next;
+  int                  size = strlen(e_lit);
+  ext_type*            e_arr = new ext_type[size + 1];
+  ext_type*            eto_next;
+  int_type*            i_arr = new int_type[size + 1];
+  int_type*            ito_next;
+
+  locale               loc;
+  const w_codecvt*     cvt = &use_facet<w_codecvt>(loc); 
+
+  int i = cvt->encoding();
+  VERIFY( i == 4 ); // Target-dependent.
+
+  delete [] e_arr;
+  delete [] i_arr;
+}
+
+int main ()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/encoding/wchar_t/wrapped_env.cc b/libstdc++-v3/testsuite/22_locale/codecvt/encoding/wchar_t/wrapped_env.cc
new file mode 100644 (file)
index 0000000..b3d040e
--- /dev/null
@@ -0,0 +1,36 @@
+// 2001-08-15 Benjamin Kosnik  <bkoz@redhat.com>
+
+// Copyright (C) 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// 22.2.4.1.1 collate members
+
+#include <testsuite_hooks.h>
+
+#define main discard_main_1
+#include "1.cc"
+#undef main 
+
+int main()
+{
+  using namespace __gnu_cxx_test;
+  func_callback two;
+  two.push_back(&test01);
+  run_tests_wrapped_env("de_DE", "LANG", two);
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/encoding/wchar_t/wrapped_locale.cc b/libstdc++-v3/testsuite/22_locale/codecvt/encoding/wchar_t/wrapped_locale.cc
new file mode 100644 (file)
index 0000000..17d4d5d
--- /dev/null
@@ -0,0 +1,36 @@
+// 2001-08-15 Benjamin Kosnik  <bkoz@redhat.com>
+
+// Copyright (C) 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// 22.2.4.1.1 collate members
+
+#include <testsuite_hooks.h>
+
+#define main discard_main_1
+#include "1.cc"
+#undef main 
+
+int main()
+{
+  using namespace __gnu_cxx_test;
+  func_callback two;
+  two.push_back(&test01);
+  run_tests_wrapped_locale("ja_JP.eucjp", two);
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/in/char/1.cc b/libstdc++-v3/testsuite/22_locale/codecvt/in/char/1.cc
new file mode 100644 (file)
index 0000000..71f6ac7
--- /dev/null
@@ -0,0 +1,68 @@
+// 2000-08-17 Benjamin Kosnik <bkoz@cygnus.com>
+
+// Copyright (C) 2000, 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// 22.2.1.5 - Template class codecvt [lib.locale.codecvt]
+
+#include <locale>
+#include <testsuite_hooks.h>
+
+// Required instantiation, degenerate conversion.
+// codecvt<char, char, mbstate_t>
+void test01()
+{
+  using namespace std;
+  typedef codecvt_base::result                 result;
+  typedef codecvt<char, char, mbstate_t>       c_codecvt;
+
+  bool                         test = true;
+  const char*          c_lit = "black pearl jasmine tea";
+  const char*          from_next;
+  int                  size = 25;
+  char*                c_arr = new char[size];
+  char*                 c_ref = new char[size];
+  char*                        to_next;
+
+  locale               loc = locale::classic();
+  c_codecvt::state_type state;
+  const c_codecvt*     cvt = &use_facet<c_codecvt>(loc); 
+
+  // According to the resolution of DR19 (see also libstd++/9168), in
+  // case of degenerate conversion ('noconv'), "there are no changes to
+  // the values in [to, to_limit)."
+  memset(c_ref, 'X', size);
+
+  // in
+  memset(c_arr, 'X', size);
+  result r1 = cvt->in(state, c_lit, c_lit + size, from_next, 
+                     c_arr, c_arr + size, to_next);
+  VERIFY( r1 == codecvt_base::noconv );
+  VERIFY( !memcmp(c_arr, c_ref, size) ); 
+  VERIFY( from_next == c_lit );
+  VERIFY( to_next == c_arr );
+
+  delete [] c_arr;
+  delete [] c_ref;
+}
+
+int main ()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/in/char/wrapped_env.cc b/libstdc++-v3/testsuite/22_locale/codecvt/in/char/wrapped_env.cc
new file mode 100644 (file)
index 0000000..b3d040e
--- /dev/null
@@ -0,0 +1,36 @@
+// 2001-08-15 Benjamin Kosnik  <bkoz@redhat.com>
+
+// Copyright (C) 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// 22.2.4.1.1 collate members
+
+#include <testsuite_hooks.h>
+
+#define main discard_main_1
+#include "1.cc"
+#undef main 
+
+int main()
+{
+  using namespace __gnu_cxx_test;
+  func_callback two;
+  two.push_back(&test01);
+  run_tests_wrapped_env("de_DE", "LANG", two);
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/in/char/wrapped_locale.cc b/libstdc++-v3/testsuite/22_locale/codecvt/in/char/wrapped_locale.cc
new file mode 100644 (file)
index 0000000..17d4d5d
--- /dev/null
@@ -0,0 +1,36 @@
+// 2001-08-15 Benjamin Kosnik  <bkoz@redhat.com>
+
+// Copyright (C) 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// 22.2.4.1.1 collate members
+
+#include <testsuite_hooks.h>
+
+#define main discard_main_1
+#include "1.cc"
+#undef main 
+
+int main()
+{
+  using namespace __gnu_cxx_test;
+  func_callback two;
+  two.push_back(&test01);
+  run_tests_wrapped_locale("ja_JP.eucjp", two);
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/1.cc b/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/1.cc
new file mode 100644 (file)
index 0000000..7340d41
--- /dev/null
@@ -0,0 +1,83 @@
+// 2000-08-17 Benjamin Kosnik <bkoz@cygnus.com>
+
+// Copyright (C) 2000, 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// 22.2.1.5 - Template class codecvt [lib.locale.codecvt]
+
+#include <locale>
+#include <testsuite_hooks.h>
+
+// Need to explicitly set the state(mbstate_t) to zero.
+// How to do this is not specified by the ISO C99 standard, so we
+// might need to add some operators to make the intuiative case
+// work:
+//   w_codecvt::state_type state00;
+//   state00 = 0;  
+// or, can use this explicit "C" initialization:
+//   w_codecvt::state_type state01 = {0, 0};
+// .. except Ulrich says: Use memset. Always use memset. Feel the force...
+void
+zero_state(std::mbstate_t& state)
+{ std::memset(&state, 0, sizeof(std::mbstate_t)); }
+
+// Required instantiation
+// codecvt<wchar_t, char, mbstate_t>
+void test01()
+{
+  using namespace std;
+  typedef codecvt<wchar_t, char, mbstate_t>    w_codecvt;
+  typedef codecvt_base::result                 result;
+  typedef wchar_t                              int_type;
+  typedef char                                 ext_type;
+  typedef char_traits<wchar_t>                 int_traits;
+  typedef char_traits<char>                    ext_traits;
+
+  bool                         test = true;
+  const ext_type*      e_lit = "black pearl jasmine tea";
+  const ext_type*       efrom_next;
+  const int_type*      i_lit = L"black pearl jasmine tea";
+  const int_type*       ifrom_next;
+  int                  size = strlen(e_lit);
+  ext_type*            e_arr = new ext_type[size + 1];
+  ext_type*            eto_next;
+  int_type*            i_arr = new int_type[size + 1];
+  int_type*            ito_next;
+
+  locale               loc;
+  const w_codecvt*     cvt = &use_facet<w_codecvt>(loc); 
+
+  // in
+  w_codecvt::state_type state01;
+  zero_state(state01);
+  result r1 = cvt->in(state01, e_lit, e_lit + size, efrom_next, 
+                     i_arr, i_arr + size, ito_next);
+  VERIFY( r1 == codecvt_base::ok );
+  VERIFY( !int_traits::compare(i_arr, i_lit, size) ); 
+  VERIFY( efrom_next == e_lit + size );
+  VERIFY( ito_next == i_arr + size );
+
+  delete [] e_arr;
+  delete [] i_arr;
+}
+
+int main ()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/wrapped_env.cc b/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/wrapped_env.cc
new file mode 100644 (file)
index 0000000..b3d040e
--- /dev/null
@@ -0,0 +1,36 @@
+// 2001-08-15 Benjamin Kosnik  <bkoz@redhat.com>
+
+// Copyright (C) 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// 22.2.4.1.1 collate members
+
+#include <testsuite_hooks.h>
+
+#define main discard_main_1
+#include "1.cc"
+#undef main 
+
+int main()
+{
+  using namespace __gnu_cxx_test;
+  func_callback two;
+  two.push_back(&test01);
+  run_tests_wrapped_env("de_DE", "LANG", two);
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/wrapped_locale.cc b/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/wrapped_locale.cc
new file mode 100644 (file)
index 0000000..17d4d5d
--- /dev/null
@@ -0,0 +1,36 @@
+// 2001-08-15 Benjamin Kosnik  <bkoz@redhat.com>
+
+// Copyright (C) 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// 22.2.4.1.1 collate members
+
+#include <testsuite_hooks.h>
+
+#define main discard_main_1
+#include "1.cc"
+#undef main 
+
+int main()
+{
+  using namespace __gnu_cxx_test;
+  func_callback two;
+  two.push_back(&test01);
+  run_tests_wrapped_locale("ja_JP.eucjp", two);
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/length/char/1.cc b/libstdc++-v3/testsuite/22_locale/codecvt/length/char/1.cc
new file mode 100644 (file)
index 0000000..1ef0f26
--- /dev/null
@@ -0,0 +1,62 @@
+// 2000-08-17 Benjamin Kosnik <bkoz@cygnus.com>
+
+// Copyright (C) 2000, 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// 22.2.1.5 - Template class codecvt [lib.locale.codecvt]
+
+#include <locale>
+#include <testsuite_hooks.h>
+
+// Required instantiation, degenerate conversion.
+// codecvt<char, char, mbstate_t>
+void test01()
+{
+  using namespace std;
+  typedef codecvt_base::result                 result;
+  typedef codecvt<char, char, mbstate_t>       c_codecvt;
+
+  bool                         test = true;
+  const char*          c_lit = "black pearl jasmine tea";
+  const char*          from_next;
+  int                  size = 25;
+  char*                c_arr = new char[size];
+  char*                 c_ref = new char[size];
+  char*                        to_next;
+
+  locale               loc = locale::classic();
+  c_codecvt::state_type state;
+  const c_codecvt*     cvt = &use_facet<c_codecvt>(loc); 
+
+  // According to the resolution of DR19 (see also libstd++/9168), in
+  // case of degenerate conversion ('noconv'), "there are no changes to
+  // the values in [to, to_limit)."
+  memset(c_ref, 'X', size);
+
+  int j = cvt->length(state, c_lit, c_lit + size, 5);
+  VERIFY( j == 5 );
+
+  delete [] c_arr;
+  delete [] c_ref;
+}
+
+int main ()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/length/char/wrapped_env.cc b/libstdc++-v3/testsuite/22_locale/codecvt/length/char/wrapped_env.cc
new file mode 100644 (file)
index 0000000..b3d040e
--- /dev/null
@@ -0,0 +1,36 @@
+// 2001-08-15 Benjamin Kosnik  <bkoz@redhat.com>
+
+// Copyright (C) 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// 22.2.4.1.1 collate members
+
+#include <testsuite_hooks.h>
+
+#define main discard_main_1
+#include "1.cc"
+#undef main 
+
+int main()
+{
+  using namespace __gnu_cxx_test;
+  func_callback two;
+  two.push_back(&test01);
+  run_tests_wrapped_env("de_DE", "LANG", two);
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/length/char/wrapped_locale.cc b/libstdc++-v3/testsuite/22_locale/codecvt/length/char/wrapped_locale.cc
new file mode 100644 (file)
index 0000000..17d4d5d
--- /dev/null
@@ -0,0 +1,36 @@
+// 2001-08-15 Benjamin Kosnik  <bkoz@redhat.com>
+
+// Copyright (C) 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// 22.2.4.1.1 collate members
+
+#include <testsuite_hooks.h>
+
+#define main discard_main_1
+#include "1.cc"
+#undef main 
+
+int main()
+{
+  using namespace __gnu_cxx_test;
+  func_callback two;
+  two.push_back(&test01);
+  run_tests_wrapped_locale("ja_JP.eucjp", two);
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/length/wchar_t/1.cc b/libstdc++-v3/testsuite/22_locale/codecvt/length/wchar_t/1.cc
new file mode 100644 (file)
index 0000000..ca67324
--- /dev/null
@@ -0,0 +1,78 @@
+// 2000-08-17 Benjamin Kosnik <bkoz@cygnus.com>
+
+// Copyright (C) 2000, 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// 22.2.1.5 - Template class codecvt [lib.locale.codecvt]
+
+#include <locale>
+#include <testsuite_hooks.h>
+
+// Need to explicitly set the state(mbstate_t) to zero.
+// How to do this is not specified by the ISO C99 standard, so we
+// might need to add some operators to make the intuiative case
+// work:
+//   w_codecvt::state_type state00;
+//   state00 = 0;  
+// or, can use this explicit "C" initialization:
+//   w_codecvt::state_type state01 = {0, 0};
+// .. except Ulrich says: Use memset. Always use memset. Feel the force...
+void
+zero_state(std::mbstate_t& state)
+{ std::memset(&state, 0, sizeof(std::mbstate_t)); }
+
+// Required instantiation
+// codecvt<wchar_t, char, mbstate_t>
+void test01()
+{
+  using namespace std;
+  typedef codecvt<wchar_t, char, mbstate_t>    w_codecvt;
+  typedef codecvt_base::result                 result;
+  typedef wchar_t                              int_type;
+  typedef char                                 ext_type;
+  typedef char_traits<wchar_t>                 int_traits;
+  typedef char_traits<char>                    ext_traits;
+
+  bool                         test = true;
+  const ext_type*      e_lit = "black pearl jasmine tea";
+  const ext_type*       efrom_next;
+  const int_type*      i_lit = L"black pearl jasmine tea";
+  const int_type*       ifrom_next;
+  int                  size = strlen(e_lit);
+  ext_type*            e_arr = new ext_type[size + 1];
+  ext_type*            eto_next;
+  int_type*            i_arr = new int_type[size + 1];
+  int_type*            ito_next;
+
+  locale               loc;
+  const w_codecvt*     cvt = &use_facet<w_codecvt>(loc); 
+
+  w_codecvt::state_type state04;
+  zero_state(state04);
+  int j = cvt->length(state04, e_lit, e_lit + size, 5);
+  VERIFY( j == 5 );
+
+  delete [] e_arr;
+  delete [] i_arr;
+}
+
+int main ()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/length/wchar_t/wrapped_env.cc b/libstdc++-v3/testsuite/22_locale/codecvt/length/wchar_t/wrapped_env.cc
new file mode 100644 (file)
index 0000000..b3d040e
--- /dev/null
@@ -0,0 +1,36 @@
+// 2001-08-15 Benjamin Kosnik  <bkoz@redhat.com>
+
+// Copyright (C) 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// 22.2.4.1.1 collate members
+
+#include <testsuite_hooks.h>
+
+#define main discard_main_1
+#include "1.cc"
+#undef main 
+
+int main()
+{
+  using namespace __gnu_cxx_test;
+  func_callback two;
+  two.push_back(&test01);
+  run_tests_wrapped_env("de_DE", "LANG", two);
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/length/wchar_t/wrapped_locale.cc b/libstdc++-v3/testsuite/22_locale/codecvt/length/wchar_t/wrapped_locale.cc
new file mode 100644 (file)
index 0000000..17d4d5d
--- /dev/null
@@ -0,0 +1,36 @@
+// 2001-08-15 Benjamin Kosnik  <bkoz@redhat.com>
+
+// Copyright (C) 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// 22.2.4.1.1 collate members
+
+#include <testsuite_hooks.h>
+
+#define main discard_main_1
+#include "1.cc"
+#undef main 
+
+int main()
+{
+  using namespace __gnu_cxx_test;
+  func_callback two;
+  two.push_back(&test01);
+  run_tests_wrapped_locale("ja_JP.eucjp", two);
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/max_length/char/1.cc b/libstdc++-v3/testsuite/22_locale/codecvt/max_length/char/1.cc
new file mode 100644 (file)
index 0000000..789007a
--- /dev/null
@@ -0,0 +1,62 @@
+// 2000-08-17 Benjamin Kosnik <bkoz@cygnus.com>
+
+// Copyright (C) 2000, 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// 22.2.1.5 - Template class codecvt [lib.locale.codecvt]
+
+#include <locale>
+#include <testsuite_hooks.h>
+
+// Required instantiation, degenerate conversion.
+// codecvt<char, char, mbstate_t>
+void test01()
+{
+  using namespace std;
+  typedef codecvt_base::result                 result;
+  typedef codecvt<char, char, mbstate_t>       c_codecvt;
+
+  bool                         test = true;
+  const char*          c_lit = "black pearl jasmine tea";
+  const char*          from_next;
+  int                  size = 25;
+  char*                c_arr = new char[size];
+  char*                 c_ref = new char[size];
+  char*                        to_next;
+
+  locale               loc = locale::classic();
+  c_codecvt::state_type state;
+  const c_codecvt*     cvt = &use_facet<c_codecvt>(loc); 
+
+  // According to the resolution of DR19 (see also libstd++/9168), in
+  // case of degenerate conversion ('noconv'), "there are no changes to
+  // the values in [to, to_limit)."
+  memset(c_ref, 'X', size);
+
+  int k = cvt->max_length();
+  VERIFY( k == 1 );
+
+  delete [] c_arr;
+  delete [] c_ref;
+}
+
+int main ()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/max_length/char/wrapped_env.cc b/libstdc++-v3/testsuite/22_locale/codecvt/max_length/char/wrapped_env.cc
new file mode 100644 (file)
index 0000000..b3d040e
--- /dev/null
@@ -0,0 +1,36 @@
+// 2001-08-15 Benjamin Kosnik  <bkoz@redhat.com>
+
+// Copyright (C) 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// 22.2.4.1.1 collate members
+
+#include <testsuite_hooks.h>
+
+#define main discard_main_1
+#include "1.cc"
+#undef main 
+
+int main()
+{
+  using namespace __gnu_cxx_test;
+  func_callback two;
+  two.push_back(&test01);
+  run_tests_wrapped_env("de_DE", "LANG", two);
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/max_length/char/wrapped_locale.cc b/libstdc++-v3/testsuite/22_locale/codecvt/max_length/char/wrapped_locale.cc
new file mode 100644 (file)
index 0000000..17d4d5d
--- /dev/null
@@ -0,0 +1,36 @@
+// 2001-08-15 Benjamin Kosnik  <bkoz@redhat.com>
+
+// Copyright (C) 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// 22.2.4.1.1 collate members
+
+#include <testsuite_hooks.h>
+
+#define main discard_main_1
+#include "1.cc"
+#undef main 
+
+int main()
+{
+  using namespace __gnu_cxx_test;
+  func_callback two;
+  two.push_back(&test01);
+  run_tests_wrapped_locale("ja_JP.eucjp", two);
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/max_length/wchar_t/1.cc b/libstdc++-v3/testsuite/22_locale/codecvt/max_length/wchar_t/1.cc
new file mode 100644 (file)
index 0000000..028756c
--- /dev/null
@@ -0,0 +1,77 @@
+// 2000-08-17 Benjamin Kosnik <bkoz@cygnus.com>
+
+// Copyright (C) 2000, 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// 22.2.1.5 - Template class codecvt [lib.locale.codecvt]
+
+#include <locale>
+#include <testsuite_hooks.h>
+
+
+// Need to explicitly set the state(mbstate_t) to zero.
+// How to do this is not specified by the ISO C99 standard, so we
+// might need to add some operators to make the intuiative case
+// work:
+//   w_codecvt::state_type state00;
+//   state00 = 0;  
+// or, can use this explicit "C" initialization:
+//   w_codecvt::state_type state01 = {0, 0};
+// .. except Ulrich says: Use memset. Always use memset. Feel the force...
+void
+zero_state(std::mbstate_t& state)
+{ std::memset(&state, 0, sizeof(std::mbstate_t)); }
+
+// Required instantiation
+// codecvt<wchar_t, char, mbstate_t>
+void test01()
+{
+  using namespace std;
+  typedef codecvt<wchar_t, char, mbstate_t>    w_codecvt;
+  typedef codecvt_base::result                 result;
+  typedef wchar_t                              int_type;
+  typedef char                                 ext_type;
+  typedef char_traits<wchar_t>                 int_traits;
+  typedef char_traits<char>                    ext_traits;
+
+  bool                         test = true;
+  const ext_type*      e_lit = "black pearl jasmine tea";
+  const ext_type*       efrom_next;
+  const int_type*      i_lit = L"black pearl jasmine tea";
+  const int_type*       ifrom_next;
+  int                  size = strlen(e_lit);
+  ext_type*            e_arr = new ext_type[size + 1];
+  ext_type*            eto_next;
+  int_type*            i_arr = new int_type[size + 1];
+  int_type*            ito_next;
+
+  locale               loc;
+  const w_codecvt*     cvt = &use_facet<w_codecvt>(loc); 
+
+  int k = cvt->max_length();
+  VERIFY( k == 1 );
+
+  delete [] e_arr;
+  delete [] i_arr;
+}
+
+int main ()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/max_length/wchar_t/wrapped_env.cc b/libstdc++-v3/testsuite/22_locale/codecvt/max_length/wchar_t/wrapped_env.cc
new file mode 100644 (file)
index 0000000..b3d040e
--- /dev/null
@@ -0,0 +1,36 @@
+// 2001-08-15 Benjamin Kosnik  <bkoz@redhat.com>
+
+// Copyright (C) 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// 22.2.4.1.1 collate members
+
+#include <testsuite_hooks.h>
+
+#define main discard_main_1
+#include "1.cc"
+#undef main 
+
+int main()
+{
+  using namespace __gnu_cxx_test;
+  func_callback two;
+  two.push_back(&test01);
+  run_tests_wrapped_env("de_DE", "LANG", two);
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/max_length/wchar_t/wrapped_locale.cc b/libstdc++-v3/testsuite/22_locale/codecvt/max_length/wchar_t/wrapped_locale.cc
new file mode 100644 (file)
index 0000000..17d4d5d
--- /dev/null
@@ -0,0 +1,36 @@
+// 2001-08-15 Benjamin Kosnik  <bkoz@redhat.com>
+
+// Copyright (C) 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// 22.2.4.1.1 collate members
+
+#include <testsuite_hooks.h>
+
+#define main discard_main_1
+#include "1.cc"
+#undef main 
+
+int main()
+{
+  using namespace __gnu_cxx_test;
+  func_callback two;
+  two.push_back(&test01);
+  run_tests_wrapped_locale("ja_JP.eucjp", two);
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/out/char/1.cc b/libstdc++-v3/testsuite/22_locale/codecvt/out/char/1.cc
new file mode 100644 (file)
index 0000000..f0ef0a5
--- /dev/null
@@ -0,0 +1,68 @@
+// 2000-08-17 Benjamin Kosnik <bkoz@cygnus.com>
+
+// Copyright (C) 2000, 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// 22.2.1.5 - Template class codecvt [lib.locale.codecvt]
+
+#include <locale>
+#include <testsuite_hooks.h>
+
+// Required instantiation, degenerate conversion.
+// codecvt<char, char, mbstate_t>
+void test01()
+{
+  using namespace std;
+  typedef codecvt_base::result                 result;
+  typedef codecvt<char, char, mbstate_t>       c_codecvt;
+
+  bool                         test = true;
+  const char*          c_lit = "black pearl jasmine tea";
+  const char*          from_next;
+  int                  size = 25;
+  char*                c_arr = new char[size];
+  char*                 c_ref = new char[size];
+  char*                        to_next;
+
+  locale               loc = locale::classic();
+  c_codecvt::state_type state;
+  const c_codecvt*     cvt = &use_facet<c_codecvt>(loc); 
+
+  // According to the resolution of DR19 (see also libstd++/9168), in
+  // case of degenerate conversion ('noconv'), "there are no changes to
+  // the values in [to, to_limit)."
+  memset(c_ref, 'X', size);
+
+  // out
+  memset(c_arr, 'X', size);
+  result r2 = cvt->out(state, c_lit, c_lit + size, from_next, 
+                      c_arr, c_arr + size, to_next);
+  VERIFY( r2 == codecvt_base::noconv );
+  VERIFY( !memcmp(c_arr, c_ref, size) ); 
+  VERIFY( from_next == c_lit );
+  VERIFY( to_next == c_arr );
+
+  delete [] c_arr;
+  delete [] c_ref;
+}
+
+int main ()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/out/char/wrapped_env.cc b/libstdc++-v3/testsuite/22_locale/codecvt/out/char/wrapped_env.cc
new file mode 100644 (file)
index 0000000..b3d040e
--- /dev/null
@@ -0,0 +1,36 @@
+// 2001-08-15 Benjamin Kosnik  <bkoz@redhat.com>
+
+// Copyright (C) 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// 22.2.4.1.1 collate members
+
+#include <testsuite_hooks.h>
+
+#define main discard_main_1
+#include "1.cc"
+#undef main 
+
+int main()
+{
+  using namespace __gnu_cxx_test;
+  func_callback two;
+  two.push_back(&test01);
+  run_tests_wrapped_env("de_DE", "LANG", two);
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/out/char/wrapped_locale.cc b/libstdc++-v3/testsuite/22_locale/codecvt/out/char/wrapped_locale.cc
new file mode 100644 (file)
index 0000000..17d4d5d
--- /dev/null
@@ -0,0 +1,36 @@
+// 2001-08-15 Benjamin Kosnik  <bkoz@redhat.com>
+
+// Copyright (C) 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// 22.2.4.1.1 collate members
+
+#include <testsuite_hooks.h>
+
+#define main discard_main_1
+#include "1.cc"
+#undef main 
+
+int main()
+{
+  using namespace __gnu_cxx_test;
+  func_callback two;
+  two.push_back(&test01);
+  run_tests_wrapped_locale("ja_JP.eucjp", two);
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/out/wchar_t/1.cc b/libstdc++-v3/testsuite/22_locale/codecvt/out/wchar_t/1.cc
new file mode 100644 (file)
index 0000000..3727044
--- /dev/null
@@ -0,0 +1,83 @@
+// 2000-08-17 Benjamin Kosnik <bkoz@cygnus.com>
+
+// Copyright (C) 2000, 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// 22.2.1.5 - Template class codecvt [lib.locale.codecvt]
+
+#include <locale>
+#include <testsuite_hooks.h>
+
+// Need to explicitly set the state(mbstate_t) to zero.
+// How to do this is not specified by the ISO C99 standard, so we
+// might need to add some operators to make the intuiative case
+// work:
+//   w_codecvt::state_type state00;
+//   state00 = 0;  
+// or, can use this explicit "C" initialization:
+//   w_codecvt::state_type state01 = {0, 0};
+// .. except Ulrich says: Use memset. Always use memset. Feel the force...
+void
+zero_state(std::mbstate_t& state)
+{ std::memset(&state, 0, sizeof(std::mbstate_t)); }
+
+// Required instantiation
+// codecvt<wchar_t, char, mbstate_t>
+void test01()
+{
+  using namespace std;
+  typedef codecvt<wchar_t, char, mbstate_t>    w_codecvt;
+  typedef codecvt_base::result                 result;
+  typedef wchar_t                              int_type;
+  typedef char                                 ext_type;
+  typedef char_traits<wchar_t>                 int_traits;
+  typedef char_traits<char>                    ext_traits;
+
+  bool                         test = true;
+  const ext_type*      e_lit = "black pearl jasmine tea";
+  const ext_type*       efrom_next;
+  const int_type*      i_lit = L"black pearl jasmine tea";
+  const int_type*       ifrom_next;
+  int                  size = strlen(e_lit);
+  ext_type*            e_arr = new ext_type[size + 1];
+  ext_type*            eto_next;
+  int_type*            i_arr = new int_type[size + 1];
+  int_type*            ito_next;
+
+  locale               loc;
+  const w_codecvt*     cvt = &use_facet<w_codecvt>(loc); 
+
+  // out
+  w_codecvt::state_type state02;
+  zero_state(state02);  
+  result r2 = cvt->out(state02, i_lit, i_lit + size, ifrom_next, 
+                      e_arr, e_arr + size, eto_next);
+  VERIFY( r2 == codecvt_base::ok );
+  VERIFY( !ext_traits::compare(e_arr, e_lit, size) ); 
+  VERIFY( ifrom_next == i_lit + size );
+  VERIFY( eto_next == e_arr + size );
+
+  delete [] e_arr;
+  delete [] i_arr;
+}
+
+int main ()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/out/wchar_t/wrapped_env.cc b/libstdc++-v3/testsuite/22_locale/codecvt/out/wchar_t/wrapped_env.cc
new file mode 100644 (file)
index 0000000..b3d040e
--- /dev/null
@@ -0,0 +1,36 @@
+// 2001-08-15 Benjamin Kosnik  <bkoz@redhat.com>
+
+// Copyright (C) 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// 22.2.4.1.1 collate members
+
+#include <testsuite_hooks.h>
+
+#define main discard_main_1
+#include "1.cc"
+#undef main 
+
+int main()
+{
+  using namespace __gnu_cxx_test;
+  func_callback two;
+  two.push_back(&test01);
+  run_tests_wrapped_env("de_DE", "LANG", two);
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/out/wchar_t/wrapped_locale.cc b/libstdc++-v3/testsuite/22_locale/codecvt/out/wchar_t/wrapped_locale.cc
new file mode 100644 (file)
index 0000000..17d4d5d
--- /dev/null
@@ -0,0 +1,36 @@
+// 2001-08-15 Benjamin Kosnik  <bkoz@redhat.com>
+
+// Copyright (C) 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// 22.2.4.1.1 collate members
+
+#include <testsuite_hooks.h>
+
+#define main discard_main_1
+#include "1.cc"
+#undef main 
+
+int main()
+{
+  using namespace __gnu_cxx_test;
+  func_callback two;
+  two.push_back(&test01);
+  run_tests_wrapped_locale("ja_JP.eucjp", two);
+  return 0;
+}
@@ -1,6 +1,6 @@
 // 2000-08-17 Benjamin Kosnik <bkoz@cygnus.com>
 
-// Copyright (C) 2000, 2002 Free Software Foundation
+// Copyright (C) 2000, 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
@@ -39,7 +39,7 @@ void test01()
   char*                 c_ref = new char[size];
   char*                        to_next;
 
-  locale               loc;
+  locale               loc = locale::classic();
   c_codecvt::state_type state;
   const c_codecvt*     cvt = &use_facet<c_codecvt>(loc); 
 
@@ -73,58 +73,12 @@ void test01()
   VERIFY( !strcmp(c_arr, c_lit) ); 
   VERIFY( to_next == c_arr );
 
-  int i = cvt->encoding();
-  VERIFY( i == 1 );
-
-  VERIFY( cvt->always_noconv() );
-
-  int j = cvt->length(state, c_lit, c_lit + size, 5);
-  VERIFY( j == 5 );
-
-  int k = cvt->max_length();
-  VERIFY( k == 1 );
-
   delete [] c_arr;
   delete [] c_ref;
 }
 
-// libstdc++/5280
-void test02()
-{
-#ifdef _GLIBCPP_HAVE_SETENV 
-  // Set the global locale to non-"C".
-  std::locale loc_de("de_DE");
-  std::locale::global(loc_de);
-
-  // Set LANG environment variable to de_DE.
-  const char* oldLANG = getenv("LANG");
-  if (!setenv("LANG", "de_DE", 1))
-    {
-      test01();
-      setenv("LANG", oldLANG ? oldLANG : "", 1);
-    }
-#endif
-}
-
-// http://gcc.gnu.org/ml/libstdc++/2002-05/msg00038.html
-void test03()
-{
-  bool test = true;
-
-  const char* tentLANG = std::setlocale(LC_ALL, "ja_JP.eucjp");
-  if (tentLANG != NULL)
-    {
-      std::string preLANG = tentLANG;
-      test01();
-      std::string postLANG = std::setlocale(LC_ALL, NULL);
-      VERIFY( preLANG == postLANG );
-    }
-}
-
 int main ()
 {
   test01();
-  test02();
-  test03();
   return 0;
 }
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/unshift/char/wrapped_env.cc b/libstdc++-v3/testsuite/22_locale/codecvt/unshift/char/wrapped_env.cc
new file mode 100644 (file)
index 0000000..b3d040e
--- /dev/null
@@ -0,0 +1,36 @@
+// 2001-08-15 Benjamin Kosnik  <bkoz@redhat.com>
+
+// Copyright (C) 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// 22.2.4.1.1 collate members
+
+#include <testsuite_hooks.h>
+
+#define main discard_main_1
+#include "1.cc"
+#undef main 
+
+int main()
+{
+  using namespace __gnu_cxx_test;
+  func_callback two;
+  two.push_back(&test01);
+  run_tests_wrapped_env("de_DE", "LANG", two);
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/unshift/char/wrapped_locale.cc b/libstdc++-v3/testsuite/22_locale/codecvt/unshift/char/wrapped_locale.cc
new file mode 100644 (file)
index 0000000..17d4d5d
--- /dev/null
@@ -0,0 +1,36 @@
+// 2001-08-15 Benjamin Kosnik  <bkoz@redhat.com>
+
+// Copyright (C) 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// 22.2.4.1.1 collate members
+
+#include <testsuite_hooks.h>
+
+#define main discard_main_1
+#include "1.cc"
+#undef main 
+
+int main()
+{
+  using namespace __gnu_cxx_test;
+  func_callback two;
+  two.push_back(&test01);
+  run_tests_wrapped_locale("ja_JP.eucjp", two);
+  return 0;
+}
@@ -1,6 +1,6 @@
-// 2000-08-18 Benjamin Kosnik <bkoz@cygnus.com>
+// 2000-08-17 Benjamin Kosnik <bkoz@cygnus.com>
 
-// Copyright (C) 2000, 2002 Free Software Foundation
+// Copyright (C) 2000, 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
 
 // 22.2.1.5 - Template class codecvt [lib.locale.codecvt]
 
-#include <cwchar> // for mbstate_t
 #include <locale>
 #include <testsuite_hooks.h>
 
-
 // Need to explicitly set the state(mbstate_t) to zero.
 // How to do this is not specified by the ISO C99 standard, so we
 // might need to add some operators to make the intuiative case
@@ -34,7 +32,6 @@
 // or, can use this explicit "C" initialization:
 //   w_codecvt::state_type state01 = {0, 0};
 // .. except Ulrich says: Use memset. Always use memset. Feel the force...
-#ifdef _GLIBCPP_USE_WCHAR_T
 void
 zero_state(std::mbstate_t& state)
 { std::memset(&state, 0, sizeof(std::mbstate_t)); }
@@ -93,66 +90,10 @@ void test01()
   VERIFY( r3 == codecvt_base::noconv );
   VERIFY( !strcmp(e_arr, e_lit) ); 
   VERIFY( eto_next == e_arr );
-
-  int i = cvt->encoding();
-  VERIFY( i == 4 ); // Target-dependent.
-
-  VERIFY( !cvt->always_noconv() );
-
-  w_codecvt::state_type state04;
-  zero_state(state04);
-  int j = cvt->length(state03, e_lit, e_lit + size, 5);
-  VERIFY( j == 5 );
-
-  int k = cvt->max_length();
-  VERIFY( k == 1 );
-
-  delete [] e_arr;
-  delete [] i_arr;
-}
-
-// libstdc++/5280
-void test02()
-{
-#ifdef _GLIBCPP_HAVE_SETENV 
-  // Set the global locale to non-"C".
-  std::locale loc_de("de_DE");
-  std::locale::global(loc_de);
-
-  // Set LANG environment variable to de_DE.
-  const char* oldLANG = getenv("LANG");
-  if (!setenv("LANG", "de_DE", 1))
-    {
-      test01();
-      setenv("LANG", oldLANG ? oldLANG : "", 1);
-    }
-#endif
-}
-
-// http://gcc.gnu.org/ml/libstdc++/2002-05/msg00038.html
-void test03()
-{
-  bool test = true;
-
-  const char* tentLANG = std::setlocale(LC_ALL, "ja_JP.eucjp");
-  if (tentLANG != NULL)
-    {
-      std::string preLANG = tentLANG;
-      test01();
-      std::string postLANG = std::setlocale(LC_ALL, NULL);
-      VERIFY( preLANG == postLANG );
-    }
 }
-#endif /* !defined(_GLIBCPP_USE_WCHAR_T) */
-
 
 int main ()
 {
-#if _GLIBCPP_USE_WCHAR_T
   test01();
-  test02();
-  test03();
-#endif 
-
   return 0;
 }
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/unshift/wchar_t/wrapped_env.cc b/libstdc++-v3/testsuite/22_locale/codecvt/unshift/wchar_t/wrapped_env.cc
new file mode 100644 (file)
index 0000000..b3d040e
--- /dev/null
@@ -0,0 +1,36 @@
+// 2001-08-15 Benjamin Kosnik  <bkoz@redhat.com>
+
+// Copyright (C) 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// 22.2.4.1.1 collate members
+
+#include <testsuite_hooks.h>
+
+#define main discard_main_1
+#include "1.cc"
+#undef main 
+
+int main()
+{
+  using namespace __gnu_cxx_test;
+  func_callback two;
+  two.push_back(&test01);
+  run_tests_wrapped_env("de_DE", "LANG", two);
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/unshift/wchar_t/wrapped_locale.cc b/libstdc++-v3/testsuite/22_locale/codecvt/unshift/wchar_t/wrapped_locale.cc
new file mode 100644 (file)
index 0000000..17d4d5d
--- /dev/null
@@ -0,0 +1,36 @@
+// 2001-08-15 Benjamin Kosnik  <bkoz@redhat.com>
+
+// Copyright (C) 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// 22.2.4.1.1 collate members
+
+#include <testsuite_hooks.h>
+
+#define main discard_main_1
+#include "1.cc"
+#undef main 
+
+int main()
+{
+  using namespace __gnu_cxx_test;
+  func_callback two;
+  two.push_back(&test01);
+  run_tests_wrapped_locale("ja_JP.eucjp", two);
+  return 0;
+}
similarity index 87%
rename from libstdc++-v3/testsuite/22_locale/collate.cc
rename to libstdc++-v3/testsuite/22_locale/collate/1.cc
index d7b1f16..5b55b03 100644 (file)
@@ -1,3 +1,4 @@
+// { dg-do compile }
 // 2001-08-15  Benjamin Kosnik  <bkoz@redhat.com>
 
 // Copyright (C) 2001 Free Software Foundation
@@ -20,8 +21,6 @@
 
 // 22.2.4 The collate category
 
-// { dg-do compile }
-
 #include <locale>
 
 void test01()
@@ -37,18 +36,8 @@ void test01()
   typedef test_type::string_type string_type;
 }
 
-// Should be able to instantiate this for other types besides char, wchar_t
-class gnu_collate: public std::collate<unsigned char> 
-{ };
-
-void test02()
-{ 
-  gnu_collate facet01;
-}
-
 int main()
 {
   test01();
-  test02();
   return 0;
 }
diff --git a/libstdc++-v3/testsuite/22_locale/collate/2.cc b/libstdc++-v3/testsuite/22_locale/collate/2.cc
new file mode 100644 (file)
index 0000000..98bc214
--- /dev/null
@@ -0,0 +1,39 @@
+// { dg-do compile }
+// 2001-08-15  Benjamin Kosnik  <bkoz@redhat.com>
+
+// Copyright (C) 2001 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// 22.2.4 The collate category
+
+#include <locale>
+
+// Should be able to instantiate this for other types besides char, wchar_t
+class gnu_collate: public std::collate<unsigned char> 
+{ };
+
+void test02()
+{ 
+  gnu_collate facet01;
+}
+
+int main()
+{
+  test02();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/22_locale/collate/compare/char/1.cc b/libstdc++-v3/testsuite/22_locale/collate/compare/char/1.cc
new file mode 100644 (file)
index 0000000..7487108
--- /dev/null
@@ -0,0 +1,79 @@
+// 2001-08-15 Benjamin Kosnik  <bkoz@redhat.com>
+
+// Copyright (C) 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// 22.2.4.1.1 collate members
+
+#include <locale>
+#include <testsuite_hooks.h>
+
+// Check "C" locale.
+void test01()
+{
+  using namespace std;
+  typedef std::collate<char>::string_type string_type;
+
+  bool test = true;
+
+  // basic construction
+  locale loc_c = locale::classic();
+  locale loc_us("en_US");
+  locale loc_fr("fr_FR");
+  locale loc_de("de_DE");
+  VERIFY( loc_c != loc_de );
+  VERIFY( loc_us != loc_fr );
+  VERIFY( loc_us != loc_de );
+  VERIFY( loc_de != loc_fr );
+
+  // cache the collate facets
+  const collate<char>& coll_c = use_facet<collate<char> >(loc_c); 
+  const collate<char>& coll_us = use_facet<collate<char> >(loc_us); 
+  const collate<char>& coll_fr = use_facet<collate<char> >(loc_fr); 
+  const collate<char>& coll_de = use_facet<collate<char> >(loc_de); 
+
+  // int compare(const charT*, const charT*, const charT*, const charT*) const
+
+  const char* strlit1 = "monkey picked tikuanyin oolong";
+  const char* strlit2 = "imperial tea court green oolong";
+
+  int i1;
+  int i2;
+  int size1 = char_traits<char>::length(strlit1) - 1;
+  int size2 = char_traits<char>::length(strlit2) - 1;
+
+  i1 = coll_c.compare(strlit1, strlit1 + size1, strlit1, strlit1 + 7);
+  VERIFY ( i1 == 1 );
+  i1 = coll_c.compare(strlit1, strlit1 + 7, strlit1, strlit1 + size1);
+  VERIFY ( i1 == -1 );
+  i1 = coll_c.compare(strlit1, strlit1 + 7, strlit1, strlit1 + 7);
+  VERIFY ( i1 == 0 );
+
+  i2 = coll_c.compare(strlit2, strlit2 + size2, strlit2, strlit2 + 13);
+  VERIFY ( i2 == 1 );
+  i2 = coll_c.compare(strlit2, strlit2 + 13, strlit2, strlit2 + size2);
+  VERIFY ( i2 == -1 );
+  i2 = coll_c.compare(strlit2, strlit2 + size2, strlit2, strlit2 + size2);
+  VERIFY ( i2 == 0 );
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/22_locale/collate/compare/char/2.cc b/libstdc++-v3/testsuite/22_locale/collate/compare/char/2.cc
new file mode 100644 (file)
index 0000000..52052f9
--- /dev/null
@@ -0,0 +1,86 @@
+// 2001-08-15 Benjamin Kosnik  <bkoz@redhat.com>
+
+// Copyright (C) 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// 22.2.4.1.1 collate members
+
+#include <locale>
+#include <testsuite_hooks.h>
+
+// Check German "de_DE" locale.
+void test02()
+{
+  using namespace std;
+  typedef std::collate<char>::string_type string_type;
+
+  bool test = true;
+
+  // basic construction
+  locale loc_c = locale::classic();
+  locale loc_us("en_US");
+  locale loc_fr("fr_FR");
+  locale loc_de("de_DE");
+  VERIFY( loc_c != loc_de );
+  VERIFY( loc_us != loc_fr );
+  VERIFY( loc_us != loc_de );
+  VERIFY( loc_de != loc_fr );
+
+  // cache the collate facets
+  const collate<char>& coll_c = use_facet<collate<char> >(loc_c); 
+  const collate<char>& coll_us = use_facet<collate<char> >(loc_us); 
+  const collate<char>& coll_fr = use_facet<collate<char> >(loc_fr); 
+  const collate<char>& coll_de = use_facet<collate<char> >(loc_de); 
+
+  // int compare(const charT*, const charT*, const charT*, const charT*) const
+
+  const char* strlit1 = "monkey picked tikuanyin oolong";
+  const char* strlit2 = "imperial tea court green oolong";
+  const char* strlit3 = "Äuglein Augment"; // "C" == "Augment Äuglein"
+  const char* strlit4 = "Base baß Baß Bast"; // "C" == "Base baß Baß Bast"
+
+  int i1;
+  int i2;
+  int size1 = char_traits<char>::length(strlit1) - 1;
+  int size2 = char_traits<char>::length(strlit2) - 1;
+  int size3 = char_traits<char>::length(strlit3) - 1;
+  int size4 = char_traits<char>::length(strlit4) - 1;
+
+  i1 = coll_de.compare(strlit3, strlit3 + size3, strlit3, strlit3 + 7);
+  VERIFY ( i1 == 1 );
+  i1 = coll_de.compare(strlit3, strlit3 + 7, strlit3, strlit3 + size1);
+  VERIFY ( i1 == -1 );
+  i1 = coll_de.compare(strlit3, strlit3 + 7, strlit3, strlit3 + 7);
+  VERIFY ( i1 == 0 );
+
+  i1 = coll_de.compare(strlit3, strlit3 + 6, strlit3 + 8, strlit3 + 14);
+  VERIFY ( i1 == -1 );
+
+  i2 = coll_de.compare(strlit4, strlit4 + size4, strlit4, strlit4 + 13);
+  VERIFY ( i2 == 1 );
+  i2 = coll_de.compare(strlit4, strlit4 + 13, strlit4, strlit4 + size4);
+  VERIFY ( i2 == -1 );
+  i2 = coll_de.compare(strlit4, strlit4 + size4, strlit4, strlit4 + size4);
+  VERIFY ( i2 == 0 );
+}
+
+int main()
+{
+  test02();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/22_locale/collate/compare/char/wrapped_env.cc b/libstdc++-v3/testsuite/22_locale/collate/compare/char/wrapped_env.cc
new file mode 100644 (file)
index 0000000..4f1d5e3
--- /dev/null
@@ -0,0 +1,41 @@
+// 2001-08-15 Benjamin Kosnik  <bkoz@redhat.com>
+
+// Copyright (C) 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// 22.2.4.1.1 collate members
+
+#include <testsuite_hooks.h>
+
+#define main discard_main_1
+#include "1.cc"
+#undef main 
+
+#define main discard_main_2
+#include "2.cc"
+#undef main 
+
+int main()
+{
+  using namespace __gnu_cxx_test;
+  func_callback two;
+  two.push_back(&test01);
+  two.push_back(&test02);
+  run_tests_wrapped_env("de_DE", "LANG", two);
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/22_locale/collate/compare/char/wrapped_locale.cc b/libstdc++-v3/testsuite/22_locale/collate/compare/char/wrapped_locale.cc
new file mode 100644 (file)
index 0000000..8d78718
--- /dev/null
@@ -0,0 +1,41 @@
+// 2001-08-15 Benjamin Kosnik  <bkoz@redhat.com>
+
+// Copyright (C) 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// 22.2.4.1.1 collate members
+
+#include <testsuite_hooks.h>
+
+#define main discard_main_1
+#include "1.cc"
+#undef main 
+
+#define main discard_main_2
+#include "2.cc"
+#undef main 
+
+int main()
+{
+  using namespace __gnu_cxx_test;
+  func_callback two;
+  two.push_back(&test01);
+  two.push_back(&test02);
+  run_tests_wrapped_locale("ja_JP.eucjp", two);
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/22_locale/collate/compare/wchar_t/1.cc b/libstdc++-v3/testsuite/22_locale/collate/compare/wchar_t/1.cc
new file mode 100644 (file)
index 0000000..0ba7b05
--- /dev/null
@@ -0,0 +1,79 @@
+// 2001-08-15 Benjamin Kosnik  <bkoz@redhat.com>
+
+// Copyright (C) 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// 22.2.4.1.1 collate members
+
+#include <locale>
+#include <testsuite_hooks.h>
+
+// Check "C" locale.
+void test01()
+{
+  using namespace std;
+  typedef std::collate<wchar_t>::string_type string_type;
+
+  bool test = true;
+
+  // basic construction
+  locale loc_c = locale::classic();
+  locale loc_us("en_US");
+  locale loc_fr("fr_FR");
+  locale loc_de("de_DE");
+  VERIFY( loc_c != loc_de );
+  VERIFY( loc_us != loc_fr );
+  VERIFY( loc_us != loc_de );
+  VERIFY( loc_de != loc_fr );
+
+  // cache the collate facets
+  const collate<wchar_t>& coll_c = use_facet<collate<wchar_t> >(loc_c); 
+  const collate<wchar_t>& coll_us = use_facet<collate<wchar_t> >(loc_us); 
+  const collate<wchar_t>& coll_fr = use_facet<collate<wchar_t> >(loc_fr); 
+  const collate<wchar_t>& coll_de = use_facet<collate<wchar_t> >(loc_de); 
+
+  // int compare(const charT*, const charT*, const charT*, const charT*) const
+
+  const wchar_t* strlit1 = L"monkey picked tikuanyin oolong";
+  const wchar_t* strlit2 = L"imperial tea court green oolong";
+
+  int i1;
+  int i2;
+  int size1 = char_traits<wchar_t>::length(strlit1) - 1;
+  int size2 = char_traits<wchar_t>::length(strlit2) - 1;
+
+  i1 = coll_c.compare(strlit1, strlit1 + size1, strlit1, strlit1 + 7);
+  VERIFY ( i1 == 1 );
+  i1 = coll_c.compare(strlit1, strlit1 + 7, strlit1, strlit1 + size1);
+  VERIFY ( i1 == -1 );
+  i1 = coll_c.compare(strlit1, strlit1 + 7, strlit1, strlit1 + 7);
+  VERIFY ( i1 == 0 );
+
+  i2 = coll_c.compare(strlit2, strlit2 + size2, strlit2, strlit2 + 13);
+  VERIFY ( i2 == 1 );
+  i2 = coll_c.compare(strlit2, strlit2 + 13, strlit2, strlit2 + size2);
+  VERIFY ( i2 == -1 );
+  i2 = coll_c.compare(strlit2, strlit2 + size2, strlit2, strlit2 + size2);
+  VERIFY ( i2 == 0 );
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/22_locale/collate/compare/wchar_t/2.cc b/libstdc++-v3/testsuite/22_locale/collate/compare/wchar_t/2.cc
new file mode 100644 (file)
index 0000000..24b327f
--- /dev/null
@@ -0,0 +1,86 @@
+// 2001-08-15 Benjamin Kosnik  <bkoz@redhat.com>
+
+// Copyright (C) 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// 22.2.4.1.1 collate members
+
+#include <locale>
+#include <testsuite_hooks.h>
+
+// Check German "de_DE" locale.
+void test02()
+{
+  using namespace std;
+  typedef std::collate<wchar_t>::string_type string_type;
+
+  bool test = true;
+
+  // basic construction
+  locale loc_c = locale::classic();
+  locale loc_us("en_US");
+  locale loc_fr("fr_FR");
+  locale loc_de("de_DE");
+  VERIFY( loc_c != loc_de );
+  VERIFY( loc_us != loc_fr );
+  VERIFY( loc_us != loc_de );
+  VERIFY( loc_de != loc_fr );
+
+  // cache the collate facets
+  const collate<wchar_t>& coll_c = use_facet<collate<wchar_t> >(loc_c); 
+  const collate<wchar_t>& coll_us = use_facet<collate<wchar_t> >(loc_us); 
+  const collate<wchar_t>& coll_fr = use_facet<collate<wchar_t> >(loc_fr); 
+  const collate<wchar_t>& coll_de = use_facet<collate<wchar_t> >(loc_de); 
+
+  // int compare(const charT*, const charT*, const charT*, const charT*) const
+
+  const wchar_t* strlit1 = L"monkey picked tikuanyin oolong";
+  const wchar_t* strlit2 = L"imperial tea court green oolong";
+  const wchar_t* strlit3 = L"Äuglein Augment"; // "C" == "Augment Äuglein"
+  const wchar_t* strlit4 = L"Base baß Baß Bast"; // "C" == "Base baß Baß Bast"
+
+  int i1;
+  int i2;
+  int size1 = char_traits<wchar_t>::length(strlit1) - 1;
+  int size2 = char_traits<wchar_t>::length(strlit2) - 1;
+  int size3 = char_traits<wchar_t>::length(strlit3) - 1;
+  int size4 = char_traits<wchar_t>::length(strlit4) - 1;
+
+  i1 = coll_de.compare(strlit3, strlit3 + size3, strlit3, strlit3 + 7);
+  VERIFY ( i1 == 1 );
+  i1 = coll_de.compare(strlit3, strlit3 + 7, strlit3, strlit3 + size1);
+  VERIFY ( i1 == -1 );
+  i1 = coll_de.compare(strlit3, strlit3 + 7, strlit3, strlit3 + 7);
+  VERIFY ( i1 == 0 );
+
+  i1 = coll_de.compare(strlit3, strlit3 + 6, strlit3 + 8, strlit3 + 14);
+  VERIFY ( i1 == -1 );
+
+  i2 = coll_de.compare(strlit4, strlit4 + size4, strlit4, strlit4 + 13);
+  VERIFY ( i2 == 1 );
+  i2 = coll_de.compare(strlit4, strlit4 + 13, strlit4, strlit4 + size4);
+  VERIFY ( i2 == -1 );
+  i2 = coll_de.compare(strlit4, strlit4 + size4, strlit4, strlit4 + size4);
+  VERIFY ( i2 == 0 );
+}
+
+int main()
+{
+  test02();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/22_locale/collate/compare/wchar_t/wrapped_env.cc b/libstdc++-v3/testsuite/22_locale/collate/compare/wchar_t/wrapped_env.cc
new file mode 100644 (file)
index 0000000..4f1d5e3
--- /dev/null
@@ -0,0 +1,41 @@
+// 2001-08-15 Benjamin Kosnik  <bkoz@redhat.com>
+
+// Copyright (C) 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// 22.2.4.1.1 collate members
+
+#include <testsuite_hooks.h>
+
+#define main discard_main_1
+#include "1.cc"
+#undef main 
+
+#define main discard_main_2
+#include "2.cc"
+#undef main 
+
+int main()
+{
+  using namespace __gnu_cxx_test;
+  func_callback two;
+  two.push_back(&test01);
+  two.push_back(&test02);
+  run_tests_wrapped_env("de_DE", "LANG", two);
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/22_locale/collate/compare/wchar_t/wrapped_locale.cc b/libstdc++-v3/testsuite/22_locale/collate/compare/wchar_t/wrapped_locale.cc
new file mode 100644 (file)
index 0000000..8d78718
--- /dev/null
@@ -0,0 +1,41 @@
+// 2001-08-15 Benjamin Kosnik  <bkoz@redhat.com>
+
+// Copyright (C) 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// 22.2.4.1.1 collate members
+
+#include <testsuite_hooks.h>
+
+#define main discard_main_1
+#include "1.cc"
+#undef main 
+
+#define main discard_main_2
+#include "2.cc"
+#undef main 
+
+int main()
+{
+  using namespace __gnu_cxx_test;
+  func_callback two;
+  two.push_back(&test01);
+  two.push_back(&test02);
+  run_tests_wrapped_locale("ja_JP.eucjp", two);
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/22_locale/collate/hash/char/1.cc b/libstdc++-v3/testsuite/22_locale/collate/hash/char/1.cc
new file mode 100644 (file)
index 0000000..9be618a
--- /dev/null
@@ -0,0 +1,46 @@
+// 2001-08-15 Benjamin Kosnik  <bkoz@redhat.com>
+
+// Copyright (C) 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// 22.2.4.1.1 collate members
+
+#include <locale>
+#include <testsuite_hooks.h>
+
+// Check "C" locale.
+void test01()
+{
+  bool test = true;
+
+  std::string str1("fffff");
+  std::string str2("ffffffffffff");
+
+  const std::locale cloc = std::locale::classic();
+  const std::collate<char> &col = std::use_facet<std::collate<char> >(cloc);
+
+  long l1 = col.hash(str1.c_str(), str1.c_str() + str1.size());
+  long l2 = col.hash(str2.c_str(), str2.c_str() + str2.size());
+  VERIFY( l1 != l2 );
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/22_locale/collate/hash/char/2.cc b/libstdc++-v3/testsuite/22_locale/collate/hash/char/2.cc
new file mode 100644 (file)
index 0000000..75eb202
--- /dev/null
@@ -0,0 +1,75 @@
+// 2001-08-15 Benjamin Kosnik  <bkoz@redhat.com>
+
+// Copyright (C) 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// 22.2.4.1.1 collate members
+
+#include <locale>
+#include <testsuite_hooks.h>
+
+// Check German "de_DE" locale.
+void test02()
+{
+  using namespace std;
+  typedef std::collate<char>::string_type string_type;
+
+  bool test = true;
+
+  // basic construction
+  locale loc_c = locale::classic();
+  locale loc_us("en_US");
+  locale loc_fr("fr_FR");
+  locale loc_de("de_DE");
+  VERIFY( loc_c != loc_de );
+  VERIFY( loc_us != loc_fr );
+  VERIFY( loc_us != loc_de );
+  VERIFY( loc_de != loc_fr );
+
+  // cache the collate facets
+  const collate<char>& coll_c = use_facet<collate<char> >(loc_c); 
+  const collate<char>& coll_us = use_facet<collate<char> >(loc_us); 
+  const collate<char>& coll_fr = use_facet<collate<char> >(loc_fr); 
+  const collate<char>& coll_de = use_facet<collate<char> >(loc_de); 
+
+  // long hash(const charT*, const charT*) cosnt
+  const char* strlit1 = "monkey picked tikuanyin oolong";
+  const char* strlit2 = "imperial tea court green oolong";
+  const char* strlit3 = "Äuglein Augment"; // "C" == "Augment Äuglein"
+  const char* strlit4 = "Base baß Baß Bast"; // "C" == "Base baß Baß Bast"
+
+  int i1;
+  int i2;
+  long l1;
+  long l2;
+  int size3 = char_traits<char>::length(strlit4) - 1;
+  int size4 = char_traits<char>::length(strlit3) - 1;
+
+  l1 = coll_de.hash(strlit3, strlit3 + size3);
+  l2 = coll_de.hash(strlit3, strlit3 + size3 - 1);
+  VERIFY ( l1 != l2 );
+  l1 = coll_de.hash(strlit3, strlit3 + size3);
+  l2 = coll_de.hash(strlit4, strlit4 + size4);
+  VERIFY ( l1 != l2 );
+}
+
+int main()
+{
+  test02();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/22_locale/collate/hash/char/wrapped_env.cc b/libstdc++-v3/testsuite/22_locale/collate/hash/char/wrapped_env.cc
new file mode 100644 (file)
index 0000000..4f1d5e3
--- /dev/null
@@ -0,0 +1,41 @@
+// 2001-08-15 Benjamin Kosnik  <bkoz@redhat.com>
+
+// Copyright (C) 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// 22.2.4.1.1 collate members
+
+#include <testsuite_hooks.h>
+
+#define main discard_main_1
+#include "1.cc"
+#undef main 
+
+#define main discard_main_2
+#include "2.cc"
+#undef main 
+
+int main()
+{
+  using namespace __gnu_cxx_test;
+  func_callback two;
+  two.push_back(&test01);
+  two.push_back(&test02);
+  run_tests_wrapped_env("de_DE", "LANG", two);
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/22_locale/collate/hash/char/wrapped_locale.cc b/libstdc++-v3/testsuite/22_locale/collate/hash/char/wrapped_locale.cc
new file mode 100644 (file)
index 0000000..8d78718
--- /dev/null
@@ -0,0 +1,41 @@
+// 2001-08-15 Benjamin Kosnik  <bkoz@redhat.com>
+
+// Copyright (C) 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// 22.2.4.1.1 collate members
+
+#include <testsuite_hooks.h>
+
+#define main discard_main_1
+#include "1.cc"
+#undef main 
+
+#define main discard_main_2
+#include "2.cc"
+#undef main 
+
+int main()
+{
+  using namespace __gnu_cxx_test;
+  func_callback two;
+  two.push_back(&test01);
+  two.push_back(&test02);
+  run_tests_wrapped_locale("ja_JP.eucjp", two);
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/22_locale/collate/hash/wchar_t/1.cc b/libstdc++-v3/testsuite/22_locale/collate/hash/wchar_t/1.cc
new file mode 100644 (file)
index 0000000..73f8da1
--- /dev/null
@@ -0,0 +1,48 @@
+// 2001-08-15 Benjamin Kosnik  <bkoz@redhat.com>
+
+// Copyright (C) 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// 22.2.4.1.1 collate members
+
+#include <locale>
+#include <testsuite_hooks.h>
+
+// Check "C" locale.
+void test01()
+{
+  using namespace std;
+  typedef std::collate<wchar_t>::string_type string_type;
+  bool test = true;
+
+  string_type str1(L"fffff");
+  string_type str2(L"ffffffffffff");
+
+  const std::locale cloc = std::locale::classic();
+  const std::collate<wchar_t> &col = std::use_facet<std::collate<wchar_t> >(cloc);
+
+  long l1 = col.hash(str1.c_str(), str1.c_str() + str1.size());
+  long l2 = col.hash(str2.c_str(), str2.c_str() + str2.size());
+  VERIFY( l1 != l2 );
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/22_locale/collate/hash/wchar_t/2.cc b/libstdc++-v3/testsuite/22_locale/collate/hash/wchar_t/2.cc
new file mode 100644 (file)
index 0000000..b11be4a
--- /dev/null
@@ -0,0 +1,74 @@
+// 2001-08-15 Benjamin Kosnik  <bkoz@redhat.com>
+
+// Copyright (C) 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// 22.2.4.1.1 collate members
+
+#include <locale>
+#include <testsuite_hooks.h>
+
+// Check German "de_DE" locale.
+void test02()
+{
+  using namespace std;
+  typedef std::collate<wchar_t>::string_type string_type;
+  bool test = true;
+
+  // basic construction
+  locale loc_c = locale::classic();
+  locale loc_us("en_US");
+  locale loc_fr("fr_FR");
+  locale loc_de("de_DE");
+  VERIFY( loc_c != loc_de );
+  VERIFY( loc_us != loc_fr );
+  VERIFY( loc_us != loc_de );
+  VERIFY( loc_de != loc_fr );
+
+  // cache the collate facets
+  const collate<wchar_t>& coll_c = use_facet<collate<wchar_t> >(loc_c); 
+  const collate<wchar_t>& coll_us = use_facet<collate<wchar_t> >(loc_us); 
+  const collate<wchar_t>& coll_fr = use_facet<collate<wchar_t> >(loc_fr); 
+  const collate<wchar_t>& coll_de = use_facet<collate<wchar_t> >(loc_de); 
+
+  // long hash(const charT*, const charT*) cosnt
+  const wchar_t* strlit1 = L"monkey picked tikuanyin oolong";
+  const wchar_t* strlit2 = L"imperial tea court green oolong";
+  const wchar_t* strlit3 = L"Äuglein Augment"; // "C" == "Augment Äuglein"
+  const wchar_t* strlit4 = L"Base baß Baß Bast"; // "C" == "Base baß Baß Bast"
+
+  int i1;
+  int i2;
+  long l1;
+  long l2;
+  int size3 = char_traits<wchar_t>::length(strlit4) - 1;
+  int size4 = char_traits<wchar_t>::length(strlit3) - 1;
+
+  l1 = coll_de.hash(strlit3, strlit3 + size3);
+  l2 = coll_de.hash(strlit3, strlit3 + size3 - 1);
+  VERIFY ( l1 != l2 );
+  l1 = coll_de.hash(strlit3, strlit3 + size3);
+  l2 = coll_de.hash(strlit4, strlit4 + size4);
+  VERIFY ( l1 != l2 );
+}
+
+int main()
+{
+  test02();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/22_locale/collate/hash/wchar_t/wrapped_env.cc b/libstdc++-v3/testsuite/22_locale/collate/hash/wchar_t/wrapped_env.cc
new file mode 100644 (file)
index 0000000..4f1d5e3
--- /dev/null
@@ -0,0 +1,41 @@
+// 2001-08-15 Benjamin Kosnik  <bkoz@redhat.com>
+
+// Copyright (C) 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// 22.2.4.1.1 collate members
+
+#include <testsuite_hooks.h>
+
+#define main discard_main_1
+#include "1.cc"
+#undef main 
+
+#define main discard_main_2
+#include "2.cc"
+#undef main 
+
+int main()
+{
+  using namespace __gnu_cxx_test;
+  func_callback two;
+  two.push_back(&test01);
+  two.push_back(&test02);
+  run_tests_wrapped_env("de_DE", "LANG", two);
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/22_locale/collate/hash/wchar_t/wrapped_locale.cc b/libstdc++-v3/testsuite/22_locale/collate/hash/wchar_t/wrapped_locale.cc
new file mode 100644 (file)
index 0000000..8d78718
--- /dev/null
@@ -0,0 +1,41 @@
+// 2001-08-15 Benjamin Kosnik  <bkoz@redhat.com>
+
+// Copyright (C) 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// 22.2.4.1.1 collate members
+
+#include <testsuite_hooks.h>
+
+#define main discard_main_1
+#include "1.cc"
+#undef main 
+
+#define main discard_main_2
+#include "2.cc"
+#undef main 
+
+int main()
+{
+  using namespace __gnu_cxx_test;
+  func_callback two;
+  two.push_back(&test01);
+  two.push_back(&test02);
+  run_tests_wrapped_locale("ja_JP.eucjp", two);
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/22_locale/collate/transform/char/2.cc b/libstdc++-v3/testsuite/22_locale/collate/transform/char/2.cc
new file mode 100644 (file)
index 0000000..dc2b395
--- /dev/null
@@ -0,0 +1,72 @@
+// 2001-08-15 Benjamin Kosnik  <bkoz@redhat.com>
+
+// Copyright (C) 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// 22.2.4.1.1 collate members
+
+#include <locale>
+#include <testsuite_hooks.h>
+
+void test02()
+{
+  using namespace std;
+  typedef std::collate<char>::string_type string_type;
+
+  bool test = true;
+
+  // basic construction
+  locale loc_c = locale::classic();
+  locale loc_us("en_US");
+  locale loc_fr("fr_FR");
+  locale loc_de("de_DE");
+  VERIFY( loc_c != loc_de );
+  VERIFY( loc_us != loc_fr );
+  VERIFY( loc_us != loc_de );
+  VERIFY( loc_de != loc_fr );
+
+  // cache the collate facets
+  const collate<char>& coll_c = use_facet<collate<char> >(loc_c); 
+  const collate<char>& coll_us = use_facet<collate<char> >(loc_us); 
+  const collate<char>& coll_fr = use_facet<collate<char> >(loc_fr); 
+  const collate<char>& coll_de = use_facet<collate<char> >(loc_de); 
+
+  // long hash(const charT*, const charT*) cosnt
+  const char* strlit1 = "monkey picked tikuanyin oolong";
+  const char* strlit2 = "imperial tea court green oolong";
+  const char* strlit3 = "Äuglein Augment"; // "C" == "Augment Äuglein"
+  const char* strlit4 = "Base baß Baß Bast"; // "C" == "Base baß Baß Bast"
+
+  int i1;
+  int i2;
+  int size3 = char_traits<char>::length(strlit3) - 1;
+  int size4 = char_traits<char>::length(strlit4) - 1;
+
+  string_type str3 = coll_de.transform(strlit3, strlit3 + size3);
+  string_type str4 = coll_de.transform(strlit4, strlit4 + size4);
+  i1 = str3.compare(str4);
+  i2 = coll_de.compare(strlit3, strlit3 + size3, strlit4, strlit4 + size4);
+  VERIFY ( i2 == -1 );
+  VERIFY ( i1 * i2 > 0 );
+}
+
+int main()
+{
+  test02();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/22_locale/collate/transform/char/wrapped_env.cc b/libstdc++-v3/testsuite/22_locale/collate/transform/char/wrapped_env.cc
new file mode 100644 (file)
index 0000000..9f9d1aa
--- /dev/null
@@ -0,0 +1,36 @@
+// 2001-08-15 Benjamin Kosnik  <bkoz@redhat.com>
+
+// Copyright (C) 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// 22.2.4.1.1 collate members
+
+#include <testsuite_hooks.h>
+
+#define main discard_main_2
+#include "2.cc"
+#undef main 
+
+int main()
+{
+  using namespace __gnu_cxx_test;
+  func_callback two;
+  two.push_back(&test02);
+  run_tests_wrapped_env("de_DE", "LANG", two);
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/22_locale/collate/transform/char/wrapped_locale.cc b/libstdc++-v3/testsuite/22_locale/collate/transform/char/wrapped_locale.cc
new file mode 100644 (file)
index 0000000..2ef10fd
--- /dev/null
@@ -0,0 +1,36 @@
+// 2001-08-15 Benjamin Kosnik  <bkoz@redhat.com>
+
+// Copyright (C) 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// 22.2.4.1.1 collate members
+
+#include <testsuite_hooks.h>
+
+#define main discard_main_2
+#include "2.cc"
+#undef main 
+
+int main()
+{
+  using namespace __gnu_cxx_test;
+  func_callback two;
+  two.push_back(&test02);
+  run_tests_wrapped_locale("ja_JP.eucjp", two);
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/22_locale/collate/transform/wchar_t/2.cc b/libstdc++-v3/testsuite/22_locale/collate/transform/wchar_t/2.cc
new file mode 100644 (file)
index 0000000..f643fd6
--- /dev/null
@@ -0,0 +1,72 @@
+// 2001-08-15 Benjamin Kosnik  <bkoz@redhat.com>
+
+// Copyright (C) 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// 22.2.4.1.1 collate members
+
+#include <locale>
+#include <testsuite_hooks.h>
+
+void test02()
+{
+  using namespace std;
+  typedef std::collate<wchar_t>::string_type string_type;
+
+  bool test = true;
+
+  // basic construction
+  locale loc_c = locale::classic();
+  locale loc_us("en_US");
+  locale loc_fr("fr_FR");
+  locale loc_de("de_DE");
+  VERIFY( loc_c != loc_de );
+  VERIFY( loc_us != loc_fr );
+  VERIFY( loc_us != loc_de );
+  VERIFY( loc_de != loc_fr );
+
+  // cache the collate facets
+  const collate<wchar_t>& coll_c = use_facet<collate<wchar_t> >(loc_c); 
+  const collate<wchar_t>& coll_us = use_facet<collate<wchar_t> >(loc_us); 
+  const collate<wchar_t>& coll_fr = use_facet<collate<wchar_t> >(loc_fr); 
+  const collate<wchar_t>& coll_de = use_facet<collate<wchar_t> >(loc_de); 
+
+  // long hash(const charT*, const charT*) cosnt
+  const wchar_t* strlit1 = L"monkey picked tikuanyin oolong";
+  const wchar_t* strlit2 = L"imperial tea court green oolong";
+  const wchar_t* strlit3 = L"Äuglein Augment"; // "C" == "Augment Äuglein"
+  const wchar_t* strlit4 = L"Base baß Baß Bast"; // "C" == "Base baß Baß Bast"
+
+  int i1;
+  int i2;
+  int size3 = char_traits<wchar_t>::length(strlit3) - 1;
+  int size4 = char_traits<wchar_t>::length(strlit4) - 1;
+
+  string_type str3 = coll_de.transform(strlit3, strlit3 + size3);
+  string_type str4 = coll_de.transform(strlit4, strlit4 + size4);
+  i1 = str3.compare(str4);
+  i2 = coll_de.compare(strlit3, strlit3 + size3, strlit4, strlit4 + size4);
+  VERIFY ( i2 == -1 );
+  VERIFY ( i1 * i2 > 0 );
+}
+
+int main()
+{
+  test02();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/22_locale/collate/transform/wchar_t/wrapped_env.cc b/libstdc++-v3/testsuite/22_locale/collate/transform/wchar_t/wrapped_env.cc
new file mode 100644 (file)
index 0000000..9f9d1aa
--- /dev/null
@@ -0,0 +1,36 @@
+// 2001-08-15 Benjamin Kosnik  <bkoz@redhat.com>
+
+// Copyright (C) 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// 22.2.4.1.1 collate members
+
+#include <testsuite_hooks.h>
+
+#define main discard_main_2
+#include "2.cc"
+#undef main 
+
+int main()
+{
+  using namespace __gnu_cxx_test;
+  func_callback two;
+  two.push_back(&test02);
+  run_tests_wrapped_env("de_DE", "LANG", two);
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/22_locale/collate/transform/wchar_t/wrapped_locale.cc b/libstdc++-v3/testsuite/22_locale/collate/transform/wchar_t/wrapped_locale.cc
new file mode 100644 (file)
index 0000000..2ef10fd
--- /dev/null
@@ -0,0 +1,36 @@
+// 2001-08-15 Benjamin Kosnik  <bkoz@redhat.com>
+
+// Copyright (C) 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// 22.2.4.1.1 collate members
+
+#include <testsuite_hooks.h>
+
+#define main discard_main_2
+#include "2.cc"
+#undef main 
+
+int main()
+{
+  using namespace __gnu_cxx_test;
+  func_callback two;
+  two.push_back(&test02);
+  run_tests_wrapped_locale("ja_JP.eucjp", two);
+  return 0;
+}
@@ -23,9 +23,6 @@
 #include <locale>
 #include <testsuite_hooks.h>
 
-// XXX This test is not working for non-glibc locale models.
-// { dg-do run { xfail *-*-* } }
-
 void test01()
 {
   using namespace std;
@@ -135,6 +132,5 @@ void test01()
 int main()
 {
   test01();
-
   return 0;
 }
diff --git a/libstdc++-v3/testsuite/22_locale/collate_members_char.cc b/libstdc++-v3/testsuite/22_locale/collate_members_char.cc
deleted file mode 100644 (file)
index eccf7ca..0000000
+++ /dev/null
@@ -1,187 +0,0 @@
-// 2001-08-15 Benjamin Kosnik  <bkoz@redhat.com>
-
-// Copyright (C) 2001, 2002 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
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING.  If not, write to the Free
-// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-// USA.
-
-// 22.2.4.1.1 collate members
-
-#include <locale>
-#include <testsuite_hooks.h>
-
-// XXX This may not work for non-glibc locale models.
-// { dg-do run { xfail *-*-* } }
-
-void test01()
-{
-  using namespace std;
-  typedef std::collate<char>::string_type string_type;
-
-  bool test = true;
-
-  // basic construction
-  locale loc_c = locale::classic();
-  locale loc_us("en_US");
-  locale loc_fr("fr_FR");
-  locale loc_de("de_DE");
-  VERIFY( loc_c != loc_de );
-  VERIFY( loc_us != loc_fr );
-  VERIFY( loc_us != loc_de );
-  VERIFY( loc_de != loc_fr );
-
-  // cache the collate facets
-  const collate<char>& coll_c = use_facet<collate<char> >(loc_c); 
-  const collate<char>& coll_us = use_facet<collate<char> >(loc_us); 
-  const collate<char>& coll_fr = use_facet<collate<char> >(loc_fr); 
-  const collate<char>& coll_de = use_facet<collate<char> >(loc_de); 
-
-  // int compare(const charT*, const charT*, const charT*, const charT*) const
-  // long hash(const charT*, const charT*) cosnt
-  // string_type transform(const charT*, const charT*) const
-
-  // Check "C" locale.
-  const char* strlit1 = "monkey picked tikuanyin oolong";
-  const char* strlit2 = "imperial tea court green oolong";
-
-  int i1;
-  int size1 = strlen(strlit1) - 1;
-  i1 = coll_c.compare(strlit1, strlit1 + size1, strlit1, strlit1 + 7);
-  VERIFY ( i1 == 1 );
-  i1 = coll_c.compare(strlit1, strlit1 + 7, strlit1, strlit1 + size1);
-  VERIFY ( i1 == -1 );
-  i1 = coll_c.compare(strlit1, strlit1 + 7, strlit1, strlit1 + 7);
-  VERIFY ( i1 == 0 );
-
-  int i2;
-  int size2 = strlen(strlit2) - 1;
-  i2 = coll_c.compare(strlit2, strlit2 + size2, strlit2, strlit2 + 13);
-  VERIFY ( i2 == 1 );
-  i2 = coll_c.compare(strlit2, strlit2 + 13, strlit2, strlit2 + size2);
-  VERIFY ( i2 == -1 );
-  i2 = coll_c.compare(strlit2, strlit2 + size2, strlit2, strlit2 + size2);
-  VERIFY ( i2 == 0 );
-
-  long l1;
-  long l2;
-  l1 = coll_c.hash(strlit1, strlit1 + size1);
-  l2 = coll_c.hash(strlit1, strlit1 + size1 - 1);
-  VERIFY ( l1 != l2 );
-  l1 = coll_c.hash(strlit1, strlit1 + size1);
-  l2 = coll_c.hash(strlit2, strlit2 + size2);
-  VERIFY ( l1 != l2 );
-
-  string str1 = coll_c.transform(strlit1, strlit1 + size1);
-  string str2 = coll_c.transform(strlit2, strlit2 + size2);
-  i1 = str1.compare(str2);
-  i2 = coll_c.compare(strlit1, strlit1 + size1, strlit2, strlit2 + size2);
-  VERIFY ( i2 == 1 );
-  VERIFY ( i1 * i2 > 0 );
-
-  // Check German "de_DE" locale.
-  const char* strlit3 = "Äuglein Augment"; // "C" == "Augment Äuglein"
-  const char* strlit4 = "Base baß Baß Bast"; // "C" == "Base baß Baß Bast"
-
-  int size3 = strlen(strlit3) - 1;
-  i1 = coll_de.compare(strlit3, strlit3 + size3, strlit3, strlit3 + 7);
-  VERIFY ( i1 == 1 );
-  i1 = coll_de.compare(strlit3, strlit3 + 7, strlit3, strlit3 + size1);
-  VERIFY ( i1 == -1 );
-  i1 = coll_de.compare(strlit3, strlit3 + 7, strlit3, strlit3 + 7);
-  VERIFY ( i1 == 0 );
-
-  i1 = coll_de.compare(strlit3, strlit3 + 6, strlit3 + 8, strlit3 + 14);
-  VERIFY ( i1 == -1 );
-
-  int size4 = strlen(strlit4) - 1;
-  i2 = coll_de.compare(strlit4, strlit4 + size4, strlit4, strlit4 + 13);
-  VERIFY ( i2 == 1 );
-  i2 = coll_de.compare(strlit4, strlit4 + 13, strlit4, strlit4 + size4);
-  VERIFY ( i2 == -1 );
-  i2 = coll_de.compare(strlit4, strlit4 + size4, strlit4, strlit4 + size4);
-  VERIFY ( i2 == 0 );
-
-  l1 = coll_de.hash(strlit3, strlit3 + size3);
-  l2 = coll_de.hash(strlit3, strlit3 + size3 - 1);
-  VERIFY ( l1 != l2 );
-  l1 = coll_de.hash(strlit3, strlit3 + size3);
-  l2 = coll_de.hash(strlit4, strlit4 + size4);
-  VERIFY ( l1 != l2 );
-
-  string str3 = coll_de.transform(strlit3, strlit3 + size3);
-  string str4 = coll_de.transform(strlit4, strlit4 + size4);
-  i1 = str3.compare(str4);
-  i2 = coll_de.compare(strlit3, strlit3 + size3, strlit4, strlit4 + size4);
-  VERIFY ( i2 == -1 );
-  VERIFY ( i1 * i2 > 0 );
-}
-
-// libstdc++/5280
-void test02()
-{
-#ifdef _GLIBCPP_HAVE_SETENV 
-  // Set the global locale to non-"C".
-  std::locale loc_de("de_DE");
-  std::locale::global(loc_de);
-
-  // Set LANG environment variable to de_DE.
-  const char* oldLANG = getenv("LANG");
-  if (!setenv("LANG", "de_DE", 1))
-    {
-      test01();
-      setenv("LANG", oldLANG ? oldLANG : "", 1);
-    }
-#endif
-}
-
-void test03()
-{
-  bool test = true;
-  std::string str1("fffff");
-  std::string str2("ffffffffffff");
-
-  const std::locale cloc = std::locale::classic();
-  const std::collate<char> &col = std::use_facet<std::collate<char> >(cloc);
-
-  long l1 = col.hash(str1.c_str(), str1.c_str() + str1.size());
-  long l2 = col.hash(str2.c_str(), str2.c_str() + str2.size());
-  VERIFY( l1 != l2 );
-}
-
-// http://gcc.gnu.org/ml/libstdc++/2002-05/msg00038.html
-void test04()
-{
-  bool test = true;
-
-  const char* tentLANG = std::setlocale(LC_ALL, "ja_JP.eucjp");
-  if (tentLANG != NULL)
-    {
-      std::string preLANG = tentLANG;
-      test01();
-      test03();
-      std::string postLANG = std::setlocale(LC_ALL, NULL);
-      VERIFY( preLANG == postLANG );
-    }
-}
-
-int main()
-{
-  test01();
-  test02();
-  test03();
-  test04();
-  return 0;
-}
diff --git a/libstdc++-v3/testsuite/22_locale/collate_members_wchar_t.cc b/libstdc++-v3/testsuite/22_locale/collate_members_wchar_t.cc
deleted file mode 100644 (file)
index c59ab32..0000000
+++ /dev/null
@@ -1,190 +0,0 @@
-// 2001-08-17 Benjamin Kosnik  <bkoz@redhat.com>
-
-// Copyright (C) 2001, 2002 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
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING.  If not, write to the Free
-// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-// USA.
-
-// 22.2.4.1.1 collate members
-
-#include <locale>
-#include <testsuite_hooks.h>
-
-// XXX This may not work for non-glibc locale models.
-// { dg-do run { xfail *-*-* } }
-#ifdef _GLIBCPP_USE_WCHAR_T
-void test01()
-{
-  using namespace std;
-  typedef std::collate<wchar_t>::string_type string_type;
-
-  bool test = true;
-
-  // basic construction
-  locale loc_c = locale::classic();
-  locale loc_us("en_US");
-  locale loc_fr("fr_FR");
-  locale loc_de("de_DE");
-  VERIFY( loc_c != loc_de );
-  VERIFY( loc_us != loc_fr );
-  VERIFY( loc_us != loc_de );
-  VERIFY( loc_de != loc_fr );
-
-  // cache the collate facets
-  const collate<wchar_t>& coll_c = use_facet<collate<wchar_t> >(loc_c); 
-  const collate<wchar_t>& coll_us = use_facet<collate<wchar_t> >(loc_us); 
-  const collate<wchar_t>& coll_fr = use_facet<collate<wchar_t> >(loc_fr); 
-  const collate<wchar_t>& coll_de = use_facet<collate<wchar_t> >(loc_de); 
-
-  // int compare(const charT*, const charT*, const charT*, const charT*) const
-  // long hash(const charT*, const charT*) cosnt
-  // string_type transform(const charT*, const charT*) const
-
-  // Check "C" locale.
-  const wchar_t* strlit1 = L"monkey picked tikuanyin oolong";
-  const wchar_t* strlit2 = L"imperial tea court green oolong";
-
-  int i1;
-  int size1 = char_traits<wchar_t>::length(strlit1) - 1;
-  i1 = coll_c.compare(strlit1, strlit1 + size1, strlit1, strlit1 + 7);
-  VERIFY ( i1 == 1 );
-  i1 = coll_c.compare(strlit1, strlit1 + 7, strlit1, strlit1 + size1);
-  VERIFY ( i1 == -1 );
-  i1 = coll_c.compare(strlit1, strlit1 + 7, strlit1, strlit1 + 7);
-  VERIFY ( i1 == 0 );
-
-  int i2;
-  int size2 = char_traits<wchar_t>::length(strlit2) - 1;
-  i2 = coll_c.compare(strlit2, strlit2 + size2, strlit2, strlit2 + 13);
-  VERIFY ( i2 == 1 );
-  i2 = coll_c.compare(strlit2, strlit2 + 13, strlit2, strlit2 + size2);
-  VERIFY ( i2 == -1 );
-  i2 = coll_c.compare(strlit2, strlit2 + size2, strlit2, strlit2 + size2);
-  VERIFY ( i2 == 0 );
-
-  long l1;
-  long l2;
-  l1 = coll_c.hash(strlit1, strlit1 + size1);
-  l2 = coll_c.hash(strlit1, strlit1 + size1 - 1);
-  VERIFY ( l1 != l2 );
-  l1 = coll_c.hash(strlit1, strlit1 + size1);
-  l2 = coll_c.hash(strlit2, strlit2 + size2);
-  VERIFY ( l1 != l2 );
-
-  wstring str1 = coll_c.transform(strlit1, strlit1 + size1);
-  wstring str2 = coll_c.transform(strlit2, strlit2 + size2);
-  i1 = str1.compare(str2);
-  i2 = coll_c.compare(strlit1, strlit1 + size1, strlit2, strlit2 + size2);
-  VERIFY ( i2 == 1 );
-  VERIFY ( i1 * i2 > 0 );
-
-  // Check German "de_DE" locale.
-  const wchar_t* strlit3 = L"Äuglein Augment"; // "C" == "Augment Äuglein"
-  const wchar_t* strlit4 = L"Base baß Baß Bast"; // "C" == "Base baß Baß Bast"
-
-  int size3 = char_traits<wchar_t>::length(strlit3) - 1;
-  i1 = coll_de.compare(strlit3, strlit3 + size3, strlit3, strlit3 + 7);
-  VERIFY ( i1 == 1 );
-  i1 = coll_de.compare(strlit3, strlit3 + 7, strlit3, strlit3 + size1);
-  VERIFY ( i1 == -1 );
-  i1 = coll_de.compare(strlit3, strlit3 + 7, strlit3, strlit3 + 7);
-  VERIFY ( i1 == 0 );
-
-  i1 = coll_de.compare(strlit3, strlit3 + 6, strlit3 + 8, strlit3 + 14);
-  VERIFY ( i1 == -1 );
-
-  int size4 = char_traits<wchar_t>::length(strlit4) - 1;
-  i2 = coll_de.compare(strlit4, strlit4 + size4, strlit4, strlit4 + 13);
-  VERIFY ( i2 == 1 );
-  i2 = coll_de.compare(strlit4, strlit4 + 13, strlit4, strlit4 + size4);
-  VERIFY ( i2 == -1 );
-  i2 = coll_de.compare(strlit4, strlit4 + size4, strlit4, strlit4 + size4);
-  VERIFY ( i2 == 0 );
-
-  l1 = coll_de.hash(strlit3, strlit3 + size3);
-  l2 = coll_de.hash(strlit3, strlit3 + size3 - 1);
-  VERIFY ( l1 != l2 );
-  l1 = coll_de.hash(strlit3, strlit3 + size3);
-  l2 = coll_de.hash(strlit4, strlit4 + size4);
-  VERIFY ( l1 != l2 );
-
-  wstring str3 = coll_de.transform(strlit3, strlit3 + size3);
-  wstring str4 = coll_de.transform(strlit4, strlit4 + size4);
-  i1 = str3.compare(str4);
-  i2 = coll_de.compare(strlit3, strlit3 + size3, strlit4, strlit4 + size4);
-  VERIFY ( i2 == -1 );
-  VERIFY ( i1 * i2 > 0 );
-}
-
-// libstdc++/5280
-void test02()
-{
-#ifdef _GLIBCPP_HAVE_SETENV 
-  // Set the global locale to non-"C".
-  std::locale loc_de("de_DE");
-  std::locale::global(loc_de);
-
-  // Set LANG environment variable to de_DE.
-  const char* oldLANG = getenv("LANG");
-  if (!setenv("LANG", "de_DE", 1))
-    {
-      test01();
-      setenv("LANG", oldLANG ? oldLANG : "", 1);
-    }
-#endif
-}
-
-void test03()
-{
-  bool test = true;
-  std::wstring str1(L"fffff");
-  std::wstring str2(L"ffffffffffff");
-
-  const std::locale cloc = std::locale::classic();
-  const std::collate<wchar_t> &col = std::use_facet<std::collate<wchar_t> >(cloc);
-
-  long l1 = col.hash(str1.c_str(), str1.c_str() + str1.size());
-  long l2 = col.hash(str2.c_str(), str2.c_str() + str2.size());
-  VERIFY( l1 != l2 );
-}
-
-// http://gcc.gnu.org/ml/libstdc++/2002-05/msg00038.html
-void test04()
-{
-  bool test = true;
-
-  const char* tentLANG = std::setlocale(LC_ALL, "ja_JP.eucjp");
-  if (tentLANG != NULL)
-    {
-      std::string preLANG = tentLANG;
-      test01();
-      test03();
-      std::string postLANG = std::setlocale(LC_ALL, NULL);
-      VERIFY( preLANG == postLANG );
-    }
-}
-#endif
-
-int main()
-{
-#if _GLIBCPP_USE_WCHAR_T
-  test01();
-  test02();
-  test03();
-  test04();
-#endif
-  return 0;
-}
similarity index 95%
rename from libstdc++-v3/testsuite/22_locale/ctype.cc
rename to libstdc++-v3/testsuite/22_locale/ctype/1.cc
index b13fe23..541f2b9 100644 (file)
@@ -1,6 +1,7 @@
+// { dg-do compile }
 // 1999-08-24 bkoz
 
-// Copyright (C) 2000, 1999 Free Software Foundation
+// Copyright (C) 1999, 2000, 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
@@ -20,8 +21,6 @@
 
 // 22.2.1 The ctype category
 
-// { dg-do compile }
-
 // 1: Test that the locale headers are picking up the correct declaration
 // of the internal type `ctype_base::mask'.
 int mask ();
@@ -155,21 +154,8 @@ test01()
   m01 ^= m02;
 }
 
-class gnu_obj 
-{ };
-
-class gnu_ctype2: public std::ctype<gnu_obj> 
-{ };
-
-// libstdc++/3017
-void test02()
-{
-  gnu_ctype2 obj;
-}
-
 int main() 
 { 
   test01();
-  test02();
   return 0;
 }
diff --git a/libstdc++-v3/testsuite/22_locale/ctype/2.cc b/libstdc++-v3/testsuite/22_locale/ctype/2.cc
new file mode 100644 (file)
index 0000000..924efdd
--- /dev/null
@@ -0,0 +1,43 @@
+// { dg-do compile }
+// 1999-08-24 bkoz
+
+// Copyright (C) 1999, 2000, 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// 22.2.1 The ctype category
+
+#include <locale>
+#include <testsuite_hooks.h>
+
+class gnu_obj 
+{ };
+
+class gnu_ctype2: public std::ctype<gnu_obj> 
+{ };
+
+// libstdc++/3017
+void test02()
+{
+  gnu_ctype2 obj;
+}
+
+int main() 
+{ 
+  test02();
+  return 0;
+}
@@ -1,6 +1,6 @@
 // 2000-02-16 bkoz
 
-// Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc.
+// Copyright (C) 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
 //
 // 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
@@ -37,11 +37,31 @@ class comma_ctype: public std::ctype<char>
 {
 public:
   comma_ctype(): std::ctype<char>() { }
-  static void get_table()
-  { classic_table(); }
-};
+  comma_ctype(const std::ctype_base::mask* m): std::ctype<char>(m) { }
+
+  const mask* 
+  get_classic_table()
+  { return std::ctype<char>::classic_table(); }
+
+  const mask* 
+  get_table()
+  { return this->table(); }
+}; 
+
+void test01()
+{
+  using namespace std;
+  
+  comma_ctype obj;
+  const ctype_base::mask* tmp = obj.get_classic_table();
+
+  comma_ctype obj2(tmp);
+  const ctype_base::mask* ctable = obj2.get_table();
+  VERIFY ( tmp = ctable );
+}
 
 int main() 
 {
+  test01();
   return 0;
 }
diff --git a/libstdc++-v3/testsuite/22_locale/ctype/cons/char/wrapped_env.cc b/libstdc++-v3/testsuite/22_locale/ctype/cons/char/wrapped_env.cc
new file mode 100644 (file)
index 0000000..b3d040e
--- /dev/null
@@ -0,0 +1,36 @@
+// 2001-08-15 Benjamin Kosnik  <bkoz@redhat.com>
+
+// Copyright (C) 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// 22.2.4.1.1 collate members
+
+#include <testsuite_hooks.h>
+
+#define main discard_main_1
+#include "1.cc"
+#undef main 
+
+int main()
+{
+  using namespace __gnu_cxx_test;
+  func_callback two;
+  two.push_back(&test01);
+  run_tests_wrapped_env("de_DE", "LANG", two);
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/22_locale/ctype/cons/char/wrapped_locale.cc b/libstdc++-v3/testsuite/22_locale/ctype/cons/char/wrapped_locale.cc
new file mode 100644 (file)
index 0000000..17d4d5d
--- /dev/null
@@ -0,0 +1,36 @@
+// 2001-08-15 Benjamin Kosnik  <bkoz@redhat.com>
+
+// Copyright (C) 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// 22.2.4.1.1 collate members
+
+#include <testsuite_hooks.h>
+
+#define main discard_main_1
+#include "1.cc"
+#undef main 
+
+int main()
+{
+  using namespace __gnu_cxx_test;
+  func_callback two;
+  two.push_back(&test01);
+  run_tests_wrapped_locale("ja_JP.eucjp", two);
+  return 0;
+}
@@ -1,4 +1,4 @@
-// Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc.
+// Copyright (C) 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
 //
 // 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
 // 22.2.1.3.2 ctype<char> members
 
 #include <locale>
-#include <vector>
 #include <testsuite_hooks.h>
 
-// XXX This test (test02) is not working for non-glibc locale models.
-// { dg-do run { xfail *-*-* } }
-
 typedef char char_type;
 class gnu_ctype: public std::ctype<char_type> { };
 
@@ -147,129 +143,8 @@ void test01()
   VERIFY( gctype.is(m02[8], cc0[8]) );
 }
 
-// libstdc++/4456, libstdc++/4457, libstdc++/4458
-void test02()
-{
-  using namespace std;
-  typedef ctype_base::mask     mask;
-  typedef vector<mask>                 vector_type;
-
-  bool test = true;
-
-  //  const int max = numeric_limits<char>::max();
-  const int max = 255;
-  const int ctype_mask_max = 10;
-  vector_type v_c(max);
-  vector_type v_de(max);
-
-  // "C"
-  locale loc_c = locale::classic();
-  const ctype<char>& ctype_c = use_facet<ctype<char> >(loc_c); 
-  for (int i = 0; i < max; ++i)
-    {
-      char_type c = static_cast<char>(i);
-      mask mask_test = static_cast<mask>(0);
-      mask mask_is = static_cast<mask>(0);
-      for (int j = 0; j <= ctype_mask_max; ++j)
-       {
-         mask_test = static_cast<mask>(1 << j);
-         if (ctype_c.is(mask_test, c))
-           mask_is |= mask_test;
-       }
-      v_c[i] = mask_is;
-    }   
-
-  // "de_DE"
-  locale loc_de("de_DE");
-  const ctype<char>& ctype_de = use_facet<ctype<char> >(loc_de); 
-  for (int i = 0; i < max; ++i)
-    {
-      char_type c = static_cast<char>(i);
-      mask mask_test = static_cast<mask>(0);
-      mask mask_is = static_cast<mask>(0);
-      for (int j = 0; j <= ctype_mask_max; ++j)
-       {
-         mask_test = static_cast<mask>(1 << j);
-         if (ctype_de.is(mask_test, c))
-           mask_is |= mask_test;
-       }
-      v_de[i] = mask_is;
-    }   
-
-#if QUANNUM_VERBOSE_LYRICALLY_ADEPT_BAY_AREA_MCS_MODE
-    for (int i = 0; i < max; ++i)
-    {
-      char_type mark = v_c[i] == v_de[i] ? ' ' : '-';
-      cout << i << ' ' << mark << ' ' << static_cast<char>(i) << '\t' ;
-      cout << "v_c: " << setw(4) << v_c[i] << '\t';
-      cout << "v_de: " << setw(4) << v_de[i] << endl;
-    }
-    cout << (v_c == v_de) << endl;
-#endif
-
-  VERIFY( v_c != v_de );
-}
-
-// Per Liboriussen <liborius@stofanet.dk>
-void test03()
-{
-  bool test = true;
-  std::ctype_base::mask maskdata[256];
-  for (int i = 0; i < 256; ++i)
-    maskdata[i] = std::ctype_base::alpha;
-  std::ctype<char>* f = new std::ctype<char>(maskdata);
-  std::locale global;
-  std::locale loc(global, f);
-  for (int i = 0; i < 256; ++i) 
-    {
-      char_type ch = i;
-      VERIFY( std::isalpha(ch, loc) );
-    }
-}
-
-// libstdc++/5280
-void test04()
-{
-#ifdef _GLIBCPP_HAVE_SETENV 
-  // Set the global locale to non-"C".
-  std::locale loc_de("de_DE");
-  std::locale::global(loc_de);
-
-  // Set LANG environment variable to de_DE.
-  const char* oldLANG = getenv("LANG");
-  if (!setenv("LANG", "de_DE", 1))
-    {
-      test01();
-      test02();
-      test03();
-      setenv("LANG", oldLANG ? oldLANG : "", 1);
-    }
-#endif
-}
-
-// http://gcc.gnu.org/ml/libstdc++/2002-05/msg00038.html
-void test05()
-{
-  bool test = true;
-
-  const char* tentLANG = std::setlocale(LC_ALL, "ja_JP.eucjp");
-  if (tentLANG != NULL)
-    {
-      std::string preLANG = tentLANG;
-      test01();
-      test02();
-      test03();
-      std::string postLANG = std::setlocale(LC_ALL, NULL);
-      VERIFY( preLANG == postLANG );
-    }
-}
-
 int main() 
 {
   test01();
-  test02();
-  test03();
-  test04();
-  test05();
   return 0;
 }
diff --git a/libstdc++-v3/testsuite/22_locale/ctype/is/char/2.cc b/libstdc++-v3/testsuite/22_locale/ctype/is/char/2.cc
new file mode 100644 (file)
index 0000000..6e54ab8
--- /dev/null
@@ -0,0 +1,104 @@
+// { dg-do run { xfail *-*-![linux]* } }
+// Copyright (C) 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+//
+// 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+// 22.2.1.3.2 ctype<char> members
+
+#include <locale>
+#include <vector>
+#include <testsuite_hooks.h>
+
+typedef char char_type;
+
+// libstdc++/4456, libstdc++/4457, libstdc++/4458
+void test02()
+{
+  using namespace std;
+  typedef ctype_base::mask     mask;
+  typedef vector<mask>                 vector_type;
+
+  bool test = true;
+
+  //  const int max = numeric_limits<char>::max();
+  const int max = 255;
+  const int ctype_mask_max = 10;
+  vector_type v_c(max);
+  vector_type v_de(max);
+
+  // "C"
+  locale loc_c = locale::classic();
+  const ctype<char>& ctype_c = use_facet<ctype<char> >(loc_c); 
+  for (int i = 0; i < max; ++i)
+    {
+      char_type c = static_cast<char>(i);
+      mask mask_test = static_cast<mask>(0);
+      mask mask_is = static_cast<mask>(0);
+      for (int j = 0; j <= ctype_mask_max; ++j)
+       {
+         mask_test = static_cast<mask>(1 << j);
+         if (ctype_c.is(mask_test, c))
+           mask_is |= mask_test;
+       }
+      v_c[i] = mask_is;
+    }   
+
+  // "de_DE"
+  locale loc_de("de_DE");
+  const ctype<char>& ctype_de = use_facet<ctype<char> >(loc_de); 
+  for (int i = 0; i < max; ++i)
+    {
+      char_type c = static_cast<char>(i);
+      mask mask_test = static_cast<mask>(0);
+      mask mask_is = static_cast<mask>(0);
+      for (int j = 0; j <= ctype_mask_max; ++j)
+       {
+         mask_test = static_cast<mask>(1 << j);
+         if (ctype_de.is(mask_test, c))
+           mask_is |= mask_test;
+       }
+      v_de[i] = mask_is;
+    }   
+
+#if QUANNUM_VERBOSE_LYRICALLY_ADEPT_BAY_AREA_MCS_MODE
+    for (int i = 0; i < max; ++i)
+    {
+      char_type mark = v_c[i] == v_de[i] ? ' ' : '-';
+      cout << i << ' ' << mark << ' ' << static_cast<char>(i) << '\t' ;
+      cout << "v_c: " << setw(4) << v_c[i] << '\t';
+      cout << "v_de: " << setw(4) << v_de[i] << endl;
+    }
+    cout << (v_c == v_de) << endl;
+#endif
+
+  VERIFY( v_c != v_de );
+}
+
+int main() 
+{
+  test02();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/22_locale/ctype/is/char/wrapped_env.cc b/libstdc++-v3/testsuite/22_locale/ctype/is/char/wrapped_env.cc
new file mode 100644 (file)
index 0000000..3f042d9
--- /dev/null
@@ -0,0 +1,46 @@
+// 2001-08-15 Benjamin Kosnik  <bkoz@redhat.com>
+
+// Copyright (C) 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// 22.2.4.1.1 collate members
+
+#include <testsuite_hooks.h>
+
+#define main discard_main_1
+#include "1.cc"
+#undef main 
+
+#define main discard_main_2
+#include "2.cc"
+#undef main 
+
+#define main discard_main_3
+#include "3.cc"
+#undef main 
+
+int main()
+{
+  using namespace __gnu_cxx_test;
+  func_callback two;
+  two.push_back(&test01);
+  two.push_back(&test02);
+  two.push_back(&test03);
+  run_tests_wrapped_env("de_DE", "LANG", two);
+  return 0;
+}
@@ -1,4 +1,4 @@
-// Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc.
+// Copyright (C) 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
 //
 // 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
 // 22.2.1.3.2 ctype<char> members
 
 #include <locale>
-#include <vector>
 #include <testsuite_hooks.h>
 
-// XXX This test (test02) is not working for non-glibc locale models.
-// { dg-do run { xfail *-*-* } }
-
-#ifdef _GLIBCPP_USE_WCHAR_T
 typedef wchar_t char_type;
 class gnu_ctype: public std::ctype<char_type> { };
 
@@ -117,12 +112,6 @@ void test01()
   VERIFY( m01[1] == m00 );
   VERIFY( m01[2] == m00 );
 
-  cc0 = strlit00;
-  m01[0] = m00;
-  m01[1] = m00;
-  m01[2] = m00;
-  cc2 = gctype.is(cc0, cc0 + 3, m01);
-  VERIFY( cc2 == strlit00 + 3);
 #if 0
   VERIFY( m01[0] != m00 );
   VERIFY( m01[1] != m00 );
@@ -152,46 +141,8 @@ void test01()
 #endif
 }
 
-// libstdc++/5280
-void test04()
-{
-#ifdef _GLIBCPP_HAVE_SETENV 
-  // Set the global locale to non-"C".
-  std::locale loc_de("de_DE");
-  std::locale::global(loc_de);
-
-  // Set LANG environment variable to de_DE.
-  const char* oldLANG = getenv("LANG");
-  if (!setenv("LANG", "de_DE", 1))
-    {
-      test01();
-      setenv("LANG", oldLANG ? oldLANG : "", 1);
-    }
-#endif
-}
-
-// http://gcc.gnu.org/ml/libstdc++/2002-05/msg00038.html
-void test05()
-{
-  bool test = true;
-
-  const char* tentLANG = std::setlocale(LC_ALL, "ja_JP.eucjp");
-  if (tentLANG != NULL)
-    {
-      std::string preLANG = tentLANG;
-      test01();
-      std::string postLANG = std::setlocale(LC_ALL, NULL);
-      VERIFY( preLANG == postLANG );
-    }
-}
-#endif
-
 int main() 
 {
-#ifdef _GLIBCPP_USE_WCHAR_T
   test01();
-  test04();
-  test05();
-#endif
   return 0;
 }
diff --git a/libstdc++-v3/testsuite/22_locale/ctype/is/wchar_t/2.cc b/libstdc++-v3/testsuite/22_locale/ctype/is/wchar_t/2.cc
new file mode 100644 (file)
index 0000000..b1b565f
--- /dev/null
@@ -0,0 +1,104 @@
+// { dg-do run { xfail *-*-![linux]* } }
+// Copyright (C) 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+//
+// 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+// 22.2.1.3.2 ctype<char> members
+
+#include <locale>
+#include <vector>
+#include <testsuite_hooks.h>
+
+typedef wchar_t char_type;
+
+// libstdc++/4456, libstdc++/4457, libstdc++/4458
+void test02()
+{
+  using namespace std;
+  typedef ctype_base::mask     mask;
+  typedef vector<mask>                 vector_type;
+
+  bool test = true;
+
+  //  const int max = numeric_limits<char>::max();
+  const int max = 255;
+  const int ctype_mask_max = 10;
+  vector_type v_c(max);
+  vector_type v_de(max);
+
+  // "C"
+  locale loc_c = locale::classic();
+  const ctype<wchar_t>& ctype_c = use_facet<ctype<wchar_t> >(loc_c); 
+  for (int i = 0; i < max; ++i)
+    {
+      char_type c = static_cast<wchar_t>(i);
+      mask mask_test = static_cast<mask>(0);
+      mask mask_is = static_cast<mask>(0);
+      for (int j = 0; j <= ctype_mask_max; ++j)
+       {
+         mask_test = static_cast<mask>(1 << j);
+         if (ctype_c.is(mask_test, c))
+           mask_is |= mask_test;
+       }
+      v_c[i] = mask_is;
+    }   
+
+  // "de_DE"
+  locale loc_de("de_DE");
+  const ctype<wchar_t>& ctype_de = use_facet<ctype<wchar_t> >(loc_de); 
+  for (int i = 0; i < max; ++i)
+    {
+      char_type c = static_cast<wchar_t>(i);
+      mask mask_test = static_cast<mask>(0);
+      mask mask_is = static_cast<mask>(0);
+      for (int j = 0; j <= ctype_mask_max; ++j)
+       {
+         mask_test = static_cast<mask>(1 << j);
+         if (ctype_de.is(mask_test, c))
+           mask_is |= mask_test;
+       }
+      v_de[i] = mask_is;
+    }   
+
+#if QUANNUM_VERBOSE_LYRICALLY_ADEPT_BAY_AREA_MCS_MODE
+    for (int i = 0; i < max; ++i)
+    {
+      char_type mark = v_c[i] == v_de[i] ? ' ' : '-';
+      cout << i << ' ' << mark << ' ' << static_cast<wchar_t>(i) << '\t' ;
+      cout << "v_c: " << setw(4) << v_c[i] << '\t';
+      cout << "v_de: " << setw(4) << v_de[i] << endl;
+    }
+    cout << (v_c == v_de) << endl;
+#endif
+
+  VERIFY( v_c != v_de );
+}
+
+int main() 
+{
+  test02();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/22_locale/ctype/is/wchar_t/wrapped_env.cc b/libstdc++-v3/testsuite/22_locale/ctype/is/wchar_t/wrapped_env.cc
new file mode 100644 (file)
index 0000000..4f1d5e3
--- /dev/null
@@ -0,0 +1,41 @@
+// 2001-08-15 Benjamin Kosnik  <bkoz@redhat.com>
+
+// Copyright (C) 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// 22.2.4.1.1 collate members
+
+#include <testsuite_hooks.h>
+
+#define main discard_main_1
+#include "1.cc"
+#undef main 
+
+#define main discard_main_2
+#include "2.cc"
+#undef main 
+
+int main()
+{
+  using namespace __gnu_cxx_test;
+  func_callback two;
+  two.push_back(&test01);
+  two.push_back(&test02);
+  run_tests_wrapped_env("de_DE", "LANG", two);
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/22_locale/ctype/is/wchar_t/wrapped_locale.cc b/libstdc++-v3/testsuite/22_locale/ctype/is/wchar_t/wrapped_locale.cc
new file mode 100644 (file)
index 0000000..8d78718
--- /dev/null
@@ -0,0 +1,41 @@
+// 2001-08-15 Benjamin Kosnik  <bkoz@redhat.com>
+
+// Copyright (C) 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// 22.2.4.1.1 collate members
+
+#include <testsuite_hooks.h>
+
+#define main discard_main_1
+#include "1.cc"
+#undef main 
+
+#define main discard_main_2
+#include "2.cc"
+#undef main 
+
+int main()
+{
+  using namespace __gnu_cxx_test;
+  func_callback two;
+  two.push_back(&test01);
+  two.push_back(&test02);
+  run_tests_wrapped_locale("ja_JP.eucjp", two);
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/22_locale/ctype/narrow/char/1.cc b/libstdc++-v3/testsuite/22_locale/ctype/narrow/char/1.cc
new file mode 100644 (file)
index 0000000..b349a38
--- /dev/null
@@ -0,0 +1,69 @@
+// 2002-05-24 bkoz
+
+// Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+//
+// 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+// 22.2.1.3.2 ctype<char> members
+
+#include <locale>
+#include <vector>
+#include <testsuite_hooks.h>
+
+// libstdc++/6701
+void test01()
+{
+  using namespace std;
+  typedef char         wide_type;
+
+  bool test = true;
+  const char dfault = '?';
+  const locale loc_c = locale::classic();
+  const ctype<wide_type>& ctype_c = use_facet<ctype<wide_type> >(loc_c); 
+
+  basic_string<wide_type>      wide("wibble");
+  basic_string<char>           narrow("wibble");
+  vector<char>                         narrow_chars(wide.length() + 1);
+  
+  // narrow(charT c, char dfault) const
+  for (int i = 0; i < wide.length(); ++i)
+    {
+      char c = ctype_c.narrow(wide[i], dfault);
+      VERIFY( c == narrow[i] );
+    }
+
+  // narrow(const charT* low, const charT* high, char dfault, char* dest) const
+  ctype_c.narrow(&wide[0], &wide[wide.length()], dfault, &narrow_chars[0]);  
+  VERIFY( narrow_chars[0] != dfault );
+  for (int i = 0; i < wide.length(); ++i)
+    VERIFY( narrow_chars[i] == narrow[i] );
+}
+
+int main() 
+{
+  test01();
+  return 0;
+}
@@ -1,6 +1,6 @@
 // 2002-05-24 bkoz
 
-// Copyright (C) 2002 Free Software Foundation, Inc.
+// Copyright (C) 2002, 2003 Free Software Foundation, Inc.
 //
 // 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
 #include <vector>
 #include <testsuite_hooks.h>
 
-// libstdc++/6701
-void test01()
-{
-  using namespace std;
-  typedef char         wide_type;
-
-  bool test = true;
-  const char dfault = '?';
-  const locale loc_c = locale::classic();
-  const ctype<wide_type>& ctype_c = use_facet<ctype<wide_type> >(loc_c); 
-
-  basic_string<wide_type>      wide("wibble");
-  basic_string<char>           narrow("wibble");
-  vector<char>                         narrow_chars(wide.length() + 1);
-  
-  // narrow(charT c, char dfault) const
-  for (int i = 0; i < wide.length(); ++i)
-    {
-      char c = ctype_c.narrow(wide[i], dfault);
-      VERIFY( c == narrow[i] );
-    }
-
-  // narrow(const charT* low, const charT* high, char dfault, char* dest) const
-  ctype_c.narrow(&wide[0], &wide[wide.length()], dfault, &narrow_chars[0]);  
-  VERIFY( narrow_chars[0] != dfault );
-  for (int i = 0; i < wide.length(); ++i)
-    VERIFY( narrow_chars[i] == narrow[i] );
-}
-
 void test02()
 {
   using namespace std;
@@ -97,7 +68,6 @@ void test02()
 
 int main() 
 {
-  test01();
   test02();
   return 0;
 }
diff --git a/libstdc++-v3/testsuite/22_locale/ctype/narrow/char/wrapped_env.cc b/libstdc++-v3/testsuite/22_locale/ctype/narrow/char/wrapped_env.cc
new file mode 100644 (file)
index 0000000..4f1d5e3
--- /dev/null
@@ -0,0 +1,41 @@
+// 2001-08-15 Benjamin Kosnik  <bkoz@redhat.com>
+
+// Copyright (C) 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// 22.2.4.1.1 collate members
+
+#include <testsuite_hooks.h>
+
+#define main discard_main_1
+#include "1.cc"
+#undef main 
+
+#define main discard_main_2
+#include "2.cc"
+#undef main 
+
+int main()
+{
+  using namespace __gnu_cxx_test;
+  func_callback two;
+  two.push_back(&test01);
+  two.push_back(&test02);
+  run_tests_wrapped_env("de_DE", "LANG", two);
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/22_locale/ctype/narrow/char/wrapped_locale.cc b/libstdc++-v3/testsuite/22_locale/ctype/narrow/char/wrapped_locale.cc
new file mode 100644 (file)
index 0000000..8d78718
--- /dev/null
@@ -0,0 +1,41 @@
+// 2001-08-15 Benjamin Kosnik  <bkoz@redhat.com>
+
+// Copyright (C) 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// 22.2.4.1.1 collate members
+
+#include <testsuite_hooks.h>
+
+#define main discard_main_1
+#include "1.cc"
+#undef main 
+
+#define main discard_main_2
+#include "2.cc"
+#undef main 
+
+int main()
+{
+  using namespace __gnu_cxx_test;
+  func_callback two;
+  two.push_back(&test01);
+  two.push_back(&test02);
+  run_tests_wrapped_locale("ja_JP.eucjp", two);
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/22_locale/ctype/narrow/wchar_t/1.cc b/libstdc++-v3/testsuite/22_locale/ctype/narrow/wchar_t/1.cc
new file mode 100644 (file)
index 0000000..820fe6c
--- /dev/null
@@ -0,0 +1,69 @@
+// 2002-05-24 bkoz
+
+// Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+//
+// 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+// 22.2.1.3.2 ctype<char> members
+
+#include <locale>
+#include <vector>
+#include <testsuite_hooks.h>
+
+// libstdc++/6701
+void test01()
+{
+  using namespace std;
+  typedef wchar_t      wide_type;
+
+  bool test = true;
+  const char dfault = '?';
+  const locale loc_c = locale::classic();
+  const ctype<wide_type>& ctype_c = use_facet<ctype<wide_type> >(loc_c); 
+
+  basic_string<wide_type>      wide(L"wibble");
+  basic_string<char>           narrow("wibble");
+  vector<char>                         narrow_chars(wide.length() + 1);
+  
+  // narrow(charT c, char dfault) const
+  for (int i = 0; i < wide.length(); ++i)
+    {
+      char c = ctype_c.narrow(wide[i], dfault);
+      VERIFY( c == narrow[i] );
+    }
+
+  // narrow(const charT* low, const charT* high, char dfault, char* dest) const
+  ctype_c.narrow(&wide[0], &wide[wide.length()], dfault, &narrow_chars[0]);  
+  VERIFY( narrow_chars[0] != dfault );
+  for (int i = 0; i < wide.length(); ++i)
+    VERIFY( narrow_chars[i] == narrow[i] );
+}
+
+int main() 
+{
+  test01();
+  return 0;
+}
@@ -1,6 +1,6 @@
 // 2002-05-24 bkoz
 
-// Copyright (C) 2002 Free Software Foundation, Inc.
+// Copyright (C) 2002, 2003 Free Software Foundation, Inc.
 //
 // 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
 #include <vector>
 #include <testsuite_hooks.h>
 
-#ifdef _GLIBCPP_USE_WCHAR_T
-// libstdc++/6701
-void test01()
-{
-  using namespace std;
-  typedef wchar_t      wide_type;
-
-  bool test = true;
-  const char dfault = '?';
-  const locale loc_c = locale::classic();
-  const ctype<wide_type>& ctype_c = use_facet<ctype<wide_type> >(loc_c); 
-
-  basic_string<wide_type>      wide(L"wibble");
-  basic_string<char>           narrow("wibble");
-  vector<char>                         narrow_chars(wide.length() + 1);
-  
-  // narrow(charT c, char dfault) const
-  for (int i = 0; i < wide.length(); ++i)
-    {
-      char c = ctype_c.narrow(wide[i], dfault);
-      VERIFY( c == narrow[i] );
-    }
-
-  // narrow(const charT* low, const charT* high, char dfault, char* dest) const
-  ctype_c.narrow(&wide[0], &wide[wide.length()], dfault, &narrow_chars[0]);  
-  VERIFY( narrow_chars[0] != dfault );
-  for (int i = 0; i < wide.length(); ++i)
-    VERIFY( narrow_chars[i] == narrow[i] );
-}
-
 void test02()
 {
   using namespace std;
@@ -95,13 +65,9 @@ void test02()
   for (int i = 0; i < wide.length(); ++i)
     VERIFY( narrow_chars[i] == narrow[i] );
 }
-#endif
 
 int main() 
 {
-#ifdef _GLIBCPP_USE_WCHAR_T
-  test01();
   test02();
-#endif
- return 0;
+  return 0;
 }
diff --git a/libstdc++-v3/testsuite/22_locale/ctype/narrow/wchar_t/wrapped_env.cc b/libstdc++-v3/testsuite/22_locale/ctype/narrow/wchar_t/wrapped_env.cc
new file mode 100644 (file)
index 0000000..4f1d5e3
--- /dev/null
@@ -0,0 +1,41 @@
+// 2001-08-15 Benjamin Kosnik  <bkoz@redhat.com>
+
+// Copyright (C) 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// 22.2.4.1.1 collate members
+
+#include <testsuite_hooks.h>
+
+#define main discard_main_1
+#include "1.cc"
+#undef main 
+
+#define main discard_main_2
+#include "2.cc"
+#undef main 
+
+int main()
+{
+  using namespace __gnu_cxx_test;
+  func_callback two;
+  two.push_back(&test01);
+  two.push_back(&test02);
+  run_tests_wrapped_env("de_DE", "LANG", two);
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/22_locale/ctype/narrow/wchar_t/wrapped_locale.cc b/libstdc++-v3/testsuite/22_locale/ctype/narrow/wchar_t/wrapped_locale.cc
new file mode 100644 (file)
index 0000000..8d78718
--- /dev/null
@@ -0,0 +1,41 @@
+// 2001-08-15 Benjamin Kosnik  <bkoz@redhat.com>
+
+// Copyright (C) 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// 22.2.4.1.1 collate members
+
+#include <testsuite_hooks.h>
+
+#define main discard_main_1
+#include "1.cc"
+#undef main 
+
+#define main discard_main_2
+#include "2.cc"
+#undef main 
+
+int main()
+{
+  using namespace __gnu_cxx_test;
+  func_callback two;
+  two.push_back(&test01);
+  two.push_back(&test02);
+  run_tests_wrapped_locale("ja_JP.eucjp", two);
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/22_locale/ctype/scan/char/wrapped_env.cc b/libstdc++-v3/testsuite/22_locale/ctype/scan/char/wrapped_env.cc
new file mode 100644 (file)
index 0000000..b3d040e
--- /dev/null
@@ -0,0 +1,36 @@
+// 2001-08-15 Benjamin Kosnik  <bkoz@redhat.com>
+
+// Copyright (C) 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// 22.2.4.1.1 collate members
+
+#include <testsuite_hooks.h>
+
+#define main discard_main_1
+#include "1.cc"
+#undef main 
+
+int main()
+{
+  using namespace __gnu_cxx_test;
+  func_callback two;
+  two.push_back(&test01);
+  run_tests_wrapped_env("de_DE", "LANG", two);
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/22_locale/ctype/scan/char/wrapped_locale.cc b/libstdc++-v3/testsuite/22_locale/ctype/scan/char/wrapped_locale.cc
new file mode 100644 (file)
index 0000000..17d4d5d
--- /dev/null
@@ -0,0 +1,36 @@
+// 2001-08-15 Benjamin Kosnik  <bkoz@redhat.com>
+
+// Copyright (C) 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// 22.2.4.1.1 collate members
+
+#include <testsuite_hooks.h>
+
+#define main discard_main_1
+#include "1.cc"
+#undef main 
+
+int main()
+{
+  using namespace __gnu_cxx_test;
+  func_callback two;
+  two.push_back(&test01);
+  run_tests_wrapped_locale("ja_JP.eucjp", two);
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/22_locale/ctype/scan/wchar_t/wrapped_locale.cc b/libstdc++-v3/testsuite/22_locale/ctype/scan/wchar_t/wrapped_locale.cc
new file mode 100644 (file)
index 0000000..17d4d5d
--- /dev/null
@@ -0,0 +1,36 @@
+// 2001-08-15 Benjamin Kosnik  <bkoz@redhat.com>
+
+// Copyright (C) 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// 22.2.4.1.1 collate members
+
+#include <testsuite_hooks.h>
+
+#define main discard_main_1
+#include "1.cc"
+#undef main 
+
+int main()
+{
+  using namespace __gnu_cxx_test;
+  func_callback two;
+  two.push_back(&test01);
+  run_tests_wrapped_locale("ja_JP.eucjp", two);
+  return 0;
+}
@@ -1,4 +1,4 @@
-// Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc.
+// Copyright (C) 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
 //
 // 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
@@ -98,43 +98,8 @@ void test01()
   VERIFY( !std::char_traits<char_type>::compare(c_array, strlit02, len - 1) );
 }
 
-// libstdc++/5280
-void test04()
-{
-#ifdef _GLIBCPP_HAVE_SETENV 
-  // Set the global locale to non-"C".
-  std::locale loc_de("de_DE");
-  std::locale::global(loc_de);
-
-  // Set LANG environment variable to de_DE.
-  const char* oldLANG = getenv("LANG");
-  if (!setenv("LANG", "de_DE", 1))
-    {
-      test01();
-      setenv("LANG", oldLANG ? oldLANG : "", 1);
-    }
-#endif
-}
-
-// http://gcc.gnu.org/ml/libstdc++/2002-05/msg00038.html
-void test05()
-{
-  bool test = true;
-
-  const char* tentLANG = std::setlocale(LC_ALL, "ja_JP.eucjp");
-  if (tentLANG != NULL)
-    {
-      std::string preLANG = tentLANG;
-      test01();
-      std::string postLANG = std::setlocale(LC_ALL, NULL);
-      VERIFY( preLANG == postLANG );
-    }
-}
-
 int main() 
 {
   test01();
-  test04();
-  test05();
   return 0;
 }
diff --git a/libstdc++-v3/testsuite/22_locale/ctype/to/char/wrapped_env.cc b/libstdc++-v3/testsuite/22_locale/ctype/to/char/wrapped_env.cc
new file mode 100644 (file)
index 0000000..b3d040e
--- /dev/null
@@ -0,0 +1,36 @@
+// 2001-08-15 Benjamin Kosnik  <bkoz@redhat.com>
+
+// Copyright (C) 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// 22.2.4.1.1 collate members
+
+#include <testsuite_hooks.h>
+
+#define main discard_main_1
+#include "1.cc"
+#undef main 
+
+int main()
+{
+  using namespace __gnu_cxx_test;
+  func_callback two;
+  two.push_back(&test01);
+  run_tests_wrapped_env("de_DE", "LANG", two);
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/22_locale/ctype/to/char/wrapped_locale.cc b/libstdc++-v3/testsuite/22_locale/ctype/to/char/wrapped_locale.cc
new file mode 100644 (file)
index 0000000..17d4d5d
--- /dev/null
@@ -0,0 +1,36 @@
+// 2001-08-15 Benjamin Kosnik  <bkoz@redhat.com>
+
+// Copyright (C) 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// 22.2.4.1.1 collate members
+
+#include <testsuite_hooks.h>
+
+#define main discard_main_1
+#include "1.cc"
+#undef main 
+
+int main()
+{
+  using namespace __gnu_cxx_test;
+  func_callback two;
+  two.push_back(&test01);
+  run_tests_wrapped_locale("ja_JP.eucjp", two);
+  return 0;
+}
@@ -1,4 +1,4 @@
-// Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc.
+// Copyright (C) 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
 //
 // 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
@@ -30,7 +30,6 @@
 #include <locale>
 #include <testsuite_hooks.h>
 
-#ifdef _GLIBCPP_USE_WCHAR_T
 typedef wchar_t char_type;
 class gnu_ctype: public std::ctype<char_type> { };
 
@@ -99,46 +98,8 @@ void test01()
   VERIFY( !std::char_traits<char_type>::compare(c_array, strlit02, len - 1) );
 }
 
-// libstdc++/5280
-void test04()
-{
-#ifdef _GLIBCPP_HAVE_SETENV 
-  // Set the global locale to non-"C".
-  std::locale loc_de("de_DE");
-  std::locale::global(loc_de);
-
-  // Set LANG environment variable to de_DE.
-  const char* oldLANG = getenv("LANG");
-  if (!setenv("LANG", "de_DE", 1))
-    {
-      test01();
-      setenv("LANG", oldLANG ? oldLANG : "", 1);
-    }
-#endif
-}
-
-// http://gcc.gnu.org/ml/libstdc++/2002-05/msg00038.html
-void test05()
-{
-  bool test = true;
-
-  const char* tentLANG = std::setlocale(LC_ALL, "ja_JP.eucjp");
-  if (tentLANG != NULL)
-    {
-      std::string preLANG = tentLANG;
-      test01();
-      std::string postLANG = std::setlocale(LC_ALL, NULL);
-      VERIFY( preLANG == postLANG );
-    }
-}
-#endif
-
 int main() 
 {
-#ifdef _GLIBCPP_USE_WCHAR_T
   test01();
-  test04();
-  test05();
-#endif
   return 0;
 }
diff --git a/libstdc++-v3/testsuite/22_locale/ctype/to/wchar_t/wrapped_env.cc b/libstdc++-v3/testsuite/22_locale/ctype/to/wchar_t/wrapped_env.cc
new file mode 100644 (file)
index 0000000..b3d040e
--- /dev/null
@@ -0,0 +1,36 @@
+// 2001-08-15 Benjamin Kosnik  <bkoz@redhat.com>
+
+// Copyright (C) 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// 22.2.4.1.1 collate members
+
+#include <testsuite_hooks.h>
+
+#define main discard_main_1
+#include "1.cc"
+#undef main 
+
+int main()
+{
+  using namespace __gnu_cxx_test;
+  func_callback two;
+  two.push_back(&test01);
+  run_tests_wrapped_env("de_DE", "LANG", two);
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/22_locale/ctype/to/wchar_t/wrapped_locale.cc b/libstdc++-v3/testsuite/22_locale/ctype/to/wchar_t/wrapped_locale.cc
new file mode 100644 (file)
index 0000000..17d4d5d
--- /dev/null
@@ -0,0 +1,36 @@
+// 2001-08-15 Benjamin Kosnik  <bkoz@redhat.com>
+
+// Copyright (C) 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// 22.2.4.1.1 collate members
+
+#include <testsuite_hooks.h>
+
+#define main discard_main_1
+#include "1.cc"
+#undef main 
+
+int main()
+{
+  using namespace __gnu_cxx_test;
+  func_callback two;
+  two.push_back(&test01);
+  run_tests_wrapped_locale("ja_JP.eucjp", two);
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/22_locale/ctype/widen/char/wrapped_env.cc b/libstdc++-v3/testsuite/22_locale/ctype/widen/char/wrapped_env.cc
new file mode 100644 (file)
index 0000000..b3d040e
--- /dev/null
@@ -0,0 +1,36 @@
+// 2001-08-15 Benjamin Kosnik  <bkoz@redhat.com>
+
+// Copyright (C) 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// 22.2.4.1.1 collate members
+
+#include <testsuite_hooks.h>
+
+#define main discard_main_1
+#include "1.cc"
+#undef main 
+
+int main()
+{
+  using namespace __gnu_cxx_test;
+  func_callback two;
+  two.push_back(&test01);
+  run_tests_wrapped_env("de_DE", "LANG", two);
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/22_locale/ctype/widen/char/wrapped_locale.cc b/libstdc++-v3/testsuite/22_locale/ctype/widen/char/wrapped_locale.cc
new file mode 100644 (file)
index 0000000..17d4d5d
--- /dev/null
@@ -0,0 +1,36 @@
+// 2001-08-15 Benjamin Kosnik  <bkoz@redhat.com>
+
+// Copyright (C) 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// 22.2.4.1.1 collate members
+
+#include <testsuite_hooks.h>
+
+#define main discard_main_1
+#include "1.cc"
+#undef main 
+
+int main()
+{
+  using namespace __gnu_cxx_test;
+  func_callback two;
+  two.push_back(&test01);
+  run_tests_wrapped_locale("ja_JP.eucjp", two);
+  return 0;
+}
@@ -1,6 +1,6 @@
 // 2002-05-24 bkoz
 
-// Copyright (C) 2002 Free Software Foundation, Inc.
+// Copyright (C) 2002, 2003 Free Software Foundation, Inc.
 //
 // 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
@@ -33,7 +33,6 @@
 #include <vector>
 #include <testsuite_hooks.h>
 
-#ifdef _GLIBCPP_USE_WCHAR_T
 void test01()
 {
   using namespace std;
@@ -60,12 +59,9 @@ void test01()
   for (int i = 0; i < narrow.length(); ++i)
     VERIFY( wide_chars[i] == wide[i] );
 }
-#endif
 
 int main() 
 {
-#ifdef _GLIBCPP_USE_WCHAR_T
   test01();
-#endif
   return 0;
 }
diff --git a/libstdc++-v3/testsuite/22_locale/ctype/widen/wchar_t/wrapped_env.cc b/libstdc++-v3/testsuite/22_locale/ctype/widen/wchar_t/wrapped_env.cc
new file mode 100644 (file)
index 0000000..b3d040e
--- /dev/null
@@ -0,0 +1,36 @@
+// 2001-08-15 Benjamin Kosnik  <bkoz@redhat.com>
+
+// Copyright (C) 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// 22.2.4.1.1 collate members
+
+#include <testsuite_hooks.h>
+
+#define main discard_main_1
+#include "1.cc"
+#undef main 
+
+int main()
+{
+  using namespace __gnu_cxx_test;
+  func_callback two;
+  two.push_back(&test01);
+  run_tests_wrapped_env("de_DE", "LANG", two);
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/22_locale/ctype/widen/wchar_t/wrapped_locale.cc b/libstdc++-v3/testsuite/22_locale/ctype/widen/wchar_t/wrapped_locale.cc
new file mode 100644 (file)
index 0000000..17d4d5d
--- /dev/null
@@ -0,0 +1,36 @@
+// 2001-08-15 Benjamin Kosnik  <bkoz@redhat.com>
+
+// Copyright (C) 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// 22.2.4.1.1 collate members
+
+#include <testsuite_hooks.h>
+
+#define main discard_main_1
+#include "1.cc"
+#undef main 
+
+int main()
+{
+  using namespace __gnu_cxx_test;
+  func_callback two;
+  two.push_back(&test01);
+  run_tests_wrapped_locale("ja_JP.eucjp", two);
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/22_locale/ctype_members_wchar_t.cc b/libstdc++-v3/testsuite/22_locale/ctype_members_wchar_t.cc
deleted file mode 100644 (file)
index 31b1bcb..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-// 2000-09-01 Benjamin Kosnik <bkoz@redhat.com>
-
-// Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc.
-//
-// 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
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING.  If not, write to the Free
-// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-// USA.
-
-// As a special exception, you may use this file as part of a free software
-// library without restriction.  Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License.  This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-
-// 22.2.1.3.2 ctype<char> members
-
-#include <locale>
-#include <testsuite_hooks.h>
-
-#if _GLIBCPP_USE_WCHAR_T
-void test01()
-{
-  // Nothing, right now.  
-}
-#endif /* !defined(_GLIBCPP_USE_WCHAR_T) */
-
-int main() 
-{
-#if _GLIBCPP_USE_WCHAR_T
-  test01();
-#endif 
-
-  return 0;
-}
similarity index 82%
rename from libstdc++-v3/testsuite/22_locale/facet.cc
rename to libstdc++-v3/testsuite/22_locale/facet/1.cc
index 9c613b4..f93265b 100644 (file)
@@ -1,6 +1,6 @@
 // 2000-08-31 Benjamin Kosnik <bkoz@redhat.com>
 
-// Copyright (C) 2000, 2002 Free Software Foundation
+// Copyright (C) 2000, 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
@@ -234,69 +234,8 @@ void test01()
     }
 }
 
-// Static counter for use in checking ctors/dtors.
-static std::size_t counter;
-
-class surf : public std::locale::facet
-{
-public:
-  static std::locale::id               id;
-  surf(size_t refs = 0): std::locale::facet(refs) { ++counter; }
-  ~surf() { --counter; }
-};
-
-std::locale::id surf::id;
-
-typedef surf facet_type;
-
-void test02()
-{
-  using namespace std;
-  bool test = true;
-
-  // 1: Destroyed when out of scope.
-  VERIFY( counter == 0 );
-  {
-    locale loc01(locale::classic(), new facet_type);
-    VERIFY( counter == 1 );
-  }
-  VERIFY( counter == 0 );
-
-  // 2: Not destroyed when out of scope, deliberately leaked.
-  VERIFY( counter == 0 );
-  {
-    // Default refs argument is zero.
-    locale loc02(locale::classic(), new facet_type(1));
-    VERIFY( counter == 1 );
-  }
-  VERIFY( counter == 1 );
-
-  // 3: Pathological.
-  counter = 0;
-  {
-    // Test bounds.
-    facet_type* f = new facet_type(numeric_limits<size_t>::max());
-    VERIFY( counter == 1 );
-    // Add a reference.
-    locale loc01(locale::classic(), f);
-    {
-      // Add another reference...
-      locale loc02(locale::classic(), f);
-    }
-    VERIFY( counter == 1 );
-  }
-
-  // 4: Named locale should destroy facets when it goes out of scope.
-  // Not quite sure how to test for this w/o valgrind at the moment.
-  {
-    locale loc03("es_MX");
-  }
-}
-
 int main ()
 {
   test01();
-
-  test02();
   return 0;
 }
diff --git a/libstdc++-v3/testsuite/22_locale/facet/2.cc b/libstdc++-v3/testsuite/22_locale/facet/2.cc
new file mode 100644 (file)
index 0000000..abda43e
--- /dev/null
@@ -0,0 +1,94 @@
+// 2000-08-31 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2000, 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// 22.1.1.1.2 - class locale::facet [lib.locale.facet]
+
+#include <cwchar> // for mbstate_t
+#include <locale>
+#include <stdexcept>
+#include <string>
+#include <iterator>
+#include <limits>
+#include <testsuite_hooks.h>
+
+// Static counter for use in checking ctors/dtors.
+static std::size_t counter;
+
+class surf : public std::locale::facet
+{
+public:
+  static std::locale::id               id;
+  surf(size_t refs = 0): std::locale::facet(refs) { ++counter; }
+  ~surf() { --counter; }
+};
+
+std::locale::id surf::id;
+
+typedef surf facet_type;
+
+void test02()
+{
+  using namespace std;
+  bool test = true;
+
+  // 1: Destroyed when out of scope.
+  VERIFY( counter == 0 );
+  {
+    locale loc01(locale::classic(), new facet_type);
+    VERIFY( counter == 1 );
+  }
+  VERIFY( counter == 0 );
+
+  // 2: Not destroyed when out of scope, deliberately leaked.
+  VERIFY( counter == 0 );
+  {
+    // Default refs argument is zero.
+    locale loc02(locale::classic(), new facet_type(1));
+    VERIFY( counter == 1 );
+  }
+  VERIFY( counter == 1 );
+
+  // 3: Pathological.
+  counter = 0;
+  {
+    // Test bounds.
+    facet_type* f = new facet_type(numeric_limits<size_t>::max());
+    VERIFY( counter == 1 );
+    // Add a reference.
+    locale loc01(locale::classic(), f);
+    {
+      // Add another reference...
+      locale loc02(locale::classic(), f);
+    }
+    VERIFY( counter == 1 );
+  }
+
+  // 4: Named locale should destroy facets when it goes out of scope.
+  // Not quite sure how to test for this w/o valgrind at the moment.
+  {
+    locale loc03("es_MX");
+  }
+}
+
+int main ()
+{
+  test02();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/22_locale/locale/cons/1.cc b/libstdc++-v3/testsuite/22_locale/locale/cons/1.cc
new file mode 100644 (file)
index 0000000..f95b06e
--- /dev/null
@@ -0,0 +1,39 @@
+// 2000-09-13 Benjamin Kosnik <bkoz@redhat.com>
+
+// 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// 22.1.1.2 locale constructors and destructors [lib.locale.cons]
+
+#include <cwchar> // for mbstate_t
+#include <locale>
+#include <stdexcept>
+#include <testsuite_hooks.h>
+
+void test00()
+{
+  // Should be able to do this as the first thing that happens in a
+  // file and have it not crash.
+  std::locale loc("C");
+}
+
+int main()
+{
+  test00();
+  return 0;
+}
@@ -1,6 +1,6 @@
 // 2000-09-13 Benjamin Kosnik <bkoz@redhat.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
 #include <stdexcept>
 #include <testsuite_hooks.h>
 
-void test00()
-{
-  // Should be able to do this as the first thing that happens in a
-  // file and have it not crash.
-  std::locale loc("C");
-}
-
 #if _GLIBCPP_USE___ENC_TRAITS
 typedef std::codecvt<char, char, std::mbstate_t>             c_codecvt;
 typedef std::codecvt_byname<char, char, std::mbstate_t>       c_codecvt_byname;
@@ -296,213 +289,10 @@ void test01()
 }
 #endif // _GLIBCPP_USE___ENC_TRAITS
 
-// libstdc++/7222
-void test02()
-{
-  bool test = true;
-  std::locale loc_c1("C");
-  std::locale loc_c2 ("C");
-  
-  std::locale loc_1("");
-  std::locale loc_2("");