From 4e669767860f01da255f903911dc387019b32aa1 Mon Sep 17 00:00:00 2001 From: NAKAMURA Takumi Date: Mon, 25 Apr 2011 17:55:46 +0900 Subject: [PATCH] Suppress test/localization. --- test/localization/c.locales/clocale.pass.cpp | 48 - test/localization/c.locales/version.pass.cpp | 20 - .../__scan_keyword.xfail.pass.cpp | 118 - .../compare.xfail.pass.cpp | 80 - .../locale.collate.byname/hash.xfail.pass.cpp | 39 - .../transform.xfail.pass.cpp | 63 - .../types.xfail.pass.cpp | 43 - .../locale.collate/ctor.pass.cpp | 67 - .../locale.collate.members/compare.pass.cpp | 49 - .../locale.collate.members/hash.pass.cpp | 39 - .../locale.collate.members/transform.pass.cpp | 33 - .../tested_elsewhere.pass.cpp | 12 - .../locale.collate/types.pass.cpp | 49 - .../category.collate/nothing_to_do.pass.cpp | 12 - .../category.ctype/ctype_base.pass.cpp | 57 - .../facet.ctype.char.dtor/dtor.pass.cpp | 50 - .../facet.ctype.char.members/ctor.pass.cpp | 50 - .../facet.ctype.char.members/is_1.pass.cpp | 59 - .../is_many.xfail.pass.cpp | 118 - .../narrow_1.pass.cpp | 33 - .../narrow_many.pass.cpp | 38 - .../scan_is.xfail.pass.cpp | 44 - .../scan_not.xfail.pass.cpp | 44 - .../facet.ctype.char.members/table.pass.cpp | 33 - .../tolower_1.xfail.pass.cpp | 33 - .../tolower_many.xfail.pass.cpp | 36 - .../toupper_1.xfail.pass.cpp | 33 - .../toupper_many.xfail.pass.cpp | 36 - .../facet.ctype.char.members/widen_1.pass.cpp | 33 - .../widen_many.pass.cpp | 38 - .../classic_table.xfail.pass.cpp | 23 - .../tested_elsewhere.pass.cpp | 12 - .../facet.ctype.special/types.pass.cpp | 38 - .../locale.codecvt.byname/ctor_char.pass.cpp | 70 - .../ctor_char16_t.pass.cpp | 70 - .../ctor_char32_t.pass.cpp | 70 - .../ctor_wchar_t.pass.cpp | 70 - .../locale.codecvt/codecvt_base.pass.cpp | 27 - .../locale.codecvt/ctor_char.pass.cpp | 52 - .../locale.codecvt/ctor_char16_t.pass.cpp | 58 - .../locale.codecvt/ctor_char32_t.pass.cpp | 58 - .../locale.codecvt/ctor_wchar_t.pass.cpp | 52 - .../char16_t_always_noconv.pass.cpp | 26 - .../char16_t_encoding.pass.cpp | 26 - .../char16_t_in.pass.cpp | 40 - .../char16_t_length.pass.cpp | 32 - .../char16_t_max_length.pass.cpp | 26 - .../char16_t_out.pass.cpp | 45 - .../char16_t_unshift.pass.cpp | 33 - .../char32_t_always_noconv.pass.cpp | 26 - .../char32_t_encoding.pass.cpp | 26 - .../char32_t_in.pass.cpp | 40 - .../char32_t_length.pass.cpp | 32 - .../char32_t_max_length.pass.cpp | 26 - .../char32_t_out.pass.cpp | 45 - .../char32_t_unshift.pass.cpp | 33 - .../char_always_noconv.pass.cpp | 26 - .../char_encoding.pass.cpp | 26 - .../locale.codecvt.members/char_in.pass.cpp | 38 - .../char_length.pass.cpp | 32 - .../char_max_length.pass.cpp | 26 - .../locale.codecvt.members/char_out.pass.cpp | 38 - .../char_unshift.pass.cpp | 33 - .../utf_sanity_check.pass.cpp | 127 - .../wchar_t_always_noconv.pass.cpp | 26 - .../wchar_t_encoding.xfail.pass.cpp | 26 - .../wchar_t_in.xfail.pass.cpp | 42 - .../wchar_t_length.xfail.pass.cpp | 32 - .../wchar_t_max_length.xfail.pass.cpp | 26 - .../wchar_t_out.xfail.pass.cpp | 69 - .../wchar_t_unshift.xfail.pass.cpp | 35 - .../tested_elsewhere.pass.cpp | 12 - .../locale.codecvt/types_char.pass.cpp | 40 - .../locale.codecvt/types_char16_t.pass.cpp | 42 - .../locale.codecvt/types_char32_t.pass.cpp | 42 - .../locale.codecvt/types_wchar_t.pass.cpp | 40 - .../locale.ctype.byname/is_1.xfail.pass.cpp | 108 - .../is_many.xfail.pass.cpp | 243 - .../narrow_1.xfail.pass.cpp | 51 - .../narrow_many.xfail.pass.cpp | 59 - .../scan_is.xfail.pass.cpp | 67 - .../scan_not.xfail.pass.cpp | 67 - .../tolower_1.xfail.pass.cpp | 85 - .../tolower_many.xfail.pass.cpp | 90 - .../toupper_1.xfail.pass.cpp | 85 - .../toupper_many.xfail.pass.cpp | 90 - .../locale.ctype.byname/types.xfail.pass.cpp | 69 - .../widen_1.xfail.pass.cpp | 54 - .../widen_many.xfail.pass.cpp | 61 - .../category.ctype/locale.ctype/ctor.pass.cpp | 51 - .../locale.ctype.members/is_1.xfail.pass.cpp | 59 - .../is_many.xfail.pass.cpp | 118 - .../locale.ctype.members/narrow_1.pass.cpp | 33 - .../locale.ctype.members/narrow_many.pass.cpp | 38 - .../scan_is.xfail.pass.cpp | 44 - .../scan_not.xfail.pass.cpp | 44 - .../tolower_1.xfail.pass.cpp | 33 - .../tolower_many.xfail.pass.cpp | 36 - .../toupper_1.xfail.pass.cpp | 33 - .../toupper_many.xfail.pass.cpp | 36 - .../locale.ctype.members/widen_1.pass.cpp | 33 - .../locale.ctype.members/widen_many.pass.cpp | 38 - .../tested_elsewhere.pass.cpp | 12 - .../locale.ctype/types.pass.cpp | 38 - .../nothing_to_do.pass.cpp | 12 - .../locale.messages/ctor.pass.cpp | 52 - .../not_testable.pass.cpp | 34 - .../tested_elsewhere.pass.cpp | 12 - .../locale.messages/messages_base.pass.cpp | 24 - .../locale.messages/types.pass.cpp | 34 - .../category.messages/nothing_to_do.pass.cpp | 12 - .../locale.money.get/ctor.pass.cpp | 52 - .../get_long_double_en_US.xfail.pass.cpp | 719 - .../get_long_double_fr_FR.xfail.pass.cpp | 723 - .../get_long_double_ru_RU.xfail.pass.cpp | 723 - .../get_long_double_zh_CN.xfail.pass.cpp | 719 - .../get_string_en_US.xfail.pass.cpp | 727 - .../locale.money.get.members/iterators.h | 55 - .../tested_elsewhere.pass.cpp | 12 - .../locale.money.get/types.pass.cpp | 34 - .../locale.money.put/ctor.pass.cpp | 52 - .../locale.money.put.members/iterators.h | 33 - .../put_long_double_en_US.xfail.pass.cpp | 490 - .../put_long_double_fr_FR.xfail.pass.cpp | 489 - .../put_long_double_ru_RU.xfail.pass.cpp | 489 - .../put_long_double_zh_CN.xfail.pass.cpp | 489 - .../put_string_en_US.xfail.pass.cpp | 490 - .../tested_elsewhere.pass.cpp | 12 - .../locale.money.put/types.pass.cpp | 34 - .../curr_symbol.xfail.pass.cpp | 138 - .../decimal_point.xfail.pass.cpp | 138 - .../frac_digits.xfail.pass.cpp | 138 - .../grouping.xfail.pass.cpp | 138 - .../neg_format.xfail.pass.cpp | 218 - .../negative_sign.xfail.pass.cpp | 138 - .../pos_format.xfail.pass.cpp | 218 - .../positive_sign.pass.cpp | 138 - .../thousands_sep.xfail.pass.cpp | 138 - .../locale.moneypunct/ctor.pass.cpp | 52 - .../curr_symbol.pass.cpp | 75 - .../decimal_point.pass.cpp | 75 - .../frac_digits.pass.cpp | 75 - .../grouping.pass.cpp | 75 - .../neg_format.pass.cpp | 88 - .../negative_sign.pass.cpp | 76 - .../pos_format.pass.cpp | 88 - .../positive_sign.pass.cpp | 75 - .../thousands_sep.pass.cpp | 75 - .../tested_elsewhere.pass.cpp | 12 - .../locale.moneypunct/money_base.pass.cpp | 33 - .../locale.moneypunct/types.pass.cpp | 34 - .../category.monetary/nothing_to_do.pass.cpp | 12 - .../locale.nm.put/ctor.pass.cpp | 52 - .../facet.num.put.members/iterators.h | 33 - .../facet.num.put.members/put_bool.pass.cpp | 100 - .../facet.num.put.members/put_double.pass.cpp | 17887 ----------- .../facet.num.put.members/put_long.pass.cpp | 371 - .../put_long_double.xfail.pass.cpp | 26241 ---------------- .../put_long_long.pass.cpp | 344 - .../put_pointer.xfail.pass.cpp | 43 - .../put_unsigned_long.pass.cpp | 374 - .../put_unsigned_long_long.pass.cpp | 344 - .../tested_elsewhere.pass.cpp | 12 - .../locale.nm.put/types.pass.cpp | 32 - .../locale.num.get/ctor.pass.cpp | 52 - .../get_bool.xfail.pass.cpp | 230 - .../facet.num.get.members/get_double.fail.cpp | 228 - .../facet.num.get.members/get_float.fail.cpp | 170 - .../get_long.xfail.pass.cpp | 507 - .../get_long_double.fail.cpp | 170 - .../get_long_long.xfail.pass.cpp | 105 - .../get_pointer.pass.cpp | 61 - .../get_unsigned_int.xfail.pass.cpp | 83 - .../get_unsigned_long.xfail.pass.cpp | 83 - .../get_unsigned_long_long.xfail.pass.cpp | 83 - .../get_unsigned_short.xfail.pass.cpp | 83 - .../facet.num.get.members/iterators.h | 251 - .../test_min_max.xfail.pass.cpp | 53 - .../tested_elsewhere.pass.cpp | 12 - .../locale.num.get/types.pass.cpp | 32 - .../category.numeric/nothing_to_do.pass.cpp | 12 - .../date_order.xfail.pass.cpp | 48 - .../date_order_wide.xfail.pass.cpp | 48 - .../get_date.xfail.pass.cpp | 87 - .../get_date_wide.xfail.pass.cpp | 87 - .../get_monthname.xfail.pass.cpp | 79 - .../get_monthname_wide.xfail.pass.cpp | 88 - .../get_one.xfail.pass.cpp | 158 - .../get_one_wide.xfail.pass.cpp | 156 - .../get_time.xfail.pass.cpp | 87 - .../get_time_wide.xfail.pass.cpp | 87 - .../get_weekday.xfail.pass.cpp | 81 - .../get_weekday_wide.xfail.pass.cpp | 79 - .../get_year.xfail.pass.cpp | 78 - .../get_year_wide.xfail.pass.cpp | 78 - .../locale.time.get.byname/iterators.h | 55 - .../locale.time.get/ctor.pass.cpp | 52 - .../date_order.pass.cpp | 34 - .../locale.time.get.members/get_date.pass.cpp | 51 - .../get_date_wide.xfail.pass.cpp | 51 - .../get_many.xfail.pass.cpp | 68 - .../get_monthname.xfail.pass.cpp | 265 - .../get_monthname_wide.xfail.pass.cpp | 265 - .../get_one.xfail.pass.cpp | 305 - .../get_time.xfail.pass.cpp | 117 - .../get_time_wide.xfail.pass.cpp | 117 - .../get_weekday.xfail.pass.cpp | 220 - .../get_weekday_wide.xfail.pass.cpp | 220 - .../locale.time.get.members/get_year.pass.cpp | 138 - .../locale.time.get.members/iterators.h | 55 - .../tested_elsewhere.pass.cpp | 12 - .../locale.time.get/time_base.pass.cpp | 29 - .../locale.time.get/types.pass.cpp | 41 - .../locale.time.put.byname/iterators.h | 33 - .../put1.xfail.pass.cpp | 69 - .../locale.time.put/ctor.pass.cpp | 52 - .../locale.time.put.members/iterators.h | 33 - .../put1.xfail.pass.cpp | 61 - .../put2.xfail.pass.cpp | 367 - .../tested_elsewhere.pass.cpp | 12 - .../locale.time.put/types.pass.cpp | 32 - .../category.time/nothing_to_do.pass.cpp | 12 - .../decimal_point.xfail.pass.cpp | 60 - .../grouping.xfail.pass.cpp | 60 - .../thousands_sep.pass.cpp | 60 - .../locale.numpunct/ctor.pass.cpp | 66 - .../decimal_point.pass.cpp | 32 - .../facet.numpunct.members/falsename.pass.cpp | 32 - .../facet.numpunct.members/grouping.pass.cpp | 32 - .../thousands_sep.pass.cpp | 32 - .../facet.numpunct.members/truename.pass.cpp | 32 - .../tested_elsewhere.pass.cpp | 12 - .../locale.numpunct/types.pass.cpp | 48 - .../facet.numpunct/nothing_to_do.pass.cpp | 12 - .../facets.examples/nothing_to_do.pass.cpp | 12 - .../locale.stdcvt/codecvt_mode.pass.cpp | 29 - .../locale.stdcvt/codecvt_utf16.pass.cpp | 56 - .../codecvt_utf16_always_noconv.pass.cpp | 45 - .../codecvt_utf16_encoding.pass.cpp | 45 - .../locale.stdcvt/codecvt_utf16_in.pass.cpp | 739 - .../codecvt_utf16_length.pass.cpp | 449 - .../codecvt_utf16_max_length.pass.cpp | 63 - .../locale.stdcvt/codecvt_utf16_out.pass.cpp | 331 - .../codecvt_utf16_unshift.pass.cpp | 56 - .../locale.stdcvt/codecvt_utf8.pass.cpp | 56 - .../codecvt_utf8_always_noconv.pass.cpp | 45 - .../codecvt_utf8_encoding.pass.cpp | 45 - .../locale.stdcvt/codecvt_utf8_in.pass.cpp | 360 - .../codecvt_utf8_length.pass.cpp | 244 - .../codecvt_utf8_max_length.pass.cpp | 63 - .../locale.stdcvt/codecvt_utf8_out.pass.cpp | 456 - .../codecvt_utf8_unshift.pass.cpp | 56 - .../codecvt_utf8_utf16_always_noconv.pass.cpp | 45 - .../codecvt_utf8_utf16_encoding.pass.cpp | 45 - .../codecvt_utf8_utf16_in.pass.cpp | 372 - .../codecvt_utf8_utf16_length.pass.cpp | 235 - .../codecvt_utf8_utf16_max_length.pass.cpp | 63 - .../codecvt_utf8_utf16_out.pass.cpp | 415 - .../codecvt_utf8_utf16_unshift.pass.cpp | 56 - .../locale.stdcvt/version.pass.cpp | 20 - .../locale.syn/nothing_to_do.pass.cpp | 12 - .../classification/isalnum.pass.cpp | 31 - .../classification/isalpha.pass.cpp | 31 - .../classification/iscntrl.pass.cpp | 31 - .../classification/isdigit.pass.cpp | 31 - .../classification/isgraph.pass.cpp | 31 - .../classification/islower.pass.cpp | 31 - .../classification/isprint.pass.cpp | 31 - .../classification/ispunct.pass.cpp | 31 - .../classification/isspace.pass.cpp | 31 - .../classification/isupper.pass.cpp | 31 - .../classification/isxdigit.pass.cpp | 31 - .../conversions.buffer/ctor.pass.cpp | 67 - .../conversions.buffer/overflow.pass.cpp | 100 - .../pbackfail.xfail.pass.cpp | 59 - .../conversions.buffer/rdbuf.pass.cpp | 31 - .../conversions.buffer/seekoff.xfail.pass.cpp | 58 - .../conversions.buffer/state.pass.cpp | 28 - .../conversions.buffer/test.xfail.pass.cpp | 36 - .../conversions.buffer/underflow.dat | 1 - .../underflow.xfail.pass.cpp | 84 - .../conversions.buffer/underflow_utf8.dat | 1 - .../tolower.xfail.pass.cpp | 31 - .../toupper.xfail.pass.cpp | 31 - .../conversions.string/converted.pass.cpp | 32 - .../conversions.string/ctor_codecvt.pass.cpp | 34 - .../ctor_codecvt_state.pass.cpp | 28 - .../ctor_err_string.pass.cpp | 64 - .../conversions.string/from_bytes.pass.cpp | 37 - .../conversions.string/state.pass.cpp | 25 - .../conversions.string/to_bytes.pass.cpp | 37 - .../conversions.string/types.pass.cpp | 35 - .../conversions/nothing_to_do.pass.cpp | 12 - .../locale.convenience/nothing_to_do.pass.cpp | 12 - .../has_facet.pass.cpp | 32 - .../use_facet.pass.cpp | 52 - .../locale/locale.cons/assign.pass.cpp | 78 - .../locale.cons/char_pointer.xfail.pass.cpp | 98 - .../locale/locale.cons/copy.xfail.pass.cpp | 77 - .../locale/locale.cons/default.xfail.pass.cpp | 87 - .../locale_char_pointer_cat.pass.cpp | 76 - .../locale.cons/locale_facetptr.pass.cpp | 101 - .../locale.cons/locale_locale_cat.pass.cpp | 76 - .../locale.cons/locale_string_cat.pass.cpp | 76 - .../locale/locale.cons/string.pass.cpp | 81 - .../locale/locale.members/combine.pass.cpp | 107 - .../locale/locale.members/name.xfail.pass.cpp | 27 - .../locale/locale.operators/compare.pass.cpp | 34 - .../locale/locale.operators/eq.xfail.pass.cpp | 82 - .../locale/locale.statics/classic.pass.cpp | 59 - .../locale.statics/global.xfail.pass.cpp | 61 - .../locale.category/category.pass.cpp | 41 - .../locale.types/locale.facet/facet.pass.cpp | 53 - .../locale/locale.types/locale.id/id.pass.cpp | 50 - .../locale.types/nothing_to_do.pass.cpp | 12 - .../locales/locale/nothing_to_do.pass.cpp | 12 - .../locales/nothing_to_do.pass.cpp | 12 - .../nothing_to_do.pass.cpp | 12 - test/localization/version.pass.cpp | 20 - 319 files changed, 73331 deletions(-) delete mode 100644 test/localization/c.locales/clocale.pass.cpp delete mode 100644 test/localization/c.locales/version.pass.cpp delete mode 100644 test/localization/locale.categories/__scan_keyword.xfail.pass.cpp delete mode 100644 test/localization/locale.categories/category.collate/locale.collate.byname/compare.xfail.pass.cpp delete mode 100644 test/localization/locale.categories/category.collate/locale.collate.byname/hash.xfail.pass.cpp delete mode 100644 test/localization/locale.categories/category.collate/locale.collate.byname/transform.xfail.pass.cpp delete mode 100644 test/localization/locale.categories/category.collate/locale.collate.byname/types.xfail.pass.cpp delete mode 100644 test/localization/locale.categories/category.collate/locale.collate/ctor.pass.cpp delete mode 100644 test/localization/locale.categories/category.collate/locale.collate/locale.collate.members/compare.pass.cpp delete mode 100644 test/localization/locale.categories/category.collate/locale.collate/locale.collate.members/hash.pass.cpp delete mode 100644 test/localization/locale.categories/category.collate/locale.collate/locale.collate.members/transform.pass.cpp delete mode 100644 test/localization/locale.categories/category.collate/locale.collate/locale.collate.virtuals/tested_elsewhere.pass.cpp delete mode 100644 test/localization/locale.categories/category.collate/locale.collate/types.pass.cpp delete mode 100644 test/localization/locale.categories/category.collate/nothing_to_do.pass.cpp delete mode 100644 test/localization/locale.categories/category.ctype/ctype_base.pass.cpp delete mode 100644 test/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.dtor/dtor.pass.cpp delete mode 100644 test/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/ctor.pass.cpp delete mode 100644 test/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/is_1.pass.cpp delete mode 100644 test/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/is_many.xfail.pass.cpp delete mode 100644 test/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/narrow_1.pass.cpp delete mode 100644 test/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/narrow_many.pass.cpp delete mode 100644 test/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/scan_is.xfail.pass.cpp delete mode 100644 test/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/scan_not.xfail.pass.cpp delete mode 100644 test/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/table.pass.cpp delete mode 100644 test/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/tolower_1.xfail.pass.cpp delete mode 100644 test/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/tolower_many.xfail.pass.cpp delete mode 100644 test/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/toupper_1.xfail.pass.cpp delete mode 100644 test/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/toupper_many.xfail.pass.cpp delete mode 100644 test/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/widen_1.pass.cpp delete mode 100644 test/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/widen_many.pass.cpp delete mode 100644 test/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.statics/classic_table.xfail.pass.cpp delete mode 100644 test/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.virtuals/tested_elsewhere.pass.cpp delete mode 100644 test/localization/locale.categories/category.ctype/facet.ctype.special/types.pass.cpp delete mode 100644 test/localization/locale.categories/category.ctype/locale.codecvt.byname/ctor_char.pass.cpp delete mode 100644 test/localization/locale.categories/category.ctype/locale.codecvt.byname/ctor_char16_t.pass.cpp delete mode 100644 test/localization/locale.categories/category.ctype/locale.codecvt.byname/ctor_char32_t.pass.cpp delete mode 100644 test/localization/locale.categories/category.ctype/locale.codecvt.byname/ctor_wchar_t.pass.cpp delete mode 100644 test/localization/locale.categories/category.ctype/locale.codecvt/codecvt_base.pass.cpp delete mode 100644 test/localization/locale.categories/category.ctype/locale.codecvt/ctor_char.pass.cpp delete mode 100644 test/localization/locale.categories/category.ctype/locale.codecvt/ctor_char16_t.pass.cpp delete mode 100644 test/localization/locale.categories/category.ctype/locale.codecvt/ctor_char32_t.pass.cpp delete mode 100644 test/localization/locale.categories/category.ctype/locale.codecvt/ctor_wchar_t.pass.cpp delete mode 100644 test/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char16_t_always_noconv.pass.cpp delete mode 100644 test/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char16_t_encoding.pass.cpp delete mode 100644 test/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char16_t_in.pass.cpp delete mode 100644 test/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char16_t_length.pass.cpp delete mode 100644 test/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char16_t_max_length.pass.cpp delete mode 100644 test/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char16_t_out.pass.cpp delete mode 100644 test/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char16_t_unshift.pass.cpp delete mode 100644 test/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char32_t_always_noconv.pass.cpp delete mode 100644 test/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char32_t_encoding.pass.cpp delete mode 100644 test/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char32_t_in.pass.cpp delete mode 100644 test/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char32_t_length.pass.cpp delete mode 100644 test/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char32_t_max_length.pass.cpp delete mode 100644 test/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char32_t_out.pass.cpp delete mode 100644 test/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char32_t_unshift.pass.cpp delete mode 100644 test/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char_always_noconv.pass.cpp delete mode 100644 test/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char_encoding.pass.cpp delete mode 100644 test/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char_in.pass.cpp delete mode 100644 test/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char_length.pass.cpp delete mode 100644 test/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char_max_length.pass.cpp delete mode 100644 test/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char_out.pass.cpp delete mode 100644 test/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char_unshift.pass.cpp delete mode 100644 test/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/utf_sanity_check.pass.cpp delete mode 100644 test/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/wchar_t_always_noconv.pass.cpp delete mode 100644 test/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/wchar_t_encoding.xfail.pass.cpp delete mode 100644 test/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/wchar_t_in.xfail.pass.cpp delete mode 100644 test/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/wchar_t_length.xfail.pass.cpp delete mode 100644 test/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/wchar_t_max_length.xfail.pass.cpp delete mode 100644 test/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/wchar_t_out.xfail.pass.cpp delete mode 100644 test/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/wchar_t_unshift.xfail.pass.cpp delete mode 100644 test/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.virtuals/tested_elsewhere.pass.cpp delete mode 100644 test/localization/locale.categories/category.ctype/locale.codecvt/types_char.pass.cpp delete mode 100644 test/localization/locale.categories/category.ctype/locale.codecvt/types_char16_t.pass.cpp delete mode 100644 test/localization/locale.categories/category.ctype/locale.codecvt/types_char32_t.pass.cpp delete mode 100644 test/localization/locale.categories/category.ctype/locale.codecvt/types_wchar_t.pass.cpp delete mode 100644 test/localization/locale.categories/category.ctype/locale.ctype.byname/is_1.xfail.pass.cpp delete mode 100644 test/localization/locale.categories/category.ctype/locale.ctype.byname/is_many.xfail.pass.cpp delete mode 100644 test/localization/locale.categories/category.ctype/locale.ctype.byname/narrow_1.xfail.pass.cpp delete mode 100644 test/localization/locale.categories/category.ctype/locale.ctype.byname/narrow_many.xfail.pass.cpp delete mode 100644 test/localization/locale.categories/category.ctype/locale.ctype.byname/scan_is.xfail.pass.cpp delete mode 100644 test/localization/locale.categories/category.ctype/locale.ctype.byname/scan_not.xfail.pass.cpp delete mode 100644 test/localization/locale.categories/category.ctype/locale.ctype.byname/tolower_1.xfail.pass.cpp delete mode 100644 test/localization/locale.categories/category.ctype/locale.ctype.byname/tolower_many.xfail.pass.cpp delete mode 100644 test/localization/locale.categories/category.ctype/locale.ctype.byname/toupper_1.xfail.pass.cpp delete mode 100644 test/localization/locale.categories/category.ctype/locale.ctype.byname/toupper_many.xfail.pass.cpp delete mode 100644 test/localization/locale.categories/category.ctype/locale.ctype.byname/types.xfail.pass.cpp delete mode 100644 test/localization/locale.categories/category.ctype/locale.ctype.byname/widen_1.xfail.pass.cpp delete mode 100644 test/localization/locale.categories/category.ctype/locale.ctype.byname/widen_many.xfail.pass.cpp delete mode 100644 test/localization/locale.categories/category.ctype/locale.ctype/ctor.pass.cpp delete mode 100644 test/localization/locale.categories/category.ctype/locale.ctype/locale.ctype.members/is_1.xfail.pass.cpp delete mode 100644 test/localization/locale.categories/category.ctype/locale.ctype/locale.ctype.members/is_many.xfail.pass.cpp delete mode 100644 test/localization/locale.categories/category.ctype/locale.ctype/locale.ctype.members/narrow_1.pass.cpp delete mode 100644 test/localization/locale.categories/category.ctype/locale.ctype/locale.ctype.members/narrow_many.pass.cpp delete mode 100644 test/localization/locale.categories/category.ctype/locale.ctype/locale.ctype.members/scan_is.xfail.pass.cpp delete mode 100644 test/localization/locale.categories/category.ctype/locale.ctype/locale.ctype.members/scan_not.xfail.pass.cpp delete mode 100644 test/localization/locale.categories/category.ctype/locale.ctype/locale.ctype.members/tolower_1.xfail.pass.cpp delete mode 100644 test/localization/locale.categories/category.ctype/locale.ctype/locale.ctype.members/tolower_many.xfail.pass.cpp delete mode 100644 test/localization/locale.categories/category.ctype/locale.ctype/locale.ctype.members/toupper_1.xfail.pass.cpp delete mode 100644 test/localization/locale.categories/category.ctype/locale.ctype/locale.ctype.members/toupper_many.xfail.pass.cpp delete mode 100644 test/localization/locale.categories/category.ctype/locale.ctype/locale.ctype.members/widen_1.pass.cpp delete mode 100644 test/localization/locale.categories/category.ctype/locale.ctype/locale.ctype.members/widen_many.pass.cpp delete mode 100644 test/localization/locale.categories/category.ctype/locale.ctype/locale.ctype.virtuals/tested_elsewhere.pass.cpp delete mode 100644 test/localization/locale.categories/category.ctype/locale.ctype/types.pass.cpp delete mode 100644 test/localization/locale.categories/category.messages/locale.messages.byname/nothing_to_do.pass.cpp delete mode 100644 test/localization/locale.categories/category.messages/locale.messages/ctor.pass.cpp delete mode 100644 test/localization/locale.categories/category.messages/locale.messages/locale.messages.members/not_testable.pass.cpp delete mode 100644 test/localization/locale.categories/category.messages/locale.messages/locale.messages.virtuals/tested_elsewhere.pass.cpp delete mode 100644 test/localization/locale.categories/category.messages/locale.messages/messages_base.pass.cpp delete mode 100644 test/localization/locale.categories/category.messages/locale.messages/types.pass.cpp delete mode 100644 test/localization/locale.categories/category.messages/nothing_to_do.pass.cpp delete mode 100644 test/localization/locale.categories/category.monetary/locale.money.get/ctor.pass.cpp delete mode 100644 test/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_en_US.xfail.pass.cpp delete mode 100644 test/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_fr_FR.xfail.pass.cpp delete mode 100644 test/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_ru_RU.xfail.pass.cpp delete mode 100644 test/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_zh_CN.xfail.pass.cpp delete mode 100644 test/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_string_en_US.xfail.pass.cpp delete mode 100644 test/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/iterators.h delete mode 100644 test/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.virtuals/tested_elsewhere.pass.cpp delete mode 100644 test/localization/locale.categories/category.monetary/locale.money.get/types.pass.cpp delete mode 100644 test/localization/locale.categories/category.monetary/locale.money.put/ctor.pass.cpp delete mode 100644 test/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/iterators.h delete mode 100644 test/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_en_US.xfail.pass.cpp delete mode 100644 test/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_fr_FR.xfail.pass.cpp delete mode 100644 test/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_ru_RU.xfail.pass.cpp delete mode 100644 test/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_zh_CN.xfail.pass.cpp delete mode 100644 test/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_string_en_US.xfail.pass.cpp delete mode 100644 test/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.virtuals/tested_elsewhere.pass.cpp delete mode 100644 test/localization/locale.categories/category.monetary/locale.money.put/types.pass.cpp delete mode 100644 test/localization/locale.categories/category.monetary/locale.moneypunct.byname/curr_symbol.xfail.pass.cpp delete mode 100644 test/localization/locale.categories/category.monetary/locale.moneypunct.byname/decimal_point.xfail.pass.cpp delete mode 100644 test/localization/locale.categories/category.monetary/locale.moneypunct.byname/frac_digits.xfail.pass.cpp delete mode 100644 test/localization/locale.categories/category.monetary/locale.moneypunct.byname/grouping.xfail.pass.cpp delete mode 100644 test/localization/locale.categories/category.monetary/locale.moneypunct.byname/neg_format.xfail.pass.cpp delete mode 100644 test/localization/locale.categories/category.monetary/locale.moneypunct.byname/negative_sign.xfail.pass.cpp delete mode 100644 test/localization/locale.categories/category.monetary/locale.moneypunct.byname/pos_format.xfail.pass.cpp delete mode 100644 test/localization/locale.categories/category.monetary/locale.moneypunct.byname/positive_sign.pass.cpp delete mode 100644 test/localization/locale.categories/category.monetary/locale.moneypunct.byname/thousands_sep.xfail.pass.cpp delete mode 100644 test/localization/locale.categories/category.monetary/locale.moneypunct/ctor.pass.cpp delete mode 100644 test/localization/locale.categories/category.monetary/locale.moneypunct/locale.moneypunct.members/curr_symbol.pass.cpp delete mode 100644 test/localization/locale.categories/category.monetary/locale.moneypunct/locale.moneypunct.members/decimal_point.pass.cpp delete mode 100644 test/localization/locale.categories/category.monetary/locale.moneypunct/locale.moneypunct.members/frac_digits.pass.cpp delete mode 100644 test/localization/locale.categories/category.monetary/locale.moneypunct/locale.moneypunct.members/grouping.pass.cpp delete mode 100644 test/localization/locale.categories/category.monetary/locale.moneypunct/locale.moneypunct.members/neg_format.pass.cpp delete mode 100644 test/localization/locale.categories/category.monetary/locale.moneypunct/locale.moneypunct.members/negative_sign.pass.cpp delete mode 100644 test/localization/locale.categories/category.monetary/locale.moneypunct/locale.moneypunct.members/pos_format.pass.cpp delete mode 100644 test/localization/locale.categories/category.monetary/locale.moneypunct/locale.moneypunct.members/positive_sign.pass.cpp delete mode 100644 test/localization/locale.categories/category.monetary/locale.moneypunct/locale.moneypunct.members/thousands_sep.pass.cpp delete mode 100644 test/localization/locale.categories/category.monetary/locale.moneypunct/locale.moneypunct.virtuals/tested_elsewhere.pass.cpp delete mode 100644 test/localization/locale.categories/category.monetary/locale.moneypunct/money_base.pass.cpp delete mode 100644 test/localization/locale.categories/category.monetary/locale.moneypunct/types.pass.cpp delete mode 100644 test/localization/locale.categories/category.monetary/nothing_to_do.pass.cpp delete mode 100644 test/localization/locale.categories/category.numeric/locale.nm.put/ctor.pass.cpp delete mode 100644 test/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/iterators.h delete mode 100644 test/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_bool.pass.cpp delete mode 100644 test/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_double.pass.cpp delete mode 100644 test/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_long.pass.cpp delete mode 100644 test/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_long_double.xfail.pass.cpp delete mode 100644 test/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_long_long.pass.cpp delete mode 100644 test/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_pointer.xfail.pass.cpp delete mode 100644 test/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_unsigned_long.pass.cpp delete mode 100644 test/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_unsigned_long_long.pass.cpp delete mode 100644 test/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.virtuals/tested_elsewhere.pass.cpp delete mode 100644 test/localization/locale.categories/category.numeric/locale.nm.put/types.pass.cpp delete mode 100644 test/localization/locale.categories/category.numeric/locale.num.get/ctor.pass.cpp delete mode 100644 test/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_bool.xfail.pass.cpp delete mode 100644 test/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_double.fail.cpp delete mode 100644 test/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_float.fail.cpp delete mode 100644 test/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_long.xfail.pass.cpp delete mode 100644 test/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_long_double.fail.cpp delete mode 100644 test/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_long_long.xfail.pass.cpp delete mode 100644 test/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_pointer.pass.cpp delete mode 100644 test/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_unsigned_int.xfail.pass.cpp delete mode 100644 test/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_unsigned_long.xfail.pass.cpp delete mode 100644 test/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_unsigned_long_long.xfail.pass.cpp delete mode 100644 test/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_unsigned_short.xfail.pass.cpp delete mode 100644 test/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/iterators.h delete mode 100644 test/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/test_min_max.xfail.pass.cpp delete mode 100644 test/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.virtuals/tested_elsewhere.pass.cpp delete mode 100644 test/localization/locale.categories/category.numeric/locale.num.get/types.pass.cpp delete mode 100644 test/localization/locale.categories/category.numeric/nothing_to_do.pass.cpp delete mode 100644 test/localization/locale.categories/category.time/locale.time.get.byname/date_order.xfail.pass.cpp delete mode 100644 test/localization/locale.categories/category.time/locale.time.get.byname/date_order_wide.xfail.pass.cpp delete mode 100644 test/localization/locale.categories/category.time/locale.time.get.byname/get_date.xfail.pass.cpp delete mode 100644 test/localization/locale.categories/category.time/locale.time.get.byname/get_date_wide.xfail.pass.cpp delete mode 100644 test/localization/locale.categories/category.time/locale.time.get.byname/get_monthname.xfail.pass.cpp delete mode 100644 test/localization/locale.categories/category.time/locale.time.get.byname/get_monthname_wide.xfail.pass.cpp delete mode 100644 test/localization/locale.categories/category.time/locale.time.get.byname/get_one.xfail.pass.cpp delete mode 100644 test/localization/locale.categories/category.time/locale.time.get.byname/get_one_wide.xfail.pass.cpp delete mode 100644 test/localization/locale.categories/category.time/locale.time.get.byname/get_time.xfail.pass.cpp delete mode 100644 test/localization/locale.categories/category.time/locale.time.get.byname/get_time_wide.xfail.pass.cpp delete mode 100644 test/localization/locale.categories/category.time/locale.time.get.byname/get_weekday.xfail.pass.cpp delete mode 100644 test/localization/locale.categories/category.time/locale.time.get.byname/get_weekday_wide.xfail.pass.cpp delete mode 100644 test/localization/locale.categories/category.time/locale.time.get.byname/get_year.xfail.pass.cpp delete mode 100644 test/localization/locale.categories/category.time/locale.time.get.byname/get_year_wide.xfail.pass.cpp delete mode 100644 test/localization/locale.categories/category.time/locale.time.get.byname/iterators.h delete mode 100644 test/localization/locale.categories/category.time/locale.time.get/ctor.pass.cpp delete mode 100644 test/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/date_order.pass.cpp delete mode 100644 test/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_date.pass.cpp delete mode 100644 test/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_date_wide.xfail.pass.cpp delete mode 100644 test/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_many.xfail.pass.cpp delete mode 100644 test/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_monthname.xfail.pass.cpp delete mode 100644 test/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_monthname_wide.xfail.pass.cpp delete mode 100644 test/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_one.xfail.pass.cpp delete mode 100644 test/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_time.xfail.pass.cpp delete mode 100644 test/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_time_wide.xfail.pass.cpp delete mode 100644 test/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_weekday.xfail.pass.cpp delete mode 100644 test/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_weekday_wide.xfail.pass.cpp delete mode 100644 test/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_year.pass.cpp delete mode 100644 test/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/iterators.h delete mode 100644 test/localization/locale.categories/category.time/locale.time.get/locale.time.get.virtuals/tested_elsewhere.pass.cpp delete mode 100644 test/localization/locale.categories/category.time/locale.time.get/time_base.pass.cpp delete mode 100644 test/localization/locale.categories/category.time/locale.time.get/types.pass.cpp delete mode 100644 test/localization/locale.categories/category.time/locale.time.put.byname/iterators.h delete mode 100644 test/localization/locale.categories/category.time/locale.time.put.byname/put1.xfail.pass.cpp delete mode 100644 test/localization/locale.categories/category.time/locale.time.put/ctor.pass.cpp delete mode 100644 test/localization/locale.categories/category.time/locale.time.put/locale.time.put.members/iterators.h delete mode 100644 test/localization/locale.categories/category.time/locale.time.put/locale.time.put.members/put1.xfail.pass.cpp delete mode 100644 test/localization/locale.categories/category.time/locale.time.put/locale.time.put.members/put2.xfail.pass.cpp delete mode 100644 test/localization/locale.categories/category.time/locale.time.put/locale.time.put.virtuals/tested_elsewhere.pass.cpp delete mode 100644 test/localization/locale.categories/category.time/locale.time.put/types.pass.cpp delete mode 100644 test/localization/locale.categories/category.time/nothing_to_do.pass.cpp delete mode 100644 test/localization/locale.categories/facet.numpunct/locale.numpunct.byname/decimal_point.xfail.pass.cpp delete mode 100644 test/localization/locale.categories/facet.numpunct/locale.numpunct.byname/grouping.xfail.pass.cpp delete mode 100644 test/localization/locale.categories/facet.numpunct/locale.numpunct.byname/thousands_sep.pass.cpp delete mode 100644 test/localization/locale.categories/facet.numpunct/locale.numpunct/ctor.pass.cpp delete mode 100644 test/localization/locale.categories/facet.numpunct/locale.numpunct/facet.numpunct.members/decimal_point.pass.cpp delete mode 100644 test/localization/locale.categories/facet.numpunct/locale.numpunct/facet.numpunct.members/falsename.pass.cpp delete mode 100644 test/localization/locale.categories/facet.numpunct/locale.numpunct/facet.numpunct.members/grouping.pass.cpp delete mode 100644 test/localization/locale.categories/facet.numpunct/locale.numpunct/facet.numpunct.members/thousands_sep.pass.cpp delete mode 100644 test/localization/locale.categories/facet.numpunct/locale.numpunct/facet.numpunct.members/truename.pass.cpp delete mode 100644 test/localization/locale.categories/facet.numpunct/locale.numpunct/facet.numpunct.virtuals/tested_elsewhere.pass.cpp delete mode 100644 test/localization/locale.categories/facet.numpunct/locale.numpunct/types.pass.cpp delete mode 100644 test/localization/locale.categories/facet.numpunct/nothing_to_do.pass.cpp delete mode 100644 test/localization/locale.categories/facets.examples/nothing_to_do.pass.cpp delete mode 100644 test/localization/locale.stdcvt/codecvt_mode.pass.cpp delete mode 100644 test/localization/locale.stdcvt/codecvt_utf16.pass.cpp delete mode 100644 test/localization/locale.stdcvt/codecvt_utf16_always_noconv.pass.cpp delete mode 100644 test/localization/locale.stdcvt/codecvt_utf16_encoding.pass.cpp delete mode 100644 test/localization/locale.stdcvt/codecvt_utf16_in.pass.cpp delete mode 100644 test/localization/locale.stdcvt/codecvt_utf16_length.pass.cpp delete mode 100644 test/localization/locale.stdcvt/codecvt_utf16_max_length.pass.cpp delete mode 100644 test/localization/locale.stdcvt/codecvt_utf16_out.pass.cpp delete mode 100644 test/localization/locale.stdcvt/codecvt_utf16_unshift.pass.cpp delete mode 100644 test/localization/locale.stdcvt/codecvt_utf8.pass.cpp delete mode 100644 test/localization/locale.stdcvt/codecvt_utf8_always_noconv.pass.cpp delete mode 100644 test/localization/locale.stdcvt/codecvt_utf8_encoding.pass.cpp delete mode 100644 test/localization/locale.stdcvt/codecvt_utf8_in.pass.cpp delete mode 100644 test/localization/locale.stdcvt/codecvt_utf8_length.pass.cpp delete mode 100644 test/localization/locale.stdcvt/codecvt_utf8_max_length.pass.cpp delete mode 100644 test/localization/locale.stdcvt/codecvt_utf8_out.pass.cpp delete mode 100644 test/localization/locale.stdcvt/codecvt_utf8_unshift.pass.cpp delete mode 100644 test/localization/locale.stdcvt/codecvt_utf8_utf16_always_noconv.pass.cpp delete mode 100644 test/localization/locale.stdcvt/codecvt_utf8_utf16_encoding.pass.cpp delete mode 100644 test/localization/locale.stdcvt/codecvt_utf8_utf16_in.pass.cpp delete mode 100644 test/localization/locale.stdcvt/codecvt_utf8_utf16_length.pass.cpp delete mode 100644 test/localization/locale.stdcvt/codecvt_utf8_utf16_max_length.pass.cpp delete mode 100644 test/localization/locale.stdcvt/codecvt_utf8_utf16_out.pass.cpp delete mode 100644 test/localization/locale.stdcvt/codecvt_utf8_utf16_unshift.pass.cpp delete mode 100644 test/localization/locale.stdcvt/version.pass.cpp delete mode 100644 test/localization/locale.syn/nothing_to_do.pass.cpp delete mode 100644 test/localization/locales/locale.convenience/classification/isalnum.pass.cpp delete mode 100644 test/localization/locales/locale.convenience/classification/isalpha.pass.cpp delete mode 100644 test/localization/locales/locale.convenience/classification/iscntrl.pass.cpp delete mode 100644 test/localization/locales/locale.convenience/classification/isdigit.pass.cpp delete mode 100644 test/localization/locales/locale.convenience/classification/isgraph.pass.cpp delete mode 100644 test/localization/locales/locale.convenience/classification/islower.pass.cpp delete mode 100644 test/localization/locales/locale.convenience/classification/isprint.pass.cpp delete mode 100644 test/localization/locales/locale.convenience/classification/ispunct.pass.cpp delete mode 100644 test/localization/locales/locale.convenience/classification/isspace.pass.cpp delete mode 100644 test/localization/locales/locale.convenience/classification/isupper.pass.cpp delete mode 100644 test/localization/locales/locale.convenience/classification/isxdigit.pass.cpp delete mode 100644 test/localization/locales/locale.convenience/conversions/conversions.buffer/ctor.pass.cpp delete mode 100644 test/localization/locales/locale.convenience/conversions/conversions.buffer/overflow.pass.cpp delete mode 100644 test/localization/locales/locale.convenience/conversions/conversions.buffer/pbackfail.xfail.pass.cpp delete mode 100644 test/localization/locales/locale.convenience/conversions/conversions.buffer/rdbuf.pass.cpp delete mode 100644 test/localization/locales/locale.convenience/conversions/conversions.buffer/seekoff.xfail.pass.cpp delete mode 100644 test/localization/locales/locale.convenience/conversions/conversions.buffer/state.pass.cpp delete mode 100644 test/localization/locales/locale.convenience/conversions/conversions.buffer/test.xfail.pass.cpp delete mode 100644 test/localization/locales/locale.convenience/conversions/conversions.buffer/underflow.dat delete mode 100644 test/localization/locales/locale.convenience/conversions/conversions.buffer/underflow.xfail.pass.cpp delete mode 100644 test/localization/locales/locale.convenience/conversions/conversions.buffer/underflow_utf8.dat delete mode 100644 test/localization/locales/locale.convenience/conversions/conversions.character/tolower.xfail.pass.cpp delete mode 100644 test/localization/locales/locale.convenience/conversions/conversions.character/toupper.xfail.pass.cpp delete mode 100644 test/localization/locales/locale.convenience/conversions/conversions.string/converted.pass.cpp delete mode 100644 test/localization/locales/locale.convenience/conversions/conversions.string/ctor_codecvt.pass.cpp delete mode 100644 test/localization/locales/locale.convenience/conversions/conversions.string/ctor_codecvt_state.pass.cpp delete mode 100644 test/localization/locales/locale.convenience/conversions/conversions.string/ctor_err_string.pass.cpp delete mode 100644 test/localization/locales/locale.convenience/conversions/conversions.string/from_bytes.pass.cpp delete mode 100644 test/localization/locales/locale.convenience/conversions/conversions.string/state.pass.cpp delete mode 100644 test/localization/locales/locale.convenience/conversions/conversions.string/to_bytes.pass.cpp delete mode 100644 test/localization/locales/locale.convenience/conversions/conversions.string/types.pass.cpp delete mode 100644 test/localization/locales/locale.convenience/conversions/nothing_to_do.pass.cpp delete mode 100644 test/localization/locales/locale.convenience/nothing_to_do.pass.cpp delete mode 100644 test/localization/locales/locale.global.templates/has_facet.pass.cpp delete mode 100644 test/localization/locales/locale.global.templates/use_facet.pass.cpp delete mode 100644 test/localization/locales/locale/locale.cons/assign.pass.cpp delete mode 100644 test/localization/locales/locale/locale.cons/char_pointer.xfail.pass.cpp delete mode 100644 test/localization/locales/locale/locale.cons/copy.xfail.pass.cpp delete mode 100644 test/localization/locales/locale/locale.cons/default.xfail.pass.cpp delete mode 100644 test/localization/locales/locale/locale.cons/locale_char_pointer_cat.pass.cpp delete mode 100644 test/localization/locales/locale/locale.cons/locale_facetptr.pass.cpp delete mode 100644 test/localization/locales/locale/locale.cons/locale_locale_cat.pass.cpp delete mode 100644 test/localization/locales/locale/locale.cons/locale_string_cat.pass.cpp delete mode 100644 test/localization/locales/locale/locale.cons/string.pass.cpp delete mode 100644 test/localization/locales/locale/locale.members/combine.pass.cpp delete mode 100644 test/localization/locales/locale/locale.members/name.xfail.pass.cpp delete mode 100644 test/localization/locales/locale/locale.operators/compare.pass.cpp delete mode 100644 test/localization/locales/locale/locale.operators/eq.xfail.pass.cpp delete mode 100644 test/localization/locales/locale/locale.statics/classic.pass.cpp delete mode 100644 test/localization/locales/locale/locale.statics/global.xfail.pass.cpp delete mode 100644 test/localization/locales/locale/locale.types/locale.category/category.pass.cpp delete mode 100644 test/localization/locales/locale/locale.types/locale.facet/facet.pass.cpp delete mode 100644 test/localization/locales/locale/locale.types/locale.id/id.pass.cpp delete mode 100644 test/localization/locales/locale/locale.types/nothing_to_do.pass.cpp delete mode 100644 test/localization/locales/locale/nothing_to_do.pass.cpp delete mode 100644 test/localization/locales/nothing_to_do.pass.cpp delete mode 100644 test/localization/localization.general/nothing_to_do.pass.cpp delete mode 100644 test/localization/version.pass.cpp diff --git a/test/localization/c.locales/clocale.pass.cpp b/test/localization/c.locales/clocale.pass.cpp deleted file mode 100644 index 87748655..00000000 --- a/test/localization/c.locales/clocale.pass.cpp +++ /dev/null @@ -1,48 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -#include -#include - -#ifndef LC_ALL -#error LC_ALL not defined -#endif - -#ifndef LC_COLLATE -#error LC_COLLATE not defined -#endif - -#ifndef LC_CTYPE -#error LC_CTYPE not defined -#endif - -#ifndef LC_MONETARY -#error LC_MONETARY not defined -#endif - -#ifndef LC_NUMERIC -#error LC_NUMERIC not defined -#endif - -#ifndef LC_TIME -#error LC_TIME not defined -#endif - -#ifndef NULL -#error NULL not defined -#endif - -int main() -{ - std::lconv lc; - static_assert((std::is_same<__typeof__(std::setlocale(0, "")), char*>::value), ""); - static_assert((std::is_same<__typeof__(std::localeconv()), std::lconv*>::value), ""); -} diff --git a/test/localization/c.locales/version.pass.cpp b/test/localization/c.locales/version.pass.cpp deleted file mode 100644 index 0fce59e2..00000000 --- a/test/localization/c.locales/version.pass.cpp +++ /dev/null @@ -1,20 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -#include - -#ifndef _LIBCPP_VERSION -#error _LIBCPP_VERSION not defined -#endif - -int main() -{ -} diff --git a/test/localization/locale.categories/__scan_keyword.xfail.pass.cpp b/test/localization/locale.categories/__scan_keyword.xfail.pass.cpp deleted file mode 100644 index 6f75fbb7..00000000 --- a/test/localization/locale.categories/__scan_keyword.xfail.pass.cpp +++ /dev/null @@ -1,118 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// Not a portable test - -// __scan_keyword -// Scans [__b, __e) until a match is found in the basic_strings range -// [__kb, __ke) or until it can be shown that there is no match in [__kb, __ke). -// __b will be incremented (visibly), consuming CharT until a match is found -// or proved to not exist. A keyword may be "", in which will match anything. -// If one keyword is a prefix of another, and the next CharT in the input -// might match another keyword, the algorithm will attempt to find the longest -// matching keyword. If the longer matching keyword ends up not matching, then -// no keyword match is found. If no keyword match is found, __ke is returned. -// Else an iterator pointing to the matching keyword is found. If more than -// one keyword matches, an iterator to the first matching keyword is returned. -// If on exit __b == __e, eofbit is set in __err. If __case_senstive is false, -// __ct is used to force to lower case before comparing characters. -// Examples: -// Keywords: "a", "abb" -// If the input is "a", the first keyword matches and eofbit is set. -// If the input is "abc", no match is found and "ab" are consumed. -// -// template -// _ForwardIterator -// __scan_keyword(_InputIterator& __b, _InputIterator __e, -// _ForwardIterator __kb, _ForwardIterator __ke, -// const _Ctype& __ct, ios_base::iostate& __err, -// bool __case_sensitive = true); - -#include -#include - -int main() -{ - const std::ctype& ct = std::use_facet >(std::locale::classic()); - std::ios_base::iostate err = std::ios_base::goodbit; - { - const char input[] = "a"; - const char* in = input; - std::string keys[] = {"a", "abb"}; - err = std::ios_base::goodbit; - std::string* k = std::__scan_keyword(in, input+sizeof(input)-1, - keys, keys+sizeof(keys)/sizeof(keys[0]), - ct, err); - assert(k - keys == 0); - assert(in == input+1); - assert(err == std::ios_base::eofbit); - } - { - const char input[] = "abc"; - const char* in = input; - std::string keys[] = {"a", "abb"}; - err = std::ios_base::goodbit; - std::string* k = std::__scan_keyword(in, input+sizeof(input)-1, - keys, keys+sizeof(keys)/sizeof(keys[0]), - ct, err); - assert(k - keys == 2); - assert(in == input+2); - assert(err == std::ios_base::failbit); - } - { - const char input[] = "abb"; - const char* in = input; - std::string keys[] = {"a", "abb"}; - err = std::ios_base::goodbit; - std::string* k = std::__scan_keyword(in, input+sizeof(input)-1, - keys, keys+sizeof(keys)/sizeof(keys[0]), - ct, err); - assert(k - keys == 1); - assert(in == input+3); - assert(err == std::ios_base::eofbit); - } - { - const char input[] = "Tue "; - const char* in = input; - std::string keys[] = {"Mon", "Monday", "Tue", "Tuesday"}; - err = std::ios_base::goodbit; - std::string* k = std::__scan_keyword(in, input+sizeof(input)-1, - keys, keys+sizeof(keys)/sizeof(keys[0]), - ct, err); - assert(k - keys == 2); - assert(in == input+3); - assert(err == std::ios_base::goodbit); - } - { - const char input[] = "tue "; - const char* in = input; - std::string keys[] = {"Mon", "Monday", "Tue", "Tuesday"}; - err = std::ios_base::goodbit; - std::string* k = std::__scan_keyword(in, input+sizeof(input)-1, - keys, keys+sizeof(keys)/sizeof(keys[0]), - ct, err); - assert(k - keys == 4); - assert(in == input+0); - assert(err == std::ios_base::failbit); - } - { - const char input[] = "tue "; - const char* in = input; - std::string keys[] = {"Mon", "Monday", "Tue", "Tuesday"}; - err = std::ios_base::goodbit; - std::string* k = std::__scan_keyword(in, input+sizeof(input)-1, - keys, keys+sizeof(keys)/sizeof(keys[0]), - ct, err, false); - assert(k - keys == 2); - assert(in == input+3); - assert(err == std::ios_base::goodbit); - } -} diff --git a/test/localization/locale.categories/category.collate/locale.collate.byname/compare.xfail.pass.cpp b/test/localization/locale.categories/category.collate/locale.collate.byname/compare.xfail.pass.cpp deleted file mode 100644 index a910b6ef..00000000 --- a/test/localization/locale.categories/category.collate/locale.collate.byname/compare.xfail.pass.cpp +++ /dev/null @@ -1,80 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template class collate_byname - -// int compare(const charT* low1, const charT* high1, -// const charT* low2, const charT* high2) const; - -// I'm currently unable to confirm that collation based on named locales -// has any difference from "C" collation. But I do believe I'm picking -// up the OS's collation files. - -#include -#include -#include - -#include - -int main() -{ - { - std::locale l("en_US"); - { - const std::collate& f = std::use_facet >(l); - std::string s2("aaaaaaA"); - std::string s3("BaaaaaA"); - assert(f.compare(s2.data(), s2.data() + s2.size(), - s3.data(), s3.data() + s3.size()) == 1); - } - { - const std::collate& f = std::use_facet >(l); - std::wstring s2(L"aaaaaaA"); - std::wstring s3(L"BaaaaaA"); - assert(f.compare(s2.data(), s2.data() + s2.size(), - s3.data(), s3.data() + s3.size()) == 1); - } - } - { - std::locale l(""); - { - const std::collate& f = std::use_facet >(l); - std::string s2("aaaaaaA"); - std::string s3("BaaaaaA"); - assert(f.compare(s2.data(), s2.data() + s2.size(), - s3.data(), s3.data() + s3.size()) == 1); - } - { - const std::collate& f = std::use_facet >(l); - std::wstring s2(L"aaaaaaA"); - std::wstring s3(L"BaaaaaA"); - assert(f.compare(s2.data(), s2.data() + s2.size(), - s3.data(), s3.data() + s3.size()) == 1); - } - } - { - std::locale l("C"); - { - const std::collate& f = std::use_facet >(l); - std::string s2("aaaaaaA"); - std::string s3("BaaaaaA"); - assert(f.compare(s2.data(), s2.data() + s2.size(), - s3.data(), s3.data() + s3.size()) == 1); - } - { - const std::collate& f = std::use_facet >(l); - std::wstring s2(L"aaaaaaA"); - std::wstring s3(L"BaaaaaA"); - assert(f.compare(s2.data(), s2.data() + s2.size(), - s3.data(), s3.data() + s3.size()) == 1); - } - } -} diff --git a/test/localization/locale.categories/category.collate/locale.collate.byname/hash.xfail.pass.cpp b/test/localization/locale.categories/category.collate/locale.collate.byname/hash.xfail.pass.cpp deleted file mode 100644 index 7a677b36..00000000 --- a/test/localization/locale.categories/category.collate/locale.collate.byname/hash.xfail.pass.cpp +++ /dev/null @@ -1,39 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template class collate_byname - -// long hash(const charT* low, const charT* high) const; - -// This test is not portable - -#include -#include -#include - -int main() -{ - std::locale l("en_US"); - { - std::string x1("1234"); - std::string x2("12345"); - const std::collate& f = std::use_facet >(l); - assert(f.hash(x1.data(), x1.data() + x1.size()) - != f.hash(x2.data(), x2.data() + x2.size())); - } - { - std::wstring x1(L"1234"); - std::wstring x2(L"12345"); - const std::collate& f = std::use_facet >(l); - assert(f.hash(x1.data(), x1.data() + x1.size()) - != f.hash(x2.data(), x2.data() + x2.size())); - } -} diff --git a/test/localization/locale.categories/category.collate/locale.collate.byname/transform.xfail.pass.cpp b/test/localization/locale.categories/category.collate/locale.collate.byname/transform.xfail.pass.cpp deleted file mode 100644 index 877c24c3..00000000 --- a/test/localization/locale.categories/category.collate/locale.collate.byname/transform.xfail.pass.cpp +++ /dev/null @@ -1,63 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template class collate_byname - -// string_type transform(const charT* low, const charT* high) const; - -#include -#include -#include - -#include - -int main() -{ - { - std::locale l("en_US"); - { - std::string x("1234"); - const std::collate& f = std::use_facet >(l); - assert(f.transform(x.data(), x.data() + x.size()) != x); - } - { - std::wstring x(L"1234"); - const std::collate& f = std::use_facet >(l); - assert(f.transform(x.data(), x.data() + x.size()) != x); - } - } - { - std::locale l(""); - { - std::string x("1234"); - const std::collate& f = std::use_facet >(l); - assert(f.transform(x.data(), x.data() + x.size()) != x); - } - { - std::wstring x(L"1234"); - const std::collate& f = std::use_facet >(l); - assert(f.transform(x.data(), x.data() + x.size()) != x); - } - } - { - std::locale l("C"); - { - std::string x("1234"); - const std::collate& f = std::use_facet >(l); - assert(f.transform(x.data(), x.data() + x.size()) == x); - } - { - std::wstring x(L"1234"); - const std::collate& f = std::use_facet >(l); - assert(f.transform(x.data(), x.data() + x.size()) == x); - } - } -} diff --git a/test/localization/locale.categories/category.collate/locale.collate.byname/types.xfail.pass.cpp b/test/localization/locale.categories/category.collate/locale.collate.byname/types.xfail.pass.cpp deleted file mode 100644 index d9901eca..00000000 --- a/test/localization/locale.categories/category.collate/locale.collate.byname/types.xfail.pass.cpp +++ /dev/null @@ -1,43 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template -// class collate_byname -// : public collate -// { -// public: -// typedef basic_string string_type; -// explicit collate_byname(const char*, size_t refs = 0); -// explicit collate_byname(const string&, size_t refs = 0); -// protected: -// ~collate_byname(); -// }; - -#include -#include -#include - -#include - -int main() -{ - std::locale l("en_US"); - { - assert(std::has_facet >(l)); - assert(&std::use_facet >(l) - == &std::use_facet >(l)); - } - { - assert(std::has_facet >(l)); - assert(&std::use_facet >(l) - == &std::use_facet >(l)); - } -} diff --git a/test/localization/locale.categories/category.collate/locale.collate/ctor.pass.cpp b/test/localization/locale.categories/category.collate/locale.collate/ctor.pass.cpp deleted file mode 100644 index 8f7e2b5f..00000000 --- a/test/localization/locale.categories/category.collate/locale.collate/ctor.pass.cpp +++ /dev/null @@ -1,67 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template class collate; - -// explicit collate(size_t refs = 0); - -#include -#include -#include - -template -class my_facet - : public std::collate -{ -public: - static int count; - - explicit my_facet(std::size_t refs = 0) - : std::collate(refs) {++count;} - - ~my_facet() {--count;} -}; - -template int my_facet::count = 0; - -int main() -{ - { - std::locale l(std::locale::classic(), new my_facet); - assert(my_facet::count == 1); - } - assert(my_facet::count == 0); - { - my_facet f(1); - assert(my_facet::count == 1); - { - std::locale l(std::locale::classic(), &f); - assert(my_facet::count == 1); - } - assert(my_facet::count == 1); - } - assert(my_facet::count == 0); - { - std::locale l(std::locale::classic(), new my_facet); - assert(my_facet::count == 1); - } - assert(my_facet::count == 0); - { - my_facet f(1); - assert(my_facet::count == 1); - { - std::locale l(std::locale::classic(), &f); - assert(my_facet::count == 1); - } - assert(my_facet::count == 1); - } - assert(my_facet::count == 0); -} diff --git a/test/localization/locale.categories/category.collate/locale.collate/locale.collate.members/compare.pass.cpp b/test/localization/locale.categories/category.collate/locale.collate/locale.collate.members/compare.pass.cpp deleted file mode 100644 index d2cf3a92..00000000 --- a/test/localization/locale.categories/category.collate/locale.collate/locale.collate.members/compare.pass.cpp +++ /dev/null @@ -1,49 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template class collate; - -// int compare(const charT* low1, const charT* high1, -// const charT* low2, const charT* high2) const; - -#include -#include - -int main() -{ - std::locale l = std::locale::classic(); - { - const char ia[] = "1234"; - const unsigned sa = sizeof(ia)/sizeof(ia[0]); - const char ib[] = "123"; - const std::collate& f = std::use_facet >(l); - assert(f.compare(ia, ia+sa, ib, ib+2) == 1); - assert(f.compare(ib, ib+2, ia, ia+sa) == -1); - assert(f.compare(ia, ia+sa, ib, ib+3) == 1); - assert(f.compare(ib, ib+3, ia, ia+sa) == -1); - assert(f.compare(ia, ia+sa, ib+1, ib+3) == -1); - assert(f.compare(ib+1, ib+3, ia, ia+sa) == 1); - assert(f.compare(ia, ia+3, ib, ib+3) == 0); - } - { - const wchar_t ia[] = L"1234"; - const unsigned sa = sizeof(ia)/sizeof(ia[0]); - const wchar_t ib[] = L"123"; - const std::collate& f = std::use_facet >(l); - assert(f.compare(ia, ia+sa, ib, ib+2) == 1); - assert(f.compare(ib, ib+2, ia, ia+sa) == -1); - assert(f.compare(ia, ia+sa, ib, ib+3) == 1); - assert(f.compare(ib, ib+3, ia, ia+sa) == -1); - assert(f.compare(ia, ia+sa, ib+1, ib+3) == -1); - assert(f.compare(ib+1, ib+3, ia, ia+sa) == 1); - assert(f.compare(ia, ia+3, ib, ib+3) == 0); - } -} diff --git a/test/localization/locale.categories/category.collate/locale.collate/locale.collate.members/hash.pass.cpp b/test/localization/locale.categories/category.collate/locale.collate/locale.collate.members/hash.pass.cpp deleted file mode 100644 index d8a9650e..00000000 --- a/test/localization/locale.categories/category.collate/locale.collate/locale.collate.members/hash.pass.cpp +++ /dev/null @@ -1,39 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template class collate; - -// long hash(const charT* low, const charT* high) const; - -// This test is not portable - -#include -#include -#include - -int main() -{ - std::locale l = std::locale::classic(); - { - std::string x1("1234"); - std::string x2("12345"); - const std::collate& f = std::use_facet >(l); - assert(f.hash(x1.data(), x1.data() + x1.size()) - != f.hash(x2.data(), x2.data() + x2.size())); - } - { - std::wstring x1(L"1234"); - std::wstring x2(L"12345"); - const std::collate& f = std::use_facet >(l); - assert(f.hash(x1.data(), x1.data() + x1.size()) - != f.hash(x2.data(), x2.data() + x2.size())); - } -} diff --git a/test/localization/locale.categories/category.collate/locale.collate/locale.collate.members/transform.pass.cpp b/test/localization/locale.categories/category.collate/locale.collate/locale.collate.members/transform.pass.cpp deleted file mode 100644 index e78a3c74..00000000 --- a/test/localization/locale.categories/category.collate/locale.collate/locale.collate.members/transform.pass.cpp +++ /dev/null @@ -1,33 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template class collate; - -// string_type transform(const charT* low, const charT* high) const; - -#include -#include -#include - -int main() -{ - std::locale l = std::locale::classic(); - { - std::string x("1234"); - const std::collate& f = std::use_facet >(l); - assert(f.transform(x.data(), x.data() + x.size()) == x); - } - { - std::wstring x(L"1234"); - const std::collate& f = std::use_facet >(l); - assert(f.transform(x.data(), x.data() + x.size()) == x); - } -} diff --git a/test/localization/locale.categories/category.collate/locale.collate/locale.collate.virtuals/tested_elsewhere.pass.cpp b/test/localization/locale.categories/category.collate/locale.collate/locale.collate.virtuals/tested_elsewhere.pass.cpp deleted file mode 100644 index b58f5c55..00000000 --- a/test/localization/locale.categories/category.collate/locale.collate/locale.collate.virtuals/tested_elsewhere.pass.cpp +++ /dev/null @@ -1,12 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -int main() -{ -} diff --git a/test/localization/locale.categories/category.collate/locale.collate/types.pass.cpp b/test/localization/locale.categories/category.collate/locale.collate/types.pass.cpp deleted file mode 100644 index 13945f8e..00000000 --- a/test/localization/locale.categories/category.collate/locale.collate/types.pass.cpp +++ /dev/null @@ -1,49 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template -// class collate -// : public locale::facet { -// public: -// typedef charT char_type; -// typedef basic_stringstring_type; -// -// static locale::id id; -// }; - -#include -#include -#include - -int main() -{ - std::locale l = std::locale::classic(); - { - assert(std::has_facet >(l)); - const std::collate& f = std::use_facet >(l); - { - (void)std::collate::id; - } - static_assert((std::is_same::char_type, char>::value), ""); - static_assert((std::is_same::string_type, std::string>::value), ""); - static_assert((std::is_base_of >::value), ""); - } - { - assert(std::has_facet >(l)); - const std::collate& f = std::use_facet >(l); - { - (void)std::collate::id; - } - static_assert((std::is_same::char_type, wchar_t>::value), ""); - static_assert((std::is_same::string_type, std::wstring>::value), ""); - static_assert((std::is_base_of >::value), ""); - } -} diff --git a/test/localization/locale.categories/category.collate/nothing_to_do.pass.cpp b/test/localization/locale.categories/category.collate/nothing_to_do.pass.cpp deleted file mode 100644 index b58f5c55..00000000 --- a/test/localization/locale.categories/category.collate/nothing_to_do.pass.cpp +++ /dev/null @@ -1,12 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -int main() -{ -} diff --git a/test/localization/locale.categories/category.ctype/ctype_base.pass.cpp b/test/localization/locale.categories/category.ctype/ctype_base.pass.cpp deleted file mode 100644 index 9365b265..00000000 --- a/test/localization/locale.categories/category.ctype/ctype_base.pass.cpp +++ /dev/null @@ -1,57 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// class ctype_base -// { -// public: -// typedef T mask; -// -// // numeric values are for exposition only. -// static const mask space = 1 << 0; -// static const mask print = 1 << 1; -// static const mask cntrl = 1 << 2; -// static const mask upper = 1 << 3; -// static const mask lower = 1 << 4; -// static const mask alpha = 1 << 5; -// static const mask digit = 1 << 6; -// static const mask punct = 1 << 7; -// static const mask xdigit = 1 << 8; -// static const mask alnum = alpha | digit; -// static const mask graph = alnum | punct; -// }; - -#include -#include - -int main() -{ - assert(std::ctype_base::space); - assert(std::ctype_base::print); - assert(std::ctype_base::cntrl); - assert(std::ctype_base::upper); - assert(std::ctype_base::lower); - assert(std::ctype_base::alpha); - assert(std::ctype_base::digit); - assert(std::ctype_base::punct); - assert(std::ctype_base::xdigit); - assert( - ( std::ctype_base::space - & std::ctype_base::print - & std::ctype_base::cntrl - & std::ctype_base::upper - & std::ctype_base::lower - & std::ctype_base::alpha - & std::ctype_base::digit - & std::ctype_base::punct - & std::ctype_base::xdigit) == 0); - assert(std::ctype_base::alnum == (std::ctype_base::alpha | std::ctype_base::digit)); - assert(std::ctype_base::graph == (std::ctype_base::alnum | std::ctype_base::punct)); -} diff --git a/test/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.dtor/dtor.pass.cpp b/test/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.dtor/dtor.pass.cpp deleted file mode 100644 index cc9a5126..00000000 --- a/test/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.dtor/dtor.pass.cpp +++ /dev/null @@ -1,50 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template <> class ctype - -// ~ctype(); - -#include -#include -#include - -unsigned delete_called = 0; - -void operator delete[](void* p) throw() -{ - operator delete(p); - ++delete_called; -} - -int main() -{ - { - delete_called = 0; - std::locale l(std::locale::classic(), new std::ctype); - assert(delete_called == 0); - } - assert(delete_called == 0); - { - std::ctype::mask table[256]; - delete_called = 0; - std::locale l(std::locale::classic(), new std::ctype(table)); - assert(delete_called == 0); - } - assert(delete_called == 0); - { - delete_called = 0; - std::locale l(std::locale::classic(), - new std::ctype(new std::ctype::mask[256], true)); - assert(delete_called == 0); - } - assert(delete_called == 1); -} diff --git a/test/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/ctor.pass.cpp b/test/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/ctor.pass.cpp deleted file mode 100644 index a1e15ba4..00000000 --- a/test/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/ctor.pass.cpp +++ /dev/null @@ -1,50 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template class ctype; - -// explicit ctype(const mask* tbl = 0, bool del = false, size_t refs = 0); - -#include -#include - -class my_facet - : public std::ctype -{ -public: - static int count; - - explicit my_facet(const mask* tbl = 0, bool del = false, std::size_t refs = 0) - : std::ctype(tbl, del, refs) {++count;} - - ~my_facet() {--count;} -}; - -int my_facet::count = 0; - -int main() -{ - { - std::locale l(std::locale::classic(), new my_facet); - assert(my_facet::count == 1); - } - assert(my_facet::count == 0); - { - my_facet f(0, false, 1); - assert(my_facet::count == 1); - { - std::locale l(std::locale::classic(), &f); - assert(my_facet::count == 1); - } - assert(my_facet::count == 1); - } - assert(my_facet::count == 0); -} diff --git a/test/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/is_1.pass.cpp b/test/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/is_1.pass.cpp deleted file mode 100644 index 945de76a..00000000 --- a/test/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/is_1.pass.cpp +++ /dev/null @@ -1,59 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template <> class ctype; - -// bool is(mask m, char c) const; - -#include -#include - -int main() -{ - std::locale l = std::locale::classic(); - { - typedef std::ctype F; - const F& f = std::use_facet(l); - - assert(f.is(F::space, ' ')); - assert(!f.is(F::space, 'A')); - - assert(f.is(F::print, ' ')); - assert(!f.is(F::print, '\x07')); - - assert(f.is(F::cntrl, '\x07')); - assert(!f.is(F::cntrl, ' ')); - - assert(f.is(F::upper, 'A')); - assert(!f.is(F::upper, 'a')); - - assert(f.is(F::lower, 'a')); - assert(!f.is(F::lower, 'A')); - - assert(f.is(F::alpha, 'a')); - assert(!f.is(F::alpha, '1')); - - assert(f.is(F::digit, '1')); - assert(!f.is(F::digit, 'a')); - - assert(f.is(F::punct, '.')); - assert(!f.is(F::punct, 'a')); - - assert(f.is(F::xdigit, 'a')); - assert(!f.is(F::xdigit, 'g')); - - assert(f.is(F::alnum, 'a')); - assert(!f.is(F::alnum, '.')); - - assert(f.is(F::graph, '.')); - assert(!f.is(F::graph, '\x07')); - } -} diff --git a/test/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/is_many.xfail.pass.cpp b/test/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/is_many.xfail.pass.cpp deleted file mode 100644 index 74a4906f..00000000 --- a/test/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/is_many.xfail.pass.cpp +++ /dev/null @@ -1,118 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template <> class ctype; - -// const char* is(const char* low, const char* high, mask* vec) const; - -#include -#include -#include -#include - -#include - -int main() -{ - std::locale l = std::locale::classic(); - { - typedef std::ctype F; - const F& f = std::use_facet(l); - const std::string in(" A\x07.a1"); - std::vector m(in.size()); - const char* h = f.is(in.data(), in.data() + in.size(), m.data()); - assert(h == in.data() + in.size()); - - // ' ' - assert( (m[0] & F::space)); - assert( (m[0] & F::print)); - assert(!(m[0] & F::cntrl)); - assert(!(m[0] & F::upper)); - assert(!(m[0] & F::lower)); - assert(!(m[0] & F::alpha)); - assert(!(m[0] & F::digit)); - assert(!(m[0] & F::punct)); - assert(!(m[0] & F::xdigit)); - assert( (m[0] & F::blank)); - assert(!(m[0] & F::alnum)); - assert(!(m[0] & F::graph)); - - // 'A' - assert(!(m[1] & F::space)); - assert( (m[1] & F::print)); - assert(!(m[1] & F::cntrl)); - assert( (m[1] & F::upper)); - assert(!(m[1] & F::lower)); - assert( (m[1] & F::alpha)); - assert(!(m[1] & F::digit)); - assert(!(m[1] & F::punct)); - assert( (m[1] & F::xdigit)); - assert(!(m[1] & F::blank)); - assert( (m[1] & F::alnum)); - assert( (m[1] & F::graph)); - - // '\x07' - assert(!(m[2] & F::space)); - assert(!(m[2] & F::print)); - assert( (m[2] & F::cntrl)); - assert(!(m[2] & F::upper)); - assert(!(m[2] & F::lower)); - assert(!(m[2] & F::alpha)); - assert(!(m[2] & F::digit)); - assert(!(m[2] & F::punct)); - assert(!(m[2] & F::xdigit)); - assert(!(m[2] & F::blank)); - assert(!(m[2] & F::alnum)); - assert(!(m[2] & F::graph)); - - // '.' - assert(!(m[3] & F::space)); - assert( (m[3] & F::print)); - assert(!(m[3] & F::cntrl)); - assert(!(m[3] & F::upper)); - assert(!(m[3] & F::lower)); - assert(!(m[3] & F::alpha)); - assert(!(m[3] & F::digit)); - assert( (m[3] & F::punct)); - assert(!(m[3] & F::xdigit)); - assert(!(m[3] & F::blank)); - assert(!(m[3] & F::alnum)); - assert( (m[3] & F::graph)); - - // 'a' - assert(!(m[4] & F::space)); - assert( (m[4] & F::print)); - assert(!(m[4] & F::cntrl)); - assert(!(m[4] & F::upper)); - assert( (m[4] & F::lower)); - assert( (m[4] & F::alpha)); - assert(!(m[4] & F::digit)); - assert(!(m[4] & F::punct)); - assert( (m[4] & F::xdigit)); - assert(!(m[4] & F::blank)); - assert( (m[4] & F::alnum)); - assert( (m[4] & F::graph)); - - // '1' - assert(!(m[5] & F::space)); - assert( (m[5] & F::print)); - assert(!(m[5] & F::cntrl)); - assert(!(m[5] & F::upper)); - assert(!(m[5] & F::lower)); - assert(!(m[5] & F::alpha)); - assert( (m[5] & F::digit)); - assert(!(m[5] & F::punct)); - assert( (m[5] & F::xdigit)); - assert(!(m[5] & F::blank)); - assert( (m[5] & F::alnum)); - assert( (m[5] & F::graph)); - } -} diff --git a/test/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/narrow_1.pass.cpp b/test/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/narrow_1.pass.cpp deleted file mode 100644 index dedf6a7d..00000000 --- a/test/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/narrow_1.pass.cpp +++ /dev/null @@ -1,33 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template <> class ctype; - -// char narrow(char c, char dfault) const; - -#include -#include - -int main() -{ - std::locale l = std::locale::classic(); - { - typedef std::ctype F; - const F& f = std::use_facet(l); - - assert(f.narrow(' ', '*') == ' '); - assert(f.narrow('A', '*') == 'A'); - assert(f.narrow('\x07', '*') == '\x07'); - assert(f.narrow('.', '*') == '.'); - assert(f.narrow('a', '*') == 'a'); - assert(f.narrow('1', '*') == '1'); - } -} diff --git a/test/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/narrow_many.pass.cpp b/test/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/narrow_many.pass.cpp deleted file mode 100644 index 4c5478af..00000000 --- a/test/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/narrow_many.pass.cpp +++ /dev/null @@ -1,38 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template <> class ctype; - -// const char* narrow(const char* low, const char*, char dfault, char* to) const; - -#include -#include -#include -#include - -int main() -{ - std::locale l = std::locale::classic(); - { - typedef std::ctype F; - const F& f = std::use_facet(l); - std::string in(" A\x07.a1"); - std::vector v(in.size()); - - assert(f.narrow(&in[0], in.data() + in.size(), '*', v.data()) == in.data() + in.size()); - assert(v[0] == ' '); - assert(v[1] == 'A'); - assert(v[2] == '\x07'); - assert(v[3] == '.'); - assert(v[4] == 'a'); - assert(v[5] == '1'); - } -} diff --git a/test/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/scan_is.xfail.pass.cpp b/test/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/scan_is.xfail.pass.cpp deleted file mode 100644 index 9777c989..00000000 --- a/test/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/scan_is.xfail.pass.cpp +++ /dev/null @@ -1,44 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template <> class ctype; - -// const char* scan_is(mask m, const char* low, const char* high) const; - -#include -#include -#include -#include - -#include - -int main() -{ - std::locale l = std::locale::classic(); - { - typedef std::ctype F; - const F& f = std::use_facet(l); - const std::string in(" A\x07.a1"); - std::vector m(in.size()); - assert(f.scan_is(F::space, in.data(), in.data() + in.size()) - in.data() == 0); - assert(f.scan_is(F::print, in.data(), in.data() + in.size()) - in.data() == 0); - assert(f.scan_is(F::cntrl, in.data(), in.data() + in.size()) - in.data() == 2); - assert(f.scan_is(F::upper, in.data(), in.data() + in.size()) - in.data() == 1); - assert(f.scan_is(F::lower, in.data(), in.data() + in.size()) - in.data() == 4); - assert(f.scan_is(F::alpha, in.data(), in.data() + in.size()) - in.data() == 1); - assert(f.scan_is(F::digit, in.data(), in.data() + in.size()) - in.data() == 5); - assert(f.scan_is(F::punct, in.data(), in.data() + in.size()) - in.data() == 3); - assert(f.scan_is(F::xdigit, in.data(), in.data() + in.size()) - in.data() == 1); - assert(f.scan_is(F::blank, in.data(), in.data() + in.size()) - in.data() == 0); - assert(f.scan_is(F::alnum, in.data(), in.data() + in.size()) - in.data() == 1); - assert(f.scan_is(F::graph, in.data(), in.data() + in.size()) - in.data() == 1); - } -} diff --git a/test/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/scan_not.xfail.pass.cpp b/test/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/scan_not.xfail.pass.cpp deleted file mode 100644 index b17662d0..00000000 --- a/test/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/scan_not.xfail.pass.cpp +++ /dev/null @@ -1,44 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template <> class ctype; - -// const char* scan_not(mask m, const char* low, const char* high) const; - -#include -#include -#include -#include - -#include - -int main() -{ - std::locale l = std::locale::classic(); - { - typedef std::ctype F; - const F& f = std::use_facet(l); - const std::string in(" A\x07.a1"); - std::vector m(in.size()); - assert(f.scan_not(F::space, in.data(), in.data() + in.size()) - in.data() == 1); - assert(f.scan_not(F::print, in.data(), in.data() + in.size()) - in.data() == 2); - assert(f.scan_not(F::cntrl, in.data(), in.data() + in.size()) - in.data() == 0); - assert(f.scan_not(F::upper, in.data(), in.data() + in.size()) - in.data() == 0); - assert(f.scan_not(F::lower, in.data(), in.data() + in.size()) - in.data() == 0); - assert(f.scan_not(F::alpha, in.data(), in.data() + in.size()) - in.data() == 0); - assert(f.scan_not(F::digit, in.data(), in.data() + in.size()) - in.data() == 0); - assert(f.scan_not(F::punct, in.data(), in.data() + in.size()) - in.data() == 0); - assert(f.scan_not(F::xdigit, in.data(), in.data() + in.size()) - in.data() == 0); - assert(f.scan_not(F::blank, in.data(), in.data() + in.size()) - in.data() == 1); - assert(f.scan_not(F::alnum, in.data(), in.data() + in.size()) - in.data() == 0); - assert(f.scan_not(F::graph, in.data(), in.data() + in.size()) - in.data() == 0); - } -} diff --git a/test/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/table.pass.cpp b/test/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/table.pass.cpp deleted file mode 100644 index f28f4f99..00000000 --- a/test/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/table.pass.cpp +++ /dev/null @@ -1,33 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template <> class ctype - -// const mask* table() const throw(); - -#include -#include - -int main() -{ - typedef std::ctype F; - { - std::locale l(std::locale::classic(), new std::ctype); - const F& f = std::use_facet(l); - assert(f.table() == f.classic_table()); - } - { - std::ctype::mask table[256]; - std::locale l(std::locale::classic(), new std::ctype(table)); - const F& f = std::use_facet(l); - assert(f.table() == table); - } -} diff --git a/test/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/tolower_1.xfail.pass.cpp b/test/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/tolower_1.xfail.pass.cpp deleted file mode 100644 index 1dfc95fe..00000000 --- a/test/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/tolower_1.xfail.pass.cpp +++ /dev/null @@ -1,33 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template <> class ctype; - -// char tolower(char) const; - -#include -#include - -int main() -{ - std::locale l = std::locale::classic(); - { - typedef std::ctype F; - const F& f = std::use_facet(l); - - assert(f.tolower(' ') == ' '); - assert(f.tolower('A') == 'a'); - assert(f.tolower('\x07') == '\x07'); - assert(f.tolower('.') == '.'); - assert(f.tolower('a') == 'a'); - assert(f.tolower('1') == '1'); - } -} diff --git a/test/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/tolower_many.xfail.pass.cpp b/test/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/tolower_many.xfail.pass.cpp deleted file mode 100644 index 22b27370..00000000 --- a/test/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/tolower_many.xfail.pass.cpp +++ /dev/null @@ -1,36 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template <> class ctype; - -// const char* tolower(char* low, const char* high) const; - -#include -#include -#include - -int main() -{ - std::locale l = std::locale::classic(); - { - typedef std::ctype F; - const F& f = std::use_facet(l); - std::string in(" A\x07.a1"); - - assert(f.tolower(&in[0], in.data() + in.size()) == in.data() + in.size()); - assert(in[0] == ' '); - assert(in[1] == 'a'); - assert(in[2] == '\x07'); - assert(in[3] == '.'); - assert(in[4] == 'a'); - assert(in[5] == '1'); - } -} diff --git a/test/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/toupper_1.xfail.pass.cpp b/test/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/toupper_1.xfail.pass.cpp deleted file mode 100644 index 2a714b1d..00000000 --- a/test/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/toupper_1.xfail.pass.cpp +++ /dev/null @@ -1,33 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template <> class ctype; - -// char toupper(char) const; - -#include -#include - -int main() -{ - std::locale l = std::locale::classic(); - { - typedef std::ctype F; - const F& f = std::use_facet(l); - - assert(f.toupper(' ') == ' '); - assert(f.toupper('A') == 'A'); - assert(f.toupper('\x07') == '\x07'); - assert(f.toupper('.') == '.'); - assert(f.toupper('a') == 'A'); - assert(f.toupper('1') == '1'); - } -} diff --git a/test/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/toupper_many.xfail.pass.cpp b/test/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/toupper_many.xfail.pass.cpp deleted file mode 100644 index 8a842c8d..00000000 --- a/test/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/toupper_many.xfail.pass.cpp +++ /dev/null @@ -1,36 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template <> class ctype; - -// const char* toupper(char* low, const char* high) const; - -#include -#include -#include - -int main() -{ - std::locale l = std::locale::classic(); - { - typedef std::ctype F; - const F& f = std::use_facet(l); - std::string in(" A\x07.a1"); - - assert(f.toupper(&in[0], in.data() + in.size()) == in.data() + in.size()); - assert(in[0] == ' '); - assert(in[1] == 'A'); - assert(in[2] == '\x07'); - assert(in[3] == '.'); - assert(in[4] == 'A'); - assert(in[5] == '1'); - } -} diff --git a/test/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/widen_1.pass.cpp b/test/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/widen_1.pass.cpp deleted file mode 100644 index 5a65a561..00000000 --- a/test/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/widen_1.pass.cpp +++ /dev/null @@ -1,33 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template <> class ctype; - -// char widen(char c) const; - -#include -#include - -int main() -{ - std::locale l = std::locale::classic(); - { - typedef std::ctype F; - const F& f = std::use_facet(l); - - assert(f.widen(' ') == ' '); - assert(f.widen('A') == 'A'); - assert(f.widen('\x07') == '\x07'); - assert(f.widen('.') == '.'); - assert(f.widen('a') == 'a'); - assert(f.widen('1') == '1'); - } -} diff --git a/test/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/widen_many.pass.cpp b/test/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/widen_many.pass.cpp deleted file mode 100644 index c86cc55c..00000000 --- a/test/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/widen_many.pass.cpp +++ /dev/null @@ -1,38 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template <> class ctype; - -// const char* widen(const char* low, const char* high, char* to) const; - -#include -#include -#include -#include - -int main() -{ - std::locale l = std::locale::classic(); - { - typedef std::ctype F; - const F& f = std::use_facet(l); - std::string in(" A\x07.a1"); - std::vector v(in.size()); - - assert(f.widen(&in[0], in.data() + in.size(), v.data()) == in.data() + in.size()); - assert(v[0] == ' '); - assert(v[1] == 'A'); - assert(v[2] == '\x07'); - assert(v[3] == '.'); - assert(v[4] == 'a'); - assert(v[5] == '1'); - } -} diff --git a/test/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.statics/classic_table.xfail.pass.cpp b/test/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.statics/classic_table.xfail.pass.cpp deleted file mode 100644 index bdb7696b..00000000 --- a/test/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.statics/classic_table.xfail.pass.cpp +++ /dev/null @@ -1,23 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template <> class ctype - -// static const mask* classic_table() throw(); - -#include -#include - -int main() -{ - typedef std::ctype F; - assert(F::classic_table() != 0); -} diff --git a/test/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.virtuals/tested_elsewhere.pass.cpp b/test/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.virtuals/tested_elsewhere.pass.cpp deleted file mode 100644 index b58f5c55..00000000 --- a/test/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.virtuals/tested_elsewhere.pass.cpp +++ /dev/null @@ -1,12 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -int main() -{ -} diff --git a/test/localization/locale.categories/category.ctype/facet.ctype.special/types.pass.cpp b/test/localization/locale.categories/category.ctype/facet.ctype.special/types.pass.cpp deleted file mode 100644 index f58ec30e..00000000 --- a/test/localization/locale.categories/category.ctype/facet.ctype.special/types.pass.cpp +++ /dev/null @@ -1,38 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template <> -// class ctype -// : public locale::facet, -// public ctype_base -// { -// public: -// typedef char char_type; -// }; - -#include -#include -#include - -int main() -{ - std::locale l = std::locale::classic(); - { - assert(std::has_facet >(l)); - const std::ctype& f = std::use_facet >(l); - { - (void)std::ctype::id; - } - static_assert((std::is_same::char_type, char>::value), ""); - static_assert((std::is_base_of >::value), ""); - static_assert((std::is_base_of >::value), ""); - } -} diff --git a/test/localization/locale.categories/category.ctype/locale.codecvt.byname/ctor_char.pass.cpp b/test/localization/locale.categories/category.ctype/locale.codecvt.byname/ctor_char.pass.cpp deleted file mode 100644 index 34957783..00000000 --- a/test/localization/locale.categories/category.ctype/locale.codecvt.byname/ctor_char.pass.cpp +++ /dev/null @@ -1,70 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template <> class codecvt_byname - -// explicit codecvt_byname(const char* nm, size_t refs = 0); -// explicit codecvt_byname(const string& nm, size_t refs = 0); - -#include -#include - -typedef std::codecvt_byname F; - -class my_facet - : public F -{ -public: - static int count; - - explicit my_facet(const char* nm, std::size_t refs = 0) - : F(nm, refs) {++count;} - explicit my_facet(const std::string& nm, std::size_t refs = 0) - : F(nm, refs) {++count;} - - ~my_facet() {--count;} -}; - -int my_facet::count = 0; - -int main() -{ - { - std::locale l(std::locale::classic(), new my_facet("en_US")); - assert(my_facet::count == 1); - } - assert(my_facet::count == 0); - { - my_facet f("en_US", 1); - assert(my_facet::count == 1); - { - std::locale l(std::locale::classic(), &f); - assert(my_facet::count == 1); - } - assert(my_facet::count == 1); - } - assert(my_facet::count == 0); - { - std::locale l(std::locale::classic(), new my_facet(std::string("en_US"))); - assert(my_facet::count == 1); - } - assert(my_facet::count == 0); - { - my_facet f(std::string("en_US"), 1); - assert(my_facet::count == 1); - { - std::locale l(std::locale::classic(), &f); - assert(my_facet::count == 1); - } - assert(my_facet::count == 1); - } - assert(my_facet::count == 0); -} diff --git a/test/localization/locale.categories/category.ctype/locale.codecvt.byname/ctor_char16_t.pass.cpp b/test/localization/locale.categories/category.ctype/locale.codecvt.byname/ctor_char16_t.pass.cpp deleted file mode 100644 index 0559896b..00000000 --- a/test/localization/locale.categories/category.ctype/locale.codecvt.byname/ctor_char16_t.pass.cpp +++ /dev/null @@ -1,70 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template <> class codecvt_byname - -// explicit codecvt_byname(const char* nm, size_t refs = 0); -// explicit codecvt_byname(const string& nm, size_t refs = 0); - -#include -#include - -typedef std::codecvt_byname F; - -class my_facet - : public F -{ -public: - static int count; - - explicit my_facet(const char* nm, std::size_t refs = 0) - : F(nm, refs) {++count;} - explicit my_facet(const std::string& nm, std::size_t refs = 0) - : F(nm, refs) {++count;} - - ~my_facet() {--count;} -}; - -int my_facet::count = 0; - -int main() -{ - { - std::locale l(std::locale::classic(), new my_facet("en_US")); - assert(my_facet::count == 1); - } - assert(my_facet::count == 0); - { - my_facet f("en_US", 1); - assert(my_facet::count == 1); - { - std::locale l(std::locale::classic(), &f); - assert(my_facet::count == 1); - } - assert(my_facet::count == 1); - } - assert(my_facet::count == 0); - { - std::locale l(std::locale::classic(), new my_facet(std::string("en_US"))); - assert(my_facet::count == 1); - } - assert(my_facet::count == 0); - { - my_facet f(std::string("en_US"), 1); - assert(my_facet::count == 1); - { - std::locale l(std::locale::classic(), &f); - assert(my_facet::count == 1); - } - assert(my_facet::count == 1); - } - assert(my_facet::count == 0); -} diff --git a/test/localization/locale.categories/category.ctype/locale.codecvt.byname/ctor_char32_t.pass.cpp b/test/localization/locale.categories/category.ctype/locale.codecvt.byname/ctor_char32_t.pass.cpp deleted file mode 100644 index 8eda52de..00000000 --- a/test/localization/locale.categories/category.ctype/locale.codecvt.byname/ctor_char32_t.pass.cpp +++ /dev/null @@ -1,70 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template <> class codecvt_byname - -// explicit codecvt_byname(const char* nm, size_t refs = 0); -// explicit codecvt_byname(const string& nm, size_t refs = 0); - -#include -#include - -typedef std::codecvt_byname F; - -class my_facet - : public F -{ -public: - static int count; - - explicit my_facet(const char* nm, std::size_t refs = 0) - : F(nm, refs) {++count;} - explicit my_facet(const std::string& nm, std::size_t refs = 0) - : F(nm, refs) {++count;} - - ~my_facet() {--count;} -}; - -int my_facet::count = 0; - -int main() -{ - { - std::locale l(std::locale::classic(), new my_facet("en_US")); - assert(my_facet::count == 1); - } - assert(my_facet::count == 0); - { - my_facet f("en_US", 1); - assert(my_facet::count == 1); - { - std::locale l(std::locale::classic(), &f); - assert(my_facet::count == 1); - } - assert(my_facet::count == 1); - } - assert(my_facet::count == 0); - { - std::locale l(std::locale::classic(), new my_facet(std::string("en_US"))); - assert(my_facet::count == 1); - } - assert(my_facet::count == 0); - { - my_facet f(std::string("en_US"), 1); - assert(my_facet::count == 1); - { - std::locale l(std::locale::classic(), &f); - assert(my_facet::count == 1); - } - assert(my_facet::count == 1); - } - assert(my_facet::count == 0); -} diff --git a/test/localization/locale.categories/category.ctype/locale.codecvt.byname/ctor_wchar_t.pass.cpp b/test/localization/locale.categories/category.ctype/locale.codecvt.byname/ctor_wchar_t.pass.cpp deleted file mode 100644 index dd5f4363..00000000 --- a/test/localization/locale.categories/category.ctype/locale.codecvt.byname/ctor_wchar_t.pass.cpp +++ /dev/null @@ -1,70 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template <> class codecvt_byname - -// explicit codecvt_byname(const char* nm, size_t refs = 0); -// explicit codecvt_byname(const string& nm, size_t refs = 0); - -#include -#include - -typedef std::codecvt_byname F; - -class my_facet - : public F -{ -public: - static int count; - - explicit my_facet(const char* nm, std::size_t refs = 0) - : F(nm, refs) {++count;} - explicit my_facet(const std::string& nm, std::size_t refs = 0) - : F(nm, refs) {++count;} - - ~my_facet() {--count;} -}; - -int my_facet::count = 0; - -int main() -{ - { - std::locale l(std::locale::classic(), new my_facet("en_US")); - assert(my_facet::count == 1); - } - assert(my_facet::count == 0); - { - my_facet f("en_US", 1); - assert(my_facet::count == 1); - { - std::locale l(std::locale::classic(), &f); - assert(my_facet::count == 1); - } - assert(my_facet::count == 1); - } - assert(my_facet::count == 0); - { - std::locale l(std::locale::classic(), new my_facet(std::string("en_US"))); - assert(my_facet::count == 1); - } - assert(my_facet::count == 0); - { - my_facet f(std::string("en_US"), 1); - assert(my_facet::count == 1); - { - std::locale l(std::locale::classic(), &f); - assert(my_facet::count == 1); - } - assert(my_facet::count == 1); - } - assert(my_facet::count == 0); -} diff --git a/test/localization/locale.categories/category.ctype/locale.codecvt/codecvt_base.pass.cpp b/test/localization/locale.categories/category.ctype/locale.codecvt/codecvt_base.pass.cpp deleted file mode 100644 index a2973b7f..00000000 --- a/test/localization/locale.categories/category.ctype/locale.codecvt/codecvt_base.pass.cpp +++ /dev/null @@ -1,27 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// class codecvt_base -// { -// public: -// enum result {ok, partial, error, noconv}; -// }; - -#include -#include - -int main() -{ - assert(std::codecvt_base::ok == 0); - assert(std::codecvt_base::partial == 1); - assert(std::codecvt_base::error == 2); - assert(std::codecvt_base::noconv == 3); -} diff --git a/test/localization/locale.categories/category.ctype/locale.codecvt/ctor_char.pass.cpp b/test/localization/locale.categories/category.ctype/locale.codecvt/ctor_char.pass.cpp deleted file mode 100644 index 121a815b..00000000 --- a/test/localization/locale.categories/category.ctype/locale.codecvt/ctor_char.pass.cpp +++ /dev/null @@ -1,52 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template <> class codecvt - -// explicit codecvt(size_t refs = 0); - -#include -#include - -typedef std::codecvt F; - -class my_facet - : public F -{ -public: - static int count; - - explicit my_facet(std::size_t refs = 0) - : F(refs) {++count;} - - ~my_facet() {--count;} -}; - -int my_facet::count = 0; - -int main() -{ - { - std::locale l(std::locale::classic(), new my_facet); - assert(my_facet::count == 1); - } - assert(my_facet::count == 0); - { - my_facet f(1); - assert(my_facet::count == 1); - { - std::locale l(std::locale::classic(), &f); - assert(my_facet::count == 1); - } - assert(my_facet::count == 1); - } - assert(my_facet::count == 0); -} diff --git a/test/localization/locale.categories/category.ctype/locale.codecvt/ctor_char16_t.pass.cpp b/test/localization/locale.categories/category.ctype/locale.codecvt/ctor_char16_t.pass.cpp deleted file mode 100644 index 5a6cdee9..00000000 --- a/test/localization/locale.categories/category.ctype/locale.codecvt/ctor_char16_t.pass.cpp +++ /dev/null @@ -1,58 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template <> class codecvt - -// explicit codecvt(size_t refs = 0); - -#include -#include - -//#ifndef _LIBCPP_HAS_NO_UNICODE_CHARS - -typedef std::codecvt F; - -class my_facet - : public F -{ -public: - static int count; - - explicit my_facet(std::size_t refs = 0) - : F(refs) {++count;} - - ~my_facet() {--count;} -}; - -int my_facet::count = 0; - -//#endif - -int main() -{ -//#ifndef _LIBCPP_HAS_NO_UNICODE_CHARS - { - std::locale l(std::locale::classic(), new my_facet); - assert(my_facet::count == 1); - } - assert(my_facet::count == 0); - { - my_facet f(1); - assert(my_facet::count == 1); - { - std::locale l(std::locale::classic(), &f); - assert(my_facet::count == 1); - } - assert(my_facet::count == 1); - } - assert(my_facet::count == 0); -//#endif -} diff --git a/test/localization/locale.categories/category.ctype/locale.codecvt/ctor_char32_t.pass.cpp b/test/localization/locale.categories/category.ctype/locale.codecvt/ctor_char32_t.pass.cpp deleted file mode 100644 index fae0d7bb..00000000 --- a/test/localization/locale.categories/category.ctype/locale.codecvt/ctor_char32_t.pass.cpp +++ /dev/null @@ -1,58 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template <> class codecvt - -// explicit codecvt(size_t refs = 0); - -#include -#include - -//#ifndef _LIBCPP_HAS_NO_UNICODE_CHARS - -typedef std::codecvt F; - -class my_facet - : public F -{ -public: - static int count; - - explicit my_facet(std::size_t refs = 0) - : F(refs) {++count;} - - ~my_facet() {--count;} -}; - -int my_facet::count = 0; - -//#endif - -int main() -{ -//#ifndef _LIBCPP_HAS_NO_UNICODE_CHARS - { - std::locale l(std::locale::classic(), new my_facet); - assert(my_facet::count == 1); - } - assert(my_facet::count == 0); - { - my_facet f(1); - assert(my_facet::count == 1); - { - std::locale l(std::locale::classic(), &f); - assert(my_facet::count == 1); - } - assert(my_facet::count == 1); - } - assert(my_facet::count == 0); -//#endif -} diff --git a/test/localization/locale.categories/category.ctype/locale.codecvt/ctor_wchar_t.pass.cpp b/test/localization/locale.categories/category.ctype/locale.codecvt/ctor_wchar_t.pass.cpp deleted file mode 100644 index 4cd84f24..00000000 --- a/test/localization/locale.categories/category.ctype/locale.codecvt/ctor_wchar_t.pass.cpp +++ /dev/null @@ -1,52 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template <> class codecvt - -// explicit codecvt(size_t refs = 0); - -#include -#include - -typedef std::codecvt F; - -class my_facet - : public F -{ -public: - static int count; - - explicit my_facet(std::size_t refs = 0) - : F(refs) {++count;} - - ~my_facet() {--count;} -}; - -int my_facet::count = 0; - -int main() -{ - { - std::locale l(std::locale::classic(), new my_facet); - assert(my_facet::count == 1); - } - assert(my_facet::count == 0); - { - my_facet f(1); - assert(my_facet::count == 1); - { - std::locale l(std::locale::classic(), &f); - assert(my_facet::count == 1); - } - assert(my_facet::count == 1); - } - assert(my_facet::count == 0); -} diff --git a/test/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char16_t_always_noconv.pass.cpp b/test/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char16_t_always_noconv.pass.cpp deleted file mode 100644 index 4a0f94f9..00000000 --- a/test/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char16_t_always_noconv.pass.cpp +++ /dev/null @@ -1,26 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template <> class codecvt - -// bool always_noconv() const throw(); - -#include -#include - -typedef std::codecvt F; - -int main() -{ - std::locale l = std::locale::classic(); - const F& f = std::use_facet(l); - assert(!f.always_noconv()); -} diff --git a/test/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char16_t_encoding.pass.cpp b/test/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char16_t_encoding.pass.cpp deleted file mode 100644 index d2a6ae39..00000000 --- a/test/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char16_t_encoding.pass.cpp +++ /dev/null @@ -1,26 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template <> class codecvt - -// int encoding() const throw(); - -#include -#include - -typedef std::codecvt F; - -int main() -{ - std::locale l = std::locale::classic(); - const F& f = std::use_facet(l); - assert(f.encoding() == 0); -} diff --git a/test/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char16_t_in.pass.cpp b/test/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char16_t_in.pass.cpp deleted file mode 100644 index 88382a1f..00000000 --- a/test/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char16_t_in.pass.cpp +++ /dev/null @@ -1,40 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template <> class codecvt - -// result in(stateT& state, -// const externT* from, const externT* from_end, const externT*& from_next, -// internT* to, internT* to_end, internT*& to_next) const; - -#include -#include -#include -#include - -typedef std::codecvt F; - -int main() -{ - std::locale l = std::locale::classic(); - const char from[] = "some text"; - F::intern_type to[9]; - const F& f = std::use_facet(l); - std::mbstate_t mbs; - const char* from_next = 0; - F::intern_type* to_next = 0; - assert(f.in(mbs, from, from + 9, from_next, - to, to + 9, to_next) == F::ok); - assert(from_next - from == 9); - assert(to_next - to == 9); - for (unsigned i = 0; i < 9; ++i) - assert(to[i] == from[i]); -} diff --git a/test/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char16_t_length.pass.cpp b/test/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char16_t_length.pass.cpp deleted file mode 100644 index 7cd44180..00000000 --- a/test/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char16_t_length.pass.cpp +++ /dev/null @@ -1,32 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template <> class codecvt - -// int length(stateT& state, const externT* from, const externT* from_end, size_t max) const; - -#include -#include - -typedef std::codecvt F; - -int main() -{ - std::locale l = std::locale::classic(); - const F& f = std::use_facet(l); - std::mbstate_t mbs; - const char from[] = "some text"; - assert(f.length(mbs, from, from+10, 0) == 0); - assert(f.length(mbs, from, from+10, 8) == 8); - assert(f.length(mbs, from, from+10, 9) == 9); - assert(f.length(mbs, from, from+10, 10) == 10); - assert(f.length(mbs, from, from+10, 100) == 10); -} diff --git a/test/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char16_t_max_length.pass.cpp b/test/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char16_t_max_length.pass.cpp deleted file mode 100644 index 8abe10b8..00000000 --- a/test/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char16_t_max_length.pass.cpp +++ /dev/null @@ -1,26 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template <> class codecvt - -// int max_length() const throw(); - -#include -#include - -typedef std::codecvt F; - -int main() -{ - std::locale l = std::locale::classic(); - const F& f = std::use_facet(l); - assert(f.max_length() == 4); -} diff --git a/test/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char16_t_out.pass.cpp b/test/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char16_t_out.pass.cpp deleted file mode 100644 index c06f6d5b..00000000 --- a/test/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char16_t_out.pass.cpp +++ /dev/null @@ -1,45 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template <> class codecvt - -// result out(stateT& state, -// const internT* from, const internT* from_end, const internT*& from_next, -// externT* to, externT* to_end, externT*& to_next) const; - -#include -#include -#include -#include - -#include - -typedef std::codecvt F; - -int main() -{ - std::locale l = std::locale::classic(); - const F& f = std::use_facet(l); - { - F::intern_type from[9] = {'s', 'o', 'm', 'e', ' ', 't', 'e', 'x', 't'}; - char to[9] = {0}; - std::mbstate_t mbs; - const F::intern_type* from_next = 0; - char* to_next = 0; - F::result r = f.out(mbs, from, from + 9, from_next, - to, to + 9, to_next); - assert(r == F::ok); - assert(from_next - from == 9); - assert(to_next - to == 9); - for (unsigned i = 0; i < 9; ++i) - assert(to[i] == from[i]); - } -} diff --git a/test/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char16_t_unshift.pass.cpp b/test/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char16_t_unshift.pass.cpp deleted file mode 100644 index 36ad6a46..00000000 --- a/test/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char16_t_unshift.pass.cpp +++ /dev/null @@ -1,33 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template <> class codecvt - -// result unshift(stateT& state, -// externT* to, externT* to_end, externT*& to_next) const; - -#include -#include -#include -#include - -typedef std::codecvt F; - -int main() -{ - std::locale l = std::locale::classic(); - std::vector to(3); - const F& f = std::use_facet(l); - std::mbstate_t mbs; - char* to_next = 0; - assert(f.unshift(mbs, to.data(), to.data() + to.size(), to_next) == F::noconv); - assert(to_next == to.data()); -} diff --git a/test/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char32_t_always_noconv.pass.cpp b/test/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char32_t_always_noconv.pass.cpp deleted file mode 100644 index 2270a308..00000000 --- a/test/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char32_t_always_noconv.pass.cpp +++ /dev/null @@ -1,26 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template <> class codecvt - -// bool always_noconv() const throw(); - -#include -#include - -typedef std::codecvt F; - -int main() -{ - std::locale l = std::locale::classic(); - const F& f = std::use_facet(l); - assert(!f.always_noconv()); -} diff --git a/test/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char32_t_encoding.pass.cpp b/test/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char32_t_encoding.pass.cpp deleted file mode 100644 index 175470a6..00000000 --- a/test/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char32_t_encoding.pass.cpp +++ /dev/null @@ -1,26 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template <> class codecvt - -// int encoding() const throw(); - -#include -#include - -typedef std::codecvt F; - -int main() -{ - std::locale l = std::locale::classic(); - const F& f = std::use_facet(l); - assert(f.encoding() == 0); -} diff --git a/test/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char32_t_in.pass.cpp b/test/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char32_t_in.pass.cpp deleted file mode 100644 index 9430a8ad..00000000 --- a/test/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char32_t_in.pass.cpp +++ /dev/null @@ -1,40 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template <> class codecvt - -// result in(stateT& state, -// const externT* from, const externT* from_end, const externT*& from_next, -// internT* to, internT* to_end, internT*& to_next) const; - -#include -#include -#include -#include - -typedef std::codecvt F; - -int main() -{ - std::locale l = std::locale::classic(); - const char from[] = "some text"; - F::intern_type to[9]; - const F& f = std::use_facet(l); - std::mbstate_t mbs; - const char* from_next = 0; - F::intern_type* to_next = 0; - assert(f.in(mbs, from, from + 9, from_next, - to, to + 9, to_next) == F::ok); - assert(from_next - from == 9); - assert(to_next - to == 9); - for (unsigned i = 0; i < 9; ++i) - assert(to[i] == from[i]); -} diff --git a/test/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char32_t_length.pass.cpp b/test/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char32_t_length.pass.cpp deleted file mode 100644 index fd3b2bb8..00000000 --- a/test/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char32_t_length.pass.cpp +++ /dev/null @@ -1,32 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template <> class codecvt - -// int length(stateT& state, const externT* from, const externT* from_end, size_t max) const; - -#include -#include - -typedef std::codecvt F; - -int main() -{ - std::locale l = std::locale::classic(); - const F& f = std::use_facet(l); - std::mbstate_t mbs; - const char from[] = "some text"; - assert(f.length(mbs, from, from+10, 0) == 0); - assert(f.length(mbs, from, from+10, 8) == 8); - assert(f.length(mbs, from, from+10, 9) == 9); - assert(f.length(mbs, from, from+10, 10) == 10); - assert(f.length(mbs, from, from+10, 100) == 10); -} diff --git a/test/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char32_t_max_length.pass.cpp b/test/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char32_t_max_length.pass.cpp deleted file mode 100644 index 62b4919c..00000000 --- a/test/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char32_t_max_length.pass.cpp +++ /dev/null @@ -1,26 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template <> class codecvt - -// int max_length() const throw(); - -#include -#include - -typedef std::codecvt F; - -int main() -{ - std::locale l = std::locale::classic(); - const F& f = std::use_facet(l); - assert(f.max_length() == 4); -} diff --git a/test/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char32_t_out.pass.cpp b/test/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char32_t_out.pass.cpp deleted file mode 100644 index 3f06d80c..00000000 --- a/test/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char32_t_out.pass.cpp +++ /dev/null @@ -1,45 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template <> class codecvt - -// result out(stateT& state, -// const internT* from, const internT* from_end, const internT*& from_next, -// externT* to, externT* to_end, externT*& to_next) const; - -#include -#include -#include -#include - -#include - -typedef std::codecvt F; - -int main() -{ - std::locale l = std::locale::classic(); - const F& f = std::use_facet(l); - { - F::intern_type from[9] = {'s', 'o', 'm', 'e', ' ', 't', 'e', 'x', 't'}; - char to[9] = {0}; - std::mbstate_t mbs; - const F::intern_type* from_next = 0; - char* to_next = 0; - F::result r = f.out(mbs, from, from + 9, from_next, - to, to + 9, to_next); - assert(r == F::ok); - assert(from_next - from == 9); - assert(to_next - to == 9); - for (unsigned i = 0; i < 9; ++i) - assert(to[i] == from[i]); - } -} diff --git a/test/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char32_t_unshift.pass.cpp b/test/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char32_t_unshift.pass.cpp deleted file mode 100644 index 90266b40..00000000 --- a/test/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char32_t_unshift.pass.cpp +++ /dev/null @@ -1,33 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template <> class codecvt - -// result unshift(stateT& state, -// externT* to, externT* to_end, externT*& to_next) const; - -#include -#include -#include -#include - -typedef std::codecvt F; - -int main() -{ - std::locale l = std::locale::classic(); - std::vector to(3); - const F& f = std::use_facet(l); - std::mbstate_t mbs; - char* to_next = 0; - assert(f.unshift(mbs, to.data(), to.data() + to.size(), to_next) == F::noconv); - assert(to_next == to.data()); -} diff --git a/test/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char_always_noconv.pass.cpp b/test/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char_always_noconv.pass.cpp deleted file mode 100644 index 71640490..00000000 --- a/test/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char_always_noconv.pass.cpp +++ /dev/null @@ -1,26 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template <> class codecvt - -// bool always_noconv() const throw(); - -#include -#include - -typedef std::codecvt F; - -int main() -{ - std::locale l = std::locale::classic(); - const F& f = std::use_facet(l); - assert(f.always_noconv()); -} diff --git a/test/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char_encoding.pass.cpp b/test/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char_encoding.pass.cpp deleted file mode 100644 index 79bc2bfa..00000000 --- a/test/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char_encoding.pass.cpp +++ /dev/null @@ -1,26 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template <> class codecvt - -// int encoding() const throw(); - -#include -#include - -typedef std::codecvt F; - -int main() -{ - std::locale l = std::locale::classic(); - const F& f = std::use_facet(l); - assert(f.encoding() == 1); -} diff --git a/test/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char_in.pass.cpp b/test/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char_in.pass.cpp deleted file mode 100644 index 4fe55c1d..00000000 --- a/test/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char_in.pass.cpp +++ /dev/null @@ -1,38 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template <> class codecvt - -// result in(stateT& state, -// const externT* from, const externT* from_end, const externT*& from_next, -// internT* to, internT* to_end, internT*& to_next) const; - -#include -#include -#include -#include - -typedef std::codecvt F; - -int main() -{ - std::locale l = std::locale::classic(); - const std::basic_string from("some text"); - std::vector to(from.size()); - const F& f = std::use_facet(l); - std::mbstate_t mbs; - const char* from_next = 0; - char* to_next = 0; - assert(f.in(mbs, from.data(), from.data() + from.size(), from_next, - to.data(), to.data() + to.size(), to_next) == F::noconv); - assert(from_next == from.data()); - assert(to_next == to.data()); -} diff --git a/test/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char_length.pass.cpp b/test/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char_length.pass.cpp deleted file mode 100644 index 77ce3b7b..00000000 --- a/test/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char_length.pass.cpp +++ /dev/null @@ -1,32 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template <> class codecvt - -// int length(stateT& state, const externT* from, const externT* from_end, size_t max) const; - -#include -#include - -typedef std::codecvt F; - -int main() -{ - std::locale l = std::locale::classic(); - const F& f = std::use_facet(l); - std::mbstate_t mbs; - const char from[10]= {0}; - assert(f.length(mbs, from, from+10, 0) == 0); - assert(f.length(mbs, from, from+10, 9) == 9); - assert(f.length(mbs, from, from+10, 10) == 10); - assert(f.length(mbs, from, from+10, 11) == 10); - assert(f.length(mbs, from, from+10, 100) == 10); -} diff --git a/test/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char_max_length.pass.cpp b/test/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char_max_length.pass.cpp deleted file mode 100644 index 626c6524..00000000 --- a/test/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char_max_length.pass.cpp +++ /dev/null @@ -1,26 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template <> class codecvt - -// int max_length() const throw(); - -#include -#include - -typedef std::codecvt F; - -int main() -{ - std::locale l = std::locale::classic(); - const F& f = std::use_facet(l); - assert(f.max_length() == 1); -} diff --git a/test/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char_out.pass.cpp b/test/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char_out.pass.cpp deleted file mode 100644 index 2ab3642d..00000000 --- a/test/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char_out.pass.cpp +++ /dev/null @@ -1,38 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template <> class codecvt - -// result out(stateT& state, -// const internT* from, const internT* from_end, const internT*& from_next, -// externT* to, externT* to_end, externT*& to_next) const; - -#include -#include -#include -#include - -typedef std::codecvt F; - -int main() -{ - std::locale l = std::locale::classic(); - const std::basic_string from("some text"); - std::vector to(from.size()); - const F& f = std::use_facet(l); - std::mbstate_t mbs; - const char* from_next = 0; - char* to_next = 0; - assert(f.out(mbs, from.data(), from.data() + from.size(), from_next, - to.data(), to.data() + to.size(), to_next) == F::noconv); - assert(from_next == from.data()); - assert(to_next == to.data()); -} diff --git a/test/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char_unshift.pass.cpp b/test/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char_unshift.pass.cpp deleted file mode 100644 index 6a95c227..00000000 --- a/test/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char_unshift.pass.cpp +++ /dev/null @@ -1,33 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template <> class codecvt - -// result unshift(stateT& state, -// externT* to, externT* to_end, externT*& to_next) const; - -#include -#include -#include -#include - -typedef std::codecvt F; - -int main() -{ - std::locale l = std::locale::classic(); - std::vector to(3); - const F& f = std::use_facet(l); - std::mbstate_t mbs; - char* to_next = 0; - assert(f.unshift(mbs, to.data(), to.data() + to.size(), to_next) == F::noconv); - assert(to_next == to.data()); -} diff --git a/test/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/utf_sanity_check.pass.cpp b/test/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/utf_sanity_check.pass.cpp deleted file mode 100644 index 0b00f5af..00000000 --- a/test/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/utf_sanity_check.pass.cpp +++ /dev/null @@ -1,127 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template <> class codecvt -// template <> class codecvt -// template <> class codecvt // extension - -// sanity check - -#include -#include -#include - -#include - -int main() -{ - typedef std::codecvt F32_8; - typedef std::codecvt F16_8; - typedef std::codecvt_utf16 F32_16; - std::locale l = std::locale(std::locale::classic(), new F32_16); - const F32_8& f32_8 = std::use_facet(std::locale::classic()); - const F32_16& f32_16 = std::use_facet(l); - const F16_8& f16_8 = std::use_facet(std::locale::classic()); - std::mbstate_t mbs = {0}; - F32_8::intern_type* c32p; - F16_8::intern_type* c16p; - F32_8::extern_type* c8p; - const F32_8::intern_type* c_c32p; - const F16_8::intern_type* c_c16p; - const F32_8::extern_type* c_c8p; - F32_8::intern_type c32; - F16_8::intern_type c16[2]; - char c16c[4]; - char* c16cp; - F32_8::extern_type c8[4]; - for (F32_8::intern_type c32x = 0; c32x < 0x110003; ++c32x) - { - if (0xD800 <= c32x && c32x < 0xE000 || c32x >= 0x110000) - { - assert(f32_16.out(mbs, &c32x, &c32x+1, c_c32p, c16c+0, c16c+4, c16cp) == F32_8::error); - assert(f32_8.out(mbs, &c32x, &c32x+1, c_c32p, c8, c8+4, c8p) == F32_8::error); - } - else - { - assert(f32_16.out(mbs, &c32x, &c32x+1, c_c32p, c16c, c16c+4, c16cp) == F32_8::ok); - assert(c_c32p-&c32x == 1); - if (c32x < 0x10000) - assert(c16cp-c16c == 2); - else - assert(c16cp-c16c == 4); - for (int i = 0; i < (c16cp - c16c) / 2; ++i) - c16[i] = (unsigned char)c16c[2*i] << 8 | (unsigned char)c16c[2*i+1]; - c_c16p = c16 + (c16cp - c16c) / 2; - assert(f16_8.out(mbs, c16, c_c16p, c_c16p, c8, c8+4, c8p) == F32_8::ok); - if (c32x < 0x10000) - assert(c_c16p-c16 == 1); - else - assert(c_c16p-c16 == 2); - if (c32x < 0x80) - assert(c8p-c8 == 1); - else if (c32x < 0x800) - assert(c8p-c8 == 2); - else if (c32x < 0x10000) - assert(c8p-c8 == 3); - else - assert(c8p-c8 == 4); - c_c8p = c8p; - assert(f32_8.in(mbs, c8, c_c8p, c_c8p, &c32, &c32+1, c32p) == F32_8::ok); - if (c32x < 0x80) - assert(c_c8p-c8 == 1); - else if (c32x < 0x800) - assert(c_c8p-c8 == 2); - else if (c32x < 0x10000) - assert(c_c8p-c8 == 3); - else - assert(c_c8p-c8 == 4); - assert(c32p-&c32 == 1); - assert(c32 == c32x); - assert(f32_8.out(mbs, &c32x, &c32x+1, c_c32p, c8, c8+4, c8p) == F32_8::ok); - assert(c_c32p-&c32x == 1); - if (c32x < 0x80) - assert(c8p-c8 == 1); - else if (c32x < 0x800) - assert(c8p-c8 == 2); - else if (c32x < 0x10000) - assert(c8p-c8 == 3); - else - assert(c8p-c8 == 4); - c_c8p = c8p; - assert(f16_8.in(mbs, c8, c_c8p, c_c8p, c16, c16+2, c16p) == F32_8::ok); - if (c32x < 0x80) - assert(c_c8p-c8 == 1); - else if (c32x < 0x800) - assert(c_c8p-c8 == 2); - else if (c32x < 0x10000) - assert(c_c8p-c8 == 3); - else - assert(c_c8p-c8 == 4); - if (c32x < 0x10000) - assert(c16p-c16 == 1); - else - assert(c16p-c16 == 2); - for (int i = 0; i < c16p-c16; ++i) - { - c16c[2*i] = static_cast(c16[i] >> 8); - c16c[2*i+1] = static_cast(c16[i]); - } - const char* c_c16cp = c16c + (c16p-c16)*2; - assert(f32_16.in(mbs, c16c, c_c16cp, c_c16cp, &c32, &c32+1, c32p) == F32_8::ok); - if (c32x < 0x10000) - assert(c_c16cp-c16c == 2); - else - assert(c_c16cp-c16c == 4); - assert(c32p-&c32 == 1); - assert(c32 == c32x); - } - } -} diff --git a/test/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/wchar_t_always_noconv.pass.cpp b/test/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/wchar_t_always_noconv.pass.cpp deleted file mode 100644 index 258998ff..00000000 --- a/test/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/wchar_t_always_noconv.pass.cpp +++ /dev/null @@ -1,26 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template <> class codecvt - -// bool always_noconv() const throw(); - -#include -#include - -typedef std::codecvt F; - -int main() -{ - std::locale l = std::locale::classic(); - const F& f = std::use_facet(l); - assert(!f.always_noconv()); -} diff --git a/test/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/wchar_t_encoding.xfail.pass.cpp b/test/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/wchar_t_encoding.xfail.pass.cpp deleted file mode 100644 index b7604f33..00000000 --- a/test/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/wchar_t_encoding.xfail.pass.cpp +++ /dev/null @@ -1,26 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template <> class codecvt - -// int encoding() const throw(); - -#include -#include - -typedef std::codecvt F; - -int main() -{ - std::locale l = std::locale::classic(); - const F& f = std::use_facet(l); - assert(f.encoding() == 1); -} diff --git a/test/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/wchar_t_in.xfail.pass.cpp b/test/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/wchar_t_in.xfail.pass.cpp deleted file mode 100644 index e98097ba..00000000 --- a/test/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/wchar_t_in.xfail.pass.cpp +++ /dev/null @@ -1,42 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template <> class codecvt - -// result in(stateT& state, -// const externT* from, const externT* from_end, const externT*& from_next, -// internT* to, internT* to_end, internT*& to_next) const; - -#include -#include -#include -#include - -typedef std::codecvt F; - -int main() -{ - std::locale l = std::locale::classic(); - const std::basic_string from("some text"); - const std::basic_string expected(from.begin(), from.end()); - std::basic_string to(from.size(), F::intern_type()); - const F& f = std::use_facet(l); - std::mbstate_t mbs = {0}; - const F::extern_type* from_next = 0; - F::intern_type* to_next = 0; - F::result r = f.in(mbs, from.data(), from.data() + from.size(), from_next, - &to[0], &to[0] + to.size(), to_next); - assert(r == F::ok); - assert(from_next - from.data() == from.size()); - assert(to_next - to.data() == expected.size()); - assert(to_next - to.data() == expected.size()); - assert(to == expected); -} diff --git a/test/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/wchar_t_length.xfail.pass.cpp b/test/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/wchar_t_length.xfail.pass.cpp deleted file mode 100644 index f97f2b4a..00000000 --- a/test/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/wchar_t_length.xfail.pass.cpp +++ /dev/null @@ -1,32 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template <> class codecvt - -// int length(stateT& state, const externT* from, const externT* from_end, size_t max) const; - -#include -#include - -typedef std::codecvt F; - -int main() -{ - std::locale l = std::locale::classic(); - const F& f = std::use_facet(l); - std::mbstate_t mbs = {0}; - const char* from = "123467890"; - assert(f.length(mbs, from, from+10, 0) == 0); - assert(f.length(mbs, from, from+10, 9) == 9); - assert(f.length(mbs, from, from+10, 10) == 10); - assert(f.length(mbs, from, from+10, 11) == 10); - assert(f.length(mbs, from, from+10, 100) == 10); -} diff --git a/test/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/wchar_t_max_length.xfail.pass.cpp b/test/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/wchar_t_max_length.xfail.pass.cpp deleted file mode 100644 index 38ce5145..00000000 --- a/test/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/wchar_t_max_length.xfail.pass.cpp +++ /dev/null @@ -1,26 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template <> class codecvt - -// int max_length() const throw(); - -#include -#include - -typedef std::codecvt F; - -int main() -{ - std::locale l = std::locale::classic(); - const F& f = std::use_facet(l); - assert(f.max_length() == 1); -} diff --git a/test/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/wchar_t_out.xfail.pass.cpp b/test/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/wchar_t_out.xfail.pass.cpp deleted file mode 100644 index 7b8b52c5..00000000 --- a/test/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/wchar_t_out.xfail.pass.cpp +++ /dev/null @@ -1,69 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template <> class codecvt - -// result out(stateT& state, -// const internT* from, const internT* from_end, const internT*& from_next, -// externT* to, externT* to_end, externT*& to_next) const; - -#include -#include -#include -#include - -typedef std::codecvt F; - -int main() -{ - std::locale l = std::locale::classic(); - const F& f = std::use_facet(l); - { - const std::basic_string from(L"some text"); - std::vector to(from.size()+1); - std::mbstate_t mbs; - const F::intern_type* from_next = 0; - char* to_next = 0; - F::result r = f.out(mbs, from.data(), from.data() + from.size(), from_next, - to.data(), to.data() + to.size(), to_next); - assert(r == F::ok); - assert(from_next - from.data() == from.size()); - assert(to_next - to.data() == from.size()); - assert(to.data() == std::string("some text")); - } - { - std::basic_string from(L"some text"); - from[4] = '\0'; - std::vector to(from.size()+1); - std::mbstate_t mbs; - const F::intern_type* from_next = 0; - char* to_next = 0; - F::result r = f.out(mbs, from.data(), from.data() + from.size(), from_next, - to.data(), to.data() + to.size(), to_next); - assert(r == F::ok); - assert(from_next - from.data() == from.size()); - assert(to_next - to.data() == from.size()); - assert(to.data() == std::string("some\0text", from.size())); - } - { - std::basic_string from(L"some text"); - std::vector to(from.size()-1); - std::mbstate_t mbs; - const F::intern_type* from_next = 0; - char* to_next = 0; - F::result r = f.out(mbs, from.data(), from.data() + from.size(), from_next, - to.data(), to.data() + to.size()-1, to_next); - assert(r == F::partial); - assert(from_next - from.data() == to.size()-1); - assert(to_next - to.data() == to.size()-1); - assert(to.data() == std::string("some te")); - } -} diff --git a/test/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/wchar_t_unshift.xfail.pass.cpp b/test/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/wchar_t_unshift.xfail.pass.cpp deleted file mode 100644 index 4d8895cf..00000000 --- a/test/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/wchar_t_unshift.xfail.pass.cpp +++ /dev/null @@ -1,35 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template <> class codecvt - -// result unshift(stateT& state, -// externT* to, externT* to_end, externT*& to_next) const; - -// This is pretty much just an "are you breathing" test - -#include -#include -#include -#include - -typedef std::codecvt F; - -int main() -{ - std::locale l = std::locale::classic(); - std::vector to(3); - const F& f = std::use_facet(l); - std::mbstate_t mbs = {0}; - F::extern_type* to_next = 0; - assert(f.unshift(mbs, to.data(), to.data() + to.size(), to_next) == F::ok); - assert(to_next == to.data()); -} diff --git a/test/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.virtuals/tested_elsewhere.pass.cpp b/test/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.virtuals/tested_elsewhere.pass.cpp deleted file mode 100644 index b58f5c55..00000000 --- a/test/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.virtuals/tested_elsewhere.pass.cpp +++ /dev/null @@ -1,12 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -int main() -{ -} diff --git a/test/localization/locale.categories/category.ctype/locale.codecvt/types_char.pass.cpp b/test/localization/locale.categories/category.ctype/locale.codecvt/types_char.pass.cpp deleted file mode 100644 index 5e2c44ff..00000000 --- a/test/localization/locale.categories/category.ctype/locale.codecvt/types_char.pass.cpp +++ /dev/null @@ -1,40 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template <> -// class codecvt -// : public locale::facet, -// public codecvt_base -// { -// public: -// typedef char intern_type; -// typedef char extern_type; -// typedef mbstate_t state_type; -// ... -// }; - -#include -#include -#include - -int main() -{ - typedef std::codecvt F; - static_assert((std::is_base_of::value), ""); - static_assert((std::is_base_of::value), ""); - static_assert((std::is_same::value), ""); - static_assert((std::is_same::value), ""); - static_assert((std::is_same::value), ""); - std::locale l = std::locale::classic(); - assert(std::has_facet(l)); - const F& f = std::use_facet(l); - (void)F::id; -} diff --git a/test/localization/locale.categories/category.ctype/locale.codecvt/types_char16_t.pass.cpp b/test/localization/locale.categories/category.ctype/locale.codecvt/types_char16_t.pass.cpp deleted file mode 100644 index 9d512bd9..00000000 --- a/test/localization/locale.categories/category.ctype/locale.codecvt/types_char16_t.pass.cpp +++ /dev/null @@ -1,42 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template <> -// class codecvt -// : public locale::facet, -// public codecvt_base -// { -// public: -// typedef char16_t intern_type; -// typedef char extern_type; -// typedef mbstate_t state_type; -// ... -// }; - -#include -#include -#include - -int main() -{ -//#ifndef _LIBCPP_HAS_NO_UNICODE_CHARS - typedef std::codecvt F; - static_assert((std::is_base_of::value), ""); - static_assert((std::is_base_of::value), ""); - static_assert((std::is_same::value), ""); - static_assert((std::is_same::value), ""); - static_assert((std::is_same::value), ""); - std::locale l = std::locale::classic(); - assert(std::has_facet(l)); - const F& f = std::use_facet(l); - (void)F::id; -//#endif -} diff --git a/test/localization/locale.categories/category.ctype/locale.codecvt/types_char32_t.pass.cpp b/test/localization/locale.categories/category.ctype/locale.codecvt/types_char32_t.pass.cpp deleted file mode 100644 index 25f2b3d8..00000000 --- a/test/localization/locale.categories/category.ctype/locale.codecvt/types_char32_t.pass.cpp +++ /dev/null @@ -1,42 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template <> -// class codecvt -// : public locale::facet, -// public codecvt_base -// { -// public: -// typedef char32_t intern_type; -// typedef char extern_type; -// typedef mbstate_t state_type; -// ... -// }; - -#include -#include -#include - -int main() -{ -//#ifndef _LIBCPP_HAS_NO_UNICODE_CHARS - typedef std::codecvt F; - static_assert((std::is_base_of::value), ""); - static_assert((std::is_base_of::value), ""); - static_assert((std::is_same::value), ""); - static_assert((std::is_same::value), ""); - static_assert((std::is_same::value), ""); - std::locale l = std::locale::classic(); - assert(std::has_facet(l)); - const F& f = std::use_facet(l); - (void)F::id; -//#endif -} diff --git a/test/localization/locale.categories/category.ctype/locale.codecvt/types_wchar_t.pass.cpp b/test/localization/locale.categories/category.ctype/locale.codecvt/types_wchar_t.pass.cpp deleted file mode 100644 index 8b6868ec..00000000 --- a/test/localization/locale.categories/category.ctype/locale.codecvt/types_wchar_t.pass.cpp +++ /dev/null @@ -1,40 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template <> -// class codecvt -// : public locale::facet, -// public codecvt_base -// { -// public: -// typedef wchar_t intern_type; -// typedef char extern_type; -// typedef mbstate_t state_type; -// ... -// }; - -#include -#include -#include - -int main() -{ - typedef std::codecvt F; - static_assert((std::is_base_of::value), ""); - static_assert((std::is_base_of::value), ""); - static_assert((std::is_same::value), ""); - static_assert((std::is_same::value), ""); - static_assert((std::is_same::value), ""); - std::locale l = std::locale::classic(); - assert(std::has_facet(l)); - const F& f = std::use_facet(l); - (void)F::id; -} diff --git a/test/localization/locale.categories/category.ctype/locale.ctype.byname/is_1.xfail.pass.cpp b/test/localization/locale.categories/category.ctype/locale.ctype.byname/is_1.xfail.pass.cpp deleted file mode 100644 index baaf76f9..00000000 --- a/test/localization/locale.categories/category.ctype/locale.ctype.byname/is_1.xfail.pass.cpp +++ /dev/null @@ -1,108 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template class ctype_byname; - -// bool is(mask m, charT c) const; - -#include -#include -#include - -int main() -{ - { - std::locale l("en_US"); - { - typedef std::ctype F; - const F& f = std::use_facet(l); - - assert(f.is(F::space, L' ')); - assert(!f.is(F::space, L'A')); - - assert(f.is(F::print, L' ')); - assert(!f.is(F::print, L'\x07')); - - assert(f.is(F::cntrl, L'\x07')); - assert(!f.is(F::cntrl, L' ')); - - assert(f.is(F::upper, L'A')); - assert(!f.is(F::upper, L'a')); - - assert(f.is(F::lower, L'a')); - assert(!f.is(F::lower, L'A')); - - assert(f.is(F::alpha, L'a')); - assert(!f.is(F::alpha, L'1')); - - assert(f.is(F::digit, L'1')); - assert(!f.is(F::digit, L'a')); - - assert(f.is(F::punct, L'.')); - assert(!f.is(F::punct, L'a')); - - assert(f.is(F::xdigit, L'a')); - assert(!f.is(F::xdigit, L'g')); - - assert(f.is(F::alnum, L'a')); - assert(!f.is(F::alnum, L'.')); - - assert(f.is(F::graph, L'.')); - assert(!f.is(F::graph, L'\x07')); - - assert(f.is(F::alpha, L'\x00DA')); - assert(f.is(F::upper, L'\x00DA')); - } - } - { - std::locale l("C"); - { - typedef std::ctype F; - const F& f = std::use_facet(l); - - assert(f.is(F::space, L' ')); - assert(!f.is(F::space, L'A')); - - assert(f.is(F::print, L' ')); - assert(!f.is(F::print, L'\x07')); - - assert(f.is(F::cntrl, L'\x07')); - assert(!f.is(F::cntrl, L' ')); - - assert(f.is(F::upper, L'A')); - assert(!f.is(F::upper, L'a')); - - assert(f.is(F::lower, L'a')); - assert(!f.is(F::lower, L'A')); - - assert(f.is(F::alpha, L'a')); - assert(!f.is(F::alpha, L'1')); - - assert(f.is(F::digit, L'1')); - assert(!f.is(F::digit, L'a')); - - assert(f.is(F::punct, L'.')); - assert(!f.is(F::punct, L'a')); - - assert(f.is(F::xdigit, L'a')); - assert(!f.is(F::xdigit, L'g')); - - assert(f.is(F::alnum, L'a')); - assert(!f.is(F::alnum, L'.')); - - assert(f.is(F::graph, L'.')); - assert(!f.is(F::graph, L'\x07')); - - assert(!f.is(F::alpha, L'\x00DA')); - assert(!f.is(F::upper, L'\x00DA')); - } - } -} diff --git a/test/localization/locale.categories/category.ctype/locale.ctype.byname/is_many.xfail.pass.cpp b/test/localization/locale.categories/category.ctype/locale.ctype.byname/is_many.xfail.pass.cpp deleted file mode 100644 index 96324049..00000000 --- a/test/localization/locale.categories/category.ctype/locale.ctype.byname/is_many.xfail.pass.cpp +++ /dev/null @@ -1,243 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template class ctype_byname; - -// const charT* do_is(const charT* low, const charT* high, mask* vec) const; - -#include -#include -#include -#include - -#include - -int main() -{ - { - std::locale l("en_US"); - { - typedef std::ctype F; - const F& f = std::use_facet(l); - const std::wstring in(L"\x00DA A\x07.a1"); - std::vector m(in.size()); - const wchar_t* h = f.is(in.data(), in.data() + in.size(), m.data()); - assert(h == in.data() + in.size()); - - // L'\x00DA' - assert(!(m[0] & F::space)); - assert( (m[0] & F::print)); - assert(!(m[0] & F::cntrl)); - assert( (m[0] & F::upper)); - assert(!(m[0] & F::lower)); - assert( (m[0] & F::alpha)); - assert(!(m[0] & F::digit)); - assert(!(m[0] & F::punct)); - assert(!(m[0] & F::xdigit)); - assert(!(m[0] & F::blank)); - assert( (m[0] & F::alnum)); - assert( (m[0] & F::graph)); - - // L' ' - assert( (m[1] & F::space)); - assert( (m[1] & F::print)); - assert(!(m[1] & F::cntrl)); - assert(!(m[1] & F::upper)); - assert(!(m[1] & F::lower)); - assert(!(m[1] & F::alpha)); - assert(!(m[1] & F::digit)); - assert(!(m[1] & F::punct)); - assert(!(m[1] & F::xdigit)); - assert( (m[1] & F::blank)); - assert(!(m[1] & F::alnum)); - assert(!(m[1] & F::graph)); - - // L'A' - assert(!(m[2] & F::space)); - assert( (m[2] & F::print)); - assert(!(m[2] & F::cntrl)); - assert( (m[2] & F::upper)); - assert(!(m[2] & F::lower)); - assert( (m[2] & F::alpha)); - assert(!(m[2] & F::digit)); - assert(!(m[2] & F::punct)); - assert( (m[2] & F::xdigit)); - assert(!(m[2] & F::blank)); - assert( (m[2] & F::alnum)); - assert( (m[2] & F::graph)); - - // L'\x07' - assert(!(m[3] & F::space)); - assert(!(m[3] & F::print)); - assert( (m[3] & F::cntrl)); - assert(!(m[3] & F::upper)); - assert(!(m[3] & F::lower)); - assert(!(m[3] & F::alpha)); - assert(!(m[3] & F::digit)); - assert(!(m[3] & F::punct)); - assert(!(m[3] & F::xdigit)); - assert(!(m[3] & F::blank)); - assert(!(m[3] & F::alnum)); - assert(!(m[3] & F::graph)); - - // L'.' - assert(!(m[4] & F::space)); - assert( (m[4] & F::print)); - assert(!(m[4] & F::cntrl)); - assert(!(m[4] & F::upper)); - assert(!(m[4] & F::lower)); - assert(!(m[4] & F::alpha)); - assert(!(m[4] & F::digit)); - assert( (m[4] & F::punct)); - assert(!(m[4] & F::xdigit)); - assert(!(m[4] & F::blank)); - assert(!(m[4] & F::alnum)); - assert( (m[4] & F::graph)); - - // L'a' - assert(!(m[5] & F::space)); - assert( (m[5] & F::print)); - assert(!(m[5] & F::cntrl)); - assert(!(m[5] & F::upper)); - assert( (m[5] & F::lower)); - assert( (m[5] & F::alpha)); - assert(!(m[5] & F::digit)); - assert(!(m[5] & F::punct)); - assert( (m[5] & F::xdigit)); - assert(!(m[5] & F::blank)); - assert( (m[5] & F::alnum)); - assert( (m[5] & F::graph)); - - // L'1' - assert(!(m[6] & F::space)); - assert( (m[6] & F::print)); - assert(!(m[6] & F::cntrl)); - assert(!(m[6] & F::upper)); - assert(!(m[6] & F::lower)); - assert(!(m[6] & F::alpha)); - assert( (m[6] & F::digit)); - assert(!(m[6] & F::punct)); - assert( (m[6] & F::xdigit)); - assert(!(m[6] & F::blank)); - assert( (m[6] & F::alnum)); - assert( (m[6] & F::graph)); - } - } - { - std::locale l("C"); - { - typedef std::ctype F; - const F& f = std::use_facet(l); - const std::wstring in(L"\x00DA A\x07.a1"); - std::vector m(in.size()); - const wchar_t* h = f.is(in.data(), in.data() + in.size(), m.data()); - assert(h == in.data() + in.size()); - - // L'\x00DA' - assert(!(m[0] & F::space)); - assert(!(m[0] & F::print)); - assert(!(m[0] & F::cntrl)); - assert(!(m[0] & F::upper)); - assert(!(m[0] & F::lower)); - assert(!(m[0] & F::alpha)); - assert(!(m[0] & F::digit)); - assert(!(m[0] & F::punct)); - assert(!(m[0] & F::xdigit)); - assert(!(m[0] & F::blank)); - assert(!(m[0] & F::alnum)); - assert(!(m[0] & F::graph)); - - // L' ' - assert( (m[1] & F::space)); - assert( (m[1] & F::print)); - assert(!(m[1] & F::cntrl)); - assert(!(m[1] & F::upper)); - assert(!(m[1] & F::lower)); - assert(!(m[1] & F::alpha)); - assert(!(m[1] & F::digit)); - assert(!(m[1] & F::punct)); - assert(!(m[1] & F::xdigit)); - assert( (m[1] & F::blank)); - assert(!(m[1] & F::alnum)); - assert(!(m[1] & F::graph)); - - // L'A' - assert(!(m[2] & F::space)); - assert( (m[2] & F::print)); - assert(!(m[2] & F::cntrl)); - assert( (m[2] & F::upper)); - assert(!(m[2] & F::lower)); - assert( (m[2] & F::alpha)); - assert(!(m[2] & F::digit)); - assert(!(m[2] & F::punct)); - assert( (m[2] & F::xdigit)); - assert(!(m[2] & F::blank)); - assert( (m[2] & F::alnum)); - assert( (m[2] & F::graph)); - - // L'\x07' - assert(!(m[3] & F::space)); - assert(!(m[3] & F::print)); - assert( (m[3] & F::cntrl)); - assert(!(m[3] & F::upper)); - assert(!(m[3] & F::lower)); - assert(!(m[3] & F::alpha)); - assert(!(m[3] & F::digit)); - assert(!(m[3] & F::punct)); - assert(!(m[3] & F::xdigit)); - assert(!(m[3] & F::blank)); - assert(!(m[3] & F::alnum)); - assert(!(m[3] & F::graph)); - - // L'.' - assert(!(m[4] & F::space)); - assert( (m[4] & F::print)); - assert(!(m[4] & F::cntrl)); - assert(!(m[4] & F::upper)); - assert(!(m[4] & F::lower)); - assert(!(m[4] & F::alpha)); - assert(!(m[4] & F::digit)); - assert( (m[4] & F::punct)); - assert(!(m[4] & F::xdigit)); - assert(!(m[4] & F::blank)); - assert(!(m[4] & F::alnum)); - assert( (m[4] & F::graph)); - - // L'a' - assert(!(m[5] & F::space)); - assert( (m[5] & F::print)); - assert(!(m[5] & F::cntrl)); - assert(!(m[5] & F::upper)); - assert( (m[5] & F::lower)); - assert( (m[5] & F::alpha)); - assert(!(m[5] & F::digit)); - assert(!(m[5] & F::punct)); - assert( (m[5] & F::xdigit)); - assert(!(m[5] & F::blank)); - assert( (m[5] & F::alnum)); - assert( (m[5] & F::graph)); - - // L'1' - assert(!(m[6] & F::space)); - assert( (m[6] & F::print)); - assert(!(m[6] & F::cntrl)); - assert(!(m[6] & F::upper)); - assert(!(m[6] & F::lower)); - assert(!(m[6] & F::alpha)); - assert( (m[6] & F::digit)); - assert(!(m[6] & F::punct)); - assert( (m[6] & F::xdigit)); - assert(!(m[6] & F::blank)); - assert( (m[6] & F::alnum)); - assert( (m[6] & F::graph)); - } - } -} diff --git a/test/localization/locale.categories/category.ctype/locale.ctype.byname/narrow_1.xfail.pass.cpp b/test/localization/locale.categories/category.ctype/locale.ctype.byname/narrow_1.xfail.pass.cpp deleted file mode 100644 index 12c88119..00000000 --- a/test/localization/locale.categories/category.ctype/locale.ctype.byname/narrow_1.xfail.pass.cpp +++ /dev/null @@ -1,51 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template class ctype_byname; - -// char narrow(charT c, char dfault) const; - -#include -#include - -int main() -{ - { - std::locale l(std::string("fr_CA.ISO8859-1")); - { - typedef std::ctype F; - const F& f = std::use_facet(l); - - assert(f.narrow(L' ', '*') == ' '); - assert(f.narrow(L'A', '*') == 'A'); - assert(f.narrow(L'\x07', '*') == '\x07'); - assert(f.narrow(L'.', '*') == '.'); - assert(f.narrow(L'a', '*') == 'a'); - assert(f.narrow(L'1', '*') == '1'); - assert(f.narrow(L'\xDA', '*') == '\xDA'); - } - } - { - std::locale l("en_US"); - { - typedef std::ctype F; - const F& f = std::use_facet(l); - - assert(f.narrow(L' ', '*') == ' '); - assert(f.narrow(L'A', '*') == 'A'); - assert(f.narrow(L'\x07', '*') == '\x07'); - assert(f.narrow(L'.', '*') == '.'); - assert(f.narrow(L'a', '*') == 'a'); - assert(f.narrow(L'1', '*') == '1'); - assert(f.narrow(L'\xDA', '*') == '*'); - } - } -} diff --git a/test/localization/locale.categories/category.ctype/locale.ctype.byname/narrow_many.xfail.pass.cpp b/test/localization/locale.categories/category.ctype/locale.ctype.byname/narrow_many.xfail.pass.cpp deleted file mode 100644 index fc6d9fea..00000000 --- a/test/localization/locale.categories/category.ctype/locale.ctype.byname/narrow_many.xfail.pass.cpp +++ /dev/null @@ -1,59 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template class ctype_byname; - -// const charT* narrow(const charT* low, const charT*, char dfault, char* to) const; - -#include -#include -#include -#include - -int main() -{ - { - std::locale l("fr_CA.ISO8859-1"); - { - typedef std::ctype F; - const F& f = std::use_facet(l); - std::wstring in(L" A\x07.a1\xDA"); - std::vector v(in.size()); - - assert(f.narrow(&in[0], in.data() + in.size(), '*', v.data()) == in.data() + in.size()); - assert(v[0] == ' '); - assert(v[1] == 'A'); - assert(v[2] == '\x07'); - assert(v[3] == '.'); - assert(v[4] == 'a'); - assert(v[5] == '1'); - assert(v[6] == '\xDA'); - } - } - { - std::locale l("en_US"); - { - typedef std::ctype F; - const F& f = std::use_facet(l); - std::wstring in(L" A\x07.a1\xDA"); - std::vector v(in.size()); - - assert(f.narrow(&in[0], in.data() + in.size(), '*', v.data()) == in.data() + in.size()); - assert(v[0] == ' '); - assert(v[1] == 'A'); - assert(v[2] == '\x07'); - assert(v[3] == '.'); - assert(v[4] == 'a'); - assert(v[5] == '1'); - assert(v[6] == '*'); - } - } -} diff --git a/test/localization/locale.categories/category.ctype/locale.ctype.byname/scan_is.xfail.pass.cpp b/test/localization/locale.categories/category.ctype/locale.ctype.byname/scan_is.xfail.pass.cpp deleted file mode 100644 index 1f475073..00000000 --- a/test/localization/locale.categories/category.ctype/locale.ctype.byname/scan_is.xfail.pass.cpp +++ /dev/null @@ -1,67 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template class ctype_byname; - -// const charT* scan_is(mask m, const charT* low, const charT* high) const; - -#include -#include -#include -#include - -#include - -int main() -{ - { - std::locale l("en_US"); - { - typedef std::ctype F; - const F& f = std::use_facet(l); - const std::wstring in(L"\x00DA A\x07.a1"); - std::vector m(in.size()); - assert(f.scan_is(F::space, in.data(), in.data() + in.size()) - in.data() == 1); - assert(f.scan_is(F::print, in.data(), in.data() + in.size()) - in.data() == 0); - assert(f.scan_is(F::cntrl, in.data(), in.data() + in.size()) - in.data() == 3); - assert(f.scan_is(F::upper, in.data(), in.data() + in.size()) - in.data() == 0); - assert(f.scan_is(F::lower, in.data(), in.data() + in.size()) - in.data() == 5); - assert(f.scan_is(F::alpha, in.data(), in.data() + in.size()) - in.data() == 0); - assert(f.scan_is(F::digit, in.data(), in.data() + in.size()) - in.data() == 6); - assert(f.scan_is(F::punct, in.data(), in.data() + in.size()) - in.data() == 4); - assert(f.scan_is(F::xdigit, in.data(), in.data() + in.size()) - in.data() == 2); - assert(f.scan_is(F::blank, in.data(), in.data() + in.size()) - in.data() == 1); - assert(f.scan_is(F::alnum, in.data(), in.data() + in.size()) - in.data() == 0); - assert(f.scan_is(F::graph, in.data(), in.data() + in.size()) - in.data() == 0); - } - } - { - std::locale l("C"); - { - typedef std::ctype F; - const F& f = std::use_facet(l); - const std::wstring in(L"\x00DA A\x07.a1"); - std::vector m(in.size()); - assert(f.scan_is(F::space, in.data(), in.data() + in.size()) - in.data() == 1); - assert(f.scan_is(F::print, in.data(), in.data() + in.size()) - in.data() == 1); - assert(f.scan_is(F::cntrl, in.data(), in.data() + in.size()) - in.data() == 3); - assert(f.scan_is(F::upper, in.data(), in.data() + in.size()) - in.data() == 2); - assert(f.scan_is(F::lower, in.data(), in.data() + in.size()) - in.data() == 5); - assert(f.scan_is(F::alpha, in.data(), in.data() + in.size()) - in.data() == 2); - assert(f.scan_is(F::digit, in.data(), in.data() + in.size()) - in.data() == 6); - assert(f.scan_is(F::punct, in.data(), in.data() + in.size()) - in.data() == 4); - assert(f.scan_is(F::xdigit, in.data(), in.data() + in.size()) - in.data() == 2); - assert(f.scan_is(F::blank, in.data(), in.data() + in.size()) - in.data() == 1); - assert(f.scan_is(F::alnum, in.data(), in.data() + in.size()) - in.data() == 2); - assert(f.scan_is(F::graph, in.data(), in.data() + in.size()) - in.data() == 2); - } - } -} diff --git a/test/localization/locale.categories/category.ctype/locale.ctype.byname/scan_not.xfail.pass.cpp b/test/localization/locale.categories/category.ctype/locale.ctype.byname/scan_not.xfail.pass.cpp deleted file mode 100644 index 9c4cf9d8..00000000 --- a/test/localization/locale.categories/category.ctype/locale.ctype.byname/scan_not.xfail.pass.cpp +++ /dev/null @@ -1,67 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template class ctype_byname; - -// const charT* scan_not(mask m, const charT* low, const charT* high) const; - -#include -#include -#include -#include - -#include - -int main() -{ - { - std::locale l("en_US"); - { - typedef std::ctype F; - const F& f = std::use_facet(l); - const std::wstring in(L"\x00DA A\x07.a1"); - std::vector m(in.size()); - assert(f.scan_not(F::space, in.data(), in.data() + in.size()) - in.data() == 0); - assert(f.scan_not(F::print, in.data(), in.data() + in.size()) - in.data() == 3); - assert(f.scan_not(F::cntrl, in.data(), in.data() + in.size()) - in.data() == 0); - assert(f.scan_not(F::upper, in.data(), in.data() + in.size()) - in.data() == 1); - assert(f.scan_not(F::lower, in.data(), in.data() + in.size()) - in.data() == 0); - assert(f.scan_not(F::alpha, in.data(), in.data() + in.size()) - in.data() == 1); - assert(f.scan_not(F::digit, in.data(), in.data() + in.size()) - in.data() == 0); - assert(f.scan_not(F::punct, in.data(), in.data() + in.size()) - in.data() == 0); - assert(f.scan_not(F::xdigit, in.data(), in.data() + in.size()) - in.data() == 0); - assert(f.scan_not(F::blank, in.data(), in.data() + in.size()) - in.data() == 0); - assert(f.scan_not(F::alnum, in.data(), in.data() + in.size()) - in.data() == 1); - assert(f.scan_not(F::graph, in.data(), in.data() + in.size()) - in.data() == 1); - } - } - { - std::locale l("C"); - { - typedef std::ctype F; - const F& f = std::use_facet(l); - const std::wstring in(L"\x00DA A\x07.a1"); - std::vector m(in.size()); - assert(f.scan_not(F::space, in.data(), in.data() + in.size()) - in.data() == 0); - assert(f.scan_not(F::print, in.data(), in.data() + in.size()) - in.data() == 0); - assert(f.scan_not(F::cntrl, in.data(), in.data() + in.size()) - in.data() == 0); - assert(f.scan_not(F::upper, in.data(), in.data() + in.size()) - in.data() == 0); - assert(f.scan_not(F::lower, in.data(), in.data() + in.size()) - in.data() == 0); - assert(f.scan_not(F::alpha, in.data(), in.data() + in.size()) - in.data() == 0); - assert(f.scan_not(F::digit, in.data(), in.data() + in.size()) - in.data() == 0); - assert(f.scan_not(F::punct, in.data(), in.data() + in.size()) - in.data() == 0); - assert(f.scan_not(F::xdigit, in.data(), in.data() + in.size()) - in.data() == 0); - assert(f.scan_not(F::blank, in.data(), in.data() + in.size()) - in.data() == 0); - assert(f.scan_not(F::alnum, in.data(), in.data() + in.size()) - in.data() == 0); - assert(f.scan_not(F::graph, in.data(), in.data() + in.size()) - in.data() == 0); - } - } -} diff --git a/test/localization/locale.categories/category.ctype/locale.ctype.byname/tolower_1.xfail.pass.cpp b/test/localization/locale.categories/category.ctype/locale.ctype.byname/tolower_1.xfail.pass.cpp deleted file mode 100644 index a4505b52..00000000 --- a/test/localization/locale.categories/category.ctype/locale.ctype.byname/tolower_1.xfail.pass.cpp +++ /dev/null @@ -1,85 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template class ctype_byname; - -// charT tolower(charT) const; - -#include -#include - -int main() -{ - { - std::locale l("en_US"); - { - typedef std::ctype F; - const F& f = std::use_facet(l); - - assert(f.tolower(' ') == ' '); - assert(f.tolower('A') == 'a'); - assert(f.tolower('\x07') == '\x07'); - assert(f.tolower('.') == '.'); - assert(f.tolower('a') == 'a'); - assert(f.tolower('1') == '1'); - assert(f.tolower('\xDA') == '\xDA'); - assert(f.tolower('\xFA') == '\xFA'); - } - } - { - std::locale l("C"); - { - typedef std::ctype F; - const F& f = std::use_facet(l); - - assert(f.tolower(' ') == ' '); - assert(f.tolower('A') == 'a'); - assert(f.tolower('\x07') == '\x07'); - assert(f.tolower('.') == '.'); - assert(f.tolower('a') == 'a'); - assert(f.tolower('1') == '1'); - assert(f.tolower('\xDA') == '\xDA'); - assert(f.tolower('\xFA') == '\xFA'); - } - } - { - std::locale l("en_US"); - { - typedef std::ctype F; - const F& f = std::use_facet(l); - - assert(f.tolower(L' ') == L' '); - assert(f.tolower(L'A') == L'a'); - assert(f.tolower(L'\x07') == L'\x07'); - assert(f.tolower(L'.') == L'.'); - assert(f.tolower(L'a') == L'a'); - assert(f.tolower(L'1') == L'1'); - assert(f.tolower(L'\xDA') == L'\xFA'); - assert(f.tolower(L'\xFA') == L'\xFA'); - } - } - { - std::locale l("C"); - { - typedef std::ctype F; - const F& f = std::use_facet(l); - - assert(f.tolower(L' ') == L' '); - assert(f.tolower(L'A') == L'a'); - assert(f.tolower(L'\x07') == L'\x07'); - assert(f.tolower(L'.') == L'.'); - assert(f.tolower(L'a') == L'a'); - assert(f.tolower(L'1') == L'1'); - assert(f.tolower(L'\xDA') == L'\xDA'); - assert(f.tolower(L'\xFA') == L'\xFA'); - } - } -} diff --git a/test/localization/locale.categories/category.ctype/locale.ctype.byname/tolower_many.xfail.pass.cpp b/test/localization/locale.categories/category.ctype/locale.ctype.byname/tolower_many.xfail.pass.cpp deleted file mode 100644 index 99f2830d..00000000 --- a/test/localization/locale.categories/category.ctype/locale.ctype.byname/tolower_many.xfail.pass.cpp +++ /dev/null @@ -1,90 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template class ctype_byname; - -// const charT* tolower(charT* low, const charT* high) const; - -#include -#include -#include - -int main() -{ - { - std::locale l("en_US"); - { - typedef std::ctype F; - const F& f = std::use_facet(l); - std::string in("\xDA A\x07.a1"); - - assert(f.tolower(&in[0], in.data() + in.size()) == in.data() + in.size()); - assert(in[0] == '\xDA'); - assert(in[1] == ' '); - assert(in[2] == 'a'); - assert(in[3] == '\x07'); - assert(in[4] == '.'); - assert(in[5] == 'a'); - assert(in[6] == '1'); - } - } - { - std::locale l("C"); - { - typedef std::ctype F; - const F& f = std::use_facet(l); - std::string in("\xDA A\x07.a1"); - - assert(f.tolower(&in[0], in.data() + in.size()) == in.data() + in.size()); - assert(in[0] == '\xDA'); - assert(in[1] == ' '); - assert(in[2] == 'a'); - assert(in[3] == '\x07'); - assert(in[4] == '.'); - assert(in[5] == 'a'); - assert(in[6] == '1'); - } - } - { - std::locale l("en_US"); - { - typedef std::ctype F; - const F& f = std::use_facet(l); - std::wstring in(L"\xDA A\x07.a1"); - - assert(f.tolower(&in[0], in.data() + in.size()) == in.data() + in.size()); - assert(in[0] == L'\xFA'); - assert(in[1] == L' '); - assert(in[2] == L'a'); - assert(in[3] == L'\x07'); - assert(in[4] == L'.'); - assert(in[5] == L'a'); - assert(in[6] == L'1'); - } - } - { - std::locale l("C"); - { - typedef std::ctype F; - const F& f = std::use_facet(l); - std::wstring in(L"\xDA A\x07.a1"); - - assert(f.tolower(&in[0], in.data() + in.size()) == in.data() + in.size()); - assert(in[0] == L'\xDA'); - assert(in[1] == L' '); - assert(in[2] == L'a'); - assert(in[3] == L'\x07'); - assert(in[4] == L'.'); - assert(in[5] == L'a'); - assert(in[6] == L'1'); - } - } -} diff --git a/test/localization/locale.categories/category.ctype/locale.ctype.byname/toupper_1.xfail.pass.cpp b/test/localization/locale.categories/category.ctype/locale.ctype.byname/toupper_1.xfail.pass.cpp deleted file mode 100644 index 3d6c4059..00000000 --- a/test/localization/locale.categories/category.ctype/locale.ctype.byname/toupper_1.xfail.pass.cpp +++ /dev/null @@ -1,85 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template class ctype_byname; - -// charT toupper(charT) const; - -#include -#include - -int main() -{ - { - std::locale l("en_US"); - { - typedef std::ctype F; - const F& f = std::use_facet(l); - - assert(f.toupper(' ') == ' '); - assert(f.toupper('A') == 'A'); - assert(f.toupper('\x07') == '\x07'); - assert(f.toupper('.') == '.'); - assert(f.toupper('a') == 'A'); - assert(f.toupper('1') == '1'); - assert(f.toupper('\xDA') == '\xDA'); - assert(f.toupper('\xFA') == '\xFA'); - } - } - { - std::locale l("C"); - { - typedef std::ctype F; - const F& f = std::use_facet(l); - - assert(f.toupper(' ') == ' '); - assert(f.toupper('A') == 'A'); - assert(f.toupper('\x07') == '\x07'); - assert(f.toupper('.') == '.'); - assert(f.toupper('a') == 'A'); - assert(f.toupper('1') == '1'); - assert(f.toupper('\xDA') == '\xDA'); - assert(f.toupper('\xFA') == '\xFA'); - } - } - { - std::locale l("en_US"); - { - typedef std::ctype F; - const F& f = std::use_facet(l); - - assert(f.toupper(L' ') == L' '); - assert(f.toupper(L'A') == L'A'); - assert(f.toupper(L'\x07') == L'\x07'); - assert(f.toupper(L'.') == L'.'); - assert(f.toupper(L'a') == L'A'); - assert(f.toupper(L'1') == L'1'); - assert(f.toupper(L'\xDA') == L'\xDA'); - assert(f.toupper(L'\xFA') == L'\xDA'); - } - } - { - std::locale l("C"); - { - typedef std::ctype F; - const F& f = std::use_facet(l); - - assert(f.toupper(L' ') == L' '); - assert(f.toupper(L'A') == L'A'); - assert(f.toupper(L'\x07') == L'\x07'); - assert(f.toupper(L'.') == L'.'); - assert(f.toupper(L'a') == L'A'); - assert(f.toupper(L'1') == L'1'); - assert(f.toupper(L'\xDA') == L'\xDA'); - assert(f.toupper(L'\xFA') == L'\xFA'); - } - } -} diff --git a/test/localization/locale.categories/category.ctype/locale.ctype.byname/toupper_many.xfail.pass.cpp b/test/localization/locale.categories/category.ctype/locale.ctype.byname/toupper_many.xfail.pass.cpp deleted file mode 100644 index 9ccc49c9..00000000 --- a/test/localization/locale.categories/category.ctype/locale.ctype.byname/toupper_many.xfail.pass.cpp +++ /dev/null @@ -1,90 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template class ctype_byname; - -// const charT* toupper(charT* low, const charT* high) const; - -#include -#include -#include - -int main() -{ - { - std::locale l("en_US"); - { - typedef std::ctype F; - const F& f = std::use_facet(l); - std::string in("\xFA A\x07.a1"); - - assert(f.toupper(&in[0], in.data() + in.size()) == in.data() + in.size()); - assert(in[0] == '\xFA'); - assert(in[1] == ' '); - assert(in[2] == 'A'); - assert(in[3] == '\x07'); - assert(in[4] == '.'); - assert(in[5] == 'A'); - assert(in[6] == '1'); - } - } - { - std::locale l("C"); - { - typedef std::ctype F; - const F& f = std::use_facet(l); - std::string in("\xFA A\x07.a1"); - - assert(f.toupper(&in[0], in.data() + in.size()) == in.data() + in.size()); - assert(in[0] == '\xFA'); - assert(in[1] == ' '); - assert(in[2] == 'A'); - assert(in[3] == '\x07'); - assert(in[4] == '.'); - assert(in[5] == 'A'); - assert(in[6] == '1'); - } - } - { - std::locale l("en_US"); - { - typedef std::ctype F; - const F& f = std::use_facet(l); - std::wstring in(L"\xFA A\x07.a1"); - - assert(f.toupper(&in[0], in.data() + in.size()) == in.data() + in.size()); - assert(in[0] == L'\xDA'); - assert(in[1] == L' '); - assert(in[2] == L'A'); - assert(in[3] == L'\x07'); - assert(in[4] == L'.'); - assert(in[5] == L'A'); - assert(in[6] == L'1'); - } - } - { - std::locale l("C"); - { - typedef std::ctype F; - const F& f = std::use_facet(l); - std::wstring in(L"\xFA A\x07.a1"); - - assert(f.toupper(&in[0], in.data() + in.size()) == in.data() + in.size()); - assert(in[0] == L'\xFA'); - assert(in[1] == L' '); - assert(in[2] == L'A'); - assert(in[3] == L'\x07'); - assert(in[4] == L'.'); - assert(in[5] == L'A'); - assert(in[6] == L'1'); - } - } -} diff --git a/test/localization/locale.categories/category.ctype/locale.ctype.byname/types.xfail.pass.cpp b/test/localization/locale.categories/category.ctype/locale.ctype.byname/types.xfail.pass.cpp deleted file mode 100644 index 0f445ae0..00000000 --- a/test/localization/locale.categories/category.ctype/locale.ctype.byname/types.xfail.pass.cpp +++ /dev/null @@ -1,69 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template -// class ctype_byname -// : public ctype -// { -// public: -// explicit ctype_byname(const char*, size_t = 0); -// explicit ctype_byname(const string&, size_t = 0); -// -// protected: -// ~ctype_byname(); -// }; - -#include -#include -#include - -int main() -{ - { - std::locale l("en_US"); - { - assert(std::has_facet >(l)); - assert(&std::use_facet >(l) - == &std::use_facet >(l)); - } - { - assert(std::has_facet >(l)); - assert(&std::use_facet >(l) - == &std::use_facet >(l)); - } - } - { - std::locale l(""); - { - assert(std::has_facet >(l)); - assert(&std::use_facet >(l) - == &std::use_facet >(l)); - } - { - assert(std::has_facet >(l)); - assert(&std::use_facet >(l) - == &std::use_facet >(l)); - } - } - { - std::locale l("C"); - { - assert(std::has_facet >(l)); - assert(&std::use_facet >(l) - == &std::use_facet >(l)); - } - { - assert(std::has_facet >(l)); - assert(&std::use_facet >(l) - == &std::use_facet >(l)); - } - } -} diff --git a/test/localization/locale.categories/category.ctype/locale.ctype.byname/widen_1.xfail.pass.cpp b/test/localization/locale.categories/category.ctype/locale.ctype.byname/widen_1.xfail.pass.cpp deleted file mode 100644 index 5283c7e8..00000000 --- a/test/localization/locale.categories/category.ctype/locale.ctype.byname/widen_1.xfail.pass.cpp +++ /dev/null @@ -1,54 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template class ctype_byname; - -// charT widen(char c) const; - -// I doubt this test is portable - -#include -#include -#include - -int main() -{ - { - std::locale l("en_US"); - { - typedef std::ctype F; - const F& f = std::use_facet(l); - - assert(f.widen(' ') == L' '); - assert(f.widen('A') == L'A'); - assert(f.widen('\x07') == L'\x07'); - assert(f.widen('.') == L'.'); - assert(f.widen('a') == L'a'); - assert(f.widen('1') == L'1'); - assert(f.widen(char(-5)) == wchar_t(-1)); - } - } - { - std::locale l("C"); - { - typedef std::ctype F; - const F& f = std::use_facet(l); - - assert(f.widen(' ') == L' '); - assert(f.widen('A') == L'A'); - assert(f.widen('\x07') == L'\x07'); - assert(f.widen('.') == L'.'); - assert(f.widen('a') == L'a'); - assert(f.widen('1') == L'1'); - assert(f.widen(char(-5)) == wchar_t(251)); - } - } -} diff --git a/test/localization/locale.categories/category.ctype/locale.ctype.byname/widen_many.xfail.pass.cpp b/test/localization/locale.categories/category.ctype/locale.ctype.byname/widen_many.xfail.pass.cpp deleted file mode 100644 index 630e3f5b..00000000 --- a/test/localization/locale.categories/category.ctype/locale.ctype.byname/widen_many.xfail.pass.cpp +++ /dev/null @@ -1,61 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template class ctype_byname; - -// const char* widen(const char* low, const char* high, charT* to) const; - -// I doubt this test is portable - -#include -#include -#include -#include - -int main() -{ - { - std::locale l("en_US"); - { - typedef std::ctype F; - const F& f = std::use_facet(l); - std::string in(" A\x07.a1\x85"); - std::vector v(in.size()); - - assert(f.widen(&in[0], in.data() + in.size(), v.data()) == in.data() + in.size()); - assert(v[0] == L' '); - assert(v[1] == L'A'); - assert(v[2] == L'\x07'); - assert(v[3] == L'.'); - assert(v[4] == L'a'); - assert(v[5] == L'1'); - assert(v[6] == wchar_t(-1)); - } - } - { - std::locale l("C"); - { - typedef std::ctype F; - const F& f = std::use_facet(l); - std::string in(" A\x07.a1\x85"); - std::vector v(in.size()); - - assert(f.widen(&in[0], in.data() + in.size(), v.data()) == in.data() + in.size()); - assert(v[0] == L' '); - assert(v[1] == L'A'); - assert(v[2] == L'\x07'); - assert(v[3] == L'.'); - assert(v[4] == L'a'); - assert(v[5] == L'1'); - assert(v[6] == wchar_t(133)); - } - } -} diff --git a/test/localization/locale.categories/category.ctype/locale.ctype/ctor.pass.cpp b/test/localization/locale.categories/category.ctype/locale.ctype/ctor.pass.cpp deleted file mode 100644 index 7eb3cc89..00000000 --- a/test/localization/locale.categories/category.ctype/locale.ctype/ctor.pass.cpp +++ /dev/null @@ -1,51 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template class ctype; - -// explicit ctype(size_t refs = 0); - -#include -#include - -template -class my_facet - : public std::ctype -{ -public: - static int count; - - explicit my_facet(std::size_t refs = 0) - : std::ctype(refs) {++count;} - - ~my_facet() {--count;} -}; - -template int my_facet::count = 0; - -int main() -{ - { - std::locale l(std::locale::classic(), new my_facet); - assert(my_facet::count == 1); - } - assert(my_facet::count == 0); - { - my_facet f(1); - assert(my_facet::count == 1); - { - std::locale l(std::locale::classic(), &f); - assert(my_facet::count == 1); - } - assert(my_facet::count == 1); - } - assert(my_facet::count == 0); -} diff --git a/test/localization/locale.categories/category.ctype/locale.ctype/locale.ctype.members/is_1.xfail.pass.cpp b/test/localization/locale.categories/category.ctype/locale.ctype/locale.ctype.members/is_1.xfail.pass.cpp deleted file mode 100644 index fa82da96..00000000 --- a/test/localization/locale.categories/category.ctype/locale.ctype/locale.ctype.members/is_1.xfail.pass.cpp +++ /dev/null @@ -1,59 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template class ctype; - -// bool is(mask m, charT c) const; - -#include -#include - -int main() -{ - std::locale l = std::locale::classic(); - { - typedef std::ctype F; - const F& f = std::use_facet(l); - - assert(f.is(F::space, L' ')); - assert(!f.is(F::space, L'A')); - - assert(f.is(F::print, L' ')); - assert(!f.is(F::print, L'\x07')); - - assert(f.is(F::cntrl, L'\x07')); - assert(!f.is(F::cntrl, L' ')); - - assert(f.is(F::upper, L'A')); - assert(!f.is(F::upper, L'a')); - - assert(f.is(F::lower, L'a')); - assert(!f.is(F::lower, L'A')); - - assert(f.is(F::alpha, L'a')); - assert(!f.is(F::alpha, L'1')); - - assert(f.is(F::digit, L'1')); - assert(!f.is(F::digit, L'a')); - - assert(f.is(F::punct, L'.')); - assert(!f.is(F::punct, L'a')); - - assert(f.is(F::xdigit, L'a')); - assert(!f.is(F::xdigit, L'g')); - - assert(f.is(F::alnum, L'a')); - assert(!f.is(F::alnum, L'.')); - - assert(f.is(F::graph, L'.')); - assert(!f.is(F::graph, L'\x07')); - } -} diff --git a/test/localization/locale.categories/category.ctype/locale.ctype/locale.ctype.members/is_many.xfail.pass.cpp b/test/localization/locale.categories/category.ctype/locale.ctype/locale.ctype.members/is_many.xfail.pass.cpp deleted file mode 100644 index 7084245d..00000000 --- a/test/localization/locale.categories/category.ctype/locale.ctype/locale.ctype.members/is_many.xfail.pass.cpp +++ /dev/null @@ -1,118 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template class ctype; - -// const charT* do_is(const charT* low, const charT* high, mask* vec) const; - -#include -#include -#include -#include - -#include - -int main() -{ - std::locale l = std::locale::classic(); - { - typedef std::ctype F; - const F& f = std::use_facet(l); - const std::wstring in(L" A\x07.a1"); - std::vector m(in.size()); - const wchar_t* h = f.is(in.data(), in.data() + in.size(), m.data()); - assert(h == in.data() + in.size()); - - // L' ' - assert( (m[0] & F::space)); - assert( (m[0] & F::print)); - assert(!(m[0] & F::cntrl)); - assert(!(m[0] & F::upper)); - assert(!(m[0] & F::lower)); - assert(!(m[0] & F::alpha)); - assert(!(m[0] & F::digit)); - assert(!(m[0] & F::punct)); - assert(!(m[0] & F::xdigit)); - assert( (m[0] & F::blank)); - assert(!(m[0] & F::alnum)); - assert(!(m[0] & F::graph)); - - // L'A' - assert(!(m[1] & F::space)); - assert( (m[1] & F::print)); - assert(!(m[1] & F::cntrl)); - assert( (m[1] & F::upper)); - assert(!(m[1] & F::lower)); - assert( (m[1] & F::alpha)); - assert(!(m[1] & F::digit)); - assert(!(m[1] & F::punct)); - assert( (m[1] & F::xdigit)); - assert(!(m[1] & F::blank)); - assert( (m[1] & F::alnum)); - assert( (m[1] & F::graph)); - - // L'\x07' - assert(!(m[2] & F::space)); - assert(!(m[2] & F::print)); - assert( (m[2] & F::cntrl)); - assert(!(m[2] & F::upper)); - assert(!(m[2] & F::lower)); - assert(!(m[2] & F::alpha)); - assert(!(m[2] & F::digit)); - assert(!(m[2] & F::punct)); - assert(!(m[2] & F::xdigit)); - assert(!(m[2] & F::blank)); - assert(!(m[2] & F::alnum)); - assert(!(m[2] & F::graph)); - - // L'.' - assert(!(m[3] & F::space)); - assert( (m[3] & F::print)); - assert(!(m[3] & F::cntrl)); - assert(!(m[3] & F::upper)); - assert(!(m[3] & F::lower)); - assert(!(m[3] & F::alpha)); - assert(!(m[3] & F::digit)); - assert( (m[3] & F::punct)); - assert(!(m[3] & F::xdigit)); - assert(!(m[3] & F::blank)); - assert(!(m[3] & F::alnum)); - assert( (m[3] & F::graph)); - - // L'a' - assert(!(m[4] & F::space)); - assert( (m[4] & F::print)); - assert(!(m[4] & F::cntrl)); - assert(!(m[4] & F::upper)); - assert( (m[4] & F::lower)); - assert( (m[4] & F::alpha)); - assert(!(m[4] & F::digit)); - assert(!(m[4] & F::punct)); - assert( (m[4] & F::xdigit)); - assert(!(m[4] & F::blank)); - assert( (m[4] & F::alnum)); - assert( (m[4] & F::graph)); - - // L'1' - assert(!(m[5] & F::space)); - assert( (m[5] & F::print)); - assert(!(m[5] & F::cntrl)); - assert(!(m[5] & F::upper)); - assert(!(m[5] & F::lower)); - assert(!(m[5] & F::alpha)); - assert( (m[5] & F::digit)); - assert(!(m[5] & F::punct)); - assert( (m[5] & F::xdigit)); - assert(!(m[5] & F::blank)); - assert( (m[5] & F::alnum)); - assert( (m[5] & F::graph)); - } -} diff --git a/test/localization/locale.categories/category.ctype/locale.ctype/locale.ctype.members/narrow_1.pass.cpp b/test/localization/locale.categories/category.ctype/locale.ctype/locale.ctype.members/narrow_1.pass.cpp deleted file mode 100644 index ad8fb211..00000000 --- a/test/localization/locale.categories/category.ctype/locale.ctype/locale.ctype.members/narrow_1.pass.cpp +++ /dev/null @@ -1,33 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template class ctype; - -// char narrow(charT c, char dfault) const; - -#include -#include - -int main() -{ - std::locale l = std::locale::classic(); - { - typedef std::ctype F; - const F& f = std::use_facet(l); - - assert(f.narrow(L' ', '*') == ' '); - assert(f.narrow(L'A', '*') == 'A'); - assert(f.narrow(L'\x07', '*') == '\x07'); - assert(f.narrow(L'.', '*') == '.'); - assert(f.narrow(L'a', '*') == 'a'); - assert(f.narrow(L'1', '*') == '1'); - } -} diff --git a/test/localization/locale.categories/category.ctype/locale.ctype/locale.ctype.members/narrow_many.pass.cpp b/test/localization/locale.categories/category.ctype/locale.ctype/locale.ctype.members/narrow_many.pass.cpp deleted file mode 100644 index fcc6cfcc..00000000 --- a/test/localization/locale.categories/category.ctype/locale.ctype/locale.ctype.members/narrow_many.pass.cpp +++ /dev/null @@ -1,38 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template class ctype; - -// const charT* narrow(const charT* low, const charT*, char dfault, char* to) const; - -#include -#include -#include -#include - -int main() -{ - std::locale l = std::locale::classic(); - { - typedef std::ctype F; - const F& f = std::use_facet(l); - std::wstring in(L" A\x07.a1"); - std::vector v(in.size()); - - assert(f.narrow(&in[0], in.data() + in.size(), '*', v.data()) == in.data() + in.size()); - assert(v[0] == ' '); - assert(v[1] == 'A'); - assert(v[2] == '\x07'); - assert(v[3] == '.'); - assert(v[4] == 'a'); - assert(v[5] == '1'); - } -} diff --git a/test/localization/locale.categories/category.ctype/locale.ctype/locale.ctype.members/scan_is.xfail.pass.cpp b/test/localization/locale.categories/category.ctype/locale.ctype/locale.ctype.members/scan_is.xfail.pass.cpp deleted file mode 100644 index 535c8307..00000000 --- a/test/localization/locale.categories/category.ctype/locale.ctype/locale.ctype.members/scan_is.xfail.pass.cpp +++ /dev/null @@ -1,44 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template class ctype; - -// const charT* scan_is(mask m, const charT* low, const charT* high) const; - -#include -#include -#include -#include - -#include - -int main() -{ - std::locale l = std::locale::classic(); - { - typedef std::ctype F; - const F& f = std::use_facet(l); - const std::wstring in(L" A\x07.a1"); - std::vector m(in.size()); - assert(f.scan_is(F::space, in.data(), in.data() + in.size()) - in.data() == 0); - assert(f.scan_is(F::print, in.data(), in.data() + in.size()) - in.data() == 0); - assert(f.scan_is(F::cntrl, in.data(), in.data() + in.size()) - in.data() == 2); - assert(f.scan_is(F::upper, in.data(), in.data() + in.size()) - in.data() == 1); - assert(f.scan_is(F::lower, in.data(), in.data() + in.size()) - in.data() == 4); - assert(f.scan_is(F::alpha, in.data(), in.data() + in.size()) - in.data() == 1); - assert(f.scan_is(F::digit, in.data(), in.data() + in.size()) - in.data() == 5); - assert(f.scan_is(F::punct, in.data(), in.data() + in.size()) - in.data() == 3); - assert(f.scan_is(F::xdigit, in.data(), in.data() + in.size()) - in.data() == 1); - assert(f.scan_is(F::blank, in.data(), in.data() + in.size()) - in.data() == 0); - assert(f.scan_is(F::alnum, in.data(), in.data() + in.size()) - in.data() == 1); - assert(f.scan_is(F::graph, in.data(), in.data() + in.size()) - in.data() == 1); - } -} diff --git a/test/localization/locale.categories/category.ctype/locale.ctype/locale.ctype.members/scan_not.xfail.pass.cpp b/test/localization/locale.categories/category.ctype/locale.ctype/locale.ctype.members/scan_not.xfail.pass.cpp deleted file mode 100644 index da21642b..00000000 --- a/test/localization/locale.categories/category.ctype/locale.ctype/locale.ctype.members/scan_not.xfail.pass.cpp +++ /dev/null @@ -1,44 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template class ctype; - -// const charT* scan_not(mask m, const charT* low, const charT* high) const; - -#include -#include -#include -#include - -#include - -int main() -{ - std::locale l = std::locale::classic(); - { - typedef std::ctype F; - const F& f = std::use_facet(l); - const std::wstring in(L" A\x07.a1"); - std::vector m(in.size()); - assert(f.scan_not(F::space, in.data(), in.data() + in.size()) - in.data() == 1); - assert(f.scan_not(F::print, in.data(), in.data() + in.size()) - in.data() == 2); - assert(f.scan_not(F::cntrl, in.data(), in.data() + in.size()) - in.data() == 0); - assert(f.scan_not(F::upper, in.data(), in.data() + in.size()) - in.data() == 0); - assert(f.scan_not(F::lower, in.data(), in.data() + in.size()) - in.data() == 0); - assert(f.scan_not(F::alpha, in.data(), in.data() + in.size()) - in.data() == 0); - assert(f.scan_not(F::digit, in.data(), in.data() + in.size()) - in.data() == 0); - assert(f.scan_not(F::punct, in.data(), in.data() + in.size()) - in.data() == 0); - assert(f.scan_not(F::xdigit, in.data(), in.data() + in.size()) - in.data() == 0); - assert(f.scan_not(F::blank, in.data(), in.data() + in.size()) - in.data() == 1); - assert(f.scan_not(F::alnum, in.data(), in.data() + in.size()) - in.data() == 0); - assert(f.scan_not(F::graph, in.data(), in.data() + in.size()) - in.data() == 0); - } -} diff --git a/test/localization/locale.categories/category.ctype/locale.ctype/locale.ctype.members/tolower_1.xfail.pass.cpp b/test/localization/locale.categories/category.ctype/locale.ctype/locale.ctype.members/tolower_1.xfail.pass.cpp deleted file mode 100644 index 6e75ba48..00000000 --- a/test/localization/locale.categories/category.ctype/locale.ctype/locale.ctype.members/tolower_1.xfail.pass.cpp +++ /dev/null @@ -1,33 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template class ctype; - -// charT tolower(charT) const; - -#include -#include - -int main() -{ - std::locale l = std::locale::classic(); - { - typedef std::ctype F; - const F& f = std::use_facet(l); - - assert(f.tolower(L' ') == L' '); - assert(f.tolower(L'A') == L'a'); - assert(f.tolower(L'\x07') == L'\x07'); - assert(f.tolower(L'.') == L'.'); - assert(f.tolower(L'a') == L'a'); - assert(f.tolower(L'1') == L'1'); - } -} diff --git a/test/localization/locale.categories/category.ctype/locale.ctype/locale.ctype.members/tolower_many.xfail.pass.cpp b/test/localization/locale.categories/category.ctype/locale.ctype/locale.ctype.members/tolower_many.xfail.pass.cpp deleted file mode 100644 index 68daf8d8..00000000 --- a/test/localization/locale.categories/category.ctype/locale.ctype/locale.ctype.members/tolower_many.xfail.pass.cpp +++ /dev/null @@ -1,36 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template class ctype; - -// const charT* tolower(charT* low, const charT* high) const; - -#include -#include -#include - -int main() -{ - std::locale l = std::locale::classic(); - { - typedef std::ctype F; - const F& f = std::use_facet(l); - std::wstring in(L" A\x07.a1"); - - assert(f.tolower(&in[0], in.data() + in.size()) == in.data() + in.size()); - assert(in[0] == L' '); - assert(in[1] == L'a'); - assert(in[2] == L'\x07'); - assert(in[3] == L'.'); - assert(in[4] == L'a'); - assert(in[5] == L'1'); - } -} diff --git a/test/localization/locale.categories/category.ctype/locale.ctype/locale.ctype.members/toupper_1.xfail.pass.cpp b/test/localization/locale.categories/category.ctype/locale.ctype/locale.ctype.members/toupper_1.xfail.pass.cpp deleted file mode 100644 index 2a5acd17..00000000 --- a/test/localization/locale.categories/category.ctype/locale.ctype/locale.ctype.members/toupper_1.xfail.pass.cpp +++ /dev/null @@ -1,33 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template class ctype; - -// charT toupper(charT) const; - -#include -#include - -int main() -{ - std::locale l = std::locale::classic(); - { - typedef std::ctype F; - const F& f = std::use_facet(l); - - assert(f.toupper(L' ') == L' '); - assert(f.toupper(L'A') == L'A'); - assert(f.toupper(L'\x07') == L'\x07'); - assert(f.toupper(L'.') == L'.'); - assert(f.toupper(L'a') == L'A'); - assert(f.toupper(L'1') == L'1'); - } -} diff --git a/test/localization/locale.categories/category.ctype/locale.ctype/locale.ctype.members/toupper_many.xfail.pass.cpp b/test/localization/locale.categories/category.ctype/locale.ctype/locale.ctype.members/toupper_many.xfail.pass.cpp deleted file mode 100644 index f0a7ee3d..00000000 --- a/test/localization/locale.categories/category.ctype/locale.ctype/locale.ctype.members/toupper_many.xfail.pass.cpp +++ /dev/null @@ -1,36 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template class ctype; - -// const charT* toupper(charT* low, const charT* high) const; - -#include -#include -#include - -int main() -{ - std::locale l = std::locale::classic(); - { - typedef std::ctype F; - const F& f = std::use_facet(l); - std::wstring in(L" A\x07.a1"); - - assert(f.toupper(&in[0], in.data() + in.size()) == in.data() + in.size()); - assert(in[0] == L' '); - assert(in[1] == L'A'); - assert(in[2] == L'\x07'); - assert(in[3] == L'.'); - assert(in[4] == L'A'); - assert(in[5] == L'1'); - } -} diff --git a/test/localization/locale.categories/category.ctype/locale.ctype/locale.ctype.members/widen_1.pass.cpp b/test/localization/locale.categories/category.ctype/locale.ctype/locale.ctype.members/widen_1.pass.cpp deleted file mode 100644 index 2a8733c2..00000000 --- a/test/localization/locale.categories/category.ctype/locale.ctype/locale.ctype.members/widen_1.pass.cpp +++ /dev/null @@ -1,33 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template class ctype; - -// charT widen(char c) const; - -#include -#include - -int main() -{ - std::locale l = std::locale::classic(); - { - typedef std::ctype F; - const F& f = std::use_facet(l); - - assert(f.widen(' ') == L' '); - assert(f.widen('A') == L'A'); - assert(f.widen('\x07') == L'\x07'); - assert(f.widen('.') == L'.'); - assert(f.widen('a') == L'a'); - assert(f.widen('1') == L'1'); - } -} diff --git a/test/localization/locale.categories/category.ctype/locale.ctype/locale.ctype.members/widen_many.pass.cpp b/test/localization/locale.categories/category.ctype/locale.ctype/locale.ctype.members/widen_many.pass.cpp deleted file mode 100644 index 1c656011..00000000 --- a/test/localization/locale.categories/category.ctype/locale.ctype/locale.ctype.members/widen_many.pass.cpp +++ /dev/null @@ -1,38 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template class ctype; - -// const char* widen(const char* low, const char* high, charT* to) const; - -#include -#include -#include -#include - -int main() -{ - std::locale l = std::locale::classic(); - { - typedef std::ctype F; - const F& f = std::use_facet(l); - std::string in(" A\x07.a1"); - std::vector v(in.size()); - - assert(f.widen(&in[0], in.data() + in.size(), v.data()) == in.data() + in.size()); - assert(v[0] == L' '); - assert(v[1] == L'A'); - assert(v[2] == L'\x07'); - assert(v[3] == L'.'); - assert(v[4] == L'a'); - assert(v[5] == L'1'); - } -} diff --git a/test/localization/locale.categories/category.ctype/locale.ctype/locale.ctype.virtuals/tested_elsewhere.pass.cpp b/test/localization/locale.categories/category.ctype/locale.ctype/locale.ctype.virtuals/tested_elsewhere.pass.cpp deleted file mode 100644 index b58f5c55..00000000 --- a/test/localization/locale.categories/category.ctype/locale.ctype/locale.ctype.virtuals/tested_elsewhere.pass.cpp +++ /dev/null @@ -1,12 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -int main() -{ -} diff --git a/test/localization/locale.categories/category.ctype/locale.ctype/types.pass.cpp b/test/localization/locale.categories/category.ctype/locale.ctype/types.pass.cpp deleted file mode 100644 index 7ad36afe..00000000 --- a/test/localization/locale.categories/category.ctype/locale.ctype/types.pass.cpp +++ /dev/null @@ -1,38 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template -// class ctype -// : public locale::facet, -// public ctype_base -// { -// public: -// typedef CharT char_type; -// }; - -#include -#include -#include - -int main() -{ - std::locale l = std::locale::classic(); - { - assert(std::has_facet >(l)); - const std::ctype& f = std::use_facet >(l); - { - (void)std::ctype::id; - } - static_assert((std::is_same::char_type, wchar_t>::value), ""); - static_assert((std::is_base_of >::value), ""); - static_assert((std::is_base_of >::value), ""); - } -} diff --git a/test/localization/locale.categories/category.messages/locale.messages.byname/nothing_to_do.pass.cpp b/test/localization/locale.categories/category.messages/locale.messages.byname/nothing_to_do.pass.cpp deleted file mode 100644 index b58f5c55..00000000 --- a/test/localization/locale.categories/category.messages/locale.messages.byname/nothing_to_do.pass.cpp +++ /dev/null @@ -1,12 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -int main() -{ -} diff --git a/test/localization/locale.categories/category.messages/locale.messages/ctor.pass.cpp b/test/localization/locale.categories/category.messages/locale.messages/ctor.pass.cpp deleted file mode 100644 index e82878a3..00000000 --- a/test/localization/locale.categories/category.messages/locale.messages/ctor.pass.cpp +++ /dev/null @@ -1,52 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// class messages - -// explicit messages(size_t refs = 0); - -#include -#include - -typedef std::messages F; - -class my_facet - : public F -{ -public: - static int count; - - explicit my_facet(std::size_t refs = 0) - : F(refs) {++count;} - - ~my_facet() {--count;} -}; - -int my_facet::count = 0; - -int main() -{ - { - std::locale l(std::locale::classic(), new my_facet); - assert(my_facet::count == 1); - } - assert(my_facet::count == 0); - { - my_facet f(1); - assert(my_facet::count == 1); - { - std::locale l(std::locale::classic(), &f); - assert(my_facet::count == 1); - } - assert(my_facet::count == 1); - } - assert(my_facet::count == 0); -} diff --git a/test/localization/locale.categories/category.messages/locale.messages/locale.messages.members/not_testable.pass.cpp b/test/localization/locale.categories/category.messages/locale.messages/locale.messages.members/not_testable.pass.cpp deleted file mode 100644 index 6bed5383..00000000 --- a/test/localization/locale.categories/category.messages/locale.messages/locale.messages.members/not_testable.pass.cpp +++ /dev/null @@ -1,34 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// class messages - -// catalog open(const basic_string& name, const locale&) const; - -#include -#include - -// As far as I can tell, the messages facet is untestable. I have a best -// effort implementation in the hopes that in the future I will learn how -// to test it. - -template -class F - : public std::messages -{ -public: - explicit F(std::size_t refs = 0) - : std::messages(refs) {} -}; - -int main() -{ -} diff --git a/test/localization/locale.categories/category.messages/locale.messages/locale.messages.virtuals/tested_elsewhere.pass.cpp b/test/localization/locale.categories/category.messages/locale.messages/locale.messages.virtuals/tested_elsewhere.pass.cpp deleted file mode 100644 index b58f5c55..00000000 --- a/test/localization/locale.categories/category.messages/locale.messages/locale.messages.virtuals/tested_elsewhere.pass.cpp +++ /dev/null @@ -1,12 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -int main() -{ -} diff --git a/test/localization/locale.categories/category.messages/locale.messages/messages_base.pass.cpp b/test/localization/locale.categories/category.messages/locale.messages/messages_base.pass.cpp deleted file mode 100644 index cf9b4c89..00000000 --- a/test/localization/locale.categories/category.messages/locale.messages/messages_base.pass.cpp +++ /dev/null @@ -1,24 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// class messages_base -// { -// public: -// typedef unspecified catalog; -// }; - -#include -#include - -int main() -{ - std::messages_base mb; -} diff --git a/test/localization/locale.categories/category.messages/locale.messages/types.pass.cpp b/test/localization/locale.categories/category.messages/locale.messages/types.pass.cpp deleted file mode 100644 index 60e47b53..00000000 --- a/test/localization/locale.categories/category.messages/locale.messages/types.pass.cpp +++ /dev/null @@ -1,34 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template -// class messages -// : public locale::facet, -// public messages_base -// { -// public: -// typedef _CharT char_type; -// typedef basic_string<_CharT> string_type; - -#include -#include - -int main() -{ - static_assert((std::is_base_of >::value), ""); - static_assert((std::is_base_of >::value), ""); - static_assert((std::is_base_of >::value), ""); - static_assert((std::is_base_of >::value), ""); - static_assert((std::is_same::char_type, char>::value), ""); - static_assert((std::is_same::char_type, wchar_t>::value), ""); - static_assert((std::is_same::string_type, std::string>::value), ""); - static_assert((std::is_same::string_type, std::wstring>::value), ""); -} diff --git a/test/localization/locale.categories/category.messages/nothing_to_do.pass.cpp b/test/localization/locale.categories/category.messages/nothing_to_do.pass.cpp deleted file mode 100644 index b58f5c55..00000000 --- a/test/localization/locale.categories/category.messages/nothing_to_do.pass.cpp +++ /dev/null @@ -1,12 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -int main() -{ -} diff --git a/test/localization/locale.categories/category.monetary/locale.money.get/ctor.pass.cpp b/test/localization/locale.categories/category.monetary/locale.money.get/ctor.pass.cpp deleted file mode 100644 index 9052826a..00000000 --- a/test/localization/locale.categories/category.monetary/locale.money.get/ctor.pass.cpp +++ /dev/null @@ -1,52 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// class money_get - -// explicit money_get(size_t refs = 0); - -#include -#include - -typedef std::money_get F; - -class my_facet - : public F -{ -public: - static int count; - - explicit my_facet(std::size_t refs = 0) - : F(refs) {++count;} - - ~my_facet() {--count;} -}; - -int my_facet::count = 0; - -int main() -{ - { - std::locale l(std::locale::classic(), new my_facet); - assert(my_facet::count == 1); - } - assert(my_facet::count == 0); - { - my_facet f(1); - assert(my_facet::count == 1); - { - std::locale l(std::locale::classic(), &f); - assert(my_facet::count == 1); - } - assert(my_facet::count == 1); - } - assert(my_facet::count == 0); -} diff --git a/test/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_en_US.xfail.pass.cpp b/test/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_en_US.xfail.pass.cpp deleted file mode 100644 index 979468db..00000000 --- a/test/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_en_US.xfail.pass.cpp +++ /dev/null @@ -1,719 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// class money_get - -// iter_type get(iter_type b, iter_type e, bool intl, ios_base& iob, -// ios_base::iostate& err, long double& v) const; - -#include -#include -#include -#include -#include "iterators.h" - -typedef std::money_get > Fn; - -class my_facet - : public Fn -{ -public: - explicit my_facet(std::size_t refs = 0) - : Fn(refs) {} -}; - -typedef std::money_get > Fw; - -class my_facetw - : public Fw -{ -public: - explicit my_facetw(std::size_t refs = 0) - : Fw(refs) {} -}; - -int main() -{ - std::ios ios(0); - std::string loc_name("en_US"); - ios.imbue(std::locale(ios.getloc(), - new std::moneypunct_byname(loc_name))); - ios.imbue(std::locale(ios.getloc(), - new std::moneypunct_byname(loc_name))); - ios.imbue(std::locale(ios.getloc(), - new std::moneypunct_byname(loc_name))); - ios.imbue(std::locale(ios.getloc(), - new std::moneypunct_byname(loc_name))); - { - const my_facet f(1); - // char, national - { // zero - std::string v = "0.00"; - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - false, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == 0); - } - { // negative one - std::string v = "-0.01"; - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - false, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == -1); - } - { // positive - std::string v = "1,234,567.89"; - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - false, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == 123456789); - } - { // negative - std::string v = "-1,234,567.89"; - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - false, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == -123456789); - } - { // negative - std::string v = "-1234567.89"; - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - false, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == -123456789); - } - { // zero, showbase - std::string v = "$0.00"; - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - false, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == 0); - } - { // zero, showbase - std::string v = "$0.00"; - showbase(ios); - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - false, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == 0); - noshowbase(ios); - } - { // negative one, showbase - std::string v = "-$0.01"; - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - false, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == -1); - } - { // negative one, showbase - std::string v = "-$0.01"; - showbase(ios); - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - false, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == -1); - noshowbase(ios); - } - { // positive, showbase - std::string v = "$1,234,567.89"; - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - false, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == 123456789); - } - { // positive, showbase - std::string v = "$1,234,567.89"; - showbase(ios); - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - false, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == 123456789); - noshowbase(ios); - } - { // negative, showbase - std::string v = "-$1,234,567.89"; - showbase(ios); - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - false, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == -123456789); - noshowbase(ios); - } - { // negative, showbase - std::string v = "-USD 1,234,567.89"; - showbase(ios); - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - false, ios, err, ex); - assert(iter.base() == v.data() + 1); - assert(err == std::ios_base::failbit); - noshowbase(ios); - } - { // negative, showbase - std::string v = "-USD 1,234,567.89"; - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - false, ios, err, ex); - assert(iter.base() == v.data() + 1); - assert(err == std::ios_base::failbit); - } - } - { - const my_facet f(1); - // char, international - { // zero - std::string v = "0.00"; - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - true, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == 0); - } - { // negative one - std::string v = "-0.01"; - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - true, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == -1); - } - { // positive - std::string v = "1,234,567.89"; - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - true, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == 123456789); - } - { // negative - std::string v = "-1,234,567.89"; - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - true, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == -123456789); - } - { // negative - std::string v = "-1234567.89"; - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - true, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == -123456789); - } - { // zero, showbase - std::string v = "USD 0.00"; - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - true, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == 0); - } - { // zero, showbase - std::string v = "USD 0.00"; - showbase(ios); - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - true, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == 0); - noshowbase(ios); - } - { // negative one, showbase - std::string v = "-USD 0.01"; - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - true, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == -1); - } - { // negative one, showbase - std::string v = "-USD 0.01"; - showbase(ios); - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - true, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == -1); - noshowbase(ios); - } - { // positive, showbase - std::string v = "USD 1,234,567.89"; - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - true, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == 123456789); - } - { // positive, showbase - std::string v = "USD 1,234,567.89"; - showbase(ios); - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - true, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == 123456789); - noshowbase(ios); - } - { // negative, showbase - std::string v = "-USD 1,234,567.89"; - showbase(ios); - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - true, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == -123456789); - noshowbase(ios); - } - { // negative, showbase - std::string v = "-$1,234,567.89"; - showbase(ios); - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - true, ios, err, ex); - assert(iter.base() == v.data() + 1); - assert(err == std::ios_base::failbit); - noshowbase(ios); - } - { // negative, showbase - std::string v = "-$1,234,567.89"; - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - true, ios, err, ex); - assert(iter.base() == v.data() + 1); - assert(err == std::ios_base::failbit); - } - } - { - const my_facetw f(1); - // wchar_t, national - { // zero - std::wstring v = L"0.00"; - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - false, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == 0); - } - { // negative one - std::wstring v = L"-0.01"; - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - false, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == -1); - } - { // positive - std::wstring v = L"1,234,567.89"; - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - false, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == 123456789); - } - { // negative - std::wstring v = L"-1,234,567.89"; - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - false, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == -123456789); - } - { // negative - std::wstring v = L"-1234567.89"; - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - false, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == -123456789); - } - { // zero, showbase - std::wstring v = L"$0.00"; - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - false, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == 0); - } - { // zero, showbase - std::wstring v = L"$0.00"; - showbase(ios); - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - false, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == 0); - noshowbase(ios); - } - { // negative one, showbase - std::wstring v = L"-$0.01"; - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - false, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == -1); - } - { // negative one, showbase - std::wstring v = L"-$0.01"; - showbase(ios); - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - false, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == -1); - noshowbase(ios); - } - { // positive, showbase - std::wstring v = L"$1,234,567.89"; - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - false, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == 123456789); - } - { // positive, showbase - std::wstring v = L"$1,234,567.89"; - showbase(ios); - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - false, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == 123456789); - noshowbase(ios); - } - { // negative, showbase - std::wstring v = L"-$1,234,567.89"; - showbase(ios); - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - false, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == -123456789); - noshowbase(ios); - } - { // negative, showbase - std::wstring v = L"-USD 1,234,567.89"; - showbase(ios); - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - false, ios, err, ex); - assert(iter.base() == v.data() + 1); - assert(err == std::ios_base::failbit); - noshowbase(ios); - } - { // negative, showbase - std::wstring v = L"-USD 1,234,567.89"; - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - false, ios, err, ex); - assert(iter.base() == v.data() + 1); - assert(err == std::ios_base::failbit); - } - } - { - const my_facetw f(1); - // wchar_t, international - { // zero - std::wstring v = L"0.00"; - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - true, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == 0); - } - { // negative one - std::wstring v = L"-0.01"; - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - true, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == -1); - } - { // positive - std::wstring v = L"1,234,567.89"; - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - true, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == 123456789); - } - { // negative - std::wstring v = L"-1,234,567.89"; - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - true, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == -123456789); - } - { // negative - std::wstring v = L"-1234567.89"; - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - true, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == -123456789); - } - { // zero, showbase - std::wstring v = L"USD 0.00"; - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - true, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == 0); - } - { // zero, showbase - std::wstring v = L"USD 0.00"; - showbase(ios); - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - true, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == 0); - noshowbase(ios); - } - { // negative one, showbase - std::wstring v = L"-USD 0.01"; - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - true, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == -1); - } - { // negative one, showbase - std::wstring v = L"-USD 0.01"; - showbase(ios); - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - true, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == -1); - noshowbase(ios); - } - { // positive, showbase - std::wstring v = L"USD 1,234,567.89"; - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - true, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == 123456789); - } - { // positive, showbase - std::wstring v = L"USD 1,234,567.89"; - showbase(ios); - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - true, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == 123456789); - noshowbase(ios); - } - { // negative, showbase - std::wstring v = L"-USD 1,234,567.89"; - showbase(ios); - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - true, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == -123456789); - noshowbase(ios); - } - { // negative, showbase - std::wstring v = L"-$1,234,567.89"; - showbase(ios); - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - true, ios, err, ex); - assert(iter.base() == v.data() + 1); - assert(err == std::ios_base::failbit); - noshowbase(ios); - } - { // negative, showbase - std::wstring v = L"-$1,234,567.89"; - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - true, ios, err, ex); - assert(iter.base() == v.data() + 1); - assert(err == std::ios_base::failbit); - } - } -} diff --git a/test/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_fr_FR.xfail.pass.cpp b/test/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_fr_FR.xfail.pass.cpp deleted file mode 100644 index 1e02b4b1..00000000 --- a/test/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_fr_FR.xfail.pass.cpp +++ /dev/null @@ -1,723 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// class money_get - -// iter_type get(iter_type b, iter_type e, bool intl, ios_base& iob, -// ios_base::iostate& err, long double& v) const; - -#include -#include -#include -#include -#include "iterators.h" - -typedef std::money_get > Fn; - -class my_facet - : public Fn -{ -public: - explicit my_facet(std::size_t refs = 0) - : Fn(refs) {} -}; - -typedef std::money_get > Fw; - -class my_facetw - : public Fw -{ -public: - explicit my_facetw(std::size_t refs = 0) - : Fw(refs) {} -}; - -int main() -{ - std::ios ios(0); - std::string loc_name("fr_FR"); - ios.imbue(std::locale(ios.getloc(), - new std::moneypunct_byname(loc_name))); - ios.imbue(std::locale(ios.getloc(), - new std::moneypunct_byname(loc_name))); - ios.imbue(std::locale(ios.getloc(), - new std::moneypunct_byname(loc_name))); - ios.imbue(std::locale(ios.getloc(), - new std::moneypunct_byname(loc_name))); - { - const my_facet f(1); - // char, national - { // zero - std::string v = "0,00"; - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - false, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == 0); - } - { // negative one - std::string v = "0,01 -"; - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - false, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == -1); - } - { // positive - std::string v = "1 234 567,89 "; - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - false, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == 123456789); - } - { // negative - std::string v = "1 234 567,89 -"; - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - false, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == -123456789); - } - { // negative - std::string v = "1234567,89 -"; - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - false, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == -123456789); - } - { // zero, showbase - std::string v = "0,00 Eu"; - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - false, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == 0); - } - { // zero, showbase - std::string v = "0,00 Eu"; - showbase(ios); - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - false, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == 0); - noshowbase(ios); - } - { // negative one, showbase - std::string v = "0,01 Eu-"; - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - false, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == -1); - } - { // negative one, showbase - std::string v = "0,01 Eu-"; - showbase(ios); - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - false, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == -1); - noshowbase(ios); - } - { // positive, showbase - std::string v = "1 234 567,89 Eu"; - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - false, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == 123456789); - } - { // positive, showbase - std::string v = "1 234 567,89 Eu"; - showbase(ios); - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - false, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == 123456789); - noshowbase(ios); - } - { // negative, showbase - std::string v = "1 234 567,89 Eu-"; - showbase(ios); - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - false, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == -123456789); - noshowbase(ios); - } - { // negative, showbase - std::string v = "1 234 567,89 EUR -"; - showbase(ios); - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - false, ios, err, ex); - assert(iter.base() == v.data() + 14); - assert(err == std::ios_base::failbit); - noshowbase(ios); - } - { // negative, showbase - std::string v = "1 234 567,89 EUR -"; - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - false, ios, err, ex); - assert(iter.base() == v.data() + 14); - assert(err == std::ios_base::goodbit); - assert(ex == 123456789); - } - } - { - const my_facet f(1); - // char, international - { // zero - std::string v = "0,00"; - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - true, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == 0); - } - { // negative one - std::string v = "0,01 -"; - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - true, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == -1); - } - { // positive - std::string v = "1 234 567,89 "; - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - true, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == 123456789); - } - { // negative - std::string v = "1 234 567,89 -"; - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - true, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == -123456789); - } - { // negative - std::string v = "1234567,89 -"; - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - true, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == -123456789); - } - { // zero, showbase - std::string v = "0,00 EUR "; - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - true, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == 0); - } - { // zero, showbase - std::string v = "0,00 EUR "; - showbase(ios); - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - true, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == 0); - noshowbase(ios); - } - { // negative one, showbase - std::string v = "0,01 EUR -"; - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - true, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == -1); - } - { // negative one, showbase - std::string v = "0,01 EUR -"; - showbase(ios); - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - true, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == -1); - noshowbase(ios); - } - { // positive, showbase - std::string v = "1 234 567,89 EUR "; - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - true, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == 123456789); - } - { // positive, showbase - std::string v = "1 234 567,89 EUR "; - showbase(ios); - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - true, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == 123456789); - noshowbase(ios); - } - { // negative, showbase - std::string v = "1 234 567,89 EUR -"; - showbase(ios); - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - true, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == -123456789); - noshowbase(ios); - } - { // negative, showbase - std::string v = "1 234 567,89 Eu-"; - showbase(ios); - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - true, ios, err, ex); - assert(iter.base() == v.data() + 14); - assert(err == std::ios_base::failbit); - noshowbase(ios); - } - { // negative, showbase - std::string v = "1 234 567,89 Eu-"; - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - true, ios, err, ex); - assert(iter.base() == v.data() + 14); - assert(err == std::ios_base::goodbit); - assert(ex == 123456789); - } - } - { - const my_facetw f(1); - // wchar_t, national - { // zero - std::wstring v = L"0,00"; - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - false, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == 0); - } - { // negative one - std::wstring v = L"0,01 -"; - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - false, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == -1); - } - { // positive - std::wstring v = L"1 234 567,89 "; - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - false, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == 123456789); - } - { // negative - std::wstring v = L"1 234 567,89 -"; - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - false, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == -123456789); - } - { // negative - std::wstring v = L"1234567,89 -"; - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - false, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == -123456789); - } - { // zero, showbase - std::wstring v = L"0,00 Eu"; - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - false, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == 0); - } - { // zero, showbase - std::wstring v = L"0,00 Eu"; - showbase(ios); - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - false, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == 0); - noshowbase(ios); - } - { // negative one, showbase - std::wstring v = L"0,01 Eu-"; - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - false, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == -1); - } - { // negative one, showbase - std::wstring v = L"0,01 Eu-"; - showbase(ios); - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - false, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == -1); - noshowbase(ios); - } - { // positive, showbase - std::wstring v = L"1 234 567,89 Eu"; - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - false, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == 123456789); - } - { // positive, showbase - std::wstring v = L"1 234 567,89 Eu"; - showbase(ios); - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - false, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == 123456789); - noshowbase(ios); - } - { // negative, showbase - std::wstring v = L"1 234 567,89 Eu-"; - showbase(ios); - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - false, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == -123456789); - noshowbase(ios); - } - { // negative, showbase - std::wstring v = L"1 234 567,89 EUR -"; - showbase(ios); - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - false, ios, err, ex); - assert(iter.base() == v.data() + 14); - assert(err == std::ios_base::failbit); - noshowbase(ios); - } - { // negative, showbase - std::wstring v = L"1 234 567,89 EUR -"; - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - false, ios, err, ex); - assert(iter.base() == v.data() + 14); - assert(err == std::ios_base::goodbit); - assert(ex == 123456789); - } - } - { - const my_facetw f(1); - // wchar_t, international - { // zero - std::wstring v = L"0,00"; - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - true, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == 0); - } - { // negative one - std::wstring v = L"0,01 -"; - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - true, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == -1); - } - { // positive - std::wstring v = L"1 234 567,89 "; - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - true, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == 123456789); - } - { // negative - std::wstring v = L"1 234 567,89 -"; - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - true, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == -123456789); - } - { // negative - std::wstring v = L"1234567,89 -"; - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - true, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == -123456789); - } - { // zero, showbase - std::wstring v = L"0,00 EUR "; - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - true, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == 0); - } - { // zero, showbase - std::wstring v = L"0,00 EUR "; - showbase(ios); - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - true, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == 0); - noshowbase(ios); - } - { // negative one, showbase - std::wstring v = L"0,01 EUR -"; - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - true, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == -1); - } - { // negative one, showbase - std::wstring v = L"0,01 EUR -"; - showbase(ios); - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - true, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == -1); - noshowbase(ios); - } - { // positive, showbase - std::wstring v = L"1 234 567,89 EUR "; - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - true, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == 123456789); - } - { // positive, showbase - std::wstring v = L"1 234 567,89 EUR "; - showbase(ios); - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - true, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == 123456789); - noshowbase(ios); - } - { // negative, showbase - std::wstring v = L"1 234 567,89 EUR -"; - showbase(ios); - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - true, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == -123456789); - noshowbase(ios); - } - { // negative, showbase - std::wstring v = L"1 234 567,89 Eu-"; - showbase(ios); - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - true, ios, err, ex); - assert(iter.base() == v.data() + 14); - assert(err == std::ios_base::failbit); - noshowbase(ios); - } - { // negative, showbase - std::wstring v = L"1 234 567,89 Eu-"; - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - true, ios, err, ex); - assert(iter.base() == v.data() + 14); - assert(err == std::ios_base::goodbit); - assert(ex == 123456789); - } - } -} diff --git a/test/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_ru_RU.xfail.pass.cpp b/test/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_ru_RU.xfail.pass.cpp deleted file mode 100644 index 07f6f6e0..00000000 --- a/test/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_ru_RU.xfail.pass.cpp +++ /dev/null @@ -1,723 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// class money_get - -// iter_type get(iter_type b, iter_type e, bool intl, ios_base& iob, -// ios_base::iostate& err, long double& v) const; - -#include -#include -#include -#include -#include "iterators.h" - -typedef std::money_get > Fn; - -class my_facet - : public Fn -{ -public: - explicit my_facet(std::size_t refs = 0) - : Fn(refs) {} -}; - -typedef std::money_get > Fw; - -class my_facetw - : public Fw -{ -public: - explicit my_facetw(std::size_t refs = 0) - : Fw(refs) {} -}; - -int main() -{ - std::ios ios(0); - std::string loc_name("ru_RU"); - ios.imbue(std::locale(ios.getloc(), - new std::moneypunct_byname(loc_name))); - ios.imbue(std::locale(ios.getloc(), - new std::moneypunct_byname(loc_name))); - ios.imbue(std::locale(ios.getloc(), - new std::moneypunct_byname(loc_name))); - ios.imbue(std::locale(ios.getloc(), - new std::moneypunct_byname(loc_name))); - { - const my_facet f(1); - // char, national - { // zero - std::string v = "0,00 "; - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - false, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == 0); - } - { // negative one - std::string v = "-0,01 "; - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - false, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == -1); - } - { // positive - std::string v = "1 234 567,89 "; - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - false, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == 123456789); - } - { // negative - std::string v = "-1 234 567,89 "; - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - false, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == -123456789); - } - { // negative - std::string v = "-1234567,89 "; - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - false, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == -123456789); - } - { // zero, showbase - std::string v = "0,00 \xD1\x80\xD1\x83\xD0\xB1""."; - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - false, ios, err, ex); - assert(iter.base() == v.data() + 5); - assert(err == std::ios_base::goodbit); - assert(ex == 0); - } - { // zero, showbase - std::string v = "0,00 \xD1\x80\xD1\x83\xD0\xB1""."; - showbase(ios); - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - false, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == 0); - noshowbase(ios); - } - { // negative one, showbase - std::string v = "-0,01 \xD1\x80\xD1\x83\xD0\xB1""."; - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - false, ios, err, ex); - assert(iter.base() == v.data() + 6); - assert(err == std::ios_base::goodbit); - assert(ex == -1); - } - { // negative one, showbase - std::string v = "-0,01 \xD1\x80\xD1\x83\xD0\xB1""."; - showbase(ios); - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - false, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == -1); - noshowbase(ios); - } - { // positive, showbase - std::string v = "1 234 567,89 \xD1\x80\xD1\x83\xD0\xB1""."; - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - false, ios, err, ex); - assert(iter.base() == v.data() + 13); - assert(err == std::ios_base::goodbit); - assert(ex == 123456789); - } - { // positive, showbase - std::string v = "1 234 567,89 \xD1\x80\xD1\x83\xD0\xB1""."; - showbase(ios); - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - false, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == 123456789); - noshowbase(ios); - } - { // negative, showbase - std::string v = "-1 234 567,89 \xD1\x80\xD1\x83\xD0\xB1""."; - showbase(ios); - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - false, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == -123456789); - noshowbase(ios); - } - { // negative, showbase - std::string v = "-1 234 567,89 RUR "; - showbase(ios); - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - false, ios, err, ex); - assert(iter.base() == v.data() + 14); - assert(err == std::ios_base::failbit); - noshowbase(ios); - } - { // negative, showbase - std::string v = "-1 234 567,89 RUR "; - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - false, ios, err, ex); - assert(iter.base() == v.data() + 14); - assert(err == std::ios_base::goodbit); - assert(ex == -123456789); - } - } - { - const my_facet f(1); - // char, international - { // zero - std::string v = "0,00"; - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - true, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == 0); - } - { // negative one - std::string v = "-0,01 "; - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - true, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == -1); - } - { // positive - std::string v = "1 234 567,89 "; - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - true, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == 123456789); - } - { // negative - std::string v = "-1 234 567,89 "; - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - true, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == -123456789); - } - { // negative - std::string v = "-1234567,89 "; - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - true, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == -123456789); - } - { // zero, showbase - std::string v = "0,00 RUR "; - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - true, ios, err, ex); - assert(iter.base() == v.data() + 5); - assert(err == std::ios_base::goodbit); - assert(ex == 0); - } - { // zero, showbase - std::string v = "0,00 RUR "; - showbase(ios); - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - true, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == 0); - noshowbase(ios); - } - { // negative one, showbase - std::string v = "-0,01 RUR "; - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - true, ios, err, ex); - assert(iter.base() == v.data() + 6); - assert(err == std::ios_base::goodbit); - assert(ex == -1); - } - { // negative one, showbase - std::string v = "-0,01 RUR "; - showbase(ios); - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - true, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == -1); - noshowbase(ios); - } - { // positive, showbase - std::string v = "1 234 567,89 RUR "; - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - true, ios, err, ex); - assert(iter.base() == v.data() + 13); - assert(err == std::ios_base::goodbit); - assert(ex == 123456789); - } - { // positive, showbase - std::string v = "1 234 567,89 RUR "; - showbase(ios); - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - true, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == 123456789); - noshowbase(ios); - } - { // negative, showbase - std::string v = "-1 234 567,89 RUR "; - showbase(ios); - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - true, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == -123456789); - noshowbase(ios); - } - { // negative, showbase - std::string v = "-1 234 567,89 \xD1\x80\xD1\x83\xD0\xB1""."; - showbase(ios); - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - true, ios, err, ex); - assert(iter.base() == v.data() + 14); - assert(err == std::ios_base::failbit); - noshowbase(ios); - } - { // negative, showbase - std::string v = "-1 234 567,89 \xD1\x80\xD1\x83\xD0\xB1""."; - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - true, ios, err, ex); - assert(iter.base() == v.data() + 14); - assert(err == std::ios_base::goodbit); - assert(ex == -123456789); - } - } - { - const my_facetw f(1); - // wchar_t, national - { // zero - std::wstring v = L"0,00"; - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - false, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == 0); - } - { // negative one - std::wstring v = L"-0,01 "; - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - false, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == -1); - } - { // positive - std::wstring v = L"1 234 567,89 "; - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - false, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == 123456789); - } - { // negative - std::wstring v = L"-1 234 567,89 "; - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - false, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == -123456789); - } - { // negative - std::wstring v = L"-1234567,89 "; - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - false, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == -123456789); - } - { // zero, showbase - std::wstring v = L"0,00 \x440\x443\x431""."; - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - false, ios, err, ex); - assert(iter.base() == v.data() + 5); - assert(err == std::ios_base::goodbit); - assert(ex == 0); - } - { // zero, showbase - std::wstring v = L"0,00 \x440\x443\x431""."; - showbase(ios); - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - false, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == 0); - noshowbase(ios); - } - { // negative one, showbase - std::wstring v = L"-0,01 \x440\x443\x431""."; - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - false, ios, err, ex); - assert(iter.base() == v.data() + 6); - assert(err == std::ios_base::goodbit); - assert(ex == -1); - } - { // negative one, showbase - std::wstring v = L"-0,01 \x440\x443\x431""."; - showbase(ios); - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - false, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == -1); - noshowbase(ios); - } - { // positive, showbase - std::wstring v = L"1 234 567,89 \x440\x443\x431""."; - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - false, ios, err, ex); - assert(iter.base() == v.data() + 13); - assert(err == std::ios_base::goodbit); - assert(ex == 123456789); - } - { // positive, showbase - std::wstring v = L"1 234 567,89 \x440\x443\x431""."; - showbase(ios); - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - false, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == 123456789); - noshowbase(ios); - } - { // negative, showbase - std::wstring v = L"-1 234 567,89 \x440\x443\x431""."; - showbase(ios); - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - false, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == -123456789); - noshowbase(ios); - } - { // negative, showbase - std::wstring v = L"-1 234 567,89 RUR "; - showbase(ios); - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - false, ios, err, ex); - assert(iter.base() == v.data() + 14); - assert(err == std::ios_base::failbit); - noshowbase(ios); - } - { // negative, showbase - std::wstring v = L"-1 234 567,89 RUR "; - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - false, ios, err, ex); - assert(iter.base() == v.data() + 14); - assert(err == std::ios_base::goodbit); - assert(ex == -123456789); - } - } - { - const my_facetw f(1); - // wchar_t, international - { // zero - std::wstring v = L"0,00"; - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - true, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == 0); - } - { // negative one - std::wstring v = L"-0,01 "; - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - true, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == -1); - } - { // positive - std::wstring v = L"1 234 567,89 "; - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - true, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == 123456789); - } - { // negative - std::wstring v = L"-1 234 567,89 "; - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - true, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == -123456789); - } - { // negative - std::wstring v = L"-1234567,89 "; - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - true, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == -123456789); - } - { // zero, showbase - std::wstring v = L"0,00 RUR "; - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - true, ios, err, ex); - assert(iter.base() == v.data() + 5); - assert(err == std::ios_base::goodbit); - assert(ex == 0); - } - { // zero, showbase - std::wstring v = L"0,00 RUR "; - showbase(ios); - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - true, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == 0); - noshowbase(ios); - } - { // negative one, showbase - std::wstring v = L"-0,01 RUR "; - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - true, ios, err, ex); - assert(iter.base() == v.data() + 6); - assert(err == std::ios_base::goodbit); - assert(ex == -1); - } - { // negative one, showbase - std::wstring v = L"-0,01 RUR "; - showbase(ios); - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - true, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == -1); - noshowbase(ios); - } - { // positive, showbase - std::wstring v = L"1 234 567,89 RUR "; - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - true, ios, err, ex); - assert(iter.base() == v.data() + 13); - assert(err == std::ios_base::goodbit); - assert(ex == 123456789); - } - { // positive, showbase - std::wstring v = L"1 234 567,89 RUR "; - showbase(ios); - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - true, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == 123456789); - noshowbase(ios); - } - { // negative, showbase - std::wstring v = L"-1 234 567,89 RUR "; - showbase(ios); - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - true, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == -123456789); - noshowbase(ios); - } - { // negative, showbase - std::wstring v = L"-1 234 567,89 \x440\x443\x431""."; - showbase(ios); - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - true, ios, err, ex); - assert(iter.base() == v.data() + 14); - assert(err == std::ios_base::failbit); - noshowbase(ios); - } - { // negative, showbase - std::wstring v = L"-1 234 567,89 \x440\x443\x431""."; - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - true, ios, err, ex); - assert(iter.base() == v.data() + 14); - assert(err == std::ios_base::goodbit); - assert(ex == -123456789); - } - } -} diff --git a/test/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_zh_CN.xfail.pass.cpp b/test/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_zh_CN.xfail.pass.cpp deleted file mode 100644 index e53d099c..00000000 --- a/test/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_zh_CN.xfail.pass.cpp +++ /dev/null @@ -1,719 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// class money_get - -// iter_type get(iter_type b, iter_type e, bool intl, ios_base& iob, -// ios_base::iostate& err, long double& v) const; - -#include -#include -#include -#include -#include "iterators.h" - -typedef std::money_get > Fn; - -class my_facet - : public Fn -{ -public: - explicit my_facet(std::size_t refs = 0) - : Fn(refs) {} -}; - -typedef std::money_get > Fw; - -class my_facetw - : public Fw -{ -public: - explicit my_facetw(std::size_t refs = 0) - : Fw(refs) {} -}; - -int main() -{ - std::ios ios(0); - std::string loc_name("zh_CN"); - ios.imbue(std::locale(ios.getloc(), - new std::moneypunct_byname(loc_name))); - ios.imbue(std::locale(ios.getloc(), - new std::moneypunct_byname(loc_name))); - ios.imbue(std::locale(ios.getloc(), - new std::moneypunct_byname(loc_name))); - ios.imbue(std::locale(ios.getloc(), - new std::moneypunct_byname(loc_name))); - { - const my_facet f(1); - // char, national - { // zero - std::string v = "0.00"; - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - false, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == 0); - } - { // negative one - std::string v = "-0.01"; - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - false, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == -1); - } - { // positive - std::string v = "1,234,567.89"; - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - false, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == 123456789); - } - { // negative - std::string v = "-1,234,567.89"; - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - false, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == -123456789); - } - { // negative - std::string v = "-1234567.89"; - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - false, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == -123456789); - } - { // zero, showbase - std::string v = "\xEF\xBF\xA5""0.00"; - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - false, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == 0); - } - { // zero, showbase - std::string v = "\xEF\xBF\xA5""0.00"; - showbase(ios); - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - false, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == 0); - noshowbase(ios); - } - { // negative one, showbase - std::string v = "\xEF\xBF\xA5""-0.01"; - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - false, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == -1); - } - { // negative one, showbase - std::string v = "\xEF\xBF\xA5""-0.01"; - showbase(ios); - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - false, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == -1); - noshowbase(ios); - } - { // positive, showbase - std::string v = "\xEF\xBF\xA5""1,234,567.89"; - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - false, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == 123456789); - } - { // positive, showbase - std::string v = "\xEF\xBF\xA5""1,234,567.89"; - showbase(ios); - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - false, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == 123456789); - noshowbase(ios); - } - { // negative, showbase - std::string v = "\xEF\xBF\xA5""-1,234,567.89"; - showbase(ios); - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - false, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == -123456789); - noshowbase(ios); - } - { // negative, showbase - std::string v = "CNY -1,234,567.89"; - showbase(ios); - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - false, ios, err, ex); - assert(iter.base() == v.data() + 0); - assert(err == std::ios_base::failbit); - noshowbase(ios); - } - { // negative, showbase - std::string v = "CNY -1,234,567.89"; - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - false, ios, err, ex); - assert(iter.base() == v.data() + 0); - assert(err == std::ios_base::failbit); - } - } - { - const my_facet f(1); - // char, international - { // zero - std::string v = "0.00"; - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - true, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == 0); - } - { // negative one - std::string v = "-0.01"; - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - true, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == -1); - } - { // positive - std::string v = "1,234,567.89"; - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - true, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == 123456789); - } - { // negative - std::string v = "-1,234,567.89"; - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - true, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == -123456789); - } - { // negative - std::string v = "-1234567.89"; - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - true, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == -123456789); - } - { // zero, showbase - std::string v = "CNY 0.00"; - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - true, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == 0); - } - { // zero, showbase - std::string v = "CNY 0.00"; - showbase(ios); - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - true, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == 0); - noshowbase(ios); - } - { // negative one, showbase - std::string v = "CNY -0.01"; - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - true, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == -1); - } - { // negative one, showbase - std::string v = "CNY -0.01"; - showbase(ios); - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - true, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == -1); - noshowbase(ios); - } - { // positive, showbase - std::string v = "CNY 1,234,567.89"; - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - true, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == 123456789); - } - { // positive, showbase - std::string v = "CNY 1,234,567.89"; - showbase(ios); - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - true, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == 123456789); - noshowbase(ios); - } - { // negative, showbase - std::string v = "CNY -1,234,567.89"; - showbase(ios); - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - true, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == -123456789); - noshowbase(ios); - } - { // negative, showbase - std::string v = "\xEF\xBF\xA5""-1,234,567.89"; - showbase(ios); - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - true, ios, err, ex); - assert(iter.base() == v.data() + 0); - assert(err == std::ios_base::failbit); - noshowbase(ios); - } - { // negative, showbase - std::string v = "\xEF\xBF\xA5""-1,234,567.89"; - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - true, ios, err, ex); - assert(iter.base() == v.data() + 0); - assert(err == std::ios_base::failbit); - } - } - { - const my_facetw f(1); - // wchar_t, national - { // zero - std::wstring v = L"0.00"; - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - false, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == 0); - } - { // negative one - std::wstring v = L"-0.01"; - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - false, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == -1); - } - { // positive - std::wstring v = L"1,234,567.89"; - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - false, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == 123456789); - } - { // negative - std::wstring v = L"-1,234,567.89"; - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - false, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == -123456789); - } - { // negative - std::wstring v = L"-1234567.89"; - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - false, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == -123456789); - } - { // zero, showbase - std::wstring v = L"\xFFE5""0.00"; - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - false, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == 0); - } - { // zero, showbase - std::wstring v = L"\xFFE5""0.00"; - showbase(ios); - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - false, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == 0); - noshowbase(ios); - } - { // negative one, showbase - std::wstring v = L"\xFFE5""-0.01"; - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - false, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == -1); - } - { // negative one, showbase - std::wstring v = L"\xFFE5""-0.01"; - showbase(ios); - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - false, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == -1); - noshowbase(ios); - } - { // positive, showbase - std::wstring v = L"\xFFE5""1,234,567.89"; - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - false, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == 123456789); - } - { // positive, showbase - std::wstring v = L"\xFFE5""1,234,567.89"; - showbase(ios); - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - false, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == 123456789); - noshowbase(ios); - } - { // negative, showbase - std::wstring v = L"\xFFE5""-1,234,567.89"; - showbase(ios); - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - false, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == -123456789); - noshowbase(ios); - } - { // negative, showbase - std::wstring v = L"CNY -1,234,567.89"; - showbase(ios); - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - false, ios, err, ex); - assert(iter.base() == v.data() + 0); - assert(err == std::ios_base::failbit); - noshowbase(ios); - } - { // negative, showbase - std::wstring v = L"CNY -1,234,567.89"; - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - false, ios, err, ex); - assert(iter.base() == v.data() + 0); - assert(err == std::ios_base::failbit); - } - } - { - const my_facetw f(1); - // wchar_t, international - { // zero - std::wstring v = L"0.00"; - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - true, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == 0); - } - { // negative one - std::wstring v = L"-0.01"; - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - true, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == -1); - } - { // positive - std::wstring v = L"1,234,567.89"; - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - true, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == 123456789); - } - { // negative - std::wstring v = L"-1,234,567.89"; - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - true, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == -123456789); - } - { // negative - std::wstring v = L"-1234567.89"; - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - true, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == -123456789); - } - { // zero, showbase - std::wstring v = L"CNY 0.00"; - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - true, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == 0); - } - { // zero, showbase - std::wstring v = L"CNY 0.00"; - showbase(ios); - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - true, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == 0); - noshowbase(ios); - } - { // negative one, showbase - std::wstring v = L"CNY -0.01"; - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - true, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == -1); - } - { // negative one, showbase - std::wstring v = L"CNY -0.01"; - showbase(ios); - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - true, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == -1); - noshowbase(ios); - } - { // positive, showbase - std::wstring v = L"CNY 1,234,567.89"; - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - true, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == 123456789); - } - { // positive, showbase - std::wstring v = L"CNY 1,234,567.89"; - showbase(ios); - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - true, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == 123456789); - noshowbase(ios); - } - { // negative, showbase - std::wstring v = L"CNY -1,234,567.89"; - showbase(ios); - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - true, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == -123456789); - noshowbase(ios); - } - { // negative, showbase - std::wstring v = L"\xFFE5""-1,234,567.89"; - showbase(ios); - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - true, ios, err, ex); - assert(iter.base() == v.data() + 0); - assert(err == std::ios_base::failbit); - noshowbase(ios); - } - { // negative, showbase - std::wstring v = L"\xFFE5""-1,234,567.89"; - typedef input_iterator I; - long double ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - true, ios, err, ex); - assert(iter.base() == v.data() + 0); - assert(err == std::ios_base::failbit); - } - } -} diff --git a/test/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_string_en_US.xfail.pass.cpp b/test/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_string_en_US.xfail.pass.cpp deleted file mode 100644 index dfdcf964..00000000 --- a/test/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_string_en_US.xfail.pass.cpp +++ /dev/null @@ -1,727 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// class money_get - -// iter_type get(iter_type b, iter_type e, bool intl, ios_base& iob, -// ios_base::iostate& err, string_type& v) const; - -#include -#include -#include -#include -#include "iterators.h" - -typedef std::money_get > Fn; - -class my_facet - : public Fn -{ -public: - explicit my_facet(std::size_t refs = 0) - : Fn(refs) {} -}; - -typedef std::money_get > Fw; - -class my_facetw - : public Fw -{ -public: - explicit my_facetw(std::size_t refs = 0) - : Fw(refs) {} -}; - -int main() -{ - std::ios ios(0); - std::string loc_name("en_US"); - ios.imbue(std::locale(ios.getloc(), - new std::moneypunct_byname(loc_name))); - ios.imbue(std::locale(ios.getloc(), - new std::moneypunct_byname(loc_name))); - ios.imbue(std::locale(ios.getloc(), - new std::moneypunct_byname(loc_name))); - ios.imbue(std::locale(ios.getloc(), - new std::moneypunct_byname(loc_name))); - { - const my_facet f(1); - // char, national - { // zero - std::string v = "0.00"; - typedef input_iterator I; - std::string ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - false, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == "0"); - } - { // negative one - std::string v = "-0.01"; - typedef input_iterator I; - std::string ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - false, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == "-1"); - } - { // positive - std::string v = "1,234,567.89"; - typedef input_iterator I; - std::string ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - false, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == "123456789"); - } - { // negative - std::string v = "-1,234,567.89"; - typedef input_iterator I; - std::string ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - false, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == "-123456789"); - } - { // negative - std::string v = "-1234567.89"; - typedef input_iterator I; - std::string ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - false, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == "-123456789"); - } - { // zero, showbase - std::string v = "$0.00"; - typedef input_iterator I; - std::string ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - false, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == "0"); - } - { // zero, showbase - std::string v = "$0.00"; - showbase(ios); - typedef input_iterator I; - std::string ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - false, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == "0"); - noshowbase(ios); - } - { // negative one, showbase - std::string v = "-$0.01"; - typedef input_iterator I; - std::string ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - false, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == "-1"); - } - { // negative one, showbase - std::string v = "-$0.01"; - showbase(ios); - typedef input_iterator I; - std::string ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - false, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == "-1"); - noshowbase(ios); - } - { // positive, showbase - std::string v = "$1,234,567.89"; - typedef input_iterator I; - std::string ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - false, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == "123456789"); - } - { // positive, showbase - std::string v = "$1,234,567.89"; - showbase(ios); - typedef input_iterator I; - std::string ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - false, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == "123456789"); - noshowbase(ios); - } - { // negative, showbase - std::string v = "-$1,234,567.89"; - showbase(ios); - typedef input_iterator I; - std::string ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - false, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == "-123456789"); - noshowbase(ios); - } - { // negative, showbase - std::string v = "-USD 1,234,567.89"; - showbase(ios); - typedef input_iterator I; - std::string ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - false, ios, err, ex); - assert(iter.base() == v.data() + 1); - assert(err == std::ios_base::failbit); - assert(ex == ""); - noshowbase(ios); - } - { // negative, showbase - std::string v = "-USD 1,234,567.89"; - typedef input_iterator I; - std::string ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - false, ios, err, ex); - assert(iter.base() == v.data() + 1); - assert(err == std::ios_base::failbit); - assert(ex == ""); - } - } - { - const my_facet f(1); - // char, international - { // zero - std::string v = "0.00"; - typedef input_iterator I; - std::string ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - true, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == "0"); - } - { // negative one - std::string v = "-0.01"; - typedef input_iterator I; - std::string ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - true, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == "-1"); - } - { // positive - std::string v = "1,234,567.89"; - typedef input_iterator I; - std::string ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - true, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == "123456789"); - } - { // negative - std::string v = "-1,234,567.89"; - typedef input_iterator I; - std::string ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - true, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == "-123456789"); - } - { // negative - std::string v = "-1234567.89"; - typedef input_iterator I; - std::string ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - true, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == "-123456789"); - } - { // zero, showbase - std::string v = "USD 0.00"; - typedef input_iterator I; - std::string ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - true, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == "0"); - } - { // zero, showbase - std::string v = "USD 0.00"; - showbase(ios); - typedef input_iterator I; - std::string ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - true, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == "0"); - noshowbase(ios); - } - { // negative one, showbase - std::string v = "-USD 0.01"; - typedef input_iterator I; - std::string ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - true, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == "-1"); - } - { // negative one, showbase - std::string v = "-USD 0.01"; - showbase(ios); - typedef input_iterator I; - std::string ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - true, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == "-1"); - noshowbase(ios); - } - { // positive, showbase - std::string v = "USD 1,234,567.89"; - typedef input_iterator I; - std::string ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - true, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == "123456789"); - } - { // positive, showbase - std::string v = "USD 1,234,567.89"; - showbase(ios); - typedef input_iterator I; - std::string ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - true, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == "123456789"); - noshowbase(ios); - } - { // negative, showbase - std::string v = "-USD 1,234,567.89"; - showbase(ios); - typedef input_iterator I; - std::string ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - true, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == "-123456789"); - noshowbase(ios); - } - { // negative, showbase - std::string v = "-$1,234,567.89"; - showbase(ios); - typedef input_iterator I; - std::string ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - true, ios, err, ex); - assert(iter.base() == v.data() + 1); - assert(err == std::ios_base::failbit); - assert(ex == ""); - noshowbase(ios); - } - { // negative, showbase - std::string v = "-$1,234,567.89"; - typedef input_iterator I; - std::string ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - true, ios, err, ex); - assert(iter.base() == v.data() + 1); - assert(err == std::ios_base::failbit); - assert(ex == ""); - } - } - { - const my_facetw f(1); - // wchar_t, national - { // zero - std::wstring v = L"0.00"; - typedef input_iterator I; - std::wstring ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - false, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == L"0"); - } - { // negative one - std::wstring v = L"-0.01"; - typedef input_iterator I; - std::wstring ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - false, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == L"-1"); - } - { // positive - std::wstring v = L"1,234,567.89"; - typedef input_iterator I; - std::wstring ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - false, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == L"123456789"); - } - { // negative - std::wstring v = L"-1,234,567.89"; - typedef input_iterator I; - std::wstring ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - false, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == L"-123456789"); - } - { // negative - std::wstring v = L"-1234567.89"; - typedef input_iterator I; - std::wstring ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - false, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == L"-123456789"); - } - { // zero, showbase - std::wstring v = L"$0.00"; - typedef input_iterator I; - std::wstring ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - false, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == L"0"); - } - { // zero, showbase - std::wstring v = L"$0.00"; - showbase(ios); - typedef input_iterator I; - std::wstring ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - false, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == L"0"); - noshowbase(ios); - } - { // negative one, showbase - std::wstring v = L"-$0.01"; - typedef input_iterator I; - std::wstring ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - false, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == L"-1"); - } - { // negative one, showbase - std::wstring v = L"-$0.01"; - showbase(ios); - typedef input_iterator I; - std::wstring ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - false, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == L"-1"); - noshowbase(ios); - } - { // positive, showbase - std::wstring v = L"$1,234,567.89"; - typedef input_iterator I; - std::wstring ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - false, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == L"123456789"); - } - { // positive, showbase - std::wstring v = L"$1,234,567.89"; - showbase(ios); - typedef input_iterator I; - std::wstring ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - false, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == L"123456789"); - noshowbase(ios); - } - { // negative, showbase - std::wstring v = L"-$1,234,567.89"; - showbase(ios); - typedef input_iterator I; - std::wstring ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - false, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == L"-123456789"); - noshowbase(ios); - } - { // negative, showbase - std::wstring v = L"-USD 1,234,567.89"; - showbase(ios); - typedef input_iterator I; - std::wstring ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - false, ios, err, ex); - assert(iter.base() == v.data() + 1); - assert(err == std::ios_base::failbit); - assert(ex == L""); - noshowbase(ios); - } - { // negative, showbase - std::wstring v = L"-USD 1,234,567.89"; - typedef input_iterator I; - std::wstring ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - false, ios, err, ex); - assert(iter.base() == v.data() + 1); - assert(err == std::ios_base::failbit); - assert(ex == L""); - } - } - { - const my_facetw f(1); - // wchar_t, international - { // zero - std::wstring v = L"0.00"; - typedef input_iterator I; - std::wstring ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - true, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == L"0"); - } - { // negative one - std::wstring v = L"-0.01"; - typedef input_iterator I; - std::wstring ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - true, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == L"-1"); - } - { // positive - std::wstring v = L"1,234,567.89"; - typedef input_iterator I; - std::wstring ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - true, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == L"123456789"); - } - { // negative - std::wstring v = L"-1,234,567.89"; - typedef input_iterator I; - std::wstring ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - true, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == L"-123456789"); - } - { // negative - std::wstring v = L"-1234567.89"; - typedef input_iterator I; - std::wstring ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - true, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == L"-123456789"); - } - { // zero, showbase - std::wstring v = L"USD 0.00"; - typedef input_iterator I; - std::wstring ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - true, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == L"0"); - } - { // zero, showbase - std::wstring v = L"USD 0.00"; - showbase(ios); - typedef input_iterator I; - std::wstring ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - true, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == L"0"); - noshowbase(ios); - } - { // negative one, showbase - std::wstring v = L"-USD 0.01"; - typedef input_iterator I; - std::wstring ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - true, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == L"-1"); - } - { // negative one, showbase - std::wstring v = L"-USD 0.01"; - showbase(ios); - typedef input_iterator I; - std::wstring ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - true, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == L"-1"); - noshowbase(ios); - } - { // positive, showbase - std::wstring v = L"USD 1,234,567.89"; - typedef input_iterator I; - std::wstring ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - true, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == L"123456789"); - } - { // positive, showbase - std::wstring v = L"USD 1,234,567.89"; - showbase(ios); - typedef input_iterator I; - std::wstring ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - true, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == L"123456789"); - noshowbase(ios); - } - { // negative, showbase - std::wstring v = L"-USD 1,234,567.89"; - showbase(ios); - typedef input_iterator I; - std::wstring ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - true, ios, err, ex); - assert(iter.base() == v.data() + v.size()); - assert(err == std::ios_base::eofbit); - assert(ex == L"-123456789"); - noshowbase(ios); - } - { // negative, showbase - std::wstring v = L"-$1,234,567.89"; - showbase(ios); - typedef input_iterator I; - std::wstring ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - true, ios, err, ex); - assert(iter.base() == v.data() + 1); - assert(err == std::ios_base::failbit); - assert(ex == L""); - noshowbase(ios); - } - { // negative, showbase - std::wstring v = L"-$1,234,567.89"; - typedef input_iterator I; - std::wstring ex; - std::ios_base::iostate err = std::ios_base::goodbit; - I iter = f.get(I(v.data()), I(v.data() + v.size()), - true, ios, err, ex); - assert(iter.base() == v.data() + 1); - assert(err == std::ios_base::failbit); - assert(ex == L""); - } - } -} diff --git a/test/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/iterators.h b/test/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/iterators.h deleted file mode 100644 index 7b0f6338..00000000 --- a/test/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/iterators.h +++ /dev/null @@ -1,55 +0,0 @@ -#ifndef ITERATORS_H -#define ITERATORS_H - -#include - -template -class input_iterator -{ - It it_; - - template friend class input_iterator; -public: - typedef std::input_iterator_tag iterator_category; - typedef typename std::iterator_traits::value_type value_type; - typedef typename std::iterator_traits::difference_type difference_type; - typedef It pointer; - typedef typename std::iterator_traits::reference reference; - - It base() const {return it_;} - - input_iterator() : it_() {} - explicit input_iterator(It it) : it_(it) {} - template - input_iterator(const input_iterator& u) :it_(u.it_) {} - - reference operator*() const {return *it_;} - pointer operator->() const {return it_;} - - input_iterator& operator++() {++it_; return *this;} - input_iterator operator++(int) - {input_iterator tmp(*this); ++(*this); return tmp;} - - friend bool operator==(const input_iterator& x, const input_iterator& y) - {return x.it_ == y.it_;} - friend bool operator!=(const input_iterator& x, const input_iterator& y) - {return !(x == y);} -}; - -template -inline -bool -operator==(const input_iterator& x, const input_iterator& y) -{ - return x.base() == y.base(); -} - -template -inline -bool -operator!=(const input_iterator& x, const input_iterator& y) -{ - return !(x == y); -} - -#endif // ITERATORS_H diff --git a/test/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.virtuals/tested_elsewhere.pass.cpp b/test/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.virtuals/tested_elsewhere.pass.cpp deleted file mode 100644 index b58f5c55..00000000 --- a/test/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.virtuals/tested_elsewhere.pass.cpp +++ /dev/null @@ -1,12 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -int main() -{ -} diff --git a/test/localization/locale.categories/category.monetary/locale.money.get/types.pass.cpp b/test/localization/locale.categories/category.monetary/locale.money.get/types.pass.cpp deleted file mode 100644 index 2e4fb324..00000000 --- a/test/localization/locale.categories/category.monetary/locale.money.get/types.pass.cpp +++ /dev/null @@ -1,34 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template > -// class money_get -// : public locale::facet -// { -// public: -// typedef CharT char_type; -// typedef InputIterator iter_type; -// typedef basic_string string_type; - -#include -#include - -int main() -{ - static_assert((std::is_base_of >::value), ""); - static_assert((std::is_base_of >::value), ""); - static_assert((std::is_same::char_type, char>::value), ""); - static_assert((std::is_same::char_type, wchar_t>::value), ""); - static_assert((std::is_same::iter_type, std::istreambuf_iterator >::value), ""); - static_assert((std::is_same::iter_type, std::istreambuf_iterator >::value), ""); - static_assert((std::is_same::string_type, std::string>::value), ""); - static_assert((std::is_same::string_type, std::wstring>::value), ""); -} diff --git a/test/localization/locale.categories/category.monetary/locale.money.put/ctor.pass.cpp b/test/localization/locale.categories/category.monetary/locale.money.put/ctor.pass.cpp deleted file mode 100644 index d0a0007b..00000000 --- a/test/localization/locale.categories/category.monetary/locale.money.put/ctor.pass.cpp +++ /dev/null @@ -1,52 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// class money_put - -// explicit money_put(size_t refs = 0); - -#include -#include - -typedef std::money_put F; - -class my_facet - : public F -{ -public: - static int count; - - explicit my_facet(std::size_t refs = 0) - : F(refs) {++count;} - - ~my_facet() {--count;} -}; - -int my_facet::count = 0; - -int main() -{ - { - std::locale l(std::locale::classic(), new my_facet); - assert(my_facet::count == 1); - } - assert(my_facet::count == 0); - { - my_facet f(1); - assert(my_facet::count == 1); - { - std::locale l(std::locale::classic(), &f); - assert(my_facet::count == 1); - } - assert(my_facet::count == 1); - } - assert(my_facet::count == 0); -} diff --git a/test/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/iterators.h b/test/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/iterators.h deleted file mode 100644 index fa6e1004..00000000 --- a/test/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/iterators.h +++ /dev/null @@ -1,33 +0,0 @@ -#ifndef ITERATORS_H -#define ITERATORS_H - -#include - -template -class output_iterator -{ - It it_; - - template friend class output_iterator; -public: - typedef std::output_iterator_tag iterator_category; - typedef typename std::iterator_traits::value_type value_type; - typedef typename std::iterator_traits::difference_type difference_type; - typedef It pointer; - typedef typename std::iterator_traits::reference reference; - - It base() const {return it_;} - - output_iterator() : it_() {} - explicit output_iterator(It it) : it_(it) {} - template - output_iterator(const output_iterator& u) :it_(u.it_) {} - - reference operator*() const {return *it_;} - - output_iterator& operator++() {++it_; return *this;} - output_iterator operator++(int) - {output_iterator tmp(*this); ++(*this); return tmp;} -}; - -#endif // ITERATORS_H diff --git a/test/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_en_US.xfail.pass.cpp b/test/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_en_US.xfail.pass.cpp deleted file mode 100644 index 7e965f76..00000000 --- a/test/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_en_US.xfail.pass.cpp +++ /dev/null @@ -1,490 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// class money_put - -// iter_type put(iter_type s, bool intl, ios_base& f, char_type fill, -// long double units) const; - -#include -#include -#include -#include -#include "iterators.h" - -typedef std::money_put > Fn; - -class my_facet - : public Fn -{ -public: - explicit my_facet(std::size_t refs = 0) - : Fn(refs) {} -}; - -typedef std::money_put > Fw; - -class my_facetw - : public Fw -{ -public: - explicit my_facetw(std::size_t refs = 0) - : Fw(refs) {} -}; - -int main() -{ - std::ios ios(0); - std::string loc_name("en_US"); - ios.imbue(std::locale(ios.getloc(), - new std::moneypunct_byname(loc_name))); - ios.imbue(std::locale(ios.getloc(), - new std::moneypunct_byname(loc_name))); - ios.imbue(std::locale(ios.getloc(), - new std::moneypunct_byname(loc_name))); - ios.imbue(std::locale(ios.getloc(), - new std::moneypunct_byname(loc_name))); -{ - const my_facet f(1); - // char, national - { // zero - long double v = 0; - char str[100]; - output_iterator iter = f.put(output_iterator(str), - false, ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0.00"); - } - { // negative one - long double v = -1; - char str[100]; - output_iterator iter = f.put(output_iterator(str), - false, ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.01"); - } - { // positive - long double v = 123456789; - char str[100]; - output_iterator iter = f.put(output_iterator(str), - false, ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1,234,567.89"); - } - { // negative - long double v = -123456789; - char str[100]; - output_iterator iter = f.put(output_iterator(str), - false, ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-1,234,567.89"); - } - { // zero, showbase - long double v = 0; - showbase(ios); - char str[100]; - output_iterator iter = f.put(output_iterator(str), - false, ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "$0.00"); - } - { // negative one, showbase - long double v = -1; - showbase(ios); - char str[100]; - output_iterator iter = f.put(output_iterator(str), - false, ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-$0.01"); - } - { // positive, showbase - long double v = 123456789; - showbase(ios); - char str[100]; - output_iterator iter = f.put(output_iterator(str), - false, ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "$1,234,567.89"); - } - { // negative, showbase - long double v = -123456789; - showbase(ios); - char str[100]; - output_iterator iter = f.put(output_iterator(str), - false, ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-$1,234,567.89"); - } - { // negative, showbase, left - long double v = -123456789; - showbase(ios); - ios.width(20); - left(ios); - char str[100]; - output_iterator iter = f.put(output_iterator(str), - false, ios, ' ', v); - std::string ex(str, iter.base()); - assert(ex == "-$1,234,567.89 "); - assert(ios.width() == 0); - } - { // negative, showbase, internal - long double v = -123456789; - showbase(ios); - ios.width(20); - internal(ios); - char str[100]; - output_iterator iter = f.put(output_iterator(str), - false, ios, ' ', v); - std::string ex(str, iter.base()); - assert(ex == "-$ 1,234,567.89"); - assert(ios.width() == 0); - } - { // negative, showbase, right - long double v = -123456789; - showbase(ios); - ios.width(20); - right(ios); - char str[100]; - output_iterator iter = f.put(output_iterator(str), - false, ios, ' ', v); - std::string ex(str, iter.base()); - assert(ex == " -$1,234,567.89"); - assert(ios.width() == 0); - } - - // char, international - noshowbase(ios); - ios.unsetf(std::ios_base::adjustfield); - { // zero - long double v = 0; - char str[100]; - output_iterator iter = f.put(output_iterator(str), - true, ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0.00"); - } - { // negative one - long double v = -1; - char str[100]; - output_iterator iter = f.put(output_iterator(str), - true, ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.01"); - } - { // positive - long double v = 123456789; - char str[100]; - output_iterator iter = f.put(output_iterator(str), - true, ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1,234,567.89"); - } - { // negative - long double v = -123456789; - char str[100]; - output_iterator iter = f.put(output_iterator(str), - true, ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-1,234,567.89"); - } - { // zero, showbase - long double v = 0; - showbase(ios); - char str[100]; - output_iterator iter = f.put(output_iterator(str), - true, ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "USD 0.00"); - } - { // negative one, showbase - long double v = -1; - showbase(ios); - char str[100]; - output_iterator iter = f.put(output_iterator(str), - true, ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-USD 0.01"); - } - { // positive, showbase - long double v = 123456789; - showbase(ios); - char str[100]; - output_iterator iter = f.put(output_iterator(str), - true, ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "USD 1,234,567.89"); - } - { // negative, showbase - long double v = -123456789; - showbase(ios); - char str[100]; - output_iterator iter = f.put(output_iterator(str), - true, ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-USD 1,234,567.89"); - } - { // negative, showbase, left - long double v = -123456789; - showbase(ios); - ios.width(20); - left(ios); - char str[100]; - output_iterator iter = f.put(output_iterator(str), - true, ios, ' ', v); - std::string ex(str, iter.base()); - assert(ex == "-USD 1,234,567.89 "); - assert(ios.width() == 0); - } - { // negative, showbase, internal - long double v = -123456789; - showbase(ios); - ios.width(20); - internal(ios); - char str[100]; - output_iterator iter = f.put(output_iterator(str), - true, ios, ' ', v); - std::string ex(str, iter.base()); - assert(ex == "-USD 1,234,567.89"); - assert(ios.width() == 0); - } - { // negative, showbase, right - long double v = -123456789; - showbase(ios); - ios.width(20); - right(ios); - char str[100]; - output_iterator iter = f.put(output_iterator(str), - true, ios, ' ', v); - std::string ex(str, iter.base()); - assert(ex == " -USD 1,234,567.89"); - assert(ios.width() == 0); - } -} -{ - - const my_facetw f(1); - // wchar_t, national - noshowbase(ios); - ios.unsetf(std::ios_base::adjustfield); - { // zero - long double v = 0; - wchar_t str[100]; - output_iterator iter = f.put(output_iterator(str), - false, ios, '*', v); - std::wstring ex(str, iter.base()); - assert(ex == L"0.00"); - } - { // negative one - long double v = -1; - wchar_t str[100]; - output_iterator iter = f.put(output_iterator(str), - false, ios, '*', v); - std::wstring ex(str, iter.base()); - assert(ex == L"-0.01"); - } - { // positive - long double v = 123456789; - wchar_t str[100]; - output_iterator iter = f.put(output_iterator(str), - false, ios, '*', v); - std::wstring ex(str, iter.base()); - assert(ex == L"1,234,567.89"); - } - { // negative - long double v = -123456789; - wchar_t str[100]; - output_iterator iter = f.put(output_iterator(str), - false, ios, '*', v); - std::wstring ex(str, iter.base()); - assert(ex == L"-1,234,567.89"); - } - { // zero, showbase - long double v = 0; - showbase(ios); - wchar_t str[100]; - output_iterator iter = f.put(output_iterator(str), - false, ios, '*', v); - std::wstring ex(str, iter.base()); - assert(ex == L"$0.00"); - } - { // negative one, showbase - long double v = -1; - showbase(ios); - wchar_t str[100]; - output_iterator iter = f.put(output_iterator(str), - false, ios, '*', v); - std::wstring ex(str, iter.base()); - assert(ex == L"-$0.01"); - } - { // positive, showbase - long double v = 123456789; - showbase(ios); - wchar_t str[100]; - output_iterator iter = f.put(output_iterator(str), - false, ios, '*', v); - std::wstring ex(str, iter.base()); - assert(ex == L"$1,234,567.89"); - } - { // negative, showbase - long double v = -123456789; - showbase(ios); - wchar_t str[100]; - output_iterator iter = f.put(output_iterator(str), - false, ios, '*', v); - std::wstring ex(str, iter.base()); - assert(ex == L"-$1,234,567.89"); - } - { // negative, showbase, left - long double v = -123456789; - showbase(ios); - ios.width(20); - left(ios); - wchar_t str[100]; - output_iterator iter = f.put(output_iterator(str), - false, ios, ' ', v); - std::wstring ex(str, iter.base()); - assert(ex == L"-$1,234,567.89 "); - assert(ios.width() == 0); - } - { // negative, showbase, internal - long double v = -123456789; - showbase(ios); - ios.width(20); - internal(ios); - wchar_t str[100]; - output_iterator iter = f.put(output_iterator(str), - false, ios, ' ', v); - std::wstring ex(str, iter.base()); - assert(ex == L"-$ 1,234,567.89"); - assert(ios.width() == 0); - } - { // negative, showbase, right - long double v = -123456789; - showbase(ios); - ios.width(20); - right(ios); - wchar_t str[100]; - output_iterator iter = f.put(output_iterator(str), - false, ios, ' ', v); - std::wstring ex(str, iter.base()); - assert(ex == L" -$1,234,567.89"); - assert(ios.width() == 0); - } - - // wchar_t, international - noshowbase(ios); - ios.unsetf(std::ios_base::adjustfield); - { // zero - long double v = 0; - wchar_t str[100]; - output_iterator iter = f.put(output_iterator(str), - true, ios, '*', v); - std::wstring ex(str, iter.base()); - assert(ex == L"0.00"); - } - { // negative one - long double v = -1; - wchar_t str[100]; - output_iterator iter = f.put(output_iterator(str), - true, ios, '*', v); - std::wstring ex(str, iter.base()); - assert(ex == L"-0.01"); - } - { // positive - long double v = 123456789; - wchar_t str[100]; - output_iterator iter = f.put(output_iterator(str), - true, ios, '*', v); - std::wstring ex(str, iter.base()); - assert(ex == L"1,234,567.89"); - } - { // negative - long double v = -123456789; - wchar_t str[100]; - output_iterator iter = f.put(output_iterator(str), - true, ios, '*', v); - std::wstring ex(str, iter.base()); - assert(ex == L"-1,234,567.89"); - } - { // zero, showbase - long double v = 0; - showbase(ios); - wchar_t str[100]; - output_iterator iter = f.put(output_iterator(str), - true, ios, '*', v); - std::wstring ex(str, iter.base()); - assert(ex == L"USD 0.00"); - } - { // negative one, showbase - long double v = -1; - showbase(ios); - wchar_t str[100]; - output_iterator iter = f.put(output_iterator(str), - true, ios, '*', v); - std::wstring ex(str, iter.base()); - assert(ex == L"-USD 0.01"); - } - { // positive, showbase - long double v = 123456789; - showbase(ios); - wchar_t str[100]; - output_iterator iter = f.put(output_iterator(str), - true, ios, '*', v); - std::wstring ex(str, iter.base()); - assert(ex == L"USD 1,234,567.89"); - } - { // negative, showbase - long double v = -123456789; - showbase(ios); - wchar_t str[100]; - output_iterator iter = f.put(output_iterator(str), - true, ios, '*', v); - std::wstring ex(str, iter.base()); - assert(ex == L"-USD 1,234,567.89"); - } - { // negative, showbase, left - long double v = -123456789; - showbase(ios); - ios.width(20); - left(ios); - wchar_t str[100]; - output_iterator iter = f.put(output_iterator(str), - true, ios, ' ', v); - std::wstring ex(str, iter.base()); - assert(ex == L"-USD 1,234,567.89 "); - assert(ios.width() == 0); - } - { // negative, showbase, internal - long double v = -123456789; - showbase(ios); - ios.width(20); - internal(ios); - wchar_t str[100]; - output_iterator iter = f.put(output_iterator(str), - true, ios, ' ', v); - std::wstring ex(str, iter.base()); - assert(ex == L"-USD 1,234,567.89"); - assert(ios.width() == 0); - } - { // negative, showbase, right - long double v = -123456789; - showbase(ios); - ios.width(20); - right(ios); - wchar_t str[100]; - output_iterator iter = f.put(output_iterator(str), - true, ios, ' ', v); - std::wstring ex(str, iter.base()); - assert(ex == L" -USD 1,234,567.89"); - assert(ios.width() == 0); - } -} -} diff --git a/test/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_fr_FR.xfail.pass.cpp b/test/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_fr_FR.xfail.pass.cpp deleted file mode 100644 index 4605641e..00000000 --- a/test/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_fr_FR.xfail.pass.cpp +++ /dev/null @@ -1,489 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// class money_put - -// iter_type put(iter_type s, bool intl, ios_base& f, char_type fill, -// long double units) const; - -#include -#include -#include -#include -#include "iterators.h" - -typedef std::money_put > Fn; - -class my_facet - : public Fn -{ -public: - explicit my_facet(std::size_t refs = 0) - : Fn(refs) {} -}; - -typedef std::money_put > Fw; - -class my_facetw - : public Fw -{ -public: - explicit my_facetw(std::size_t refs = 0) - : Fw(refs) {} -}; - -int main() -{ - std::ios ios(0); - std::string loc_name("fr_FR"); - ios.imbue(std::locale(ios.getloc(), - new std::moneypunct_byname(loc_name))); - ios.imbue(std::locale(ios.getloc(), - new std::moneypunct_byname(loc_name))); - ios.imbue(std::locale(ios.getloc(), - new std::moneypunct_byname(loc_name))); - ios.imbue(std::locale(ios.getloc(), - new std::moneypunct_byname(loc_name))); -{ - const my_facet f(1); - // char, national - { // zero - long double v = 0; - char str[100]; - output_iterator iter = f.put(output_iterator(str), - false, ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0,00 "); - } - { // negative one - long double v = -1; - char str[100]; - output_iterator iter = f.put(output_iterator(str), - false, ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0,01 -"); - } - { // positive - long double v = 123456789; - char str[100]; - output_iterator iter = f.put(output_iterator(str), - false, ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1 234 567,89 "); - } - { // negative - long double v = -123456789; - char str[100]; - output_iterator iter = f.put(output_iterator(str), - false, ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1 234 567,89 -"); - } - { // zero, showbase - long double v = 0; - showbase(ios); - char str[100]; - output_iterator iter = f.put(output_iterator(str), - false, ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0,00 Eu"); - } - { // negative one, showbase - long double v = -1; - showbase(ios); - char str[100]; - output_iterator iter = f.put(output_iterator(str), - false, ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0,01 Eu-"); - } - { // positive, showbase - long double v = 123456789; - showbase(ios); - char str[100]; - output_iterator iter = f.put(output_iterator(str), - false, ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1 234 567,89 Eu"); - } - { // negative, showbase - long double v = -123456789; - showbase(ios); - char str[100]; - output_iterator iter = f.put(output_iterator(str), - false, ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1 234 567,89 Eu-"); - } - { // negative, showbase, left - long double v = -123456789; - showbase(ios); - ios.width(20); - left(ios); - char str[100]; - output_iterator iter = f.put(output_iterator(str), - false, ios, ' ', v); - std::string ex(str, iter.base()); - assert(ex == "1 234 567,89 Eu- "); - assert(ios.width() == 0); - } - { // negative, showbase, internal - long double v = -123456789; - showbase(ios); - ios.width(20); - internal(ios); - char str[100]; - output_iterator iter = f.put(output_iterator(str), - false, ios, ' ', v); - std::string ex(str, iter.base()); - assert(ex == "1 234 567,89 Eu-"); - assert(ios.width() == 0); - } - { // negative, showbase, right - long double v = -123456789; - showbase(ios); - ios.width(20); - right(ios); - char str[100]; - output_iterator iter = f.put(output_iterator(str), - false, ios, ' ', v); - std::string ex(str, iter.base()); - assert(ex == " 1 234 567,89 Eu-"); - assert(ios.width() == 0); - } - - // char, international - noshowbase(ios); - ios.unsetf(std::ios_base::adjustfield); - { // zero - long double v = 0; - char str[100]; - output_iterator iter = f.put(output_iterator(str), - true, ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0,00 "); - } - { // negative one - long double v = -1; - char str[100]; - output_iterator iter = f.put(output_iterator(str), - true, ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0,01 -"); - } - { // positive - long double v = 123456789; - char str[100]; - output_iterator iter = f.put(output_iterator(str), - true, ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1 234 567,89 "); - } - { // negative - long double v = -123456789; - char str[100]; - output_iterator iter = f.put(output_iterator(str), - true, ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1 234 567,89 -"); - } - { // zero, showbase - long double v = 0; - showbase(ios); - char str[100]; - output_iterator iter = f.put(output_iterator(str), - true, ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0,00 EUR "); - } - { // negative one, showbase - long double v = -1; - showbase(ios); - char str[100]; - output_iterator iter = f.put(output_iterator(str), - true, ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0,01 EUR -"); - } - { // positive, showbase - long double v = 123456789; - showbase(ios); - char str[100]; - output_iterator iter = f.put(output_iterator(str), - true, ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1 234 567,89 EUR "); - } - { // negative, showbase - long double v = -123456789; - showbase(ios); - char str[100]; - output_iterator iter = f.put(output_iterator(str), - true, ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1 234 567,89 EUR -"); - } - { // negative, showbase, left - long double v = -123456789; - showbase(ios); - ios.width(20); - left(ios); - char str[100]; - output_iterator iter = f.put(output_iterator(str), - true, ios, ' ', v); - std::string ex(str, iter.base()); - assert(ex == "1 234 567,89 EUR - "); - assert(ios.width() == 0); - } - { // negative, showbase, internal - long double v = -123456789; - showbase(ios); - ios.width(20); - internal(ios); - char str[100]; - output_iterator iter = f.put(output_iterator(str), - true, ios, ' ', v); - std::string ex(str, iter.base()); - assert(ex == "1 234 567,89 EUR -"); - assert(ios.width() == 0); - } - { // negative, showbase, right - long double v = -123456789; - showbase(ios); - ios.width(20); - right(ios); - char str[100]; - output_iterator iter = f.put(output_iterator(str), - true, ios, ' ', v); - std::string ex(str, iter.base()); - assert(ex == " 1 234 567,89 EUR -"); - assert(ios.width() == 0); - } -} -{ - const my_facetw f(1); - // wchar_t, national - noshowbase(ios); - ios.unsetf(std::ios_base::adjustfield); - { // zero - long double v = 0; - wchar_t str[100]; - output_iterator iter = f.put(output_iterator(str), - false, ios, '*', v); - std::wstring ex(str, iter.base()); - assert(ex == L"0,00 "); - } - { // negative one - long double v = -1; - wchar_t str[100]; - output_iterator iter = f.put(output_iterator(str), - false, ios, '*', v); - std::wstring ex(str, iter.base()); - assert(ex == L"0,01 -"); - } - { // positive - long double v = 123456789; - wchar_t str[100]; - output_iterator iter = f.put(output_iterator(str), - false, ios, '*', v); - std::wstring ex(str, iter.base()); - assert(ex == L"1 234 567,89 "); - } - { // negative - long double v = -123456789; - wchar_t str[100]; - output_iterator iter = f.put(output_iterator(str), - false, ios, '*', v); - std::wstring ex(str, iter.base()); - assert(ex == L"1 234 567,89 -"); - } - { // zero, showbase - long double v = 0; - showbase(ios); - wchar_t str[100]; - output_iterator iter = f.put(output_iterator(str), - false, ios, '*', v); - std::wstring ex(str, iter.base()); - assert(ex == L"0,00 Eu"); - } - { // negative one, showbase - long double v = -1; - showbase(ios); - wchar_t str[100]; - output_iterator iter = f.put(output_iterator(str), - false, ios, '*', v); - std::wstring ex(str, iter.base()); - assert(ex == L"0,01 Eu-"); - } - { // positive, showbase - long double v = 123456789; - showbase(ios); - wchar_t str[100]; - output_iterator iter = f.put(output_iterator(str), - false, ios, '*', v); - std::wstring ex(str, iter.base()); - assert(ex == L"1 234 567,89 Eu"); - } - { // negative, showbase - long double v = -123456789; - showbase(ios); - wchar_t str[100]; - output_iterator iter = f.put(output_iterator(str), - false, ios, '*', v); - std::wstring ex(str, iter.base()); - assert(ex == L"1 234 567,89 Eu-"); - } - { // negative, showbase, left - long double v = -123456789; - showbase(ios); - ios.width(20); - left(ios); - wchar_t str[100]; - output_iterator iter = f.put(output_iterator(str), - false, ios, ' ', v); - std::wstring ex(str, iter.base()); - assert(ex == L"1 234 567,89 Eu- "); - assert(ios.width() == 0); - } - { // negative, showbase, internal - long double v = -123456789; - showbase(ios); - ios.width(20); - internal(ios); - wchar_t str[100]; - output_iterator iter = f.put(output_iterator(str), - false, ios, ' ', v); - std::wstring ex(str, iter.base()); - assert(ex == L"1 234 567,89 Eu-"); - assert(ios.width() == 0); - } - { // negative, showbase, right - long double v = -123456789; - showbase(ios); - ios.width(20); - right(ios); - wchar_t str[100]; - output_iterator iter = f.put(output_iterator(str), - false, ios, ' ', v); - std::wstring ex(str, iter.base()); - assert(ex == L" 1 234 567,89 Eu-"); - assert(ios.width() == 0); - } - - // wchar_t, international - noshowbase(ios); - ios.unsetf(std::ios_base::adjustfield); - { // zero - long double v = 0; - wchar_t str[100]; - output_iterator iter = f.put(output_iterator(str), - true, ios, '*', v); - std::wstring ex(str, iter.base()); - assert(ex == L"0,00 "); - } - { // negative one - long double v = -1; - wchar_t str[100]; - output_iterator iter = f.put(output_iterator(str), - true, ios, '*', v); - std::wstring ex(str, iter.base()); - assert(ex == L"0,01 -"); - } - { // positive - long double v = 123456789; - wchar_t str[100]; - output_iterator iter = f.put(output_iterator(str), - true, ios, '*', v); - std::wstring ex(str, iter.base()); - assert(ex == L"1 234 567,89 "); - } - { // negative - long double v = -123456789; - wchar_t str[100]; - output_iterator iter = f.put(output_iterator(str), - true, ios, '*', v); - std::wstring ex(str, iter.base()); - assert(ex == L"1 234 567,89 -"); - } - { // zero, showbase - long double v = 0; - showbase(ios); - wchar_t str[100]; - output_iterator iter = f.put(output_iterator(str), - true, ios, '*', v); - std::wstring ex(str, iter.base()); - assert(ex == L"0,00 EUR "); - } - { // negative one, showbase - long double v = -1; - showbase(ios); - wchar_t str[100]; - output_iterator iter = f.put(output_iterator(str), - true, ios, '*', v); - std::wstring ex(str, iter.base()); - assert(ex == L"0,01 EUR -"); - } - { // positive, showbase - long double v = 123456789; - showbase(ios); - wchar_t str[100]; - output_iterator iter = f.put(output_iterator(str), - true, ios, '*', v); - std::wstring ex(str, iter.base()); - assert(ex == L"1 234 567,89 EUR "); - } - { // negative, showbase - long double v = -123456789; - showbase(ios); - wchar_t str[100]; - output_iterator iter = f.put(output_iterator(str), - true, ios, '*', v); - std::wstring ex(str, iter.base()); - assert(ex == L"1 234 567,89 EUR -"); - } - { // negative, showbase, left - long double v = -123456789; - showbase(ios); - ios.width(20); - left(ios); - wchar_t str[100]; - output_iterator iter = f.put(output_iterator(str), - true, ios, ' ', v); - std::wstring ex(str, iter.base()); - assert(ex == L"1 234 567,89 EUR - "); - assert(ios.width() == 0); - } - { // negative, showbase, internal - long double v = -123456789; - showbase(ios); - ios.width(20); - internal(ios); - wchar_t str[100]; - output_iterator iter = f.put(output_iterator(str), - true, ios, ' ', v); - std::wstring ex(str, iter.base()); - assert(ex == L"1 234 567,89 EUR -"); - assert(ios.width() == 0); - } - { // negative, showbase, right - long double v = -123456789; - showbase(ios); - ios.width(20); - right(ios); - wchar_t str[100]; - output_iterator iter = f.put(output_iterator(str), - true, ios, ' ', v); - std::wstring ex(str, iter.base()); - assert(ex == L" 1 234 567,89 EUR -"); - assert(ios.width() == 0); - } -} -} diff --git a/test/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_ru_RU.xfail.pass.cpp b/test/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_ru_RU.xfail.pass.cpp deleted file mode 100644 index 7755d3d1..00000000 --- a/test/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_ru_RU.xfail.pass.cpp +++ /dev/null @@ -1,489 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// class money_put - -// iter_type put(iter_type s, bool intl, ios_base& f, char_type fill, -// long double units) const; - -#include -#include -#include -#include -#include "iterators.h" - -typedef std::money_put > Fn; - -class my_facet - : public Fn -{ -public: - explicit my_facet(std::size_t refs = 0) - : Fn(refs) {} -}; - -typedef std::money_put > Fw; - -class my_facetw - : public Fw -{ -public: - explicit my_facetw(std::size_t refs = 0) - : Fw(refs) {} -}; - -int main() -{ - std::ios ios(0); - std::string loc_name("ru_RU"); - ios.imbue(std::locale(ios.getloc(), - new std::moneypunct_byname(loc_name))); - ios.imbue(std::locale(ios.getloc(), - new std::moneypunct_byname(loc_name))); - ios.imbue(std::locale(ios.getloc(), - new std::moneypunct_byname(loc_name))); - ios.imbue(std::locale(ios.getloc(), - new std::moneypunct_byname(loc_name))); -{ - const my_facet f(1); - // char, national - { // zero - long double v = 0; - char str[100]; - output_iterator iter = f.put(output_iterator(str), - false, ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0,00 "); - } - { // negative one - long double v = -1; - char str[100]; - output_iterator iter = f.put(output_iterator(str), - false, ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0,01 "); - } - { // positive - long double v = 123456789; - char str[100]; - output_iterator iter = f.put(output_iterator(str), - false, ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1 234 567,89 "); - } - { // negative - long double v = -123456789; - char str[100]; - output_iterator iter = f.put(output_iterator(str), - false, ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-1 234 567,89 "); - } - { // zero, showbase - long double v = 0; - showbase(ios); - char str[100]; - output_iterator iter = f.put(output_iterator(str), - false, ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0,00 \xD1\x80\xD1\x83\xD0\xB1""."); - } - { // negative one, showbase - long double v = -1; - showbase(ios); - char str[100]; - output_iterator iter = f.put(output_iterator(str), - false, ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0,01 \xD1\x80\xD1\x83\xD0\xB1""."); - } - { // positive, showbase - long double v = 123456789; - showbase(ios); - char str[100]; - output_iterator iter = f.put(output_iterator(str), - false, ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1 234 567,89 \xD1\x80\xD1\x83\xD0\xB1""."); - } - { // negative, showbase - long double v = -123456789; - showbase(ios); - char str[100]; - output_iterator iter = f.put(output_iterator(str), - false, ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-1 234 567,89 \xD1\x80\xD1\x83\xD0\xB1""."); - } - { // negative, showbase, left - long double v = -123456789; - showbase(ios); - ios.width(20); - left(ios); - char str[100]; - output_iterator iter = f.put(output_iterator(str), - false, ios, ' ', v); - std::string ex(str, iter.base()); - assert(ex == "-1 234 567,89 \xD1\x80\xD1\x83\xD0\xB1""."); - assert(ios.width() == 0); - } - { // negative, showbase, internal - long double v = -123456789; - showbase(ios); - ios.width(20); - internal(ios); - char str[100]; - output_iterator iter = f.put(output_iterator(str), - false, ios, ' ', v); - std::string ex(str, iter.base()); - assert(ex == "-1 234 567,89 \xD1\x80\xD1\x83\xD0\xB1""."); - assert(ios.width() == 0); - } - { // negative, showbase, right - long double v = -123456789; - showbase(ios); - ios.width(20); - right(ios); - char str[100]; - output_iterator iter = f.put(output_iterator(str), - false, ios, ' ', v); - std::string ex(str, iter.base()); - assert(ex == "-1 234 567,89 \xD1\x80\xD1\x83\xD0\xB1""."); - assert(ios.width() == 0); - } - - // char, international - noshowbase(ios); - ios.unsetf(std::ios_base::adjustfield); - { // zero - long double v = 0; - char str[100]; - output_iterator iter = f.put(output_iterator(str), - true, ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0,00 "); - } - { // negative one - long double v = -1; - char str[100]; - output_iterator iter = f.put(output_iterator(str), - true, ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0,01 "); - } - { // positive - long double v = 123456789; - char str[100]; - output_iterator iter = f.put(output_iterator(str), - true, ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1 234 567,89 "); - } - { // negative - long double v = -123456789; - char str[100]; - output_iterator iter = f.put(output_iterator(str), - true, ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-1 234 567,89 "); - } - { // zero, showbase - long double v = 0; - showbase(ios); - char str[100]; - output_iterator iter = f.put(output_iterator(str), - true, ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0,00 RUR "); - } - { // negative one, showbase - long double v = -1; - showbase(ios); - char str[100]; - output_iterator iter = f.put(output_iterator(str), - true, ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0,01 RUR "); - } - { // positive, showbase - long double v = 123456789; - showbase(ios); - char str[100]; - output_iterator iter = f.put(output_iterator(str), - true, ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1 234 567,89 RUR "); - } - { // negative, showbase - long double v = -123456789; - showbase(ios); - char str[100]; - output_iterator iter = f.put(output_iterator(str), - true, ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-1 234 567,89 RUR "); - } - { // negative, showbase, left - long double v = -123456789; - showbase(ios); - ios.width(20); - left(ios); - char str[100]; - output_iterator iter = f.put(output_iterator(str), - true, ios, ' ', v); - std::string ex(str, iter.base()); - assert(ex == "-1 234 567,89 RUR "); - assert(ios.width() == 0); - } - { // negative, showbase, internal - long double v = -123456789; - showbase(ios); - ios.width(20); - internal(ios); - char str[100]; - output_iterator iter = f.put(output_iterator(str), - true, ios, ' ', v); - std::string ex(str, iter.base()); - assert(ex == "-1 234 567,89 RUR "); - assert(ios.width() == 0); - } - { // negative, showbase, right - long double v = -123456789; - showbase(ios); - ios.width(20); - right(ios); - char str[100]; - output_iterator iter = f.put(output_iterator(str), - true, ios, ' ', v); - std::string ex(str, iter.base()); - assert(ex == " -1 234 567,89 RUR "); - assert(ios.width() == 0); - } -} -{ - const my_facetw f(1); - // wchar_t, national - noshowbase(ios); - ios.unsetf(std::ios_base::adjustfield); - { // zero - long double v = 0; - wchar_t str[100]; - output_iterator iter = f.put(output_iterator(str), - false, ios, '*', v); - std::wstring ex(str, iter.base()); - assert(ex == L"0,00 "); - } - { // negative one - long double v = -1; - wchar_t str[100]; - output_iterator iter = f.put(output_iterator(str), - false, ios, '*', v); - std::wstring ex(str, iter.base()); - assert(ex == L"-0,01 "); - } - { // positive - long double v = 123456789; - wchar_t str[100]; - output_iterator iter = f.put(output_iterator(str), - false, ios, '*', v); - std::wstring ex(str, iter.base()); - assert(ex == L"1 234 567,89 "); - } - { // negative - long double v = -123456789; - wchar_t str[100]; - output_iterator iter = f.put(output_iterator(str), - false, ios, '*', v); - std::wstring ex(str, iter.base()); - assert(ex == L"-1 234 567,89 "); - } - { // zero, showbase - long double v = 0; - showbase(ios); - wchar_t str[100]; - output_iterator iter = f.put(output_iterator(str), - false, ios, '*', v); - std::wstring ex(str, iter.base()); - assert(ex == L"0,00 \x440\x443\x431""."); - } - { // negative one, showbase - long double v = -1; - showbase(ios); - wchar_t str[100]; - output_iterator iter = f.put(output_iterator(str), - false, ios, '*', v); - std::wstring ex(str, iter.base()); - assert(ex == L"-0,01 \x440\x443\x431""."); - } - { // positive, showbase - long double v = 123456789; - showbase(ios); - wchar_t str[100]; - output_iterator iter = f.put(output_iterator(str), - false, ios, '*', v); - std::wstring ex(str, iter.base()); - assert(ex == L"1 234 567,89 \x440\x443\x431""."); - } - { // negative, showbase - long double v = -123456789; - showbase(ios); - wchar_t str[100]; - output_iterator iter = f.put(output_iterator(str), - false, ios, '*', v); - std::wstring ex(str, iter.base()); - assert(ex == L"-1 234 567,89 \x440\x443\x431""."); - } - { // negative, showbase, left - long double v = -123456789; - showbase(ios); - ios.width(20); - left(ios); - wchar_t str[100]; - output_iterator iter = f.put(output_iterator(str), - false, ios, ' ', v); - std::wstring ex(str, iter.base()); - assert(ex == L"-1 234 567,89 \x440\x443\x431"". "); - assert(ios.width() == 0); - } - { // negative, showbase, internal - long double v = -123456789; - showbase(ios); - ios.width(20); - internal(ios); - wchar_t str[100]; - output_iterator iter = f.put(output_iterator(str), - false, ios, ' ', v); - std::wstring ex(str, iter.base()); - assert(ex == L"-1 234 567,89 \x440\x443\x431""."); - assert(ios.width() == 0); - } - { // negative, showbase, right - long double v = -123456789; - showbase(ios); - ios.width(20); - right(ios); - wchar_t str[100]; - output_iterator iter = f.put(output_iterator(str), - false, ios, ' ', v); - std::wstring ex(str, iter.base()); - assert(ex == L" -1 234 567,89 \x440\x443\x431""."); - assert(ios.width() == 0); - } - - // wchar_t, international - noshowbase(ios); - ios.unsetf(std::ios_base::adjustfield); - { // zero - long double v = 0; - wchar_t str[100]; - output_iterator iter = f.put(output_iterator(str), - true, ios, '*', v); - std::wstring ex(str, iter.base()); - assert(ex == L"0,00 "); - } - { // negative one - long double v = -1; - wchar_t str[100]; - output_iterator iter = f.put(output_iterator(str), - true, ios, '*', v); - std::wstring ex(str, iter.base()); - assert(ex == L"-0,01 "); - } - { // positive - long double v = 123456789; - wchar_t str[100]; - output_iterator iter = f.put(output_iterator(str), - true, ios, '*', v); - std::wstring ex(str, iter.base()); - assert(ex == L"1 234 567,89 "); - } - { // negative - long double v = -123456789; - wchar_t str[100]; - output_iterator iter = f.put(output_iterator(str), - true, ios, '*', v); - std::wstring ex(str, iter.base()); - assert(ex == L"-1 234 567,89 "); - } - { // zero, showbase - long double v = 0; - showbase(ios); - wchar_t str[100]; - output_iterator iter = f.put(output_iterator(str), - true, ios, '*', v); - std::wstring ex(str, iter.base()); - assert(ex == L"0,00 RUR "); - } - { // negative one, showbase - long double v = -1; - showbase(ios); - wchar_t str[100]; - output_iterator iter = f.put(output_iterator(str), - true, ios, '*', v); - std::wstring ex(str, iter.base()); - assert(ex == L"-0,01 RUR "); - } - { // positive, showbase - long double v = 123456789; - showbase(ios); - wchar_t str[100]; - output_iterator iter = f.put(output_iterator(str), - true, ios, '*', v); - std::wstring ex(str, iter.base()); - assert(ex == L"1 234 567,89 RUR "); - } - { // negative, showbase - long double v = -123456789; - showbase(ios); - wchar_t str[100]; - output_iterator iter = f.put(output_iterator(str), - true, ios, '*', v); - std::wstring ex(str, iter.base()); - assert(ex == L"-1 234 567,89 RUR "); - } - { // negative, showbase, left - long double v = -123456789; - showbase(ios); - ios.width(20); - left(ios); - wchar_t str[100]; - output_iterator iter = f.put(output_iterator(str), - true, ios, ' ', v); - std::wstring ex(str, iter.base()); - assert(ex == L"-1 234 567,89 RUR "); - assert(ios.width() == 0); - } - { // negative, showbase, internal - long double v = -123456789; - showbase(ios); - ios.width(20); - internal(ios); - wchar_t str[100]; - output_iterator iter = f.put(output_iterator(str), - true, ios, ' ', v); - std::wstring ex(str, iter.base()); - assert(ex == L"-1 234 567,89 RUR "); - assert(ios.width() == 0); - } - { // negative, showbase, right - long double v = -123456789; - showbase(ios); - ios.width(20); - right(ios); - wchar_t str[100]; - output_iterator iter = f.put(output_iterator(str), - true, ios, ' ', v); - std::wstring ex(str, iter.base()); - assert(ex == L" -1 234 567,89 RUR "); - assert(ios.width() == 0); - } -} -} diff --git a/test/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_zh_CN.xfail.pass.cpp b/test/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_zh_CN.xfail.pass.cpp deleted file mode 100644 index fc4a071d..00000000 --- a/test/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_zh_CN.xfail.pass.cpp +++ /dev/null @@ -1,489 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// class money_put - -// iter_type put(iter_type s, bool intl, ios_base& f, char_type fill, -// long double units) const; - -#include -#include -#include -#include -#include "iterators.h" - -typedef std::money_put > Fn; - -class my_facet - : public Fn -{ -public: - explicit my_facet(std::size_t refs = 0) - : Fn(refs) {} -}; - -typedef std::money_put > Fw; - -class my_facetw - : public Fw -{ -public: - explicit my_facetw(std::size_t refs = 0) - : Fw(refs) {} -}; - -int main() -{ - std::ios ios(0); - std::string loc_name("zh_CN"); - ios.imbue(std::locale(ios.getloc(), - new std::moneypunct_byname(loc_name))); - ios.imbue(std::locale(ios.getloc(), - new std::moneypunct_byname(loc_name))); - ios.imbue(std::locale(ios.getloc(), - new std::moneypunct_byname(loc_name))); - ios.imbue(std::locale(ios.getloc(), - new std::moneypunct_byname(loc_name))); -{ - const my_facet f(1); - // char, national - { // zero - long double v = 0; - char str[100]; - output_iterator iter = f.put(output_iterator(str), - false, ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0.00"); - } - { // negative one - long double v = -1; - char str[100]; - output_iterator iter = f.put(output_iterator(str), - false, ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.01"); - } - { // positive - long double v = 123456789; - char str[100]; - output_iterator iter = f.put(output_iterator(str), - false, ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1,234,567.89"); - } - { // negative - long double v = -123456789; - char str[100]; - output_iterator iter = f.put(output_iterator(str), - false, ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-1,234,567.89"); - } - { // zero, showbase - long double v = 0; - showbase(ios); - char str[100]; - output_iterator iter = f.put(output_iterator(str), - false, ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "\xEF\xBF\xA5""0.00"); - } - { // negative one, showbase - long double v = -1; - showbase(ios); - char str[100]; - output_iterator iter = f.put(output_iterator(str), - false, ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "\xEF\xBF\xA5""-0.01"); - } - { // positive, showbase - long double v = 123456789; - showbase(ios); - char str[100]; - output_iterator iter = f.put(output_iterator(str), - false, ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "\xEF\xBF\xA5""1,234,567.89"); - } - { // negative, showbase - long double v = -123456789; - showbase(ios); - char str[100]; - output_iterator iter = f.put(output_iterator(str), - false, ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "\xEF\xBF\xA5""-1,234,567.89"); - } - { // negative, showbase, left - long double v = -123456789; - showbase(ios); - ios.width(20); - left(ios); - char str[100]; - output_iterator iter = f.put(output_iterator(str), - false, ios, ' ', v); - std::string ex(str, iter.base()); - assert(ex == "\xEF\xBF\xA5""-1,234,567.89 "); - assert(ios.width() == 0); - } - { // negative, showbase, internal - long double v = -123456789; - showbase(ios); - ios.width(20); - internal(ios); - char str[100]; - output_iterator iter = f.put(output_iterator(str), - false, ios, ' ', v); - std::string ex(str, iter.base()); - assert(ex == "\xEF\xBF\xA5""- 1,234,567.89"); - assert(ios.width() == 0); - } - { // negative, showbase, right - long double v = -123456789; - showbase(ios); - ios.width(20); - right(ios); - char str[100]; - output_iterator iter = f.put(output_iterator(str), - false, ios, ' ', v); - std::string ex(str, iter.base()); - assert(ex == " \xEF\xBF\xA5""-1,234,567.89"); - assert(ios.width() == 0); - } - - // char, international - noshowbase(ios); - ios.unsetf(std::ios_base::adjustfield); - { // zero - long double v = 0; - char str[100]; - output_iterator iter = f.put(output_iterator(str), - true, ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0.00"); - } - { // negative one - long double v = -1; - char str[100]; - output_iterator iter = f.put(output_iterator(str), - true, ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.01"); - } - { // positive - long double v = 123456789; - char str[100]; - output_iterator iter = f.put(output_iterator(str), - true, ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1,234,567.89"); - } - { // negative - long double v = -123456789; - char str[100]; - output_iterator iter = f.put(output_iterator(str), - true, ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-1,234,567.89"); - } - { // zero, showbase - long double v = 0; - showbase(ios); - char str[100]; - output_iterator iter = f.put(output_iterator(str), - true, ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "CNY 0.00"); - } - { // negative one, showbase - long double v = -1; - showbase(ios); - char str[100]; - output_iterator iter = f.put(output_iterator(str), - true, ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "CNY -0.01"); - } - { // positive, showbase - long double v = 123456789; - showbase(ios); - char str[100]; - output_iterator iter = f.put(output_iterator(str), - true, ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "CNY 1,234,567.89"); - } - { // negative, showbase - long double v = -123456789; - showbase(ios); - char str[100]; - output_iterator iter = f.put(output_iterator(str), - true, ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "CNY -1,234,567.89"); - } - { // negative, showbase, left - long double v = -123456789; - showbase(ios); - ios.width(20); - left(ios); - char str[100]; - output_iterator iter = f.put(output_iterator(str), - true, ios, ' ', v); - std::string ex(str, iter.base()); - assert(ex == "CNY -1,234,567.89 "); - assert(ios.width() == 0); - } - { // negative, showbase, internal - long double v = -123456789; - showbase(ios); - ios.width(20); - internal(ios); - char str[100]; - output_iterator iter = f.put(output_iterator(str), - true, ios, ' ', v); - std::string ex(str, iter.base()); - assert(ex == "CNY - 1,234,567.89"); - assert(ios.width() == 0); - } - { // negative, showbase, right - long double v = -123456789; - showbase(ios); - ios.width(20); - right(ios); - char str[100]; - output_iterator iter = f.put(output_iterator(str), - true, ios, ' ', v); - std::string ex(str, iter.base()); - assert(ex == " CNY -1,234,567.89"); - assert(ios.width() == 0); - } -} -{ - const my_facetw f(1); - // wchar_t, national - noshowbase(ios); - ios.unsetf(std::ios_base::adjustfield); - { // zero - long double v = 0; - wchar_t str[100]; - output_iterator iter = f.put(output_iterator(str), - false, ios, '*', v); - std::wstring ex(str, iter.base()); - assert(ex == L"0.00"); - } - { // negative one - long double v = -1; - wchar_t str[100]; - output_iterator iter = f.put(output_iterator(str), - false, ios, '*', v); - std::wstring ex(str, iter.base()); - assert(ex == L"-0.01"); - } - { // positive - long double v = 123456789; - wchar_t str[100]; - output_iterator iter = f.put(output_iterator(str), - false, ios, '*', v); - std::wstring ex(str, iter.base()); - assert(ex == L"1,234,567.89"); - } - { // negative - long double v = -123456789; - wchar_t str[100]; - output_iterator iter = f.put(output_iterator(str), - false, ios, '*', v); - std::wstring ex(str, iter.base()); - assert(ex == L"-1,234,567.89"); - } - { // zero, showbase - long double v = 0; - showbase(ios); - wchar_t str[100]; - output_iterator iter = f.put(output_iterator(str), - false, ios, '*', v); - std::wstring ex(str, iter.base()); - assert(ex == L"\xFFE5""0.00"); - } - { // negative one, showbase - long double v = -1; - showbase(ios); - wchar_t str[100]; - output_iterator iter = f.put(output_iterator(str), - false, ios, '*', v); - std::wstring ex(str, iter.base()); - assert(ex == L"\xFFE5""-0.01"); - } - { // positive, showbase - long double v = 123456789; - showbase(ios); - wchar_t str[100]; - output_iterator iter = f.put(output_iterator(str), - false, ios, '*', v); - std::wstring ex(str, iter.base()); - assert(ex == L"\xFFE5""1,234,567.89"); - } - { // negative, showbase - long double v = -123456789; - showbase(ios); - wchar_t str[100]; - output_iterator iter = f.put(output_iterator(str), - false, ios, '*', v); - std::wstring ex(str, iter.base()); - assert(ex == L"\xFFE5""-1,234,567.89"); - } - { // negative, showbase, left - long double v = -123456789; - showbase(ios); - ios.width(20); - left(ios); - wchar_t str[100]; - output_iterator iter = f.put(output_iterator(str), - false, ios, ' ', v); - std::wstring ex(str, iter.base()); - assert(ex == L"\xFFE5""-1,234,567.89 "); - assert(ios.width() == 0); - } - { // negative, showbase, internal - long double v = -123456789; - showbase(ios); - ios.width(20); - internal(ios); - wchar_t str[100]; - output_iterator iter = f.put(output_iterator(str), - false, ios, ' ', v); - std::wstring ex(str, iter.base()); - assert(ex == L"\xFFE5""- 1,234,567.89"); - assert(ios.width() == 0); - } - { // negative, showbase, right - long double v = -123456789; - showbase(ios); - ios.width(20); - right(ios); - wchar_t str[100]; - output_iterator iter = f.put(output_iterator(str), - false, ios, ' ', v); - std::wstring ex(str, iter.base()); - assert(ex == L" \xFFE5""-1,234,567.89"); - assert(ios.width() == 0); - } - - // wchar_t, international - noshowbase(ios); - ios.unsetf(std::ios_base::adjustfield); - { // zero - long double v = 0; - wchar_t str[100]; - output_iterator iter = f.put(output_iterator(str), - true, ios, '*', v); - std::wstring ex(str, iter.base()); - assert(ex == L"0.00"); - } - { // negative one - long double v = -1; - wchar_t str[100]; - output_iterator iter = f.put(output_iterator(str), - true, ios, '*', v); - std::wstring ex(str, iter.base()); - assert(ex == L"-0.01"); - } - { // positive - long double v = 123456789; - wchar_t str[100]; - output_iterator iter = f.put(output_iterator(str), - true, ios, '*', v); - std::wstring ex(str, iter.base()); - assert(ex == L"1,234,567.89"); - } - { // negative - long double v = -123456789; - wchar_t str[100]; - output_iterator iter = f.put(output_iterator(str), - true, ios, '*', v); - std::wstring ex(str, iter.base()); - assert(ex == L"-1,234,567.89"); - } - { // zero, showbase - long double v = 0; - showbase(ios); - wchar_t str[100]; - output_iterator iter = f.put(output_iterator(str), - true, ios, '*', v); - std::wstring ex(str, iter.base()); - assert(ex == L"CNY 0.00"); - } - { // negative one, showbase - long double v = -1; - showbase(ios); - wchar_t str[100]; - output_iterator iter = f.put(output_iterator(str), - true, ios, '*', v); - std::wstring ex(str, iter.base()); - assert(ex == L"CNY -0.01"); - } - { // positive, showbase - long double v = 123456789; - showbase(ios); - wchar_t str[100]; - output_iterator iter = f.put(output_iterator(str), - true, ios, '*', v); - std::wstring ex(str, iter.base()); - assert(ex == L"CNY 1,234,567.89"); - } - { // negative, showbase - long double v = -123456789; - showbase(ios); - wchar_t str[100]; - output_iterator iter = f.put(output_iterator(str), - true, ios, '*', v); - std::wstring ex(str, iter.base()); - assert(ex == L"CNY -1,234,567.89"); - } - { // negative, showbase, left - long double v = -123456789; - showbase(ios); - ios.width(20); - left(ios); - wchar_t str[100]; - output_iterator iter = f.put(output_iterator(str), - true, ios, ' ', v); - std::wstring ex(str, iter.base()); - assert(ex == L"CNY -1,234,567.89 "); - assert(ios.width() == 0); - } - { // negative, showbase, internal - long double v = -123456789; - showbase(ios); - ios.width(20); - internal(ios); - wchar_t str[100]; - output_iterator iter = f.put(output_iterator(str), - true, ios, ' ', v); - std::wstring ex(str, iter.base()); - assert(ex == L"CNY - 1,234,567.89"); - assert(ios.width() == 0); - } - { // negative, showbase, right - long double v = -123456789; - showbase(ios); - ios.width(20); - right(ios); - wchar_t str[100]; - output_iterator iter = f.put(output_iterator(str), - true, ios, ' ', v); - std::wstring ex(str, iter.base()); - assert(ex == L" CNY -1,234,567.89"); - assert(ios.width() == 0); - } -} -} diff --git a/test/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_string_en_US.xfail.pass.cpp b/test/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_string_en_US.xfail.pass.cpp deleted file mode 100644 index 28e10339..00000000 --- a/test/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_string_en_US.xfail.pass.cpp +++ /dev/null @@ -1,490 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// class money_put - -// iter_type put(iter_type s, bool intl, ios_base& f, char_type fill, -// const string_type& units) const; - -#include -#include -#include -#include -#include "iterators.h" - -typedef std::money_put > Fn; - -class my_facet - : public Fn -{ -public: - explicit my_facet(std::size_t refs = 0) - : Fn(refs) {} -}; - -typedef std::money_put > Fw; - -class my_facetw - : public Fw -{ -public: - explicit my_facetw(std::size_t refs = 0) - : Fw(refs) {} -}; - -int main() -{ - std::ios ios(0); - std::string loc_name("en_US"); - ios.imbue(std::locale(ios.getloc(), - new std::moneypunct_byname(loc_name))); - ios.imbue(std::locale(ios.getloc(), - new std::moneypunct_byname(loc_name))); - ios.imbue(std::locale(ios.getloc(), - new std::moneypunct_byname(loc_name))); - ios.imbue(std::locale(ios.getloc(), - new std::moneypunct_byname(loc_name))); -{ - const my_facet f(1); - // char, national - { // zero - std::string v = "0"; - char str[100]; - output_iterator iter = f.put(output_iterator(str), - false, ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0.00"); - } - { // negative one - std::string v = "-1"; - char str[100]; - output_iterator iter = f.put(output_iterator(str), - false, ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.01"); - } - { // positive - std::string v = "123456789"; - char str[100]; - output_iterator iter = f.put(output_iterator(str), - false, ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1,234,567.89"); - } - { // negative - std::string v = "-123456789"; - char str[100]; - output_iterator iter = f.put(output_iterator(str), - false, ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-1,234,567.89"); - } - { // zero, showbase - std::string v = "0"; - showbase(ios); - char str[100]; - output_iterator iter = f.put(output_iterator(str), - false, ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "$0.00"); - } - { // negative one, showbase - std::string v = "-1"; - showbase(ios); - char str[100]; - output_iterator iter = f.put(output_iterator(str), - false, ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-$0.01"); - } - { // positive, showbase - std::string v = "123456789"; - showbase(ios); - char str[100]; - output_iterator iter = f.put(output_iterator(str), - false, ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "$1,234,567.89"); - } - { // negative, showbase - std::string v = "-123456789"; - showbase(ios); - char str[100]; - output_iterator iter = f.put(output_iterator(str), - false, ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-$1,234,567.89"); - } - { // negative, showbase, left - std::string v = "-123456789"; - showbase(ios); - ios.width(20); - left(ios); - char str[100]; - output_iterator iter = f.put(output_iterator(str), - false, ios, ' ', v); - std::string ex(str, iter.base()); - assert(ex == "-$1,234,567.89 "); - assert(ios.width() == 0); - } - { // negative, showbase, internal - std::string v = "-123456789"; - showbase(ios); - ios.width(20); - internal(ios); - char str[100]; - output_iterator iter = f.put(output_iterator(str), - false, ios, ' ', v); - std::string ex(str, iter.base()); - assert(ex == "-$ 1,234,567.89"); - assert(ios.width() == 0); - } - { // negative, showbase, right - std::string v = "-123456789"; - showbase(ios); - ios.width(20); - right(ios); - char str[100]; - output_iterator iter = f.put(output_iterator(str), - false, ios, ' ', v); - std::string ex(str, iter.base()); - assert(ex == " -$1,234,567.89"); - assert(ios.width() == 0); - } - - // char, international - noshowbase(ios); - ios.unsetf(std::ios_base::adjustfield); - { // zero - std::string v = "0"; - char str[100]; - output_iterator iter = f.put(output_iterator(str), - true, ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0.00"); - } - { // negative one - std::string v = "-1"; - char str[100]; - output_iterator iter = f.put(output_iterator(str), - true, ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.01"); - } - { // positive - std::string v = "123456789"; - char str[100]; - output_iterator iter = f.put(output_iterator(str), - true, ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1,234,567.89"); - } - { // negative - std::string v = "-123456789"; - char str[100]; - output_iterator iter = f.put(output_iterator(str), - true, ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-1,234,567.89"); - } - { // zero, showbase - std::string v = "0"; - showbase(ios); - char str[100]; - output_iterator iter = f.put(output_iterator(str), - true, ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "USD 0.00"); - } - { // negative one, showbase - std::string v = "-1"; - showbase(ios); - char str[100]; - output_iterator iter = f.put(output_iterator(str), - true, ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-USD 0.01"); - } - { // positive, showbase - std::string v = "123456789"; - showbase(ios); - char str[100]; - output_iterator iter = f.put(output_iterator(str), - true, ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "USD 1,234,567.89"); - } - { // negative, showbase - std::string v = "-123456789"; - showbase(ios); - char str[100]; - output_iterator iter = f.put(output_iterator(str), - true, ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-USD 1,234,567.89"); - } - { // negative, showbase, left - std::string v = "-123456789"; - showbase(ios); - ios.width(20); - left(ios); - char str[100]; - output_iterator iter = f.put(output_iterator(str), - true, ios, ' ', v); - std::string ex(str, iter.base()); - assert(ex == "-USD 1,234,567.89 "); - assert(ios.width() == 0); - } - { // negative, showbase, internal - std::string v = "-123456789"; - showbase(ios); - ios.width(20); - internal(ios); - char str[100]; - output_iterator iter = f.put(output_iterator(str), - true, ios, ' ', v); - std::string ex(str, iter.base()); - assert(ex == "-USD 1,234,567.89"); - assert(ios.width() == 0); - } - { // negative, showbase, right - std::string v = "-123456789"; - showbase(ios); - ios.width(20); - right(ios); - char str[100]; - output_iterator iter = f.put(output_iterator(str), - true, ios, ' ', v); - std::string ex(str, iter.base()); - assert(ex == " -USD 1,234,567.89"); - assert(ios.width() == 0); - } -} -{ - - const my_facetw f(1); - // wchar_t, national - noshowbase(ios); - ios.unsetf(std::ios_base::adjustfield); - { // zero - std::wstring v = L"0"; - wchar_t str[100]; - output_iterator iter = f.put(output_iterator(str), - false, ios, '*', v); - std::wstring ex(str, iter.base()); - assert(ex == L"0.00"); - } - { // negative one - std::wstring v = L"-1"; - wchar_t str[100]; - output_iterator iter = f.put(output_iterator(str), - false, ios, '*', v); - std::wstring ex(str, iter.base()); - assert(ex == L"-0.01"); - } - { // positive - std::wstring v = L"123456789"; - wchar_t str[100]; - output_iterator iter = f.put(output_iterator(str), - false, ios, '*', v); - std::wstring ex(str, iter.base()); - assert(ex == L"1,234,567.89"); - } - { // negative - std::wstring v = L"-123456789"; - wchar_t str[100]; - output_iterator iter = f.put(output_iterator(str), - false, ios, '*', v); - std::wstring ex(str, iter.base()); - assert(ex == L"-1,234,567.89"); - } - { // zero, showbase - std::wstring v = L"0"; - showbase(ios); - wchar_t str[100]; - output_iterator iter = f.put(output_iterator(str), - false, ios, '*', v); - std::wstring ex(str, iter.base()); - assert(ex == L"$0.00"); - } - { // negative one, showbase - std::wstring v = L"-1"; - showbase(ios); - wchar_t str[100]; - output_iterator iter = f.put(output_iterator(str), - false, ios, '*', v); - std::wstring ex(str, iter.base()); - assert(ex == L"-$0.01"); - } - { // positive, showbase - std::wstring v = L"123456789"; - showbase(ios); - wchar_t str[100]; - output_iterator iter = f.put(output_iterator(str), - false, ios, '*', v); - std::wstring ex(str, iter.base()); - assert(ex == L"$1,234,567.89"); - } - { // negative, showbase - std::wstring v = L"-123456789"; - showbase(ios); - wchar_t str[100]; - output_iterator iter = f.put(output_iterator(str), - false, ios, '*', v); - std::wstring ex(str, iter.base()); - assert(ex == L"-$1,234,567.89"); - } - { // negative, showbase, left - std::wstring v = L"-123456789"; - showbase(ios); - ios.width(20); - left(ios); - wchar_t str[100]; - output_iterator iter = f.put(output_iterator(str), - false, ios, ' ', v); - std::wstring ex(str, iter.base()); - assert(ex == L"-$1,234,567.89 "); - assert(ios.width() == 0); - } - { // negative, showbase, internal - std::wstring v = L"-123456789"; - showbase(ios); - ios.width(20); - internal(ios); - wchar_t str[100]; - output_iterator iter = f.put(output_iterator(str), - false, ios, ' ', v); - std::wstring ex(str, iter.base()); - assert(ex == L"-$ 1,234,567.89"); - assert(ios.width() == 0); - } - { // negative, showbase, right - std::wstring v = L"-123456789"; - showbase(ios); - ios.width(20); - right(ios); - wchar_t str[100]; - output_iterator iter = f.put(output_iterator(str), - false, ios, ' ', v); - std::wstring ex(str, iter.base()); - assert(ex == L" -$1,234,567.89"); - assert(ios.width() == 0); - } - - // wchar_t, international - noshowbase(ios); - ios.unsetf(std::ios_base::adjustfield); - { // zero - std::wstring v = L"0"; - wchar_t str[100]; - output_iterator iter = f.put(output_iterator(str), - true, ios, '*', v); - std::wstring ex(str, iter.base()); - assert(ex == L"0.00"); - } - { // negative one - std::wstring v = L"-1"; - wchar_t str[100]; - output_iterator iter = f.put(output_iterator(str), - true, ios, '*', v); - std::wstring ex(str, iter.base()); - assert(ex == L"-0.01"); - } - { // positive - std::wstring v = L"123456789"; - wchar_t str[100]; - output_iterator iter = f.put(output_iterator(str), - true, ios, '*', v); - std::wstring ex(str, iter.base()); - assert(ex == L"1,234,567.89"); - } - { // negative - std::wstring v = L"-123456789"; - wchar_t str[100]; - output_iterator iter = f.put(output_iterator(str), - true, ios, '*', v); - std::wstring ex(str, iter.base()); - assert(ex == L"-1,234,567.89"); - } - { // zero, showbase - std::wstring v = L"0"; - showbase(ios); - wchar_t str[100]; - output_iterator iter = f.put(output_iterator(str), - true, ios, '*', v); - std::wstring ex(str, iter.base()); - assert(ex == L"USD 0.00"); - } - { // negative one, showbase - std::wstring v = L"-1"; - showbase(ios); - wchar_t str[100]; - output_iterator iter = f.put(output_iterator(str), - true, ios, '*', v); - std::wstring ex(str, iter.base()); - assert(ex == L"-USD 0.01"); - } - { // positive, showbase - std::wstring v = L"123456789"; - showbase(ios); - wchar_t str[100]; - output_iterator iter = f.put(output_iterator(str), - true, ios, '*', v); - std::wstring ex(str, iter.base()); - assert(ex == L"USD 1,234,567.89"); - } - { // negative, showbase - std::wstring v = L"-123456789"; - showbase(ios); - wchar_t str[100]; - output_iterator iter = f.put(output_iterator(str), - true, ios, '*', v); - std::wstring ex(str, iter.base()); - assert(ex == L"-USD 1,234,567.89"); - } - { // negative, showbase, left - std::wstring v = L"-123456789"; - showbase(ios); - ios.width(20); - left(ios); - wchar_t str[100]; - output_iterator iter = f.put(output_iterator(str), - true, ios, ' ', v); - std::wstring ex(str, iter.base()); - assert(ex == L"-USD 1,234,567.89 "); - assert(ios.width() == 0); - } - { // negative, showbase, internal - std::wstring v = L"-123456789"; - showbase(ios); - ios.width(20); - internal(ios); - wchar_t str[100]; - output_iterator iter = f.put(output_iterator(str), - true, ios, ' ', v); - std::wstring ex(str, iter.base()); - assert(ex == L"-USD 1,234,567.89"); - assert(ios.width() == 0); - } - { // negative, showbase, right - std::wstring v = L"-123456789"; - showbase(ios); - ios.width(20); - right(ios); - wchar_t str[100]; - output_iterator iter = f.put(output_iterator(str), - true, ios, ' ', v); - std::wstring ex(str, iter.base()); - assert(ex == L" -USD 1,234,567.89"); - assert(ios.width() == 0); - } -} -} diff --git a/test/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.virtuals/tested_elsewhere.pass.cpp b/test/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.virtuals/tested_elsewhere.pass.cpp deleted file mode 100644 index b58f5c55..00000000 --- a/test/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.virtuals/tested_elsewhere.pass.cpp +++ /dev/null @@ -1,12 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -int main() -{ -} diff --git a/test/localization/locale.categories/category.monetary/locale.money.put/types.pass.cpp b/test/localization/locale.categories/category.monetary/locale.money.put/types.pass.cpp deleted file mode 100644 index 44ff1073..00000000 --- a/test/localization/locale.categories/category.monetary/locale.money.put/types.pass.cpp +++ /dev/null @@ -1,34 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template > -// class money_put -// : public locale::facet -// { -// public: -// typedef CharT char_type; -// typedef OutputIterator iter_type; -// typedef basic_string string_type; - -#include -#include - -int main() -{ - static_assert((std::is_base_of >::value), ""); - static_assert((std::is_base_of >::value), ""); - static_assert((std::is_same::char_type, char>::value), ""); - static_assert((std::is_same::char_type, wchar_t>::value), ""); - static_assert((std::is_same::iter_type, std::ostreambuf_iterator >::value), ""); - static_assert((std::is_same::iter_type, std::ostreambuf_iterator >::value), ""); - static_assert((std::is_same::string_type, std::string>::value), ""); - static_assert((std::is_same::string_type, std::wstring>::value), ""); -} diff --git a/test/localization/locale.categories/category.monetary/locale.moneypunct.byname/curr_symbol.xfail.pass.cpp b/test/localization/locale.categories/category.monetary/locale.moneypunct.byname/curr_symbol.xfail.pass.cpp deleted file mode 100644 index ecd125ba..00000000 --- a/test/localization/locale.categories/category.monetary/locale.moneypunct.byname/curr_symbol.xfail.pass.cpp +++ /dev/null @@ -1,138 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// class moneypunct_byname - -// string_type curr_symbol() const; - -#include -#include -#include - -class Fnf - : public std::moneypunct_byname -{ -public: - explicit Fnf(const std::string& nm, std::size_t refs = 0) - : std::moneypunct_byname(nm, refs) {} -}; - -class Fnt - : public std::moneypunct_byname -{ -public: - explicit Fnt(const std::string& nm, std::size_t refs = 0) - : std::moneypunct_byname(nm, refs) {} -}; - -class Fwf - : public std::moneypunct_byname -{ -public: - explicit Fwf(const std::string& nm, std::size_t refs = 0) - : std::moneypunct_byname(nm, refs) {} -}; - -class Fwt - : public std::moneypunct_byname -{ -public: - explicit Fwt(const std::string& nm, std::size_t refs = 0) - : std::moneypunct_byname(nm, refs) {} -}; - -int main() -{ - { - Fnf f("C", 1); - assert(f.curr_symbol() == std::string()); - } - { - Fnt f("C", 1); - assert(f.curr_symbol() == std::string()); - } - { - Fwf f("C", 1); - assert(f.curr_symbol() == std::wstring()); - } - { - Fwt f("C", 1); - assert(f.curr_symbol() == std::wstring()); - } - - { - Fnf f("en_US", 1); - assert(f.curr_symbol() == "$"); - } - { - Fnt f("en_US", 1); - assert(f.curr_symbol() == "USD "); - } - { - Fwf f("en_US", 1); - assert(f.curr_symbol() == L"$"); - } - { - Fwt f("en_US", 1); - assert(f.curr_symbol() == L"USD "); - } - - { - Fnf f("fr_FR", 1); - assert(f.curr_symbol() == "Eu"); - } - { - Fnt f("fr_FR", 1); - assert(f.curr_symbol() == "EUR "); - } - { - Fwf f("fr_FR", 1); - assert(f.curr_symbol() == L"Eu"); - } - { - Fwt f("fr_FR", 1); - assert(f.curr_symbol() == L"EUR "); - } - - { - Fnf f("ru_RU", 1); - assert(f.curr_symbol() == "\xD1\x80\xD1\x83\xD0\xB1""."); - } - { - Fnt f("ru_RU", 1); - assert(f.curr_symbol() == "RUR "); - } - { - Fwf f("ru_RU", 1); - assert(f.curr_symbol() == L"\x440\x443\x431""."); - } - { - Fwt f("ru_RU", 1); - assert(f.curr_symbol() == L"RUR "); - } - - { - Fnf f("zh_CN", 1); - assert(f.curr_symbol() == "\xEF\xBF\xA5"); - } - { - Fnt f("zh_CN", 1); - assert(f.curr_symbol() == "CNY "); - } - { - Fwf f("zh_CN", 1); - assert(f.curr_symbol() == L"\xFFE5"); - } - { - Fwt f("zh_CN", 1); - assert(f.curr_symbol() == L"CNY "); - } -} diff --git a/test/localization/locale.categories/category.monetary/locale.moneypunct.byname/decimal_point.xfail.pass.cpp b/test/localization/locale.categories/category.monetary/locale.moneypunct.byname/decimal_point.xfail.pass.cpp deleted file mode 100644 index 0055d93b..00000000 --- a/test/localization/locale.categories/category.monetary/locale.moneypunct.byname/decimal_point.xfail.pass.cpp +++ /dev/null @@ -1,138 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// class moneypunct_byname - -// charT decimal_point() const; - -#include -#include -#include - -class Fnf - : public std::moneypunct_byname -{ -public: - explicit Fnf(const std::string& nm, std::size_t refs = 0) - : std::moneypunct_byname(nm, refs) {} -}; - -class Fnt - : public std::moneypunct_byname -{ -public: - explicit Fnt(const std::string& nm, std::size_t refs = 0) - : std::moneypunct_byname(nm, refs) {} -}; - -class Fwf - : public std::moneypunct_byname -{ -public: - explicit Fwf(const std::string& nm, std::size_t refs = 0) - : std::moneypunct_byname(nm, refs) {} -}; - -class Fwt - : public std::moneypunct_byname -{ -public: - explicit Fwt(const std::string& nm, std::size_t refs = 0) - : std::moneypunct_byname(nm, refs) {} -}; - -int main() -{ - { - Fnf f("C", 1); - assert(f.decimal_point() == std::numeric_limits::max()); - } - { - Fnt f("C", 1); - assert(f.decimal_point() == std::numeric_limits::max()); - } - { - Fwf f("C", 1); - assert(f.decimal_point() == std::numeric_limits::max()); - } - { - Fwt f("C", 1); - assert(f.decimal_point() == std::numeric_limits::max()); - } - - { - Fnf f("en_US", 1); - assert(f.decimal_point() == '.'); - } - { - Fnt f("en_US", 1); - assert(f.decimal_point() == '.'); - } - { - Fwf f("en_US", 1); - assert(f.decimal_point() == L'.'); - } - { - Fwt f("en_US", 1); - assert(f.decimal_point() == L'.'); - } - - { - Fnf f("fr_FR", 1); - assert(f.decimal_point() == ','); - } - { - Fnt f("fr_FR", 1); - assert(f.decimal_point() == ','); - } - { - Fwf f("fr_FR", 1); - assert(f.decimal_point() == L','); - } - { - Fwt f("fr_FR", 1); - assert(f.decimal_point() == L','); - } - - { - Fnf f("ru_RU", 1); - assert(f.decimal_point() == ','); - } - { - Fnt f("ru_RU", 1); - assert(f.decimal_point() == ','); - } - { - Fwf f("ru_RU", 1); - assert(f.decimal_point() == L','); - } - { - Fwt f("ru_RU", 1); - assert(f.decimal_point() == L','); - } - - { - Fnf f("zh_CN", 1); - assert(f.decimal_point() == '.'); - } - { - Fnt f("zh_CN", 1); - assert(f.decimal_point() == '.'); - } - { - Fwf f("zh_CN", 1); - assert(f.decimal_point() == L'.'); - } - { - Fwt f("zh_CN", 1); - assert(f.decimal_point() == L'.'); - } -} diff --git a/test/localization/locale.categories/category.monetary/locale.moneypunct.byname/frac_digits.xfail.pass.cpp b/test/localization/locale.categories/category.monetary/locale.moneypunct.byname/frac_digits.xfail.pass.cpp deleted file mode 100644 index 3ffc6526..00000000 --- a/test/localization/locale.categories/category.monetary/locale.moneypunct.byname/frac_digits.xfail.pass.cpp +++ /dev/null @@ -1,138 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// class moneypunct_byname - -// int frac_digits() const; - -#include -#include -#include - -class Fnf - : public std::moneypunct_byname -{ -public: - explicit Fnf(const std::string& nm, std::size_t refs = 0) - : std::moneypunct_byname(nm, refs) {} -}; - -class Fnt - : public std::moneypunct_byname -{ -public: - explicit Fnt(const std::string& nm, std::size_t refs = 0) - : std::moneypunct_byname(nm, refs) {} -}; - -class Fwf - : public std::moneypunct_byname -{ -public: - explicit Fwf(const std::string& nm, std::size_t refs = 0) - : std::moneypunct_byname(nm, refs) {} -}; - -class Fwt - : public std::moneypunct_byname -{ -public: - explicit Fwt(const std::string& nm, std::size_t refs = 0) - : std::moneypunct_byname(nm, refs) {} -}; - -int main() -{ - { - Fnf f("C", 1); - assert(f.frac_digits() == 0); - } - { - Fnt f("C", 1); - assert(f.frac_digits() == 0); - } - { - Fwf f("C", 1); - assert(f.frac_digits() == 0); - } - { - Fwt f("C", 1); - assert(f.frac_digits() == 0); - } - - { - Fnf f("en_US", 1); - assert(f.frac_digits() == 2); - } - { - Fnt f("en_US", 1); - assert(f.frac_digits() == 2); - } - { - Fwf f("en_US", 1); - assert(f.frac_digits() == 2); - } - { - Fwt f("en_US", 1); - assert(f.frac_digits() == 2); - } - - { - Fnf f("fr_FR", 1); - assert(f.frac_digits() == 2); - } - { - Fnt f("fr_FR", 1); - assert(f.frac_digits() == 2); - } - { - Fwf f("fr_FR", 1); - assert(f.frac_digits() == 2); - } - { - Fwt f("fr_FR", 1); - assert(f.frac_digits() == 2); - } - - { - Fnf f("ru_RU", 1); - assert(f.frac_digits() == 2); - } - { - Fnt f("ru_RU", 1); - assert(f.frac_digits() == 2); - } - { - Fwf f("ru_RU", 1); - assert(f.frac_digits() == 2); - } - { - Fwt f("ru_RU", 1); - assert(f.frac_digits() == 2); - } - - { - Fnf f("zh_CN", 1); - assert(f.frac_digits() == 2); - } - { - Fnt f("zh_CN", 1); - assert(f.frac_digits() == 2); - } - { - Fwf f("zh_CN", 1); - assert(f.frac_digits() == 2); - } - { - Fwt f("zh_CN", 1); - assert(f.frac_digits() == 2); - } -} diff --git a/test/localization/locale.categories/category.monetary/locale.moneypunct.byname/grouping.xfail.pass.cpp b/test/localization/locale.categories/category.monetary/locale.moneypunct.byname/grouping.xfail.pass.cpp deleted file mode 100644 index 340f151b..00000000 --- a/test/localization/locale.categories/category.monetary/locale.moneypunct.byname/grouping.xfail.pass.cpp +++ /dev/null @@ -1,138 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// class moneypunct_byname - -// string grouping() const; - -#include -#include -#include - -class Fnf - : public std::moneypunct_byname -{ -public: - explicit Fnf(const std::string& nm, std::size_t refs = 0) - : std::moneypunct_byname(nm, refs) {} -}; - -class Fnt - : public std::moneypunct_byname -{ -public: - explicit Fnt(const std::string& nm, std::size_t refs = 0) - : std::moneypunct_byname(nm, refs) {} -}; - -class Fwf - : public std::moneypunct_byname -{ -public: - explicit Fwf(const std::string& nm, std::size_t refs = 0) - : std::moneypunct_byname(nm, refs) {} -}; - -class Fwt - : public std::moneypunct_byname -{ -public: - explicit Fwt(const std::string& nm, std::size_t refs = 0) - : std::moneypunct_byname(nm, refs) {} -}; - -int main() -{ - { - Fnf f("C", 1); - assert(f.grouping() == ""); - } - { - Fnt f("C", 1); - assert(f.grouping() == ""); - } - { - Fwf f("C", 1); - assert(f.grouping() == ""); - } - { - Fwt f("C", 1); - assert(f.grouping() == ""); - } - - { - Fnf f("en_US", 1); - assert(f.grouping() == "\3\3"); - } - { - Fnt f("en_US", 1); - assert(f.grouping() == "\3\3"); - } - { - Fwf f("en_US", 1); - assert(f.grouping() == "\3\3"); - } - { - Fwt f("en_US", 1); - assert(f.grouping() == "\3\3"); - } - - { - Fnf f("fr_FR", 1); - assert(f.grouping() == "\3\3"); - } - { - Fnt f("fr_FR", 1); - assert(f.grouping() == "\3\3"); - } - { - Fwf f("fr_FR", 1); - assert(f.grouping() == "\3\3"); - } - { - Fwt f("fr_FR", 1); - assert(f.grouping() == "\3\3"); - } - - { - Fnf f("ru_RU", 1); - assert(f.grouping() == "\3\3"); - } - { - Fnt f("ru_RU", 1); - assert(f.grouping() == "\3\3"); - } - { - Fwf f("ru_RU", 1); - assert(f.grouping() == "\3\3"); - } - { - Fwt f("ru_RU", 1); - assert(f.grouping() == "\3\3"); - } - - { - Fnf f("zh_CN", 1); - assert(f.grouping() == "\3\3"); - } - { - Fnt f("zh_CN", 1); - assert(f.grouping() == "\3\3"); - } - { - Fwf f("zh_CN", 1); - assert(f.grouping() == "\3\3"); - } - { - Fwt f("zh_CN", 1); - assert(f.grouping() == "\3\3"); - } -} diff --git a/test/localization/locale.categories/category.monetary/locale.moneypunct.byname/neg_format.xfail.pass.cpp b/test/localization/locale.categories/category.monetary/locale.moneypunct.byname/neg_format.xfail.pass.cpp deleted file mode 100644 index b904af8a..00000000 --- a/test/localization/locale.categories/category.monetary/locale.moneypunct.byname/neg_format.xfail.pass.cpp +++ /dev/null @@ -1,218 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// class moneypunct_byname - -// pattern neg_format() const; - -#include -#include -#include - -class Fnf - : public std::moneypunct_byname -{ -public: - explicit Fnf(const std::string& nm, std::size_t refs = 0) - : std::moneypunct_byname(nm, refs) {} -}; - -class Fnt - : public std::moneypunct_byname -{ -public: - explicit Fnt(const std::string& nm, std::size_t refs = 0) - : std::moneypunct_byname(nm, refs) {} -}; - -class Fwf - : public std::moneypunct_byname -{ -public: - explicit Fwf(const std::string& nm, std::size_t refs = 0) - : std::moneypunct_byname(nm, refs) {} -}; - -class Fwt - : public std::moneypunct_byname -{ -public: - explicit Fwt(const std::string& nm, std::size_t refs = 0) - : std::moneypunct_byname(nm, refs) {} -}; - -int main() -{ - { - Fnf f("C", 1); - std::money_base::pattern p = f.neg_format(); - assert(p.field[0] == std::money_base::symbol); - assert(p.field[1] == std::money_base::sign); - assert(p.field[2] == std::money_base::none); - assert(p.field[3] == std::money_base::value); - } - { - Fnt f("C", 1); - std::money_base::pattern p = f.neg_format(); - assert(p.field[0] == std::money_base::symbol); - assert(p.field[1] == std::money_base::sign); - assert(p.field[2] == std::money_base::none); - assert(p.field[3] == std::money_base::value); - } - { - Fwf f("C", 1); - std::money_base::pattern p = f.neg_format(); - assert(p.field[0] == std::money_base::symbol); - assert(p.field[1] == std::money_base::sign); - assert(p.field[2] == std::money_base::none); - assert(p.field[3] == std::money_base::value); - } - { - Fwt f("C", 1); - std::money_base::pattern p = f.neg_format(); - assert(p.field[0] == std::money_base::symbol); - assert(p.field[1] == std::money_base::sign); - assert(p.field[2] == std::money_base::none); - assert(p.field[3] == std::money_base::value); - } - - { - Fnf f("en_US", 1); - std::money_base::pattern p = f.neg_format(); - assert(p.field[0] == std::money_base::sign); - assert(p.field[1] == std::money_base::symbol); - assert(p.field[2] == std::money_base::none); - assert(p.field[3] == std::money_base::value); - } - { - Fnt f("en_US", 1); - std::money_base::pattern p = f.neg_format(); - assert(p.field[0] == std::money_base::sign); - assert(p.field[1] == std::money_base::symbol); - assert(p.field[2] == std::money_base::none); - assert(p.field[3] == std::money_base::value); - } - { - Fwf f("en_US", 1); - std::money_base::pattern p = f.neg_format(); - assert(p.field[0] == std::money_base::sign); - assert(p.field[1] == std::money_base::symbol); - assert(p.field[2] == std::money_base::none); - assert(p.field[3] == std::money_base::value); - } - { - Fwt f("en_US", 1); - std::money_base::pattern p = f.neg_format(); - assert(p.field[0] == std::money_base::sign); - assert(p.field[1] == std::money_base::symbol); - assert(p.field[2] == std::money_base::none); - assert(p.field[3] == std::money_base::value); - } - - { - Fnf f("fr_FR", 1); - std::money_base::pattern p = f.neg_format(); - assert(p.field[0] == std::money_base::value); - assert(p.field[1] == std::money_base::space); - assert(p.field[2] == std::money_base::symbol); - assert(p.field[3] == std::money_base::sign); - } - { - Fnt f("fr_FR", 1); - std::money_base::pattern p = f.neg_format(); - assert(p.field[0] == std::money_base::value); - assert(p.field[1] == std::money_base::space); - assert(p.field[2] == std::money_base::symbol); - assert(p.field[3] == std::money_base::sign); - } - { - Fwf f("fr_FR", 1); - std::money_base::pattern p = f.neg_format(); - assert(p.field[0] == std::money_base::value); - assert(p.field[1] == std::money_base::space); - assert(p.field[2] == std::money_base::symbol); - assert(p.field[3] == std::money_base::sign); - } - { - Fwt f("fr_FR", 1); - std::money_base::pattern p = f.neg_format(); - assert(p.field[0] == std::money_base::value); - assert(p.field[1] == std::money_base::space); - assert(p.field[2] == std::money_base::symbol); - assert(p.field[3] == std::money_base::sign); - } - - { - Fnf f("ru_RU", 1); - std::money_base::pattern p = f.neg_format(); - assert(p.field[0] == std::money_base::sign); - assert(p.field[1] == std::money_base::value); - assert(p.field[2] == std::money_base::space); - assert(p.field[3] == std::money_base::symbol); - } - { - Fnt f("ru_RU", 1); - std::money_base::pattern p = f.neg_format(); - assert(p.field[0] == std::money_base::sign); - assert(p.field[1] == std::money_base::value); - assert(p.field[2] == std::money_base::space); - assert(p.field[3] == std::money_base::symbol); - } - { - Fwf f("ru_RU", 1); - std::money_base::pattern p = f.neg_format(); - assert(p.field[0] == std::money_base::sign); - assert(p.field[1] == std::money_base::value); - assert(p.field[2] == std::money_base::space); - assert(p.field[3] == std::money_base::symbol); - } - { - Fwt f("ru_RU", 1); - std::money_base::pattern p = f.neg_format(); - assert(p.field[0] == std::money_base::sign); - assert(p.field[1] == std::money_base::value); - assert(p.field[2] == std::money_base::space); - assert(p.field[3] == std::money_base::symbol); - } - - { - Fnf f("zh_CN", 1); - std::money_base::pattern p = f.neg_format(); - assert(p.field[0] == std::money_base::symbol); - assert(p.field[1] == std::money_base::sign); - assert(p.field[2] == std::money_base::none); - assert(p.field[3] == std::money_base::value); - } - { - Fnt f("zh_CN", 1); - std::money_base::pattern p = f.neg_format(); - assert(p.field[0] == std::money_base::symbol); - assert(p.field[1] == std::money_base::sign); - assert(p.field[2] == std::money_base::none); - assert(p.field[3] == std::money_base::value); - } - { - Fwf f("zh_CN", 1); - std::money_base::pattern p = f.neg_format(); - assert(p.field[0] == std::money_base::symbol); - assert(p.field[1] == std::money_base::sign); - assert(p.field[2] == std::money_base::none); - assert(p.field[3] == std::money_base::value); - } - { - Fwt f("zh_CN", 1); - std::money_base::pattern p = f.neg_format(); - assert(p.field[0] == std::money_base::symbol); - assert(p.field[1] == std::money_base::sign); - assert(p.field[2] == std::money_base::none); - assert(p.field[3] == std::money_base::value); - } -} diff --git a/test/localization/locale.categories/category.monetary/locale.moneypunct.byname/negative_sign.xfail.pass.cpp b/test/localization/locale.categories/category.monetary/locale.moneypunct.byname/negative_sign.xfail.pass.cpp deleted file mode 100644 index 73a23f56..00000000 --- a/test/localization/locale.categories/category.monetary/locale.moneypunct.byname/negative_sign.xfail.pass.cpp +++ /dev/null @@ -1,138 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// class moneypunct_byname - -// string_type negative_sign() const; - -#include -#include -#include - -class Fnf - : public std::moneypunct_byname -{ -public: - explicit Fnf(const std::string& nm, std::size_t refs = 0) - : std::moneypunct_byname(nm, refs) {} -}; - -class Fnt - : public std::moneypunct_byname -{ -public: - explicit Fnt(const std::string& nm, std::size_t refs = 0) - : std::moneypunct_byname(nm, refs) {} -}; - -class Fwf - : public std::moneypunct_byname -{ -public: - explicit Fwf(const std::string& nm, std::size_t refs = 0) - : std::moneypunct_byname(nm, refs) {} -}; - -class Fwt - : public std::moneypunct_byname -{ -public: - explicit Fwt(const std::string& nm, std::size_t refs = 0) - : std::moneypunct_byname(nm, refs) {} -}; - -int main() -{ - { - Fnf f("C", 1); - assert(f.negative_sign() == std::string()); - } - { - Fnt f("C", 1); - assert(f.negative_sign() == std::string()); - } - { - Fwf f("C", 1); - assert(f.negative_sign() == std::wstring()); - } - { - Fwt f("C", 1); - assert(f.negative_sign() == std::wstring()); - } - - { - Fnf f("en_US", 1); - assert(f.negative_sign() == "-"); - } - { - Fnt f("en_US", 1); - assert(f.negative_sign() == "-"); - } - { - Fwf f("en_US", 1); - assert(f.negative_sign() == L"-"); - } - { - Fwt f("en_US", 1); - assert(f.negative_sign() == L"-"); - } - - { - Fnf f("fr_FR", 1); - assert(f.negative_sign() == "-"); - } - { - Fnt f("fr_FR", 1); - assert(f.negative_sign() == "-"); - } - { - Fwf f("fr_FR", 1); - assert(f.negative_sign() == L"-"); - } - { - Fwt f("fr_FR", 1); - assert(f.negative_sign() == L"-"); - } - - { - Fnf f("ru_RU", 1); - assert(f.negative_sign() == "-"); - } - { - Fnt f("ru_RU", 1); - assert(f.negative_sign() == "-"); - } - { - Fwf f("ru_RU", 1); - assert(f.negative_sign() == L"-"); - } - { - Fwt f("ru_RU", 1); - assert(f.negative_sign() == L"-"); - } - - { - Fnf f("zh_CN", 1); - assert(f.negative_sign() == "-"); - } - { - Fnt f("zh_CN", 1); - assert(f.negative_sign() == "-"); - } - { - Fwf f("zh_CN", 1); - assert(f.negative_sign() == L"-"); - } - { - Fwt f("zh_CN", 1); - assert(f.negative_sign() == L"-"); - } -} diff --git a/test/localization/locale.categories/category.monetary/locale.moneypunct.byname/pos_format.xfail.pass.cpp b/test/localization/locale.categories/category.monetary/locale.moneypunct.byname/pos_format.xfail.pass.cpp deleted file mode 100644 index 8acaa450..00000000 --- a/test/localization/locale.categories/category.monetary/locale.moneypunct.byname/pos_format.xfail.pass.cpp +++ /dev/null @@ -1,218 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// class moneypunct_byname - -// pattern pos_format() const; - -#include -#include -#include - -class Fnf - : public std::moneypunct_byname -{ -public: - explicit Fnf(const std::string& nm, std::size_t refs = 0) - : std::moneypunct_byname(nm, refs) {} -}; - -class Fnt - : public std::moneypunct_byname -{ -public: - explicit Fnt(const std::string& nm, std::size_t refs = 0) - : std::moneypunct_byname(nm, refs) {} -}; - -class Fwf - : public std::moneypunct_byname -{ -public: - explicit Fwf(const std::string& nm, std::size_t refs = 0) - : std::moneypunct_byname(nm, refs) {} -}; - -class Fwt - : public std::moneypunct_byname -{ -public: - explicit Fwt(const std::string& nm, std::size_t refs = 0) - : std::moneypunct_byname(nm, refs) {} -}; - -int main() -{ - { - Fnf f("C", 1); - std::money_base::pattern p = f.pos_format(); - assert(p.field[0] == std::money_base::symbol); - assert(p.field[1] == std::money_base::sign); - assert(p.field[2] == std::money_base::none); - assert(p.field[3] == std::money_base::value); - } - { - Fnt f("C", 1); - std::money_base::pattern p = f.pos_format(); - assert(p.field[0] == std::money_base::symbol); - assert(p.field[1] == std::money_base::sign); - assert(p.field[2] == std::money_base::none); - assert(p.field[3] == std::money_base::value); - } - { - Fwf f("C", 1); - std::money_base::pattern p = f.pos_format(); - assert(p.field[0] == std::money_base::symbol); - assert(p.field[1] == std::money_base::sign); - assert(p.field[2] == std::money_base::none); - assert(p.field[3] == std::money_base::value); - } - { - Fwt f("C", 1); - std::money_base::pattern p = f.pos_format(); - assert(p.field[0] == std::money_base::symbol); - assert(p.field[1] == std::money_base::sign); - assert(p.field[2] == std::money_base::none); - assert(p.field[3] == std::money_base::value); - } - - { - Fnf f("en_US", 1); - std::money_base::pattern p = f.pos_format(); - assert(p.field[0] == std::money_base::sign); - assert(p.field[1] == std::money_base::symbol); - assert(p.field[2] == std::money_base::none); - assert(p.field[3] == std::money_base::value); - } - { - Fnt f("en_US", 1); - std::money_base::pattern p = f.pos_format(); - assert(p.field[0] == std::money_base::sign); - assert(p.field[1] == std::money_base::symbol); - assert(p.field[2] == std::money_base::none); - assert(p.field[3] == std::money_base::value); - } - { - Fwf f("en_US", 1); - std::money_base::pattern p = f.pos_format(); - assert(p.field[0] == std::money_base::sign); - assert(p.field[1] == std::money_base::symbol); - assert(p.field[2] == std::money_base::none); - assert(p.field[3] == std::money_base::value); - } - { - Fwt f("en_US", 1); - std::money_base::pattern p = f.pos_format(); - assert(p.field[0] == std::money_base::sign); - assert(p.field[1] == std::money_base::symbol); - assert(p.field[2] == std::money_base::none); - assert(p.field[3] == std::money_base::value); - } - - { - Fnf f("fr_FR", 1); - std::money_base::pattern p = f.pos_format(); - assert(p.field[0] == std::money_base::sign); - assert(p.field[1] == std::money_base::value); - assert(p.field[2] == std::money_base::space); - assert(p.field[3] == std::money_base::symbol); - } - { - Fnt f("fr_FR", 1); - std::money_base::pattern p = f.pos_format(); - assert(p.field[0] == std::money_base::sign); - assert(p.field[1] == std::money_base::value); - assert(p.field[2] == std::money_base::space); - assert(p.field[3] == std::money_base::symbol); - } - { - Fwf f("fr_FR", 1); - std::money_base::pattern p = f.pos_format(); - assert(p.field[0] == std::money_base::sign); - assert(p.field[1] == std::money_base::value); - assert(p.field[2] == std::money_base::space); - assert(p.field[3] == std::money_base::symbol); - } - { - Fwt f("fr_FR", 1); - std::money_base::pattern p = f.pos_format(); - assert(p.field[0] == std::money_base::sign); - assert(p.field[1] == std::money_base::value); - assert(p.field[2] == std::money_base::space); - assert(p.field[3] == std::money_base::symbol); - } - - { - Fnf f("ru_RU", 1); - std::money_base::pattern p = f.pos_format(); - assert(p.field[0] == std::money_base::sign); - assert(p.field[1] == std::money_base::value); - assert(p.field[2] == std::money_base::space); - assert(p.field[3] == std::money_base::symbol); - } - { - Fnt f("ru_RU", 1); - std::money_base::pattern p = f.pos_format(); - assert(p.field[0] == std::money_base::sign); - assert(p.field[1] == std::money_base::value); - assert(p.field[2] == std::money_base::space); - assert(p.field[3] == std::money_base::symbol); - } - { - Fwf f("ru_RU", 1); - std::money_base::pattern p = f.pos_format(); - assert(p.field[0] == std::money_base::sign); - assert(p.field[1] == std::money_base::value); - assert(p.field[2] == std::money_base::space); - assert(p.field[3] == std::money_base::symbol); - } - { - Fwt f("ru_RU", 1); - std::money_base::pattern p = f.pos_format(); - assert(p.field[0] == std::money_base::sign); - assert(p.field[1] == std::money_base::value); - assert(p.field[2] == std::money_base::space); - assert(p.field[3] == std::money_base::symbol); - } - - { - Fnf f("zh_CN", 1); - std::money_base::pattern p = f.pos_format(); - assert(p.field[0] == std::money_base::sign); - assert(p.field[1] == std::money_base::symbol); - assert(p.field[2] == std::money_base::none); - assert(p.field[3] == std::money_base::value); - } - { - Fnt f("zh_CN", 1); - std::money_base::pattern p = f.pos_format(); - assert(p.field[0] == std::money_base::sign); - assert(p.field[1] == std::money_base::symbol); - assert(p.field[2] == std::money_base::none); - assert(p.field[3] == std::money_base::value); - } - { - Fwf f("zh_CN", 1); - std::money_base::pattern p = f.pos_format(); - assert(p.field[0] == std::money_base::sign); - assert(p.field[1] == std::money_base::symbol); - assert(p.field[2] == std::money_base::none); - assert(p.field[3] == std::money_base::value); - } - { - Fwt f("zh_CN", 1); - std::money_base::pattern p = f.pos_format(); - assert(p.field[0] == std::money_base::sign); - assert(p.field[1] == std::money_base::symbol); - assert(p.field[2] == std::money_base::none); - assert(p.field[3] == std::money_base::value); - } -} diff --git a/test/localization/locale.categories/category.monetary/locale.moneypunct.byname/positive_sign.pass.cpp b/test/localization/locale.categories/category.monetary/locale.moneypunct.byname/positive_sign.pass.cpp deleted file mode 100644 index eee4be26..00000000 --- a/test/localization/locale.categories/category.monetary/locale.moneypunct.byname/positive_sign.pass.cpp +++ /dev/null @@ -1,138 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// class moneypunct_byname - -// string_type positive_sign() const; - -#include -#include -#include - -class Fnf - : public std::moneypunct_byname -{ -public: - explicit Fnf(const std::string& nm, std::size_t refs = 0) - : std::moneypunct_byname(nm, refs) {} -}; - -class Fnt - : public std::moneypunct_byname -{ -public: - explicit Fnt(const std::string& nm, std::size_t refs = 0) - : std::moneypunct_byname(nm, refs) {} -}; - -class Fwf - : public std::moneypunct_byname -{ -public: - explicit Fwf(const std::string& nm, std::size_t refs = 0) - : std::moneypunct_byname(nm, refs) {} -}; - -class Fwt - : public std::moneypunct_byname -{ -public: - explicit Fwt(const std::string& nm, std::size_t refs = 0) - : std::moneypunct_byname(nm, refs) {} -}; - -int main() -{ - { - Fnf f("C", 1); - assert(f.positive_sign() == std::string()); - } - { - Fnt f("C", 1); - assert(f.positive_sign() == std::string()); - } - { - Fwf f("C", 1); - assert(f.positive_sign() == std::wstring()); - } - { - Fwt f("C", 1); - assert(f.positive_sign() == std::wstring()); - } - - { - Fnf f("en_US", 1); - assert(f.positive_sign() == ""); - } - { - Fnt f("en_US", 1); - assert(f.positive_sign() == ""); - } - { - Fwf f("en_US", 1); - assert(f.positive_sign() == L""); - } - { - Fwt f("en_US", 1); - assert(f.positive_sign() == L""); - } - - { - Fnf f("fr_FR", 1); - assert(f.positive_sign() == ""); - } - { - Fnt f("fr_FR", 1); - assert(f.positive_sign() == ""); - } - { - Fwf f("fr_FR", 1); - assert(f.positive_sign() == L""); - } - { - Fwt f("fr_FR", 1); - assert(f.positive_sign() == L""); - } - - { - Fnf f("ru_RU", 1); - assert(f.positive_sign() == ""); - } - { - Fnt f("ru_RU", 1); - assert(f.positive_sign() == ""); - } - { - Fwf f("ru_RU", 1); - assert(f.positive_sign() == L""); - } - { - Fwt f("ru_RU", 1); - assert(f.positive_sign() == L""); - } - - { - Fnf f("zh_CN", 1); - assert(f.positive_sign() == ""); - } - { - Fnt f("zh_CN", 1); - assert(f.positive_sign() == ""); - } - { - Fwf f("zh_CN", 1); - assert(f.positive_sign() == L""); - } - { - Fwt f("zh_CN", 1); - assert(f.positive_sign() == L""); - } -} diff --git a/test/localization/locale.categories/category.monetary/locale.moneypunct.byname/thousands_sep.xfail.pass.cpp b/test/localization/locale.categories/category.monetary/locale.moneypunct.byname/thousands_sep.xfail.pass.cpp deleted file mode 100644 index fa0776ec..00000000 --- a/test/localization/locale.categories/category.monetary/locale.moneypunct.byname/thousands_sep.xfail.pass.cpp +++ /dev/null @@ -1,138 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// class moneypunct_byname - -// charT thousands_sep() const; - -#include -#include -#include - -class Fnf - : public std::moneypunct_byname -{ -public: - explicit Fnf(const std::string& nm, std::size_t refs = 0) - : std::moneypunct_byname(nm, refs) {} -}; - -class Fnt - : public std::moneypunct_byname -{ -public: - explicit Fnt(const std::string& nm, std::size_t refs = 0) - : std::moneypunct_byname(nm, refs) {} -}; - -class Fwf - : public std::moneypunct_byname -{ -public: - explicit Fwf(const std::string& nm, std::size_t refs = 0) - : std::moneypunct_byname(nm, refs) {} -}; - -class Fwt - : public std::moneypunct_byname -{ -public: - explicit Fwt(const std::string& nm, std::size_t refs = 0) - : std::moneypunct_byname(nm, refs) {} -}; - -int main() -{ - { - Fnf f("C", 1); - assert(f.thousands_sep() == std::numeric_limits::max()); - } - { - Fnt f("C", 1); - assert(f.thousands_sep() == std::numeric_limits::max()); - } - { - Fwf f("C", 1); - assert(f.thousands_sep() == std::numeric_limits::max()); - } - { - Fwt f("C", 1); - assert(f.thousands_sep() == std::numeric_limits::max()); - } - - { - Fnf f("en_US", 1); - assert(f.thousands_sep() == ','); - } - { - Fnt f("en_US", 1); - assert(f.thousands_sep() == ','); - } - { - Fwf f("en_US", 1); - assert(f.thousands_sep() == L','); - } - { - Fwt f("en_US", 1); - assert(f.thousands_sep() == L','); - } - - { - Fnf f("fr_FR", 1); - assert(f.thousands_sep() == ' '); - } - { - Fnt f("fr_FR", 1); - assert(f.thousands_sep() == ' '); - } - { - Fwf f("fr_FR", 1); - assert(f.thousands_sep() == L' '); - } - { - Fwt f("fr_FR", 1); - assert(f.thousands_sep() == L' '); - } - - { - Fnf f("ru_RU", 1); - assert(f.thousands_sep() == ' '); - } - { - Fnt f("ru_RU", 1); - assert(f.thousands_sep() == ' '); - } - { - Fwf f("ru_RU", 1); - assert(f.thousands_sep() == L' '); - } - { - Fwt f("ru_RU", 1); - assert(f.thousands_sep() == L' '); - } - - { - Fnf f("zh_CN", 1); - assert(f.thousands_sep() == ','); - } - { - Fnt f("zh_CN", 1); - assert(f.thousands_sep() == ','); - } - { - Fwf f("zh_CN", 1); - assert(f.thousands_sep() == L','); - } - { - Fwt f("zh_CN", 1); - assert(f.thousands_sep() == L','); - } -} diff --git a/test/localization/locale.categories/category.monetary/locale.moneypunct/ctor.pass.cpp b/test/localization/locale.categories/category.monetary/locale.moneypunct/ctor.pass.cpp deleted file mode 100644 index 798dbd08..00000000 --- a/test/localization/locale.categories/category.monetary/locale.moneypunct/ctor.pass.cpp +++ /dev/null @@ -1,52 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// class moneypunct - -// explicit moneypunct(size_t refs = 0); - -#include -#include - -typedef std::moneypunct F; - -class my_facet - : public F -{ -public: - static int count; - - explicit my_facet(std::size_t refs = 0) - : F(refs) {++count;} - - ~my_facet() {--count;} -}; - -int my_facet::count = 0; - -int main() -{ - { - std::locale l(std::locale::classic(), new my_facet); - assert(my_facet::count == 1); - } - assert(my_facet::count == 0); - { - my_facet f(1); - assert(my_facet::count == 1); - { - std::locale l(std::locale::classic(), &f); - assert(my_facet::count == 1); - } - assert(my_facet::count == 1); - } - assert(my_facet::count == 0); -} diff --git a/test/localization/locale.categories/category.monetary/locale.moneypunct/locale.moneypunct.members/curr_symbol.pass.cpp b/test/localization/locale.categories/category.monetary/locale.moneypunct/locale.moneypunct.members/curr_symbol.pass.cpp deleted file mode 100644 index 8dc4726e..00000000 --- a/test/localization/locale.categories/category.monetary/locale.moneypunct/locale.moneypunct.members/curr_symbol.pass.cpp +++ /dev/null @@ -1,75 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// class moneypunct - -// string_type curr_symbol() const; - -// The C++ and C standards are silent. -// POSIX standard is being followed (as a guideline). - -#include -#include -#include - -typedef std::moneypunct F; - -class Fnf - : public std::moneypunct -{ -public: - explicit Fnf(std::size_t refs = 0) - : std::moneypunct(refs) {} -}; - -class Fnt - : public std::moneypunct -{ -public: - explicit Fnt(std::size_t refs = 0) - : std::moneypunct(refs) {} -}; - -class Fwf - : public std::moneypunct -{ -public: - explicit Fwf(std::size_t refs = 0) - : std::moneypunct(refs) {} -}; - -class Fwt - : public std::moneypunct -{ -public: - explicit Fwt(std::size_t refs = 0) - : std::moneypunct(refs) {} -}; - -int main() -{ - { - Fnf f(1); - assert(f.curr_symbol() == std::string()); - } - { - Fnt f(1); - assert(f.curr_symbol() == std::string()); - } - { - Fwf f(1); - assert(f.curr_symbol() == std::wstring()); - } - { - Fwt f(1); - assert(f.curr_symbol() == std::wstring()); - } -} diff --git a/test/localization/locale.categories/category.monetary/locale.moneypunct/locale.moneypunct.members/decimal_point.pass.cpp b/test/localization/locale.categories/category.monetary/locale.moneypunct/locale.moneypunct.members/decimal_point.pass.cpp deleted file mode 100644 index 66262dc4..00000000 --- a/test/localization/locale.categories/category.monetary/locale.moneypunct/locale.moneypunct.members/decimal_point.pass.cpp +++ /dev/null @@ -1,75 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// class moneypunct - -// charT decimal_point() const; - -// The C++ and C standards are silent. -// POSIX standard is being followed (as a guideline). - -#include -#include -#include - -typedef std::moneypunct F; - -class Fnf - : public std::moneypunct -{ -public: - explicit Fnf(std::size_t refs = 0) - : std::moneypunct(refs) {} -}; - -class Fnt - : public std::moneypunct -{ -public: - explicit Fnt(std::size_t refs = 0) - : std::moneypunct(refs) {} -}; - -class Fwf - : public std::moneypunct -{ -public: - explicit Fwf(std::size_t refs = 0) - : std::moneypunct(refs) {} -}; - -class Fwt - : public std::moneypunct -{ -public: - explicit Fwt(std::size_t refs = 0) - : std::moneypunct(refs) {} -}; - -int main() -{ - { - Fnf f(1); - assert(f.decimal_point() == std::numeric_limits::max()); - } - { - Fnt f(1); - assert(f.decimal_point() == std::numeric_limits::max()); - } - { - Fwf f(1); - assert(f.decimal_point() == std::numeric_limits::max()); - } - { - Fwt f(1); - assert(f.decimal_point() == std::numeric_limits::max()); - } -} diff --git a/test/localization/locale.categories/category.monetary/locale.moneypunct/locale.moneypunct.members/frac_digits.pass.cpp b/test/localization/locale.categories/category.monetary/locale.moneypunct/locale.moneypunct.members/frac_digits.pass.cpp deleted file mode 100644 index 0622342f..00000000 --- a/test/localization/locale.categories/category.monetary/locale.moneypunct/locale.moneypunct.members/frac_digits.pass.cpp +++ /dev/null @@ -1,75 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// class moneypunct - -// int frac_digits() const; - -// The C++ and C standards are silent. -// POSIX standard is being followed (as a guideline). - -#include -#include -#include - -typedef std::moneypunct F; - -class Fnf - : public std::moneypunct -{ -public: - explicit Fnf(std::size_t refs = 0) - : std::moneypunct(refs) {} -}; - -class Fnt - : public std::moneypunct -{ -public: - explicit Fnt(std::size_t refs = 0) - : std::moneypunct(refs) {} -}; - -class Fwf - : public std::moneypunct -{ -public: - explicit Fwf(std::size_t refs = 0) - : std::moneypunct(refs) {} -}; - -class Fwt - : public std::moneypunct -{ -public: - explicit Fwt(std::size_t refs = 0) - : std::moneypunct(refs) {} -}; - -int main() -{ - { - Fnf f(1); - assert(f.frac_digits() == 0); - } - { - Fnt f(1); - assert(f.frac_digits() == 0); - } - { - Fwf f(1); - assert(f.frac_digits() == 0); - } - { - Fwt f(1); - assert(f.frac_digits() == 0); - } -} diff --git a/test/localization/locale.categories/category.monetary/locale.moneypunct/locale.moneypunct.members/grouping.pass.cpp b/test/localization/locale.categories/category.monetary/locale.moneypunct/locale.moneypunct.members/grouping.pass.cpp deleted file mode 100644 index fc857d65..00000000 --- a/test/localization/locale.categories/category.monetary/locale.moneypunct/locale.moneypunct.members/grouping.pass.cpp +++ /dev/null @@ -1,75 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// class moneypunct - -// string grouping() const; - -// The C++ and C standards are silent. -// POSIX standard is being followed (as a guideline). - -#include -#include -#include - -typedef std::moneypunct F; - -class Fnf - : public std::moneypunct -{ -public: - explicit Fnf(std::size_t refs = 0) - : std::moneypunct(refs) {} -}; - -class Fnt - : public std::moneypunct -{ -public: - explicit Fnt(std::size_t refs = 0) - : std::moneypunct(refs) {} -}; - -class Fwf - : public std::moneypunct -{ -public: - explicit Fwf(std::size_t refs = 0) - : std::moneypunct(refs) {} -}; - -class Fwt - : public std::moneypunct -{ -public: - explicit Fwt(std::size_t refs = 0) - : std::moneypunct(refs) {} -}; - -int main() -{ - { - Fnf f(1); - assert(f.grouping() == std::string()); - } - { - Fnt f(1); - assert(f.grouping() == std::string()); - } - { - Fwf f(1); - assert(f.grouping() == std::string()); - } - { - Fwt f(1); - assert(f.grouping() == std::string()); - } -} diff --git a/test/localization/locale.categories/category.monetary/locale.moneypunct/locale.moneypunct.members/neg_format.pass.cpp b/test/localization/locale.categories/category.monetary/locale.moneypunct/locale.moneypunct.members/neg_format.pass.cpp deleted file mode 100644 index d1df09cd..00000000 --- a/test/localization/locale.categories/category.monetary/locale.moneypunct/locale.moneypunct.members/neg_format.pass.cpp +++ /dev/null @@ -1,88 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// class moneypunct - -// pattern neg_format() const; - -#include -#include -#include - -typedef std::moneypunct F; - -class Fnf - : public std::moneypunct -{ -public: - explicit Fnf(std::size_t refs = 0) - : std::moneypunct(refs) {} -}; - -class Fnt - : public std::moneypunct -{ -public: - explicit Fnt(std::size_t refs = 0) - : std::moneypunct(refs) {} -}; - -class Fwf - : public std::moneypunct -{ -public: - explicit Fwf(std::size_t refs = 0) - : std::moneypunct(refs) {} -}; - -class Fwt - : public std::moneypunct -{ -public: - explicit Fwt(std::size_t refs = 0) - : std::moneypunct(refs) {} -}; - -int main() -{ - { - Fnf f(1); - std::money_base::pattern p = f.neg_format(); - assert(p.field[0] == std::money_base::symbol); - assert(p.field[1] == std::money_base::sign); - assert(p.field[2] == std::money_base::none); - assert(p.field[3] == std::money_base::value); - } - { - Fnt f(1); - std::money_base::pattern p = f.neg_format(); - assert(p.field[0] == std::money_base::symbol); - assert(p.field[1] == std::money_base::sign); - assert(p.field[2] == std::money_base::none); - assert(p.field[3] == std::money_base::value); - } - { - Fwf f(1); - std::money_base::pattern p = f.neg_format(); - assert(p.field[0] == std::money_base::symbol); - assert(p.field[1] == std::money_base::sign); - assert(p.field[2] == std::money_base::none); - assert(p.field[3] == std::money_base::value); - } - { - Fwt f(1); - std::money_base::pattern p = f.neg_format(); - assert(p.field[0] == std::money_base::symbol); - assert(p.field[1] == std::money_base::sign); - assert(p.field[2] == std::money_base::none); - assert(p.field[3] == std::money_base::value); - } -} diff --git a/test/localization/locale.categories/category.monetary/locale.moneypunct/locale.moneypunct.members/negative_sign.pass.cpp b/test/localization/locale.categories/category.monetary/locale.moneypunct/locale.moneypunct.members/negative_sign.pass.cpp deleted file mode 100644 index df350d35..00000000 --- a/test/localization/locale.categories/category.monetary/locale.moneypunct/locale.moneypunct.members/negative_sign.pass.cpp +++ /dev/null @@ -1,76 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// class moneypunct - -// string_type negative_sign() const; - -// The C++ and C standards are silent. -// On this one, commen sense is the guideline. -// If customers complain, I'll endeavor to minimize customer complaints - -#include -#include -#include - -typedef std::moneypunct F; - -class Fnf - : public std::moneypunct -{ -public: - explicit Fnf(std::size_t refs = 0) - : std::moneypunct(refs) {} -}; - -class Fnt - : public std::moneypunct -{ -public: - explicit Fnt(std::size_t refs = 0) - : std::moneypunct(refs) {} -}; - -class Fwf - : public std::moneypunct -{ -public: - explicit Fwf(std::size_t refs = 0) - : std::moneypunct(refs) {} -}; - -class Fwt - : public std::moneypunct -{ -public: - explicit Fwt(std::size_t refs = 0) - : std::moneypunct(refs) {} -}; - -int main() -{ - { - Fnf f(1); - assert(f.negative_sign() == "-"); - } - { - Fnt f(1); - assert(f.negative_sign() == "-"); - } - { - Fwf f(1); - assert(f.negative_sign() == L"-"); - } - { - Fwt f(1); - assert(f.negative_sign() == L"-"); - } -} diff --git a/test/localization/locale.categories/category.monetary/locale.moneypunct/locale.moneypunct.members/pos_format.pass.cpp b/test/localization/locale.categories/category.monetary/locale.moneypunct/locale.moneypunct.members/pos_format.pass.cpp deleted file mode 100644 index 6e28154c..00000000 --- a/test/localization/locale.categories/category.monetary/locale.moneypunct/locale.moneypunct.members/pos_format.pass.cpp +++ /dev/null @@ -1,88 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// class moneypunct - -// pattern pos_format() const; - -#include -#include -#include - -typedef std::moneypunct F; - -class Fnf - : public std::moneypunct -{ -public: - explicit Fnf(std::size_t refs = 0) - : std::moneypunct(refs) {} -}; - -class Fnt - : public std::moneypunct -{ -public: - explicit Fnt(std::size_t refs = 0) - : std::moneypunct(refs) {} -}; - -class Fwf - : public std::moneypunct -{ -public: - explicit Fwf(std::size_t refs = 0) - : std::moneypunct(refs) {} -}; - -class Fwt - : public std::moneypunct -{ -public: - explicit Fwt(std::size_t refs = 0) - : std::moneypunct(refs) {} -}; - -int main() -{ - { - Fnf f(1); - std::money_base::pattern p = f.pos_format(); - assert(p.field[0] == std::money_base::symbol); - assert(p.field[1] == std::money_base::sign); - assert(p.field[2] == std::money_base::none); - assert(p.field[3] == std::money_base::value); - } - { - Fnt f(1); - std::money_base::pattern p = f.pos_format(); - assert(p.field[0] == std::money_base::symbol); - assert(p.field[1] == std::money_base::sign); - assert(p.field[2] == std::money_base::none); - assert(p.field[3] == std::money_base::value); - } - { - Fwf f(1); - std::money_base::pattern p = f.pos_format(); - assert(p.field[0] == std::money_base::symbol); - assert(p.field[1] == std::money_base::sign); - assert(p.field[2] == std::money_base::none); - assert(p.field[3] == std::money_base::value); - } - { - Fwt f(1); - std::money_base::pattern p = f.pos_format(); - assert(p.field[0] == std::money_base::symbol); - assert(p.field[1] == std::money_base::sign); - assert(p.field[2] == std::money_base::none); - assert(p.field[3] == std::money_base::value); - } -} diff --git a/test/localization/locale.categories/category.monetary/locale.moneypunct/locale.moneypunct.members/positive_sign.pass.cpp b/test/localization/locale.categories/category.monetary/locale.moneypunct/locale.moneypunct.members/positive_sign.pass.cpp deleted file mode 100644 index 5ec8d9a5..00000000 --- a/test/localization/locale.categories/category.monetary/locale.moneypunct/locale.moneypunct.members/positive_sign.pass.cpp +++ /dev/null @@ -1,75 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// class moneypunct - -// string_type positive_sign() const; - -// The C++ and C standards are silent. -// POSIX standard is being followed (as a guideline). - -#include -#include -#include - -typedef std::moneypunct F; - -class Fnf - : public std::moneypunct -{ -public: - explicit Fnf(std::size_t refs = 0) - : std::moneypunct(refs) {} -}; - -class Fnt - : public std::moneypunct -{ -public: - explicit Fnt(std::size_t refs = 0) - : std::moneypunct(refs) {} -}; - -class Fwf - : public std::moneypunct -{ -public: - explicit Fwf(std::size_t refs = 0) - : std::moneypunct(refs) {} -}; - -class Fwt - : public std::moneypunct -{ -public: - explicit Fwt(std::size_t refs = 0) - : std::moneypunct(refs) {} -}; - -int main() -{ - { - Fnf f(1); - assert(f.positive_sign() == std::string()); - } - { - Fnt f(1); - assert(f.positive_sign() == std::string()); - } - { - Fwf f(1); - assert(f.positive_sign() == std::wstring()); - } - { - Fwt f(1); - assert(f.positive_sign() == std::wstring()); - } -} diff --git a/test/localization/locale.categories/category.monetary/locale.moneypunct/locale.moneypunct.members/thousands_sep.pass.cpp b/test/localization/locale.categories/category.monetary/locale.moneypunct/locale.moneypunct.members/thousands_sep.pass.cpp deleted file mode 100644 index 27db562f..00000000 --- a/test/localization/locale.categories/category.monetary/locale.moneypunct/locale.moneypunct.members/thousands_sep.pass.cpp +++ /dev/null @@ -1,75 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// class moneypunct - -// charT thousands_sep() const; - -// The C++ and C standards are silent. -// POSIX standard is being followed (as a guideline). - -#include -#include -#include - -typedef std::moneypunct F; - -class Fnf - : public std::moneypunct -{ -public: - explicit Fnf(std::size_t refs = 0) - : std::moneypunct(refs) {} -}; - -class Fnt - : public std::moneypunct -{ -public: - explicit Fnt(std::size_t refs = 0) - : std::moneypunct(refs) {} -}; - -class Fwf - : public std::moneypunct -{ -public: - explicit Fwf(std::size_t refs = 0) - : std::moneypunct(refs) {} -}; - -class Fwt - : public std::moneypunct -{ -public: - explicit Fwt(std::size_t refs = 0) - : std::moneypunct(refs) {} -}; - -int main() -{ - { - Fnf f(1); - assert(f.thousands_sep() == std::numeric_limits::max()); - } - { - Fnt f(1); - assert(f.thousands_sep() == std::numeric_limits::max()); - } - { - Fwf f(1); - assert(f.thousands_sep() == std::numeric_limits::max()); - } - { - Fwt f(1); - assert(f.thousands_sep() == std::numeric_limits::max()); - } -} diff --git a/test/localization/locale.categories/category.monetary/locale.moneypunct/locale.moneypunct.virtuals/tested_elsewhere.pass.cpp b/test/localization/locale.categories/category.monetary/locale.moneypunct/locale.moneypunct.virtuals/tested_elsewhere.pass.cpp deleted file mode 100644 index b58f5c55..00000000 --- a/test/localization/locale.categories/category.monetary/locale.moneypunct/locale.moneypunct.virtuals/tested_elsewhere.pass.cpp +++ /dev/null @@ -1,12 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -int main() -{ -} diff --git a/test/localization/locale.categories/category.monetary/locale.moneypunct/money_base.pass.cpp b/test/localization/locale.categories/category.monetary/locale.moneypunct/money_base.pass.cpp deleted file mode 100644 index beabe0ca..00000000 --- a/test/localization/locale.categories/category.monetary/locale.moneypunct/money_base.pass.cpp +++ /dev/null @@ -1,33 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// class money_base -// { -// public: -// enum part {none, space, symbol, sign, value}; -// struct pattern {char field[4];}; -// }; - -#include -#include - -int main() -{ - std::money_base mb; - assert(mb.none == 0); - assert(mb.space == 1); - assert(mb.symbol == 2); - assert(mb.sign == 3); - assert(mb.value == 4); - assert(sizeof(std::money_base::pattern) == 4); - std::money_base::pattern p; - p.field[0] = std::money_base::none; -} diff --git a/test/localization/locale.categories/category.monetary/locale.moneypunct/types.pass.cpp b/test/localization/locale.categories/category.monetary/locale.moneypunct/types.pass.cpp deleted file mode 100644 index 7025ec9c..00000000 --- a/test/localization/locale.categories/category.monetary/locale.moneypunct/types.pass.cpp +++ /dev/null @@ -1,34 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template -// class moneypunct -// : public locale::facet, -// public money_base -// { -// public: -// typedef _CharT char_type; -// typedef basic_string string_type; - -#include -#include - -int main() -{ - static_assert((std::is_base_of >::value), ""); - static_assert((std::is_base_of >::value), ""); - static_assert((std::is_base_of >::value), ""); - static_assert((std::is_base_of >::value), ""); - static_assert((std::is_same::char_type, char>::value), ""); - static_assert((std::is_same::char_type, wchar_t>::value), ""); - static_assert((std::is_same::string_type, std::string>::value), ""); - static_assert((std::is_same::string_type, std::wstring>::value), ""); -} diff --git a/test/localization/locale.categories/category.monetary/nothing_to_do.pass.cpp b/test/localization/locale.categories/category.monetary/nothing_to_do.pass.cpp deleted file mode 100644 index b58f5c55..00000000 --- a/test/localization/locale.categories/category.monetary/nothing_to_do.pass.cpp +++ /dev/null @@ -1,12 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -int main() -{ -} diff --git a/test/localization/locale.categories/category.numeric/locale.nm.put/ctor.pass.cpp b/test/localization/locale.categories/category.numeric/locale.nm.put/ctor.pass.cpp deleted file mode 100644 index f801e6c5..00000000 --- a/test/localization/locale.categories/category.numeric/locale.nm.put/ctor.pass.cpp +++ /dev/null @@ -1,52 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// class num_put - -// explicit num_put(size_t refs = 0); - -#include -#include - -typedef std::num_put F; - -class my_facet - : public F -{ -public: - static int count; - - explicit my_facet(std::size_t refs = 0) - : F(refs) {++count;} - - ~my_facet() {--count;} -}; - -int my_facet::count = 0; - -int main() -{ - { - std::locale l(std::locale::classic(), new my_facet); - assert(my_facet::count == 1); - } - assert(my_facet::count == 0); - { - my_facet f(1); - assert(my_facet::count == 1); - { - std::locale l(std::locale::classic(), &f); - assert(my_facet::count == 1); - } - assert(my_facet::count == 1); - } - assert(my_facet::count == 0); -} diff --git a/test/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/iterators.h b/test/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/iterators.h deleted file mode 100644 index fa6e1004..00000000 --- a/test/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/iterators.h +++ /dev/null @@ -1,33 +0,0 @@ -#ifndef ITERATORS_H -#define ITERATORS_H - -#include - -template -class output_iterator -{ - It it_; - - template friend class output_iterator; -public: - typedef std::output_iterator_tag iterator_category; - typedef typename std::iterator_traits::value_type value_type; - typedef typename std::iterator_traits::difference_type difference_type; - typedef It pointer; - typedef typename std::iterator_traits::reference reference; - - It base() const {return it_;} - - output_iterator() : it_() {} - explicit output_iterator(It it) : it_(it) {} - template - output_iterator(const output_iterator& u) :it_(u.it_) {} - - reference operator*() const {return *it_;} - - output_iterator& operator++() {++it_; return *this;} - output_iterator operator++(int) - {output_iterator tmp(*this); ++(*this); return tmp;} -}; - -#endif // ITERATORS_H diff --git a/test/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_bool.pass.cpp b/test/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_bool.pass.cpp deleted file mode 100644 index cac1802e..00000000 --- a/test/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_bool.pass.cpp +++ /dev/null @@ -1,100 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// class num_put - -// iter_type put(iter_type s, ios_base& iob, char_type fill, bool v) const; - -#include -#include -#include -#include -#include "iterators.h" - -typedef std::num_put > F; - -class my_facet - : public F -{ -public: - explicit my_facet(std::size_t refs = 0) - : F(refs) {} -}; - -class my_numpunct - : public std::numpunct -{ -public: - my_numpunct() : std::numpunct() {} - -protected: - virtual string_type do_truename() const {return "yes";} - virtual string_type do_falsename() const {return "no";} -}; - -int main() -{ - const my_facet f(1); - { - std::ios ios(0); - { - bool v = false; - char str[50]; - output_iterator iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0"); - } - { - bool v = true; - char str[50]; - output_iterator iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1"); - } - } - { - std::ios ios(0); - boolalpha(ios); - { - bool v = false; - char str[50]; - output_iterator iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "false"); - } - { - bool v = true; - char str[50]; - output_iterator iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "true"); - } - } - { - std::ios ios(0); - boolalpha(ios); - ios.imbue(std::locale(std::locale::classic(), new my_numpunct)); - { - bool v = false; - char str[50]; - output_iterator iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "no"); - } - { - bool v = true; - char str[50]; - output_iterator iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "yes"); - } - } -} diff --git a/test/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_double.pass.cpp b/test/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_double.pass.cpp deleted file mode 100644 index 3428692b..00000000 --- a/test/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_double.pass.cpp +++ /dev/null @@ -1,17887 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// class num_put - -// iter_type put(iter_type s, ios_base& iob, char_type fill, double v) const; - -#include -#include -#include -#include -#include -#include "iterators.h" - -typedef std::num_put > F; - -class my_facet - : public F -{ -public: - explicit my_facet(std::size_t refs = 0) - : F(refs) {} -}; - -class my_numpunct - : public std::numpunct -{ -public: - my_numpunct() : std::numpunct() {} - -protected: - virtual char_type do_decimal_point() const {return ';';} - virtual char_type do_thousands_sep() const {return '_';} - virtual std::string do_grouping() const {return std::string("\1\2\3");} -}; - -void test1() -{ - char str[200]; - output_iterator iter; - std::locale lc = std::locale::classic(); - std::locale lg(lc, new my_numpunct); - const my_facet f(1); - { - double v = +0.; - std::ios ios(0); - // %g - { - ios.precision(0); - { - nouppercase(ios); - { - noshowpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0************************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "************************0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "************************0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0************************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "************************0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "************************0"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0."); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0.***********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********************0."); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********************0."); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0;"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0;***********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********************0;"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********************0;"); - assert(ios.width() == 0); - } - } - } - } - showpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0***********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********************+0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+***********************0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0***********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********************+0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+***********************0"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0."); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0.**********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**********************+0."); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+**********************0."); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0;"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0;**********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**********************+0;"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+**********************0;"); - assert(ios.width() == 0); - } - } - } - } - } - uppercase(ios); - { - noshowpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0************************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "************************0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "************************0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0************************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "************************0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "************************0"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0."); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0.***********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********************0."); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********************0."); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0;"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0;***********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********************0;"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********************0;"); - assert(ios.width() == 0); - } - } - } - } - showpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0***********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********************+0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+***********************0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0***********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********************+0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+***********************0"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0."); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0.**********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**********************+0."); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+**********************0."); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0;"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0;**********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**********************+0;"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+**********************0;"); - assert(ios.width() == 0); - } - } - } - } - } - } - ios.precision(1); - { - nouppercase(ios); - { - noshowpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0************************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "************************0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "************************0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0************************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "************************0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "************************0"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0."); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0.***********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********************0."); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********************0."); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0;"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0;***********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********************0;"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********************0;"); - assert(ios.width() == 0); - } - } - } - } - showpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0***********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********************+0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+***********************0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0***********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********************+0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+***********************0"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0."); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0.**********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**********************+0."); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+**********************0."); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0;"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0;**********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**********************+0;"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+**********************0;"); - assert(ios.width() == 0); - } - } - } - } - } - uppercase(ios); - { - noshowpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0************************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "************************0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "************************0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0************************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "************************0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "************************0"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0."); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0.***********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********************0."); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********************0."); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0;"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0;***********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********************0;"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********************0;"); - assert(ios.width() == 0); - } - } - } - } - showpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0***********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********************+0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+***********************0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0***********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********************+0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+***********************0"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0."); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0.**********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**********************+0."); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+**********************0."); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0;"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0;**********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**********************+0;"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+**********************0;"); - assert(ios.width() == 0); - } - } - } - } - } - } - ios.precision(6); - { - nouppercase(ios); - { - noshowpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0************************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "************************0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "************************0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0************************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "************************0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "************************0"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0.00000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0.00000******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************0.00000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************0.00000"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0;00000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0;00000******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************0;00000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************0;00000"); - assert(ios.width() == 0); - } - } - } - } - showpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0***********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********************+0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+***********************0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0***********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********************+0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+***********************0"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0.00000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0.00000*****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************+0.00000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+*****************0.00000"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0;00000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0;00000*****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************+0;00000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+*****************0;00000"); - assert(ios.width() == 0); - } - } - } - } - } - uppercase(ios); - { - noshowpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0************************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "************************0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "************************0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0************************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "************************0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "************************0"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0.00000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0.00000******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************0.00000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************0.00000"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0;00000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0;00000******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************0;00000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************0;00000"); - assert(ios.width() == 0); - } - } - } - } - showpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0***********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********************+0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+***********************0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0***********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********************+0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+***********************0"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0.00000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0.00000*****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************+0.00000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+*****************0.00000"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0;00000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0;00000*****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************+0;00000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+*****************0;00000"); - assert(ios.width() == 0); - } - } - } - } - } - } - ios.precision(16); - { - nouppercase(ios); - { - noshowpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0************************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "************************0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "************************0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0************************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "************************0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "************************0"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0.000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0.000000000000000********"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********0.000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********0.000000000000000"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0;000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0;000000000000000********"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********0;000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********0;000000000000000"); - assert(ios.width() == 0); - } - } - } - } - showpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0***********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********************+0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+***********************0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0***********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********************+0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+***********************0"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0.000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0.000000000000000*******"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******+0.000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+*******0.000000000000000"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0;000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0;000000000000000*******"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******+0;000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+*******0;000000000000000"); - assert(ios.width() == 0); - } - } - } - } - } - uppercase(ios); - { - noshowpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0************************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "************************0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "************************0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0************************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "************************0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "************************0"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0.000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0.000000000000000********"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********0.000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********0.000000000000000"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0;000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0;000000000000000********"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********0;000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********0;000000000000000"); - assert(ios.width() == 0); - } - } - } - } - showpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0***********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********************+0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+***********************0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0***********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********************+0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+***********************0"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0.000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0.000000000000000*******"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******+0.000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+*******0.000000000000000"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0;000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0;000000000000000*******"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******+0;000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+*******0;000000000000000"); - assert(ios.width() == 0); - } - } - } - } - } - } - ios.precision(60); - { - nouppercase(ios); - { - noshowpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0************************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "************************0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "************************0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0************************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "************************0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "************************0"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0.00000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0.00000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0.00000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0.00000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0;00000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0;00000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0;00000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0;00000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - } - } - } - showpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0***********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********************+0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+***********************0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0***********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********************+0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+***********************0"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0.00000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0.00000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0.00000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0.00000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0;00000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0;00000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0;00000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0;00000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - } - } - } - } - uppercase(ios); - { - noshowpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0************************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "************************0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "************************0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0************************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "************************0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "************************0"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0.00000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0.00000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0.00000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0.00000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0;00000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0;00000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0;00000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0;00000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - } - } - } - showpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0***********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********************+0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+***********************0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0***********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********************+0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+***********************0"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0.00000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0.00000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0.00000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0.00000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0;00000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0;00000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0;00000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0;00000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - } - } - } - } - } - } - } -} - -void test2() -{ - char str[200]; - output_iterator iter; - std::locale lc = std::locale::classic(); - std::locale lg(lc, new my_numpunct); - const my_facet f(1); - { - double v = 1234567890.125; - std::ios ios(0); - // %g - { - ios.precision(0); - { - nouppercase(ios); - { - noshowpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1e+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1e+09********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********************1e+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********************1e+09"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1e+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1e+09********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********************1e+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********************1e+09"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1.e+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1.e+09*******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******************1.e+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******************1.e+09"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1;e+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1;e+09*******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******************1;e+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******************1;e+09"); - assert(ios.width() == 0); - } - } - } - } - showpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1e+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1e+09*******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******************+1e+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+*******************1e+09"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1e+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1e+09*******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******************+1e+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+*******************1e+09"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1.e+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1.e+09******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************+1.e+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+******************1.e+09"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1;e+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1;e+09******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************+1;e+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+******************1;e+09"); - assert(ios.width() == 0); - } - } - } - } - } - uppercase(ios); - { - noshowpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1E+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1E+09********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********************1E+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********************1E+09"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1E+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1E+09********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********************1E+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********************1E+09"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1.E+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1.E+09*******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******************1.E+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******************1.E+09"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1;E+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1;E+09*******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******************1;E+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******************1;E+09"); - assert(ios.width() == 0); - } - } - } - } - showpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1E+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1E+09*******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******************+1E+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+*******************1E+09"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1E+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1E+09*******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******************+1E+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+*******************1E+09"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1.E+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1.E+09******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************+1.E+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+******************1.E+09"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1;E+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1;E+09******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************+1;E+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+******************1;E+09"); - assert(ios.width() == 0); - } - } - } - } - } - } - ios.precision(1); - { - nouppercase(ios); - { - noshowpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1e+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1e+09********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********************1e+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********************1e+09"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1e+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1e+09********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********************1e+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********************1e+09"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1.e+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1.e+09*******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******************1.e+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******************1.e+09"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1;e+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1;e+09*******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******************1;e+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******************1;e+09"); - assert(ios.width() == 0); - } - } - } - } - showpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1e+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1e+09*******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******************+1e+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+*******************1e+09"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1e+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1e+09*******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******************+1e+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+*******************1e+09"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1.e+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1.e+09******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************+1.e+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+******************1.e+09"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1;e+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1;e+09******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************+1;e+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+******************1;e+09"); - assert(ios.width() == 0); - } - } - } - } - } - uppercase(ios); - { - noshowpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1E+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1E+09********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********************1E+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********************1E+09"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1E+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1E+09********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********************1E+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********************1E+09"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1.E+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1.E+09*******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******************1.E+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******************1.E+09"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1;E+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1;E+09*******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******************1;E+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******************1;E+09"); - assert(ios.width() == 0); - } - } - } - } - showpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1E+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1E+09*******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******************+1E+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+*******************1E+09"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1E+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1E+09*******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******************+1E+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+*******************1E+09"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1.E+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1.E+09******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************+1.E+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+******************1.E+09"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1;E+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1;E+09******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************+1;E+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+******************1;E+09"); - assert(ios.width() == 0); - } - } - } - } - } - } - ios.precision(6); - { - nouppercase(ios); - { - noshowpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1.23457e+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1.23457e+09**************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**************1.23457e+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**************1.23457e+09"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1;23457e+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1;23457e+09**************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**************1;23457e+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**************1;23457e+09"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1.23457e+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1.23457e+09**************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**************1.23457e+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**************1.23457e+09"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1;23457e+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1;23457e+09**************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**************1;23457e+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**************1;23457e+09"); - assert(ios.width() == 0); - } - } - } - } - showpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1.23457e+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1.23457e+09*************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*************+1.23457e+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+*************1.23457e+09"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1;23457e+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1;23457e+09*************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*************+1;23457e+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+*************1;23457e+09"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1.23457e+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1.23457e+09*************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*************+1.23457e+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+*************1.23457e+09"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1;23457e+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1;23457e+09*************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*************+1;23457e+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+*************1;23457e+09"); - assert(ios.width() == 0); - } - } - } - } - } - uppercase(ios); - { - noshowpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1.23457E+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1.23457E+09**************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**************1.23457E+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**************1.23457E+09"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1;23457E+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1;23457E+09**************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**************1;23457E+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**************1;23457E+09"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1.23457E+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1.23457E+09**************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**************1.23457E+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**************1.23457E+09"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1;23457E+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1;23457E+09**************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**************1;23457E+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**************1;23457E+09"); - assert(ios.width() == 0); - } - } - } - } - showpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1.23457E+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1.23457E+09*************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*************+1.23457E+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+*************1.23457E+09"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1;23457E+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1;23457E+09*************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*************+1;23457E+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+*************1;23457E+09"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1.23457E+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1.23457E+09*************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*************+1.23457E+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+*************1.23457E+09"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1;23457E+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1;23457E+09*************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*************+1;23457E+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+*************1;23457E+09"); - assert(ios.width() == 0); - } - } - } - } - } - } - ios.precision(16); - { - nouppercase(ios); - { - noshowpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1234567890.125"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1234567890.125***********"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********1234567890.125"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********1234567890.125"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1_234_567_89_0;125"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1_234_567_89_0;125*******"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******1_234_567_89_0;125"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******1_234_567_89_0;125"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1234567890.125000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1234567890.125000********"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********1234567890.125000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********1234567890.125000"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1_234_567_89_0;125000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1_234_567_89_0;125000****"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "****1_234_567_89_0;125000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "****1_234_567_89_0;125000"); - assert(ios.width() == 0); - } - } - } - } - showpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1234567890.125"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1234567890.125**********"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**********+1234567890.125"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+**********1234567890.125"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1_234_567_89_0;125"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1_234_567_89_0;125******"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******+1_234_567_89_0;125"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+******1_234_567_89_0;125"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1234567890.125000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1234567890.125000*******"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******+1234567890.125000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+*******1234567890.125000"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1_234_567_89_0;125000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1_234_567_89_0;125000***"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***+1_234_567_89_0;125000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+***1_234_567_89_0;125000"); - assert(ios.width() == 0); - } - } - } - } - } - uppercase(ios); - { - noshowpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1234567890.125"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1234567890.125***********"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********1234567890.125"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********1234567890.125"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1_234_567_89_0;125"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1_234_567_89_0;125*******"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******1_234_567_89_0;125"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******1_234_567_89_0;125"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1234567890.125000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1234567890.125000********"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********1234567890.125000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********1234567890.125000"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1_234_567_89_0;125000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1_234_567_89_0;125000****"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "****1_234_567_89_0;125000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "****1_234_567_89_0;125000"); - assert(ios.width() == 0); - } - } - } - } - showpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1234567890.125"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1234567890.125**********"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**********+1234567890.125"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+**********1234567890.125"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1_234_567_89_0;125"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1_234_567_89_0;125******"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******+1_234_567_89_0;125"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+******1_234_567_89_0;125"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1234567890.125000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1234567890.125000*******"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******+1234567890.125000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+*******1234567890.125000"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1_234_567_89_0;125000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1_234_567_89_0;125000***"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***+1_234_567_89_0;125000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+***1_234_567_89_0;125000"); - assert(ios.width() == 0); - } - } - } - } - } - } - ios.precision(60); - { - nouppercase(ios); - { - noshowpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1234567890.125"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1234567890.125***********"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********1234567890.125"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********1234567890.125"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1_234_567_89_0;125"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1_234_567_89_0;125*******"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******1_234_567_89_0;125"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******1_234_567_89_0;125"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1234567890.12500000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1234567890.12500000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1234567890.12500000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1234567890.12500000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1_234_567_89_0;12500000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1_234_567_89_0;12500000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1_234_567_89_0;12500000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1_234_567_89_0;12500000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - } - } - } - showpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1234567890.125"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1234567890.125**********"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**********+1234567890.125"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+**********1234567890.125"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1_234_567_89_0;125"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1_234_567_89_0;125******"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******+1_234_567_89_0;125"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+******1_234_567_89_0;125"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1234567890.12500000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1234567890.12500000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1234567890.12500000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1234567890.12500000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1_234_567_89_0;12500000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1_234_567_89_0;12500000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1_234_567_89_0;12500000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1_234_567_89_0;12500000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - } - } - } - } - uppercase(ios); - { - noshowpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1234567890.125"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1234567890.125***********"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********1234567890.125"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********1234567890.125"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1_234_567_89_0;125"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1_234_567_89_0;125*******"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******1_234_567_89_0;125"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******1_234_567_89_0;125"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1234567890.12500000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1234567890.12500000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1234567890.12500000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1234567890.12500000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1_234_567_89_0;12500000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1_234_567_89_0;12500000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1_234_567_89_0;12500000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1_234_567_89_0;12500000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - } - } - } - showpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1234567890.125"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1234567890.125**********"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**********+1234567890.125"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+**********1234567890.125"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1_234_567_89_0;125"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1_234_567_89_0;125******"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******+1_234_567_89_0;125"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+******1_234_567_89_0;125"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1234567890.12500000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1234567890.12500000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1234567890.12500000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1234567890.12500000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1_234_567_89_0;12500000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1_234_567_89_0;12500000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1_234_567_89_0;12500000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1_234_567_89_0;12500000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - } - } - } - } - } - } - } -} - -void test3() -{ - char str[200]; - output_iterator iter; - std::locale lc = std::locale::classic(); - std::locale lg(lc, new my_numpunct); - const my_facet f(1); - { - double v = +0.; - std::ios ios(0); - fixed(ios); - // %f - { - ios.precision(0); - { - nouppercase(ios); - { - noshowpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0************************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "************************0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "************************0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0************************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "************************0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "************************0"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0."); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0.***********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********************0."); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********************0."); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0;"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0;***********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********************0;"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********************0;"); - assert(ios.width() == 0); - } - } - } - } - showpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0***********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********************+0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+***********************0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0***********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********************+0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+***********************0"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0."); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0.**********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**********************+0."); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+**********************0."); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0;"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0;**********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**********************+0;"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+**********************0;"); - assert(ios.width() == 0); - } - } - } - } - } - uppercase(ios); - { - noshowpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0************************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "************************0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "************************0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0************************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "************************0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "************************0"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0."); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0.***********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********************0."); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********************0."); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0;"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0;***********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********************0;"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********************0;"); - assert(ios.width() == 0); - } - } - } - } - showpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0***********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********************+0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+***********************0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0***********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********************+0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+***********************0"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0."); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0.**********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**********************+0."); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+**********************0."); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0;"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0;**********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**********************+0;"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+**********************0;"); - assert(ios.width() == 0); - } - } - } - } - } - } - ios.precision(1); - { - nouppercase(ios); - { - noshowpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0.0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0.0**********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**********************0.0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**********************0.0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0;0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0;0**********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**********************0;0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**********************0;0"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0.0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0.0**********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**********************0.0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**********************0.0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0;0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0;0**********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**********************0;0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**********************0;0"); - assert(ios.width() == 0); - } - } - } - } - showpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0.0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0.0*********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*********************+0.0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+*********************0.0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0;0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0;0*********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*********************+0;0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+*********************0;0"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0.0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0.0*********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*********************+0.0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+*********************0.0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0;0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0;0*********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*********************+0;0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+*********************0;0"); - assert(ios.width() == 0); - } - } - } - } - } - uppercase(ios); - { - noshowpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0.0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0.0**********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**********************0.0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**********************0.0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0;0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0;0**********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**********************0;0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**********************0;0"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0.0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0.0**********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**********************0.0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**********************0.0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0;0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0;0**********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**********************0;0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**********************0;0"); - assert(ios.width() == 0); - } - } - } - } - showpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0.0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0.0*********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*********************+0.0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+*********************0.0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0;0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0;0*********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*********************+0;0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+*********************0;0"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0.0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0.0*********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*********************+0.0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+*********************0.0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0;0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0;0*********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*********************+0;0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+*********************0;0"); - assert(ios.width() == 0); - } - } - } - } - } - } - ios.precision(6); - { - nouppercase(ios); - { - noshowpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0.000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0.000000*****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************0.000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************0.000000"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0;000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0;000000*****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************0;000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************0;000000"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0.000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0.000000*****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************0.000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************0.000000"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0;000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0;000000*****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************0;000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************0;000000"); - assert(ios.width() == 0); - } - } - } - } - showpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0.000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0.000000****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "****************+0.000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+****************0.000000"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0;000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0;000000****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "****************+0;000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+****************0;000000"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0.000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0.000000****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "****************+0.000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+****************0.000000"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0;000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0;000000****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "****************+0;000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+****************0;000000"); - assert(ios.width() == 0); - } - } - } - } - } - uppercase(ios); - { - noshowpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0.000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0.000000*****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************0.000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************0.000000"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0;000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0;000000*****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************0;000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************0;000000"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0.000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0.000000*****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************0.000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************0.000000"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0;000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0;000000*****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************0;000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************0;000000"); - assert(ios.width() == 0); - } - } - } - } - showpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0.000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0.000000****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "****************+0.000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+****************0.000000"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0;000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0;000000****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "****************+0;000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+****************0;000000"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0.000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0.000000****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "****************+0.000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+****************0.000000"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0;000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0;000000****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "****************+0;000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+****************0;000000"); - assert(ios.width() == 0); - } - } - } - } - } - } - ios.precision(16); - { - nouppercase(ios); - { - noshowpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0.0000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0.0000000000000000*******"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******0.0000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******0.0000000000000000"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0;0000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0;0000000000000000*******"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******0;0000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******0;0000000000000000"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0.0000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0.0000000000000000*******"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******0.0000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******0.0000000000000000"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0;0000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0;0000000000000000*******"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******0;0000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******0;0000000000000000"); - assert(ios.width() == 0); - } - } - } - } - showpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0.0000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0.0000000000000000******"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******+0.0000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+******0.0000000000000000"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0;0000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0;0000000000000000******"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******+0;0000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+******0;0000000000000000"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0.0000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0.0000000000000000******"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******+0.0000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+******0.0000000000000000"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0;0000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0;0000000000000000******"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******+0;0000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+******0;0000000000000000"); - assert(ios.width() == 0); - } - } - } - } - } - uppercase(ios); - { - noshowpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0.0000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0.0000000000000000*******"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******0.0000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******0.0000000000000000"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0;0000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0;0000000000000000*******"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******0;0000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******0;0000000000000000"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0.0000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0.0000000000000000*******"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******0.0000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******0.0000000000000000"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0;0000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0;0000000000000000*******"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******0;0000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******0;0000000000000000"); - assert(ios.width() == 0); - } - } - } - } - showpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0.0000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0.0000000000000000******"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******+0.0000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+******0.0000000000000000"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0;0000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0;0000000000000000******"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******+0;0000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+******0;0000000000000000"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0.0000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0.0000000000000000******"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******+0.0000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+******0.0000000000000000"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0;0000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0;0000000000000000******"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******+0;0000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+******0;0000000000000000"); - assert(ios.width() == 0); - } - } - } - } - } - } - ios.precision(60); - { - nouppercase(ios); - { - noshowpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0.000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0.000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0.000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0.000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0;000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0;000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0;000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0;000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0.000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0.000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0.000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0.000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0;000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0;000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0;000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0;000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - } - } - } - showpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0.000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0.000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0.000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0.000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0;000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0;000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0;000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0;000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0.000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0.000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0.000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0.000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0;000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0;000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0;000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0;000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - } - } - } - } - uppercase(ios); - { - noshowpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0.000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0.000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0.000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0.000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0;000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0;000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0;000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0;000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0.000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0.000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0.000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0.000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0;000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0;000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0;000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0;000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - } - } - } - showpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0.000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0.000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0.000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0.000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0;000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0;000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0;000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0;000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0.000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0.000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0.000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0.000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0;000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0;000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0;000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0;000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - } - } - } - } - } - } - } -} - -void test4() -{ - char str[200]; - output_iterator iter; - std::locale lc = std::locale::classic(); - std::locale lg(lc, new my_numpunct); - const my_facet f(1); - { - double v = 1234567890.125; - std::ios ios(0); - fixed(ios); - // %f - { - ios.precision(0); - { - nouppercase(ios); - { - noshowpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1234567890"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1234567890***************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***************1234567890"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***************1234567890"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1_234_567_89_0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1_234_567_89_0***********"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********1_234_567_89_0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********1_234_567_89_0"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1234567890."); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1234567890.**************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**************1234567890."); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**************1234567890."); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1_234_567_89_0;"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1_234_567_89_0;**********"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**********1_234_567_89_0;"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**********1_234_567_89_0;"); - assert(ios.width() == 0); - } - } - } - } - showpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1234567890"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1234567890**************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**************+1234567890"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+**************1234567890"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1_234_567_89_0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1_234_567_89_0**********"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**********+1_234_567_89_0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+**********1_234_567_89_0"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1234567890."); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1234567890.*************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*************+1234567890."); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+*************1234567890."); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1_234_567_89_0;"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1_234_567_89_0;*********"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*********+1_234_567_89_0;"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+*********1_234_567_89_0;"); - assert(ios.width() == 0); - } - } - } - } - } - uppercase(ios); - { - noshowpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1234567890"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1234567890***************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***************1234567890"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***************1234567890"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1_234_567_89_0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1_234_567_89_0***********"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********1_234_567_89_0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********1_234_567_89_0"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1234567890."); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1234567890.**************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**************1234567890."); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**************1234567890."); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1_234_567_89_0;"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1_234_567_89_0;**********"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**********1_234_567_89_0;"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**********1_234_567_89_0;"); - assert(ios.width() == 0); - } - } - } - } - showpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1234567890"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1234567890**************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**************+1234567890"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+**************1234567890"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1_234_567_89_0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1_234_567_89_0**********"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**********+1_234_567_89_0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+**********1_234_567_89_0"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1234567890."); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1234567890.*************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*************+1234567890."); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+*************1234567890."); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1_234_567_89_0;"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1_234_567_89_0;*********"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*********+1_234_567_89_0;"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+*********1_234_567_89_0;"); - assert(ios.width() == 0); - } - } - } - } - } - } - ios.precision(1); - { - nouppercase(ios); - { - noshowpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1234567890.1"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1234567890.1*************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*************1234567890.1"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*************1234567890.1"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1_234_567_89_0;1"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1_234_567_89_0;1*********"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*********1_234_567_89_0;1"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*********1_234_567_89_0;1"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1234567890.1"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1234567890.1*************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*************1234567890.1"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*************1234567890.1"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1_234_567_89_0;1"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1_234_567_89_0;1*********"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*********1_234_567_89_0;1"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*********1_234_567_89_0;1"); - assert(ios.width() == 0); - } - } - } - } - showpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1234567890.1"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1234567890.1************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "************+1234567890.1"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+************1234567890.1"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1_234_567_89_0;1"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1_234_567_89_0;1********"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********+1_234_567_89_0;1"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+********1_234_567_89_0;1"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1234567890.1"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1234567890.1************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "************+1234567890.1"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+************1234567890.1"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1_234_567_89_0;1"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1_234_567_89_0;1********"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********+1_234_567_89_0;1"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+********1_234_567_89_0;1"); - assert(ios.width() == 0); - } - } - } - } - } - uppercase(ios); - { - noshowpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1234567890.1"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1234567890.1*************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*************1234567890.1"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*************1234567890.1"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1_234_567_89_0;1"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1_234_567_89_0;1*********"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*********1_234_567_89_0;1"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*********1_234_567_89_0;1"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1234567890.1"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1234567890.1*************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*************1234567890.1"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*************1234567890.1"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1_234_567_89_0;1"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1_234_567_89_0;1*********"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*********1_234_567_89_0;1"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*********1_234_567_89_0;1"); - assert(ios.width() == 0); - } - } - } - } - showpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1234567890.1"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1234567890.1************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "************+1234567890.1"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+************1234567890.1"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1_234_567_89_0;1"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1_234_567_89_0;1********"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********+1_234_567_89_0;1"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+********1_234_567_89_0;1"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1234567890.1"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1234567890.1************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "************+1234567890.1"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+************1234567890.1"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1_234_567_89_0;1"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1_234_567_89_0;1********"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********+1_234_567_89_0;1"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+********1_234_567_89_0;1"); - assert(ios.width() == 0); - } - } - } - } - } - } - ios.precision(6); - { - nouppercase(ios); - { - noshowpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1234567890.125000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1234567890.125000********"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********1234567890.125000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********1234567890.125000"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1_234_567_89_0;125000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1_234_567_89_0;125000****"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "****1_234_567_89_0;125000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "****1_234_567_89_0;125000"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1234567890.125000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1234567890.125000********"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********1234567890.125000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********1234567890.125000"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1_234_567_89_0;125000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1_234_567_89_0;125000****"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "****1_234_567_89_0;125000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "****1_234_567_89_0;125000"); - assert(ios.width() == 0); - } - } - } - } - showpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1234567890.125000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1234567890.125000*******"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******+1234567890.125000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+*******1234567890.125000"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1_234_567_89_0;125000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1_234_567_89_0;125000***"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***+1_234_567_89_0;125000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+***1_234_567_89_0;125000"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1234567890.125000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1234567890.125000*******"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******+1234567890.125000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+*******1234567890.125000"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1_234_567_89_0;125000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1_234_567_89_0;125000***"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***+1_234_567_89_0;125000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+***1_234_567_89_0;125000"); - assert(ios.width() == 0); - } - } - } - } - } - uppercase(ios); - { - noshowpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1234567890.125000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1234567890.125000********"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********1234567890.125000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********1234567890.125000"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1_234_567_89_0;125000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1_234_567_89_0;125000****"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "****1_234_567_89_0;125000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "****1_234_567_89_0;125000"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1234567890.125000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1234567890.125000********"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********1234567890.125000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********1234567890.125000"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1_234_567_89_0;125000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1_234_567_89_0;125000****"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "****1_234_567_89_0;125000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "****1_234_567_89_0;125000"); - assert(ios.width() == 0); - } - } - } - } - showpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1234567890.125000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1234567890.125000*******"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******+1234567890.125000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+*******1234567890.125000"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1_234_567_89_0;125000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1_234_567_89_0;125000***"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***+1_234_567_89_0;125000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+***1_234_567_89_0;125000"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1234567890.125000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1234567890.125000*******"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******+1234567890.125000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+*******1234567890.125000"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1_234_567_89_0;125000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1_234_567_89_0;125000***"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***+1_234_567_89_0;125000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+***1_234_567_89_0;125000"); - assert(ios.width() == 0); - } - } - } - } - } - } - ios.precision(16); - {} - ios.precision(60); - {} - } - } -} - -void test5() -{ - char str[200]; - output_iterator iter; - std::locale lc = std::locale::classic(); - std::locale lg(lc, new my_numpunct); - const my_facet f(1); - { - double v = -0.; - std::ios ios(0); - scientific(ios); - // %e - { - ios.precision(0); - { - nouppercase(ios); - { - noshowpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0e+00"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0e+00*******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******************-0e+00"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*******************0e+00"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0e+00"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0e+00*******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******************-0e+00"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*******************0e+00"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.e+00"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.e+00******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************-0.e+00"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-******************0.e+00"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;e+00"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;e+00******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************-0;e+00"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-******************0;e+00"); - assert(ios.width() == 0); - } - } - } - } - showpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0e+00"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0e+00*******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******************-0e+00"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*******************0e+00"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0e+00"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0e+00*******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******************-0e+00"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*******************0e+00"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.e+00"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.e+00******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************-0.e+00"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-******************0.e+00"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;e+00"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;e+00******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************-0;e+00"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-******************0;e+00"); - assert(ios.width() == 0); - } - } - } - } - } - uppercase(ios); - { - noshowpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0E+00"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0E+00*******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******************-0E+00"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*******************0E+00"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0E+00"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0E+00*******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******************-0E+00"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*******************0E+00"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.E+00"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.E+00******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************-0.E+00"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-******************0.E+00"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;E+00"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;E+00******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************-0;E+00"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-******************0;E+00"); - assert(ios.width() == 0); - } - } - } - } - showpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0E+00"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0E+00*******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******************-0E+00"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*******************0E+00"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0E+00"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0E+00*******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******************-0E+00"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*******************0E+00"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.E+00"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.E+00******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************-0.E+00"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-******************0.E+00"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;E+00"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;E+00******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************-0;E+00"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-******************0;E+00"); - assert(ios.width() == 0); - } - } - } - } - } - } - ios.precision(1); - { - nouppercase(ios); - { - noshowpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.0e+00"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.0e+00*****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************-0.0e+00"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*****************0.0e+00"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;0e+00"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;0e+00*****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************-0;0e+00"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*****************0;0e+00"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.0e+00"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.0e+00*****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************-0.0e+00"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*****************0.0e+00"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;0e+00"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;0e+00*****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************-0;0e+00"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*****************0;0e+00"); - assert(ios.width() == 0); - } - } - } - } - showpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.0e+00"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.0e+00*****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************-0.0e+00"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*****************0.0e+00"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;0e+00"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;0e+00*****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************-0;0e+00"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*****************0;0e+00"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.0e+00"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.0e+00*****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************-0.0e+00"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*****************0.0e+00"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;0e+00"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;0e+00*****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************-0;0e+00"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*****************0;0e+00"); - assert(ios.width() == 0); - } - } - } - } - } - uppercase(ios); - { - noshowpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.0E+00"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.0E+00*****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************-0.0E+00"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*****************0.0E+00"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;0E+00"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;0E+00*****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************-0;0E+00"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*****************0;0E+00"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.0E+00"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.0E+00*****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************-0.0E+00"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*****************0.0E+00"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;0E+00"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;0E+00*****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************-0;0E+00"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*****************0;0E+00"); - assert(ios.width() == 0); - } - } - } - } - showpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.0E+00"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.0E+00*****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************-0.0E+00"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*****************0.0E+00"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;0E+00"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;0E+00*****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************-0;0E+00"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*****************0;0E+00"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.0E+00"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.0E+00*****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************-0.0E+00"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*****************0.0E+00"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;0E+00"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;0E+00*****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************-0;0E+00"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*****************0;0E+00"); - assert(ios.width() == 0); - } - } - } - } - } - } - ios.precision(6); - { - nouppercase(ios); - { - noshowpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.000000e+00"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.000000e+00************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "************-0.000000e+00"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-************0.000000e+00"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;000000e+00"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;000000e+00************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "************-0;000000e+00"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-************0;000000e+00"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.000000e+00"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.000000e+00************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "************-0.000000e+00"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-************0.000000e+00"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;000000e+00"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;000000e+00************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "************-0;000000e+00"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-************0;000000e+00"); - assert(ios.width() == 0); - } - } - } - } - showpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.000000e+00"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.000000e+00************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "************-0.000000e+00"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-************0.000000e+00"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;000000e+00"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;000000e+00************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "************-0;000000e+00"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-************0;000000e+00"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.000000e+00"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.000000e+00************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "************-0.000000e+00"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-************0.000000e+00"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;000000e+00"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;000000e+00************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "************-0;000000e+00"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-************0;000000e+00"); - assert(ios.width() == 0); - } - } - } - } - } - uppercase(ios); - { - noshowpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.000000E+00"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.000000E+00************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "************-0.000000E+00"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-************0.000000E+00"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;000000E+00"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;000000E+00************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "************-0;000000E+00"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-************0;000000E+00"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.000000E+00"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.000000E+00************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "************-0.000000E+00"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-************0.000000E+00"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;000000E+00"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;000000E+00************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "************-0;000000E+00"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-************0;000000E+00"); - assert(ios.width() == 0); - } - } - } - } - showpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.000000E+00"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.000000E+00************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "************-0.000000E+00"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-************0.000000E+00"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;000000E+00"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;000000E+00************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "************-0;000000E+00"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-************0;000000E+00"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.000000E+00"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.000000E+00************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "************-0.000000E+00"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-************0.000000E+00"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;000000E+00"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;000000E+00************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "************-0;000000E+00"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-************0;000000E+00"); - assert(ios.width() == 0); - } - } - } - } - } - } - ios.precision(16); - { - } - ios.precision(60); - { - } - } - } -} - -void test6() -{ - char str[200]; - output_iterator iter; - std::locale lc = std::locale::classic(); - std::locale lg(lc, new my_numpunct); - const my_facet f(1); - { - double v = 1234567890.125; - std::ios ios(0); - scientific(ios); - // %e - { - ios.precision(0); - { - nouppercase(ios); - { - noshowpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1e+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1e+09********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********************1e+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********************1e+09"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1e+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1e+09********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********************1e+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********************1e+09"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1.e+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1.e+09*******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******************1.e+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******************1.e+09"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1;e+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1;e+09*******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******************1;e+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******************1;e+09"); - assert(ios.width() == 0); - } - } - } - } - showpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1e+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1e+09*******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******************+1e+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+*******************1e+09"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1e+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1e+09*******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******************+1e+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+*******************1e+09"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1.e+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1.e+09******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************+1.e+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+******************1.e+09"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1;e+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1;e+09******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************+1;e+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+******************1;e+09"); - assert(ios.width() == 0); - } - } - } - } - } - uppercase(ios); - { - noshowpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1E+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1E+09********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********************1E+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********************1E+09"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1E+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1E+09********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********************1E+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********************1E+09"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1.E+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1.E+09*******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******************1.E+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******************1.E+09"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1;E+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1;E+09*******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******************1;E+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******************1;E+09"); - assert(ios.width() == 0); - } - } - } - } - showpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1E+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1E+09*******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******************+1E+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+*******************1E+09"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1E+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1E+09*******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******************+1E+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+*******************1E+09"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1.E+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1.E+09******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************+1.E+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+******************1.E+09"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1;E+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1;E+09******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************+1;E+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+******************1;E+09"); - assert(ios.width() == 0); - } - } - } - } - } - } - ios.precision(1); - { - nouppercase(ios); - { - noshowpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1.2e+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1.2e+09******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************1.2e+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************1.2e+09"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1;2e+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1;2e+09******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************1;2e+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************1;2e+09"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1.2e+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1.2e+09******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************1.2e+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************1.2e+09"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1;2e+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1;2e+09******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************1;2e+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************1;2e+09"); - assert(ios.width() == 0); - } - } - } - } - showpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1.2e+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1.2e+09*****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************+1.2e+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+*****************1.2e+09"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1;2e+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1;2e+09*****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************+1;2e+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+*****************1;2e+09"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1.2e+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1.2e+09*****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************+1.2e+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+*****************1.2e+09"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1;2e+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1;2e+09*****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************+1;2e+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+*****************1;2e+09"); - assert(ios.width() == 0); - } - } - } - } - } - uppercase(ios); - { - noshowpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1.2E+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1.2E+09******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************1.2E+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************1.2E+09"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1;2E+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1;2E+09******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************1;2E+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************1;2E+09"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1.2E+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1.2E+09******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************1.2E+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************1.2E+09"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1;2E+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1;2E+09******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************1;2E+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************1;2E+09"); - assert(ios.width() == 0); - } - } - } - } - showpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1.2E+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1.2E+09*****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************+1.2E+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+*****************1.2E+09"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1;2E+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1;2E+09*****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************+1;2E+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+*****************1;2E+09"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1.2E+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1.2E+09*****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************+1.2E+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+*****************1.2E+09"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1;2E+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1;2E+09*****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************+1;2E+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+*****************1;2E+09"); - assert(ios.width() == 0); - } - } - } - } - } - } - ios.precision(6); - { - } - ios.precision(16); - { - } - ios.precision(60); - { - nouppercase(ios); - { - noshowpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1.234567890125000000000000000000000000000000000000000000000000e+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1.234567890125000000000000000000000000000000000000000000000000e+09"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1.234567890125000000000000000000000000000000000000000000000000e+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1.234567890125000000000000000000000000000000000000000000000000e+09"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1;234567890125000000000000000000000000000000000000000000000000e+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1;234567890125000000000000000000000000000000000000000000000000e+09"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1;234567890125000000000000000000000000000000000000000000000000e+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1;234567890125000000000000000000000000000000000000000000000000e+09"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1.234567890125000000000000000000000000000000000000000000000000e+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1.234567890125000000000000000000000000000000000000000000000000e+09"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1.234567890125000000000000000000000000000000000000000000000000e+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1.234567890125000000000000000000000000000000000000000000000000e+09"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1;234567890125000000000000000000000000000000000000000000000000e+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1;234567890125000000000000000000000000000000000000000000000000e+09"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1;234567890125000000000000000000000000000000000000000000000000e+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1;234567890125000000000000000000000000000000000000000000000000e+09"); - assert(ios.width() == 0); - } - } - } - } - showpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1.234567890125000000000000000000000000000000000000000000000000e+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1.234567890125000000000000000000000000000000000000000000000000e+09"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1.234567890125000000000000000000000000000000000000000000000000e+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1.234567890125000000000000000000000000000000000000000000000000e+09"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1;234567890125000000000000000000000000000000000000000000000000e+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1;234567890125000000000000000000000000000000000000000000000000e+09"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1;234567890125000000000000000000000000000000000000000000000000e+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1;234567890125000000000000000000000000000000000000000000000000e+09"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1.234567890125000000000000000000000000000000000000000000000000e+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1.234567890125000000000000000000000000000000000000000000000000e+09"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1.234567890125000000000000000000000000000000000000000000000000e+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1.234567890125000000000000000000000000000000000000000000000000e+09"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1;234567890125000000000000000000000000000000000000000000000000e+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1;234567890125000000000000000000000000000000000000000000000000e+09"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1;234567890125000000000000000000000000000000000000000000000000e+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1;234567890125000000000000000000000000000000000000000000000000e+09"); - assert(ios.width() == 0); - } - } - } - } - } - uppercase(ios); - { - noshowpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1.234567890125000000000000000000000000000000000000000000000000E+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1.234567890125000000000000000000000000000000000000000000000000E+09"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1.234567890125000000000000000000000000000000000000000000000000E+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1.234567890125000000000000000000000000000000000000000000000000E+09"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1;234567890125000000000000000000000000000000000000000000000000E+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1;234567890125000000000000000000000000000000000000000000000000E+09"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1;234567890125000000000000000000000000000000000000000000000000E+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1;234567890125000000000000000000000000000000000000000000000000E+09"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1.234567890125000000000000000000000000000000000000000000000000E+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1.234567890125000000000000000000000000000000000000000000000000E+09"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1.234567890125000000000000000000000000000000000000000000000000E+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1.234567890125000000000000000000000000000000000000000000000000E+09"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1;234567890125000000000000000000000000000000000000000000000000E+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1;234567890125000000000000000000000000000000000000000000000000E+09"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1;234567890125000000000000000000000000000000000000000000000000E+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1;234567890125000000000000000000000000000000000000000000000000E+09"); - assert(ios.width() == 0); - } - } - } - } - showpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1.234567890125000000000000000000000000000000000000000000000000E+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1.234567890125000000000000000000000000000000000000000000000000E+09"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1.234567890125000000000000000000000000000000000000000000000000E+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1.234567890125000000000000000000000000000000000000000000000000E+09"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1;234567890125000000000000000000000000000000000000000000000000E+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1;234567890125000000000000000000000000000000000000000000000000E+09"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1;234567890125000000000000000000000000000000000000000000000000E+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1;234567890125000000000000000000000000000000000000000000000000E+09"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1.234567890125000000000000000000000000000000000000000000000000E+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1.234567890125000000000000000000000000000000000000000000000000E+09"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1.234567890125000000000000000000000000000000000000000000000000E+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1.234567890125000000000000000000000000000000000000000000000000E+09"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1;234567890125000000000000000000000000000000000000000000000000E+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1;234567890125000000000000000000000000000000000000000000000000E+09"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1;234567890125000000000000000000000000000000000000000000000000E+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1;234567890125000000000000000000000000000000000000000000000000E+09"); - assert(ios.width() == 0); - } - } - } - } - } - } - } - } -} - -void test7() -{ - char str[200]; - output_iterator iter; - std::locale lc = std::locale::classic(); - std::locale lg(lc, new my_numpunct); - const my_facet f(1); - { - double v = -0.; - std::ios ios(0); - hexfloat(ios); - // %a - { - ios.precision(0); - { - nouppercase(ios); - { - noshowpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0p+0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0p+0******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************-0x0p+0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-******************0x0p+0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0p+0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0p+0******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************-0x0p+0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-******************0x0p+0"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0.p+0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0.p+0*****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************-0x0.p+0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*****************0x0.p+0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0;p+0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0;p+0*****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************-0x0;p+0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*****************0x0;p+0"); - assert(ios.width() == 0); - } - } - } - } - showpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0p+0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0p+0******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************-0x0p+0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-******************0x0p+0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0p+0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0p+0******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************-0x0p+0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-******************0x0p+0"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0.p+0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0.p+0*****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************-0x0.p+0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*****************0x0.p+0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0;p+0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0;p+0*****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************-0x0;p+0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*****************0x0;p+0"); - assert(ios.width() == 0); - } - } - } - } - } - uppercase(ios); - { - noshowpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0P+0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0P+0******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************-0X0P+0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-******************0X0P+0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0P+0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0P+0******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************-0X0P+0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-******************0X0P+0"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0.P+0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0.P+0*****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************-0X0.P+0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*****************0X0.P+0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0;P+0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0;P+0*****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************-0X0;P+0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*****************0X0;P+0"); - assert(ios.width() == 0); - } - } - } - } - showpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0P+0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0P+0******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************-0X0P+0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-******************0X0P+0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0P+0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0P+0******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************-0X0P+0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-******************0X0P+0"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0.P+0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0.P+0*****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************-0X0.P+0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*****************0X0.P+0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0;P+0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0;P+0*****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************-0X0;P+0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*****************0X0;P+0"); - assert(ios.width() == 0); - } - } - } - } - } - } - ios.precision(1); - { - nouppercase(ios); - { - noshowpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0p+0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0p+0******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************-0x0p+0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-******************0x0p+0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0p+0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0p+0******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************-0x0p+0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-******************0x0p+0"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0.p+0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0.p+0*****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************-0x0.p+0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*****************0x0.p+0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0;p+0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0;p+0*****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************-0x0;p+0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*****************0x0;p+0"); - assert(ios.width() == 0); - } - } - } - } - showpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0p+0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0p+0******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************-0x0p+0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-******************0x0p+0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0p+0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0p+0******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************-0x0p+0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-******************0x0p+0"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0.p+0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0.p+0*****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************-0x0.p+0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*****************0x0.p+0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0;p+0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0;p+0*****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************-0x0;p+0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*****************0x0;p+0"); - assert(ios.width() == 0); - } - } - } - } - } - uppercase(ios); - { - noshowpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0P+0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0P+0******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************-0X0P+0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-******************0X0P+0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0P+0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0P+0******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************-0X0P+0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-******************0X0P+0"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0.P+0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0.P+0*****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************-0X0.P+0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*****************0X0.P+0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0;P+0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0;P+0*****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************-0X0;P+0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*****************0X0;P+0"); - assert(ios.width() == 0); - } - } - } - } - showpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0P+0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0P+0******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************-0X0P+0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-******************0X0P+0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0P+0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0P+0******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************-0X0P+0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-******************0X0P+0"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0.P+0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0.P+0*****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************-0X0.P+0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*****************0X0.P+0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0;P+0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0;P+0*****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************-0X0;P+0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*****************0X0;P+0"); - assert(ios.width() == 0); - } - } - } - } - } - } - ios.precision(6); - { - nouppercase(ios); - { - noshowpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0p+0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0p+0******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************-0x0p+0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-******************0x0p+0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0p+0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0p+0******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************-0x0p+0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-******************0x0p+0"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0.p+0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0.p+0*****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************-0x0.p+0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*****************0x0.p+0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0;p+0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0;p+0*****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************-0x0;p+0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*****************0x0;p+0"); - assert(ios.width() == 0); - } - } - } - } - showpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0p+0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0p+0******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************-0x0p+0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-******************0x0p+0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0p+0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0p+0******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************-0x0p+0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-******************0x0p+0"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0.p+0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0.p+0*****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************-0x0.p+0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*****************0x0.p+0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0;p+0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0;p+0*****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************-0x0;p+0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*****************0x0;p+0"); - assert(ios.width() == 0); - } - } - } - } - } - uppercase(ios); - { - noshowpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0P+0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0P+0******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************-0X0P+0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-******************0X0P+0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0P+0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0P+0******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************-0X0P+0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-******************0X0P+0"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0.P+0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0.P+0*****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************-0X0.P+0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*****************0X0.P+0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0;P+0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0;P+0*****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************-0X0;P+0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*****************0X0;P+0"); - assert(ios.width() == 0); - } - } - } - } - showpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0P+0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0P+0******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************-0X0P+0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-******************0X0P+0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0P+0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0P+0******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************-0X0P+0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-******************0X0P+0"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0.P+0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0.P+0*****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************-0X0.P+0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*****************0X0.P+0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0;P+0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0;P+0*****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************-0X0;P+0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*****************0X0;P+0"); - assert(ios.width() == 0); - } - } - } - } - } - } - ios.precision(16); - { - } - ios.precision(60); - { - } - } - } -} - -void test8() -{ - char str[200]; - output_iterator iter; - std::locale lc = std::locale::classic(); - std::locale lg(lc, new my_numpunct); - const my_facet f(1); - { - double v = 1234567890.125; - std::ios ios(0); - hexfloat(ios); - // %a - { - ios.precision(0); - { - nouppercase(ios); - { - noshowpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x1.26580b488p+30"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x1.26580b488p+30********"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********0x1.26580b488p+30"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x********1.26580b488p+30"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x1;26580b488p+30"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x1;26580b488p+30********"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********0x1;26580b488p+30"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x********1;26580b488p+30"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x1.26580b488p+30"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x1.26580b488p+30********"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********0x1.26580b488p+30"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x********1.26580b488p+30"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x1;26580b488p+30"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x1;26580b488p+30********"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********0x1;26580b488p+30"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x********1;26580b488p+30"); - assert(ios.width() == 0); - } - } - } - } - showpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0x1.26580b488p+30"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0x1.26580b488p+30*******"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******+0x1.26580b488p+30"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+*******0x1.26580b488p+30"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0x1;26580b488p+30"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0x1;26580b488p+30*******"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******+0x1;26580b488p+30"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+*******0x1;26580b488p+30"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0x1.26580b488p+30"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0x1.26580b488p+30*******"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******+0x1.26580b488p+30"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+*******0x1.26580b488p+30"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0x1;26580b488p+30"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0x1;26580b488p+30*******"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******+0x1;26580b488p+30"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+*******0x1;26580b488p+30"); - assert(ios.width() == 0); - } - } - } - } - } - uppercase(ios); - { - noshowpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0X1.26580B488P+30"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0X1.26580B488P+30********"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********0X1.26580B488P+30"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0X********1.26580B488P+30"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0X1;26580B488P+30"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0X1;26580B488P+30********"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********0X1;26580B488P+30"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0X********1;26580B488P+30"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0X1.26580B488P+30"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0X1.26580B488P+30********"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********0X1.26580B488P+30"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0X********1.26580B488P+30"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0X1;26580B488P+30"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0X1;26580B488P+30********"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********0X1;26580B488P+30"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0X********1;26580B488P+30"); - assert(ios.width() == 0); - } - } - } - } - showpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0X1.26580B488P+30"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0X1.26580B488P+30*******"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******+0X1.26580B488P+30"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+*******0X1.26580B488P+30"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0X1;26580B488P+30"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0X1;26580B488P+30*******"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******+0X1;26580B488P+30"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+*******0X1;26580B488P+30"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0X1.26580B488P+30"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0X1.26580B488P+30*******"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******+0X1.26580B488P+30"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+*******0X1.26580B488P+30"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0X1;26580B488P+30"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0X1;26580B488P+30*******"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******+0X1;26580B488P+30"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+*******0X1;26580B488P+30"); - assert(ios.width() == 0); - } - } - } - } - } - } - ios.precision(1); - { - nouppercase(ios); - { - noshowpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x1.26580b488p+30"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x1.26580b488p+30********"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********0x1.26580b488p+30"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x********1.26580b488p+30"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x1;26580b488p+30"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x1;26580b488p+30********"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********0x1;26580b488p+30"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x********1;26580b488p+30"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x1.26580b488p+30"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x1.26580b488p+30********"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********0x1.26580b488p+30"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x********1.26580b488p+30"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x1;26580b488p+30"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x1;26580b488p+30********"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********0x1;26580b488p+30"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x********1;26580b488p+30"); - assert(ios.width() == 0); - } - } - } - } - showpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0x1.26580b488p+30"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0x1.26580b488p+30*******"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******+0x1.26580b488p+30"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+*******0x1.26580b488p+30"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0x1;26580b488p+30"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0x1;26580b488p+30*******"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******+0x1;26580b488p+30"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+*******0x1;26580b488p+30"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0x1.26580b488p+30"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0x1.26580b488p+30*******"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******+0x1.26580b488p+30"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+*******0x1.26580b488p+30"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0x1;26580b488p+30"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0x1;26580b488p+30*******"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******+0x1;26580b488p+30"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+*******0x1;26580b488p+30"); - assert(ios.width() == 0); - } - } - } - } - } - uppercase(ios); - { - noshowpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0X1.26580B488P+30"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0X1.26580B488P+30********"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********0X1.26580B488P+30"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0X********1.26580B488P+30"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0X1;26580B488P+30"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0X1;26580B488P+30********"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********0X1;26580B488P+30"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0X********1;26580B488P+30"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0X1.26580B488P+30"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0X1.26580B488P+30********"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********0X1.26580B488P+30"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0X********1.26580B488P+30"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0X1;26580B488P+30"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0X1;26580B488P+30********"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********0X1;26580B488P+30"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0X********1;26580B488P+30"); - assert(ios.width() == 0); - } - } - } - } - showpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0X1.26580B488P+30"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0X1.26580B488P+30*******"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******+0X1.26580B488P+30"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+*******0X1.26580B488P+30"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0X1;26580B488P+30"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0X1;26580B488P+30*******"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******+0X1;26580B488P+30"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+*******0X1;26580B488P+30"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0X1.26580B488P+30"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0X1.26580B488P+30*******"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******+0X1.26580B488P+30"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+*******0X1.26580B488P+30"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0X1;26580B488P+30"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0X1;26580B488P+30*******"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******+0X1;26580B488P+30"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+*******0X1;26580B488P+30"); - assert(ios.width() == 0); - } - } - } - } - } - } - ios.precision(6); - { - } - ios.precision(16); - { - } - ios.precision(60); - { - nouppercase(ios); - { - noshowpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x1.26580b488p+30"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x1.26580b488p+30********"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********0x1.26580b488p+30"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x********1.26580b488p+30"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x1;26580b488p+30"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x1;26580b488p+30********"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********0x1;26580b488p+30"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x********1;26580b488p+30"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x1.26580b488p+30"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x1.26580b488p+30********"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********0x1.26580b488p+30"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x********1.26580b488p+30"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x1;26580b488p+30"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x1;26580b488p+30********"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********0x1;26580b488p+30"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x********1;26580b488p+30"); - assert(ios.width() == 0); - } - } - } - } - showpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0x1.26580b488p+30"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0x1.26580b488p+30*******"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******+0x1.26580b488p+30"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+*******0x1.26580b488p+30"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0x1;26580b488p+30"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0x1;26580b488p+30*******"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******+0x1;26580b488p+30"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+*******0x1;26580b488p+30"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0x1.26580b488p+30"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0x1.26580b488p+30*******"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******+0x1.26580b488p+30"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+*******0x1.26580b488p+30"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0x1;26580b488p+30"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0x1;26580b488p+30*******"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******+0x1;26580b488p+30"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+*******0x1;26580b488p+30"); - assert(ios.width() == 0); - } - } - } - } - } - uppercase(ios); - { - noshowpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0X1.26580B488P+30"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0X1.26580B488P+30********"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********0X1.26580B488P+30"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0X********1.26580B488P+30"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0X1;26580B488P+30"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0X1;26580B488P+30********"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********0X1;26580B488P+30"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0X********1;26580B488P+30"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0X1.26580B488P+30"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0X1.26580B488P+30********"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********0X1.26580B488P+30"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0X********1.26580B488P+30"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0X1;26580B488P+30"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0X1;26580B488P+30********"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********0X1;26580B488P+30"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0X********1;26580B488P+30"); - assert(ios.width() == 0); - } - } - } - } - showpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0X1.26580B488P+30"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0X1.26580B488P+30*******"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******+0X1.26580B488P+30"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+*******0X1.26580B488P+30"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0X1;26580B488P+30"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0X1;26580B488P+30*******"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******+0X1;26580B488P+30"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+*******0X1;26580B488P+30"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0X1.26580B488P+30"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0X1.26580B488P+30*******"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******+0X1.26580B488P+30"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+*******0X1.26580B488P+30"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0X1;26580B488P+30"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0X1;26580B488P+30*******"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******+0X1;26580B488P+30"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+*******0X1;26580B488P+30"); - assert(ios.width() == 0); - } - } - } - } - } - } - } - } -} - -int main() -{ - test1(); - test2(); - test3(); - test4(); - test5(); - test6(); - test7(); - test8(); -} diff --git a/test/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_long.pass.cpp b/test/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_long.pass.cpp deleted file mode 100644 index def43915..00000000 --- a/test/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_long.pass.cpp +++ /dev/null @@ -1,371 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// class num_put - -// iter_type put(iter_type s, ios_base& iob, char_type fill, long v) const; - -#include -#include -#include -#include -#include "iterators.h" - -typedef std::num_put > F; - -class my_facet - : public F -{ -public: - explicit my_facet(std::size_t refs = 0) - : F(refs) {} -}; - -class my_numpunct - : public std::numpunct -{ -public: - my_numpunct() : std::numpunct() {} - -protected: - virtual char_type do_thousands_sep() const {return '_';} - virtual std::string do_grouping() const {return std::string("\1\2\3");} -}; - -int main() -{ - const my_facet f(1); - { - std::ios ios(0); - long v = 0; - char str[50]; - std::ios_base::iostate err = ios.goodbit; - output_iterator iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0"); - } - { - std::ios ios(0); - long v = 1; - char str[50]; - std::ios_base::iostate err = ios.goodbit; - output_iterator iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1"); - } - { - std::ios ios(0); - long v = -1; - char str[50]; - std::ios_base::iostate err = ios.goodbit; - output_iterator iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-1"); - } - { - std::ios ios(0); - long v = -1000; - char str[50]; - std::ios_base::iostate err = ios.goodbit; - output_iterator iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-1000"); - } - { - std::ios ios(0); - long v = 1000; - char str[50]; - std::ios_base::iostate err = ios.goodbit; - output_iterator iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1000"); - } - { - std::ios ios(0); - showpos(ios); - long v = 1000; - char str[50]; - std::ios_base::iostate err = ios.goodbit; - output_iterator iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1000"); - } - { - std::ios ios(0); - oct(ios); - long v = 1000; - char str[50]; - std::ios_base::iostate err = ios.goodbit; - output_iterator iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1750"); - } - { - std::ios ios(0); - oct(ios); - showbase(ios); - long v = 1000; - char str[50]; - std::ios_base::iostate err = ios.goodbit; - output_iterator iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "01750"); - } - { - std::ios ios(0); - hex(ios); - long v = 1000; - char str[50]; - std::ios_base::iostate err = ios.goodbit; - output_iterator iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "3e8"); - } - { - std::ios ios(0); - hex(ios); - showbase(ios); - long v = 1000; - char str[50]; - std::ios_base::iostate err = ios.goodbit; - output_iterator iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x3e8"); - } - { - std::ios ios(0); - hex(ios); - showbase(ios); - uppercase(ios); - long v = 1000; - char str[50]; - std::ios_base::iostate err = ios.goodbit; - output_iterator iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0X3E8"); - } - { - std::ios ios(0); - ios.imbue(std::locale(std::locale::classic(), new my_numpunct)); - hex(ios); - showbase(ios); - uppercase(ios); - long v = 1000; - char str[50]; - std::ios_base::iostate err = ios.goodbit; - output_iterator iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0X3E_8"); - } - { - std::ios ios(0); - ios.imbue(std::locale(std::locale::classic(), new my_numpunct)); - hex(ios); - showbase(ios); - long v = 2147483647; - char str[50]; - std::ios_base::iostate err = ios.goodbit; - output_iterator iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x7f_fff_ff_f"); - } - { - std::ios ios(0); - ios.imbue(std::locale(std::locale::classic(), new my_numpunct)); - oct(ios); - long v = 0123467; - char str[50]; - std::ios_base::iostate err = ios.goodbit; - output_iterator iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "123_46_7"); - } - { - std::ios ios(0); - ios.imbue(std::locale(std::locale::classic(), new my_numpunct)); - oct(ios); - showbase(ios); - long v = 0123467; - char str[50]; - std::ios_base::iostate err = ios.goodbit; - output_iterator iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0_123_46_7"); - } - { - std::ios ios(0); - ios.imbue(std::locale(std::locale::classic(), new my_numpunct)); - oct(ios); - showbase(ios); - right(ios); - ios.width(15); - long v = 0123467; - char str[50]; - std::ios_base::iostate err = ios.goodbit; - output_iterator iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****0_123_46_7"); - } - { - std::ios ios(0); - ios.imbue(std::locale(std::locale::classic(), new my_numpunct)); - oct(ios); - showbase(ios); - left(ios); - ios.width(15); - long v = 0123467; - char str[50]; - std::ios_base::iostate err = ios.goodbit; - output_iterator iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0_123_46_7*****"); - } - { - std::ios ios(0); - ios.imbue(std::locale(std::locale::classic(), new my_numpunct)); - oct(ios); - showbase(ios); - internal(ios); - ios.width(15); - long v = 0123467; - char str[50]; - std::ios_base::iostate err = ios.goodbit; - output_iterator iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****0_123_46_7"); - assert(ios.width() == 0); - } - { - std::ios ios(0); - ios.imbue(std::locale(std::locale::classic(), new my_numpunct)); - hex(ios); - showbase(ios); - right(ios); - ios.width(15); - long v = 2147483647; - char str[50]; - std::ios_base::iostate err = ios.goodbit; - output_iterator iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**0x7f_fff_ff_f"); - } - { - std::ios ios(0); - ios.imbue(std::locale(std::locale::classic(), new my_numpunct)); - hex(ios); - showbase(ios); - left(ios); - ios.width(15); - long v = 2147483647; - char str[50]; - std::ios_base::iostate err = ios.goodbit; - output_iterator iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x7f_fff_ff_f**"); - } - { - std::ios ios(0); - ios.imbue(std::locale(std::locale::classic(), new my_numpunct)); - hex(ios); - showbase(ios); - internal(ios); - ios.width(15); - long v = 2147483647; - char str[50]; - std::ios_base::iostate err = ios.goodbit; - output_iterator iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x**7f_fff_ff_f"); - assert(ios.width() == 0); - } - { - std::ios ios(0); - ios.imbue(std::locale(std::locale::classic(), new my_numpunct)); - showpos(ios); - long v = 1000; - right(ios); - ios.width(10); - char str[50]; - std::ios_base::iostate err = ios.goodbit; - output_iterator iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***+1_00_0"); - assert(ios.width() == 0); - } - { - std::ios ios(0); - ios.imbue(std::locale(std::locale::classic(), new my_numpunct)); - showpos(ios); - long v = 1000; - left(ios); - ios.width(10); - char str[50]; - std::ios_base::iostate err = ios.goodbit; - output_iterator iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1_00_0***"); - assert(ios.width() == 0); - } - { - std::ios ios(0); - ios.imbue(std::locale(std::locale::classic(), new my_numpunct)); - showpos(ios); - long v = 1000; - internal(ios); - ios.width(10); - char str[50]; - std::ios_base::iostate err = ios.goodbit; - output_iterator iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+***1_00_0"); - assert(ios.width() == 0); - } - { - std::ios ios(0); - ios.imbue(std::locale(std::locale::classic(), new my_numpunct)); - long v = -1000; - right(ios); - showpos(ios); - ios.width(10); - char str[50]; - std::ios_base::iostate err = ios.goodbit; - output_iterator iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***-1_00_0"); - assert(ios.width() == 0); - } - { - std::ios ios(0); - ios.imbue(std::locale(std::locale::classic(), new my_numpunct)); - long v = -1000; - left(ios); - ios.width(10); - char str[50]; - std::ios_base::iostate err = ios.goodbit; - output_iterator iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-1_00_0***"); - assert(ios.width() == 0); - } - { - std::ios ios(0); - ios.imbue(std::locale(std::locale::classic(), new my_numpunct)); - long v = -1000; - internal(ios); - ios.width(10); - char str[50]; - std::ios_base::iostate err = ios.goodbit; - output_iterator iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-***1_00_0"); - assert(ios.width() == 0); - } -} diff --git a/test/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_long_double.xfail.pass.cpp b/test/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_long_double.xfail.pass.cpp deleted file mode 100644 index 6d955478..00000000 --- a/test/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_long_double.xfail.pass.cpp +++ /dev/null @@ -1,26241 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// class num_put - -// iter_type put(iter_type s, ios_base& iob, char_type fill, long double v) const; - -#include -#include -#include -#include -#include -#include "iterators.h" - -typedef std::num_put > F; - -class my_facet - : public F -{ -public: - explicit my_facet(std::size_t refs = 0) - : F(refs) {} -}; - -class my_numpunct - : public std::numpunct -{ -public: - my_numpunct() : std::numpunct() {} - -protected: - virtual char_type do_decimal_point() const {return ';';} - virtual char_type do_thousands_sep() const {return '_';} - virtual std::string do_grouping() const {return std::string("\1\2\3");} -}; - -void test1() -{ - char str[200]; - output_iterator iter; - std::locale lc = std::locale::classic(); - std::locale lg(lc, new my_numpunct); - const my_facet f(1); - { - long double v = +0.; - std::ios ios(0); - // %g - { - ios.precision(0); - { - nouppercase(ios); - { - noshowpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0************************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "************************0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "************************0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0************************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "************************0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "************************0"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0."); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0.***********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********************0."); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********************0."); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0;"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0;***********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********************0;"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********************0;"); - assert(ios.width() == 0); - } - } - } - } - showpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0***********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********************+0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+***********************0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0***********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********************+0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+***********************0"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0."); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0.**********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**********************+0."); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+**********************0."); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0;"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0;**********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**********************+0;"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+**********************0;"); - assert(ios.width() == 0); - } - } - } - } - } - uppercase(ios); - { - noshowpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0************************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "************************0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "************************0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0************************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "************************0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "************************0"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0."); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0.***********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********************0."); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********************0."); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0;"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0;***********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********************0;"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********************0;"); - assert(ios.width() == 0); - } - } - } - } - showpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0***********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********************+0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+***********************0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0***********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********************+0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+***********************0"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0."); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0.**********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**********************+0."); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+**********************0."); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0;"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0;**********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**********************+0;"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+**********************0;"); - assert(ios.width() == 0); - } - } - } - } - } - } - ios.precision(1); - { - nouppercase(ios); - { - noshowpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0************************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "************************0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "************************0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0************************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "************************0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "************************0"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0."); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0.***********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********************0."); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********************0."); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0;"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0;***********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********************0;"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********************0;"); - assert(ios.width() == 0); - } - } - } - } - showpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0***********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********************+0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+***********************0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0***********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********************+0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+***********************0"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0."); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0.**********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**********************+0."); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+**********************0."); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0;"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0;**********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**********************+0;"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+**********************0;"); - assert(ios.width() == 0); - } - } - } - } - } - uppercase(ios); - { - noshowpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0************************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "************************0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "************************0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0************************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "************************0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "************************0"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0."); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0.***********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********************0."); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********************0."); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0;"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0;***********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********************0;"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********************0;"); - assert(ios.width() == 0); - } - } - } - } - showpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0***********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********************+0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+***********************0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0***********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********************+0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+***********************0"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0."); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0.**********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**********************+0."); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+**********************0."); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0;"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0;**********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**********************+0;"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+**********************0;"); - assert(ios.width() == 0); - } - } - } - } - } - } - ios.precision(6); - { - nouppercase(ios); - { - noshowpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0************************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "************************0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "************************0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0************************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "************************0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "************************0"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0.00000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0.00000******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************0.00000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************0.00000"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0;00000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0;00000******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************0;00000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************0;00000"); - assert(ios.width() == 0); - } - } - } - } - showpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0***********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********************+0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+***********************0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0***********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********************+0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+***********************0"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0.00000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0.00000*****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************+0.00000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+*****************0.00000"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0;00000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0;00000*****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************+0;00000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+*****************0;00000"); - assert(ios.width() == 0); - } - } - } - } - } - uppercase(ios); - { - noshowpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0************************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "************************0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "************************0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0************************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "************************0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "************************0"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0.00000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0.00000******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************0.00000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************0.00000"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0;00000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0;00000******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************0;00000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************0;00000"); - assert(ios.width() == 0); - } - } - } - } - showpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0***********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********************+0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+***********************0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0***********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********************+0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+***********************0"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0.00000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0.00000*****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************+0.00000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+*****************0.00000"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0;00000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0;00000*****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************+0;00000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+*****************0;00000"); - assert(ios.width() == 0); - } - } - } - } - } - } - ios.precision(16); - { - nouppercase(ios); - { - noshowpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0************************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "************************0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "************************0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0************************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "************************0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "************************0"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0.000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0.000000000000000********"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********0.000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********0.000000000000000"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0;000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0;000000000000000********"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********0;000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********0;000000000000000"); - assert(ios.width() == 0); - } - } - } - } - showpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0***********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********************+0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+***********************0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0***********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********************+0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+***********************0"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0.000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0.000000000000000*******"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******+0.000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+*******0.000000000000000"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0;000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0;000000000000000*******"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******+0;000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+*******0;000000000000000"); - assert(ios.width() == 0); - } - } - } - } - } - uppercase(ios); - { - noshowpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0************************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "************************0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "************************0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0************************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "************************0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "************************0"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0.000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0.000000000000000********"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********0.000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********0.000000000000000"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0;000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0;000000000000000********"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********0;000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********0;000000000000000"); - assert(ios.width() == 0); - } - } - } - } - showpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0***********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********************+0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+***********************0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0***********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********************+0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+***********************0"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0.000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0.000000000000000*******"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******+0.000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+*******0.000000000000000"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0;000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0;000000000000000*******"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******+0;000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+*******0;000000000000000"); - assert(ios.width() == 0); - } - } - } - } - } - } - ios.precision(60); - { - nouppercase(ios); - { - noshowpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0************************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "************************0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "************************0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0************************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "************************0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "************************0"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0.00000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0.00000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0.00000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0.00000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0;00000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0;00000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0;00000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0;00000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - } - } - } - showpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0***********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********************+0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+***********************0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0***********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********************+0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+***********************0"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0.00000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0.00000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0.00000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0.00000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0;00000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0;00000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0;00000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0;00000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - } - } - } - } - uppercase(ios); - { - noshowpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0************************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "************************0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "************************0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0************************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "************************0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "************************0"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0.00000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0.00000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0.00000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0.00000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0;00000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0;00000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0;00000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0;00000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - } - } - } - showpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0***********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********************+0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+***********************0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0***********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********************+0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+***********************0"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0.00000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0.00000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0.00000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0.00000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0;00000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0;00000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0;00000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0;00000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - } - } - } - } - } - } - } -} - -void test2() -{ - char str[200]; - output_iterator iter; - std::locale lc = std::locale::classic(); - std::locale lg(lc, new my_numpunct); - const my_facet f(1); - { - long double v = -0.; - std::ios ios(0); - // %g - { - ios.precision(0); - { - nouppercase(ios); - { - noshowpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0***********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********************-0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-***********************0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0***********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********************-0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-***********************0"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0."); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.**********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**********************-0."); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-**********************0."); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;**********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**********************-0;"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-**********************0;"); - assert(ios.width() == 0); - } - } - } - } - showpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0***********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********************-0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-***********************0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0***********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********************-0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-***********************0"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0."); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.**********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**********************-0."); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-**********************0."); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;**********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**********************-0;"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-**********************0;"); - assert(ios.width() == 0); - } - } - } - } - } - uppercase(ios); - { - noshowpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0***********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********************-0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-***********************0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0***********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********************-0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-***********************0"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0."); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.**********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**********************-0."); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-**********************0."); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;**********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**********************-0;"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-**********************0;"); - assert(ios.width() == 0); - } - } - } - } - showpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0***********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********************-0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-***********************0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0***********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********************-0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-***********************0"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0."); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.**********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**********************-0."); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-**********************0."); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;**********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**********************-0;"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-**********************0;"); - assert(ios.width() == 0); - } - } - } - } - } - } - ios.precision(1); - { - nouppercase(ios); - { - noshowpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0***********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********************-0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-***********************0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0***********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********************-0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-***********************0"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0."); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.**********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**********************-0."); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-**********************0."); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;**********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**********************-0;"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-**********************0;"); - assert(ios.width() == 0); - } - } - } - } - showpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0***********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********************-0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-***********************0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0***********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********************-0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-***********************0"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0."); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.**********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**********************-0."); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-**********************0."); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;**********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**********************-0;"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-**********************0;"); - assert(ios.width() == 0); - } - } - } - } - } - uppercase(ios); - { - noshowpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0***********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********************-0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-***********************0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0***********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********************-0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-***********************0"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0."); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.**********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**********************-0."); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-**********************0."); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;**********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**********************-0;"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-**********************0;"); - assert(ios.width() == 0); - } - } - } - } - showpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0***********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********************-0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-***********************0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0***********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********************-0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-***********************0"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0."); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.**********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**********************-0."); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-**********************0."); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;**********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**********************-0;"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-**********************0;"); - assert(ios.width() == 0); - } - } - } - } - } - } - ios.precision(6); - { - nouppercase(ios); - { - noshowpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0***********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********************-0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-***********************0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0***********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********************-0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-***********************0"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.00000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.00000*****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************-0.00000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*****************0.00000"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;00000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;00000*****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************-0;00000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*****************0;00000"); - assert(ios.width() == 0); - } - } - } - } - showpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0***********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********************-0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-***********************0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0***********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********************-0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-***********************0"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.00000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.00000*****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************-0.00000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*****************0.00000"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;00000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;00000*****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************-0;00000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*****************0;00000"); - assert(ios.width() == 0); - } - } - } - } - } - uppercase(ios); - { - noshowpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0***********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********************-0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-***********************0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0***********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********************-0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-***********************0"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.00000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.00000*****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************-0.00000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*****************0.00000"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;00000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;00000*****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************-0;00000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*****************0;00000"); - assert(ios.width() == 0); - } - } - } - } - showpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0***********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********************-0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-***********************0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0***********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********************-0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-***********************0"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.00000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.00000*****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************-0.00000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*****************0.00000"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;00000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;00000*****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************-0;00000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*****************0;00000"); - assert(ios.width() == 0); - } - } - } - } - } - } - ios.precision(16); - { - nouppercase(ios); - { - noshowpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0***********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********************-0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-***********************0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0***********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********************-0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-***********************0"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.000000000000000*******"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******-0.000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*******0.000000000000000"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;000000000000000*******"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******-0;000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*******0;000000000000000"); - assert(ios.width() == 0); - } - } - } - } - showpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0***********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********************-0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-***********************0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0***********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********************-0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-***********************0"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.000000000000000*******"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******-0.000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*******0.000000000000000"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;000000000000000*******"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******-0;000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*******0;000000000000000"); - assert(ios.width() == 0); - } - } - } - } - } - uppercase(ios); - { - noshowpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0***********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********************-0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-***********************0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0***********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********************-0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-***********************0"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.000000000000000*******"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******-0.000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*******0.000000000000000"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;000000000000000*******"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******-0;000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*******0;000000000000000"); - assert(ios.width() == 0); - } - } - } - } - showpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0***********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********************-0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-***********************0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0***********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********************-0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-***********************0"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.000000000000000*******"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******-0.000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*******0.000000000000000"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;000000000000000*******"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******-0;000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*******0;000000000000000"); - assert(ios.width() == 0); - } - } - } - } - } - } - ios.precision(60); - { - nouppercase(ios); - { - noshowpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0***********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********************-0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-***********************0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0***********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********************-0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-***********************0"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.00000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.00000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.00000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.00000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;00000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;00000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;00000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;00000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - } - } - } - showpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0***********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********************-0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-***********************0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0***********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********************-0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-***********************0"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.00000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.00000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.00000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.00000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;00000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;00000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;00000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;00000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - } - } - } - } - uppercase(ios); - { - noshowpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0***********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********************-0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-***********************0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0***********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********************-0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-***********************0"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.00000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.00000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.00000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.00000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;00000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;00000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;00000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;00000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - } - } - } - showpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0***********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********************-0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-***********************0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0***********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********************-0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-***********************0"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.00000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.00000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.00000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.00000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;00000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;00000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;00000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;00000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - } - } - } - } - } - } - } -} - -void test3() -{ - char str[200]; - output_iterator iter; - std::locale lc = std::locale::classic(); - std::locale lg(lc, new my_numpunct); - const my_facet f(1); - { - long double v = 1234567890.125; - std::ios ios(0); - // %g - { - ios.precision(0); - { - nouppercase(ios); - { - noshowpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1e+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1e+09********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********************1e+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********************1e+09"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1e+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1e+09********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********************1e+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********************1e+09"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1.e+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1.e+09*******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******************1.e+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******************1.e+09"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1;e+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1;e+09*******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******************1;e+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******************1;e+09"); - assert(ios.width() == 0); - } - } - } - } - showpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1e+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1e+09*******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******************+1e+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+*******************1e+09"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1e+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1e+09*******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******************+1e+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+*******************1e+09"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1.e+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1.e+09******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************+1.e+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+******************1.e+09"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1;e+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1;e+09******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************+1;e+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+******************1;e+09"); - assert(ios.width() == 0); - } - } - } - } - } - uppercase(ios); - { - noshowpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1E+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1E+09********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********************1E+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********************1E+09"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1E+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1E+09********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********************1E+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********************1E+09"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1.E+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1.E+09*******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******************1.E+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******************1.E+09"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1;E+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1;E+09*******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******************1;E+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******************1;E+09"); - assert(ios.width() == 0); - } - } - } - } - showpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1E+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1E+09*******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******************+1E+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+*******************1E+09"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1E+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1E+09*******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******************+1E+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+*******************1E+09"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1.E+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1.E+09******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************+1.E+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+******************1.E+09"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1;E+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1;E+09******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************+1;E+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+******************1;E+09"); - assert(ios.width() == 0); - } - } - } - } - } - } - ios.precision(1); - { - nouppercase(ios); - { - noshowpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1e+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1e+09********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********************1e+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********************1e+09"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1e+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1e+09********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********************1e+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********************1e+09"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1.e+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1.e+09*******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******************1.e+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******************1.e+09"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1;e+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1;e+09*******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******************1;e+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******************1;e+09"); - assert(ios.width() == 0); - } - } - } - } - showpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1e+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1e+09*******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******************+1e+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+*******************1e+09"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1e+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1e+09*******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******************+1e+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+*******************1e+09"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1.e+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1.e+09******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************+1.e+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+******************1.e+09"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1;e+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1;e+09******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************+1;e+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+******************1;e+09"); - assert(ios.width() == 0); - } - } - } - } - } - uppercase(ios); - { - noshowpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1E+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1E+09********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********************1E+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********************1E+09"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1E+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1E+09********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********************1E+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********************1E+09"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1.E+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1.E+09*******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******************1.E+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******************1.E+09"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1;E+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1;E+09*******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******************1;E+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******************1;E+09"); - assert(ios.width() == 0); - } - } - } - } - showpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1E+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1E+09*******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******************+1E+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+*******************1E+09"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1E+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1E+09*******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******************+1E+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+*******************1E+09"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1.E+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1.E+09******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************+1.E+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+******************1.E+09"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1;E+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1;E+09******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************+1;E+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+******************1;E+09"); - assert(ios.width() == 0); - } - } - } - } - } - } - ios.precision(6); - { - nouppercase(ios); - { - noshowpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1.23457e+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1.23457e+09**************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**************1.23457e+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**************1.23457e+09"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1;23457e+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1;23457e+09**************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**************1;23457e+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**************1;23457e+09"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1.23457e+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1.23457e+09**************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**************1.23457e+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**************1.23457e+09"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1;23457e+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1;23457e+09**************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**************1;23457e+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**************1;23457e+09"); - assert(ios.width() == 0); - } - } - } - } - showpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1.23457e+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1.23457e+09*************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*************+1.23457e+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+*************1.23457e+09"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1;23457e+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1;23457e+09*************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*************+1;23457e+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+*************1;23457e+09"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1.23457e+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1.23457e+09*************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*************+1.23457e+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+*************1.23457e+09"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1;23457e+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1;23457e+09*************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*************+1;23457e+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+*************1;23457e+09"); - assert(ios.width() == 0); - } - } - } - } - } - uppercase(ios); - { - noshowpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1.23457E+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1.23457E+09**************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**************1.23457E+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**************1.23457E+09"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1;23457E+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1;23457E+09**************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**************1;23457E+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**************1;23457E+09"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1.23457E+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1.23457E+09**************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**************1.23457E+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**************1.23457E+09"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1;23457E+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1;23457E+09**************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**************1;23457E+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**************1;23457E+09"); - assert(ios.width() == 0); - } - } - } - } - showpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1.23457E+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1.23457E+09*************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*************+1.23457E+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+*************1.23457E+09"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1;23457E+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1;23457E+09*************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*************+1;23457E+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+*************1;23457E+09"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1.23457E+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1.23457E+09*************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*************+1.23457E+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+*************1.23457E+09"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1;23457E+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1;23457E+09*************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*************+1;23457E+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+*************1;23457E+09"); - assert(ios.width() == 0); - } - } - } - } - } - } - ios.precision(16); - { - nouppercase(ios); - { - noshowpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1234567890.125"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1234567890.125***********"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********1234567890.125"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********1234567890.125"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1_234_567_89_0;125"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1_234_567_89_0;125*******"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******1_234_567_89_0;125"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******1_234_567_89_0;125"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1234567890.125000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1234567890.125000********"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********1234567890.125000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********1234567890.125000"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1_234_567_89_0;125000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1_234_567_89_0;125000****"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "****1_234_567_89_0;125000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "****1_234_567_89_0;125000"); - assert(ios.width() == 0); - } - } - } - } - showpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1234567890.125"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1234567890.125**********"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**********+1234567890.125"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+**********1234567890.125"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1_234_567_89_0;125"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1_234_567_89_0;125******"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******+1_234_567_89_0;125"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+******1_234_567_89_0;125"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1234567890.125000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1234567890.125000*******"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******+1234567890.125000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+*******1234567890.125000"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1_234_567_89_0;125000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1_234_567_89_0;125000***"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***+1_234_567_89_0;125000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+***1_234_567_89_0;125000"); - assert(ios.width() == 0); - } - } - } - } - } - uppercase(ios); - { - noshowpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1234567890.125"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1234567890.125***********"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********1234567890.125"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********1234567890.125"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1_234_567_89_0;125"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1_234_567_89_0;125*******"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******1_234_567_89_0;125"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******1_234_567_89_0;125"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1234567890.125000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1234567890.125000********"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********1234567890.125000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********1234567890.125000"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1_234_567_89_0;125000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1_234_567_89_0;125000****"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "****1_234_567_89_0;125000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "****1_234_567_89_0;125000"); - assert(ios.width() == 0); - } - } - } - } - showpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1234567890.125"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1234567890.125**********"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**********+1234567890.125"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+**********1234567890.125"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1_234_567_89_0;125"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1_234_567_89_0;125******"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******+1_234_567_89_0;125"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+******1_234_567_89_0;125"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1234567890.125000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1234567890.125000*******"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******+1234567890.125000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+*******1234567890.125000"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1_234_567_89_0;125000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1_234_567_89_0;125000***"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***+1_234_567_89_0;125000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+***1_234_567_89_0;125000"); - assert(ios.width() == 0); - } - } - } - } - } - } - ios.precision(60); - { - nouppercase(ios); - { - noshowpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1234567890.125"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1234567890.125***********"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********1234567890.125"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********1234567890.125"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1_234_567_89_0;125"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1_234_567_89_0;125*******"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******1_234_567_89_0;125"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******1_234_567_89_0;125"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1234567890.12500000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1234567890.12500000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1234567890.12500000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1234567890.12500000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1_234_567_89_0;12500000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1_234_567_89_0;12500000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1_234_567_89_0;12500000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1_234_567_89_0;12500000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - } - } - } - showpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1234567890.125"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1234567890.125**********"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**********+1234567890.125"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+**********1234567890.125"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1_234_567_89_0;125"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1_234_567_89_0;125******"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******+1_234_567_89_0;125"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+******1_234_567_89_0;125"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1234567890.12500000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1234567890.12500000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1234567890.12500000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1234567890.12500000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1_234_567_89_0;12500000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1_234_567_89_0;12500000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1_234_567_89_0;12500000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1_234_567_89_0;12500000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - } - } - } - } - uppercase(ios); - { - noshowpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1234567890.125"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1234567890.125***********"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********1234567890.125"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********1234567890.125"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1_234_567_89_0;125"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1_234_567_89_0;125*******"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******1_234_567_89_0;125"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******1_234_567_89_0;125"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1234567890.12500000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1234567890.12500000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1234567890.12500000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1234567890.12500000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1_234_567_89_0;12500000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1_234_567_89_0;12500000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1_234_567_89_0;12500000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1_234_567_89_0;12500000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - } - } - } - showpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1234567890.125"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1234567890.125**********"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**********+1234567890.125"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+**********1234567890.125"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1_234_567_89_0;125"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1_234_567_89_0;125******"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******+1_234_567_89_0;125"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+******1_234_567_89_0;125"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1234567890.12500000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1234567890.12500000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1234567890.12500000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1234567890.12500000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1_234_567_89_0;12500000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1_234_567_89_0;12500000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1_234_567_89_0;12500000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1_234_567_89_0;12500000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - } - } - } - } - } - } - } -} - -void test4() -{ - char str[200]; - output_iterator iter; - std::locale lc = std::locale::classic(); - std::locale lg(lc, new my_numpunct); - const my_facet f(1); - { - long double v = -INFINITY; - std::ios ios(0); - // %g - { - ios.precision(0); - { - nouppercase(ios); - { - noshowpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-inf"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-inf*********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*********************-inf"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*********************inf"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-inf"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-inf*********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*********************-inf"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*********************inf"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-inf"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-inf*********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*********************-inf"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*********************inf"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-inf"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-inf*********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*********************-inf"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*********************inf"); - assert(ios.width() == 0); - } - } - } - } - showpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-inf"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-inf*********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*********************-inf"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*********************inf"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-inf"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-inf*********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*********************-inf"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*********************inf"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-inf"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-inf*********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*********************-inf"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*********************inf"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-inf"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-inf*********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*********************-inf"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*********************inf"); - assert(ios.width() == 0); - } - } - } - } - } - uppercase(ios); - { - noshowpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-INF"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-INF*********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*********************-INF"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*********************INF"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-INF"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-INF*********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*********************-INF"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*********************INF"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-INF"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-INF*********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*********************-INF"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*********************INF"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-INF"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-INF*********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*********************-INF"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*********************INF"); - assert(ios.width() == 0); - } - } - } - } - showpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-INF"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-INF*********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*********************-INF"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*********************INF"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-INF"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-INF*********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*********************-INF"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*********************INF"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-INF"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-INF*********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*********************-INF"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*********************INF"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-INF"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-INF*********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*********************-INF"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*********************INF"); - assert(ios.width() == 0); - } - } - } - } - } - } - ios.precision(1); - { - nouppercase(ios); - { - noshowpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-inf"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-inf*********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*********************-inf"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*********************inf"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-inf"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-inf*********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*********************-inf"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*********************inf"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-inf"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-inf*********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*********************-inf"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*********************inf"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-inf"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-inf*********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*********************-inf"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*********************inf"); - assert(ios.width() == 0); - } - } - } - } - showpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-inf"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-inf*********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*********************-inf"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*********************inf"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-inf"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-inf*********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*********************-inf"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*********************inf"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-inf"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-inf*********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*********************-inf"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*********************inf"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-inf"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-inf*********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*********************-inf"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*********************inf"); - assert(ios.width() == 0); - } - } - } - } - } - uppercase(ios); - { - noshowpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-INF"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-INF*********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*********************-INF"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*********************INF"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-INF"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-INF*********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*********************-INF"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*********************INF"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-INF"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-INF*********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*********************-INF"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*********************INF"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-INF"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-INF*********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*********************-INF"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*********************INF"); - assert(ios.width() == 0); - } - } - } - } - showpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-INF"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-INF*********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*********************-INF"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*********************INF"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-INF"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-INF*********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*********************-INF"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*********************INF"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-INF"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-INF*********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*********************-INF"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*********************INF"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-INF"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-INF*********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*********************-INF"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*********************INF"); - assert(ios.width() == 0); - } - } - } - } - } - } - ios.precision(6); - { - nouppercase(ios); - { - noshowpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-inf"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-inf*********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*********************-inf"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*********************inf"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-inf"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-inf*********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*********************-inf"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*********************inf"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-inf"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-inf*********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*********************-inf"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*********************inf"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-inf"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-inf*********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*********************-inf"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*********************inf"); - assert(ios.width() == 0); - } - } - } - } - showpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-inf"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-inf*********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*********************-inf"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*********************inf"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-inf"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-inf*********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*********************-inf"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*********************inf"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-inf"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-inf*********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*********************-inf"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*********************inf"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-inf"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-inf*********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*********************-inf"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*********************inf"); - assert(ios.width() == 0); - } - } - } - } - } - uppercase(ios); - { - noshowpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-INF"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-INF*********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*********************-INF"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*********************INF"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-INF"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-INF*********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*********************-INF"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*********************INF"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-INF"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-INF*********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*********************-INF"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*********************INF"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-INF"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-INF*********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*********************-INF"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*********************INF"); - assert(ios.width() == 0); - } - } - } - } - showpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-INF"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-INF*********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*********************-INF"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*********************INF"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-INF"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-INF*********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*********************-INF"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*********************INF"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-INF"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-INF*********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*********************-INF"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*********************INF"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-INF"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-INF*********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*********************-INF"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*********************INF"); - assert(ios.width() == 0); - } - } - } - } - } - } - ios.precision(16); - {} - ios.precision(60); - {} - } - } -} - -void test5() -{ - char str[200]; - output_iterator iter; - std::locale lc = std::locale::classic(); - std::locale lg(lc, new my_numpunct); - const my_facet f(1); - { - long double v = std::nan(""); - std::ios ios(0); - // %g - { - ios.precision(0); - { - nouppercase(ios); - { - noshowpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "nan"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "nan**********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**********************nan"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**********************nan"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "nan"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "nan**********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**********************nan"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**********************nan"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "nan"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "nan**********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**********************nan"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**********************nan"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "nan"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "nan**********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**********************nan"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**********************nan"); - assert(ios.width() == 0); - } - } - } - } - showpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "nan"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "nan**********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**********************nan"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**********************nan"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "nan"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "nan**********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**********************nan"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**********************nan"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "nan"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "nan**********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**********************nan"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**********************nan"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "nan"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "nan**********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**********************nan"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**********************nan"); - assert(ios.width() == 0); - } - } - } - } - } - uppercase(ios); - { - noshowpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "NAN"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "NAN**********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**********************NAN"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**********************NAN"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "NAN"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "NAN**********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**********************NAN"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**********************NAN"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "NAN"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "NAN**********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**********************NAN"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**********************NAN"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "NAN"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "NAN**********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**********************NAN"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**********************NAN"); - assert(ios.width() == 0); - } - } - } - } - showpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "NAN"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "NAN**********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**********************NAN"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**********************NAN"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "NAN"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "NAN**********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**********************NAN"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**********************NAN"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "NAN"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "NAN**********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**********************NAN"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**********************NAN"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "NAN"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "NAN**********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**********************NAN"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**********************NAN"); - assert(ios.width() == 0); - } - } - } - } - } - } - ios.precision(1); - {} - ios.precision(6); - {} - ios.precision(16); - {} - ios.precision(60); - {} - } - } -} - -void test6() -{ - char str[200]; - output_iterator iter; - std::locale lc = std::locale::classic(); - std::locale lg(lc, new my_numpunct); - const my_facet f(1); - { - long double v = +0.; - std::ios ios(0); - fixed(ios); - // %f - { - ios.precision(0); - { - nouppercase(ios); - { - noshowpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0************************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "************************0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "************************0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0************************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "************************0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "************************0"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0."); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0.***********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********************0."); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********************0."); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0;"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0;***********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********************0;"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********************0;"); - assert(ios.width() == 0); - } - } - } - } - showpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0***********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********************+0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+***********************0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0***********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********************+0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+***********************0"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0."); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0.**********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**********************+0."); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+**********************0."); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0;"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0;**********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**********************+0;"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+**********************0;"); - assert(ios.width() == 0); - } - } - } - } - } - uppercase(ios); - { - noshowpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0************************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "************************0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "************************0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0************************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "************************0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "************************0"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0."); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0.***********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********************0."); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********************0."); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0;"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0;***********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********************0;"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********************0;"); - assert(ios.width() == 0); - } - } - } - } - showpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0***********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********************+0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+***********************0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0***********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********************+0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+***********************0"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0."); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0.**********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**********************+0."); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+**********************0."); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0;"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0;**********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**********************+0;"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+**********************0;"); - assert(ios.width() == 0); - } - } - } - } - } - } - ios.precision(1); - { - nouppercase(ios); - { - noshowpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0.0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0.0**********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**********************0.0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**********************0.0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0;0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0;0**********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**********************0;0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**********************0;0"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0.0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0.0**********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**********************0.0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**********************0.0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0;0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0;0**********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**********************0;0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**********************0;0"); - assert(ios.width() == 0); - } - } - } - } - showpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0.0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0.0*********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*********************+0.0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+*********************0.0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0;0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0;0*********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*********************+0;0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+*********************0;0"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0.0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0.0*********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*********************+0.0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+*********************0.0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0;0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0;0*********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*********************+0;0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+*********************0;0"); - assert(ios.width() == 0); - } - } - } - } - } - uppercase(ios); - { - noshowpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0.0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0.0**********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**********************0.0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**********************0.0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0;0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0;0**********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**********************0;0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**********************0;0"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0.0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0.0**********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**********************0.0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**********************0.0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0;0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0;0**********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**********************0;0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**********************0;0"); - assert(ios.width() == 0); - } - } - } - } - showpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0.0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0.0*********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*********************+0.0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+*********************0.0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0;0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0;0*********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*********************+0;0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+*********************0;0"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0.0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0.0*********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*********************+0.0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+*********************0.0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0;0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0;0*********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*********************+0;0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+*********************0;0"); - assert(ios.width() == 0); - } - } - } - } - } - } - ios.precision(6); - { - nouppercase(ios); - { - noshowpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0.000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0.000000*****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************0.000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************0.000000"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0;000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0;000000*****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************0;000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************0;000000"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0.000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0.000000*****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************0.000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************0.000000"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0;000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0;000000*****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************0;000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************0;000000"); - assert(ios.width() == 0); - } - } - } - } - showpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0.000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0.000000****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "****************+0.000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+****************0.000000"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0;000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0;000000****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "****************+0;000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+****************0;000000"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0.000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0.000000****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "****************+0.000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+****************0.000000"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0;000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0;000000****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "****************+0;000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+****************0;000000"); - assert(ios.width() == 0); - } - } - } - } - } - uppercase(ios); - { - noshowpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0.000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0.000000*****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************0.000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************0.000000"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0;000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0;000000*****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************0;000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************0;000000"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0.000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0.000000*****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************0.000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************0.000000"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0;000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0;000000*****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************0;000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************0;000000"); - assert(ios.width() == 0); - } - } - } - } - showpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0.000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0.000000****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "****************+0.000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+****************0.000000"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0;000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0;000000****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "****************+0;000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+****************0;000000"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0.000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0.000000****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "****************+0.000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+****************0.000000"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0;000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0;000000****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "****************+0;000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+****************0;000000"); - assert(ios.width() == 0); - } - } - } - } - } - } - ios.precision(16); - { - nouppercase(ios); - { - noshowpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0.0000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0.0000000000000000*******"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******0.0000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******0.0000000000000000"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0;0000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0;0000000000000000*******"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******0;0000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******0;0000000000000000"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0.0000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0.0000000000000000*******"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******0.0000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******0.0000000000000000"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0;0000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0;0000000000000000*******"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******0;0000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******0;0000000000000000"); - assert(ios.width() == 0); - } - } - } - } - showpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0.0000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0.0000000000000000******"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******+0.0000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+******0.0000000000000000"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0;0000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0;0000000000000000******"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******+0;0000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+******0;0000000000000000"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0.0000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0.0000000000000000******"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******+0.0000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+******0.0000000000000000"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0;0000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0;0000000000000000******"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******+0;0000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+******0;0000000000000000"); - assert(ios.width() == 0); - } - } - } - } - } - uppercase(ios); - { - noshowpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0.0000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0.0000000000000000*******"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******0.0000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******0.0000000000000000"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0;0000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0;0000000000000000*******"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******0;0000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******0;0000000000000000"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0.0000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0.0000000000000000*******"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******0.0000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******0.0000000000000000"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0;0000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0;0000000000000000*******"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******0;0000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******0;0000000000000000"); - assert(ios.width() == 0); - } - } - } - } - showpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0.0000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0.0000000000000000******"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******+0.0000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+******0.0000000000000000"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0;0000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0;0000000000000000******"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******+0;0000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+******0;0000000000000000"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0.0000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0.0000000000000000******"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******+0.0000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+******0.0000000000000000"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0;0000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0;0000000000000000******"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******+0;0000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+******0;0000000000000000"); - assert(ios.width() == 0); - } - } - } - } - } - } - ios.precision(60); - { - nouppercase(ios); - { - noshowpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0.000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0.000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0.000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0.000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0;000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0;000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0;000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0;000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0.000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0.000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0.000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0.000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0;000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0;000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0;000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0;000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - } - } - } - showpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0.000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0.000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0.000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0.000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0;000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0;000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0;000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0;000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0.000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0.000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0.000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0.000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0;000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0;000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0;000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0;000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - } - } - } - } - uppercase(ios); - { - noshowpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0.000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0.000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0.000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0.000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0;000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0;000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0;000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0;000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0.000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0.000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0.000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0.000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0;000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0;000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0;000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0;000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - } - } - } - showpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0.000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0.000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0.000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0.000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0;000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0;000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0;000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0;000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0.000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0.000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0.000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0.000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0;000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0;000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0;000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0;000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - } - } - } - } - } - } - } -} - -void test7() -{ - char str[200]; - output_iterator iter; - std::locale lc = std::locale::classic(); - std::locale lg(lc, new my_numpunct); - const my_facet f(1); - { - long double v = -0.; - std::ios ios(0); - fixed(ios); - // %f - { - ios.precision(0); - { - nouppercase(ios); - { - noshowpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0***********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********************-0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-***********************0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0***********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********************-0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-***********************0"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0."); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.**********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**********************-0."); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-**********************0."); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;**********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**********************-0;"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-**********************0;"); - assert(ios.width() == 0); - } - } - } - } - showpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0***********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********************-0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-***********************0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0***********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********************-0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-***********************0"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0."); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.**********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**********************-0."); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-**********************0."); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;**********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**********************-0;"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-**********************0;"); - assert(ios.width() == 0); - } - } - } - } - } - uppercase(ios); - { - noshowpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0***********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********************-0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-***********************0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0***********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********************-0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-***********************0"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0."); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.**********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**********************-0."); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-**********************0."); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;**********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**********************-0;"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-**********************0;"); - assert(ios.width() == 0); - } - } - } - } - showpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0***********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********************-0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-***********************0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0***********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********************-0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-***********************0"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0."); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.**********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**********************-0."); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-**********************0."); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;**********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**********************-0;"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-**********************0;"); - assert(ios.width() == 0); - } - } - } - } - } - } - ios.precision(1); - { - nouppercase(ios); - { - noshowpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.0*********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*********************-0.0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*********************0.0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;0*********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*********************-0;0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*********************0;0"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.0*********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*********************-0.0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*********************0.0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;0*********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*********************-0;0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*********************0;0"); - assert(ios.width() == 0); - } - } - } - } - showpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.0*********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*********************-0.0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*********************0.0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;0*********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*********************-0;0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*********************0;0"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.0*********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*********************-0.0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*********************0.0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;0*********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*********************-0;0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*********************0;0"); - assert(ios.width() == 0); - } - } - } - } - } - uppercase(ios); - { - noshowpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.0*********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*********************-0.0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*********************0.0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;0*********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*********************-0;0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*********************0;0"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.0*********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*********************-0.0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*********************0.0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;0*********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*********************-0;0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*********************0;0"); - assert(ios.width() == 0); - } - } - } - } - showpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.0*********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*********************-0.0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*********************0.0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;0*********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*********************-0;0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*********************0;0"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.0*********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*********************-0.0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*********************0.0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;0*********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*********************-0;0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*********************0;0"); - assert(ios.width() == 0); - } - } - } - } - } - } - ios.precision(6); - { - nouppercase(ios); - { - noshowpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.000000****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "****************-0.000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-****************0.000000"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;000000****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "****************-0;000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-****************0;000000"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.000000****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "****************-0.000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-****************0.000000"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;000000****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "****************-0;000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-****************0;000000"); - assert(ios.width() == 0); - } - } - } - } - showpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.000000****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "****************-0.000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-****************0.000000"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;000000****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "****************-0;000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-****************0;000000"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.000000****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "****************-0.000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-****************0.000000"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;000000****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "****************-0;000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-****************0;000000"); - assert(ios.width() == 0); - } - } - } - } - } - uppercase(ios); - { - noshowpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.000000****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "****************-0.000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-****************0.000000"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;000000****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "****************-0;000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-****************0;000000"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.000000****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "****************-0.000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-****************0.000000"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;000000****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "****************-0;000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-****************0;000000"); - assert(ios.width() == 0); - } - } - } - } - showpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.000000****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "****************-0.000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-****************0.000000"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;000000****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "****************-0;000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-****************0;000000"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.000000****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "****************-0.000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-****************0.000000"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;000000****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "****************-0;000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-****************0;000000"); - assert(ios.width() == 0); - } - } - } - } - } - } - ios.precision(16); - { - nouppercase(ios); - { - noshowpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.0000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.0000000000000000******"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******-0.0000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-******0.0000000000000000"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;0000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;0000000000000000******"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******-0;0000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-******0;0000000000000000"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.0000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.0000000000000000******"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******-0.0000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-******0.0000000000000000"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;0000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;0000000000000000******"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******-0;0000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-******0;0000000000000000"); - assert(ios.width() == 0); - } - } - } - } - showpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.0000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.0000000000000000******"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******-0.0000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-******0.0000000000000000"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;0000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;0000000000000000******"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******-0;0000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-******0;0000000000000000"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.0000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.0000000000000000******"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******-0.0000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-******0.0000000000000000"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;0000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;0000000000000000******"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******-0;0000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-******0;0000000000000000"); - assert(ios.width() == 0); - } - } - } - } - } - uppercase(ios); - { - noshowpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.0000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.0000000000000000******"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******-0.0000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-******0.0000000000000000"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;0000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;0000000000000000******"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******-0;0000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-******0;0000000000000000"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.0000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.0000000000000000******"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******-0.0000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-******0.0000000000000000"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;0000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;0000000000000000******"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******-0;0000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-******0;0000000000000000"); - assert(ios.width() == 0); - } - } - } - } - showpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.0000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.0000000000000000******"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******-0.0000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-******0.0000000000000000"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;0000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;0000000000000000******"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******-0;0000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-******0;0000000000000000"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.0000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.0000000000000000******"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******-0.0000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-******0.0000000000000000"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;0000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;0000000000000000******"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******-0;0000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-******0;0000000000000000"); - assert(ios.width() == 0); - } - } - } - } - } - } - ios.precision(60); - { - nouppercase(ios); - { - noshowpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - } - } - } - showpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - } - } - } - } - uppercase(ios); - { - noshowpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - } - } - } - showpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;000000000000000000000000000000000000000000000000000000000000"); - assert(ios.width() == 0); - } - } - } - } - } - } - } - } -} - -void test8() -{ - char str[200]; - output_iterator iter; - std::locale lc = std::locale::classic(); - std::locale lg(lc, new my_numpunct); - const my_facet f(1); - { - long double v = 1234567890.125; - std::ios ios(0); - fixed(ios); - // %f - { - ios.precision(0); - { - nouppercase(ios); - { - noshowpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1234567890"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1234567890***************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***************1234567890"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***************1234567890"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1_234_567_89_0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1_234_567_89_0***********"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********1_234_567_89_0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********1_234_567_89_0"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1234567890."); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1234567890.**************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**************1234567890."); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**************1234567890."); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1_234_567_89_0;"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1_234_567_89_0;**********"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**********1_234_567_89_0;"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**********1_234_567_89_0;"); - assert(ios.width() == 0); - } - } - } - } - showpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1234567890"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1234567890**************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**************+1234567890"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+**************1234567890"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1_234_567_89_0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1_234_567_89_0**********"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**********+1_234_567_89_0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+**********1_234_567_89_0"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1234567890."); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1234567890.*************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*************+1234567890."); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+*************1234567890."); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1_234_567_89_0;"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1_234_567_89_0;*********"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*********+1_234_567_89_0;"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+*********1_234_567_89_0;"); - assert(ios.width() == 0); - } - } - } - } - } - uppercase(ios); - { - noshowpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1234567890"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1234567890***************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***************1234567890"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***************1234567890"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1_234_567_89_0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1_234_567_89_0***********"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********1_234_567_89_0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***********1_234_567_89_0"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1234567890."); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1234567890.**************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**************1234567890."); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**************1234567890."); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1_234_567_89_0;"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1_234_567_89_0;**********"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**********1_234_567_89_0;"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**********1_234_567_89_0;"); - assert(ios.width() == 0); - } - } - } - } - showpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1234567890"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1234567890**************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**************+1234567890"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+**************1234567890"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1_234_567_89_0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1_234_567_89_0**********"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**********+1_234_567_89_0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+**********1_234_567_89_0"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1234567890."); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1234567890.*************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*************+1234567890."); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+*************1234567890."); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1_234_567_89_0;"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1_234_567_89_0;*********"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*********+1_234_567_89_0;"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+*********1_234_567_89_0;"); - assert(ios.width() == 0); - } - } - } - } - } - } - ios.precision(1); - { - nouppercase(ios); - { - noshowpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1234567890.1"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1234567890.1*************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*************1234567890.1"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*************1234567890.1"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1_234_567_89_0;1"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1_234_567_89_0;1*********"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*********1_234_567_89_0;1"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*********1_234_567_89_0;1"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1234567890.1"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1234567890.1*************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*************1234567890.1"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*************1234567890.1"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1_234_567_89_0;1"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1_234_567_89_0;1*********"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*********1_234_567_89_0;1"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*********1_234_567_89_0;1"); - assert(ios.width() == 0); - } - } - } - } - showpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1234567890.1"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1234567890.1************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "************+1234567890.1"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+************1234567890.1"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1_234_567_89_0;1"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1_234_567_89_0;1********"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********+1_234_567_89_0;1"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+********1_234_567_89_0;1"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1234567890.1"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1234567890.1************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "************+1234567890.1"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+************1234567890.1"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1_234_567_89_0;1"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1_234_567_89_0;1********"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********+1_234_567_89_0;1"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+********1_234_567_89_0;1"); - assert(ios.width() == 0); - } - } - } - } - } - uppercase(ios); - { - noshowpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1234567890.1"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1234567890.1*************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*************1234567890.1"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*************1234567890.1"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1_234_567_89_0;1"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1_234_567_89_0;1*********"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*********1_234_567_89_0;1"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*********1_234_567_89_0;1"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1234567890.1"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1234567890.1*************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*************1234567890.1"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*************1234567890.1"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1_234_567_89_0;1"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1_234_567_89_0;1*********"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*********1_234_567_89_0;1"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*********1_234_567_89_0;1"); - assert(ios.width() == 0); - } - } - } - } - showpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1234567890.1"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1234567890.1************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "************+1234567890.1"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+************1234567890.1"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1_234_567_89_0;1"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1_234_567_89_0;1********"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********+1_234_567_89_0;1"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+********1_234_567_89_0;1"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1234567890.1"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1234567890.1************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "************+1234567890.1"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+************1234567890.1"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1_234_567_89_0;1"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1_234_567_89_0;1********"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********+1_234_567_89_0;1"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+********1_234_567_89_0;1"); - assert(ios.width() == 0); - } - } - } - } - } - } - ios.precision(6); - { - nouppercase(ios); - { - noshowpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1234567890.125000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1234567890.125000********"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********1234567890.125000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********1234567890.125000"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1_234_567_89_0;125000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1_234_567_89_0;125000****"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "****1_234_567_89_0;125000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "****1_234_567_89_0;125000"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1234567890.125000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1234567890.125000********"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********1234567890.125000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********1234567890.125000"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1_234_567_89_0;125000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1_234_567_89_0;125000****"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "****1_234_567_89_0;125000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "****1_234_567_89_0;125000"); - assert(ios.width() == 0); - } - } - } - } - showpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1234567890.125000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1234567890.125000*******"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******+1234567890.125000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+*******1234567890.125000"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1_234_567_89_0;125000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1_234_567_89_0;125000***"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***+1_234_567_89_0;125000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+***1_234_567_89_0;125000"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1234567890.125000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1234567890.125000*******"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******+1234567890.125000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+*******1234567890.125000"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1_234_567_89_0;125000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1_234_567_89_0;125000***"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***+1_234_567_89_0;125000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+***1_234_567_89_0;125000"); - assert(ios.width() == 0); - } - } - } - } - } - uppercase(ios); - { - noshowpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1234567890.125000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1234567890.125000********"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********1234567890.125000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********1234567890.125000"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1_234_567_89_0;125000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1_234_567_89_0;125000****"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "****1_234_567_89_0;125000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "****1_234_567_89_0;125000"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1234567890.125000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1234567890.125000********"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********1234567890.125000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********1234567890.125000"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1_234_567_89_0;125000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1_234_567_89_0;125000****"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "****1_234_567_89_0;125000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "****1_234_567_89_0;125000"); - assert(ios.width() == 0); - } - } - } - } - showpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1234567890.125000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1234567890.125000*******"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******+1234567890.125000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+*******1234567890.125000"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1_234_567_89_0;125000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1_234_567_89_0;125000***"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***+1_234_567_89_0;125000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+***1_234_567_89_0;125000"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1234567890.125000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1234567890.125000*******"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******+1234567890.125000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+*******1234567890.125000"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1_234_567_89_0;125000"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1_234_567_89_0;125000***"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***+1_234_567_89_0;125000"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+***1_234_567_89_0;125000"); - assert(ios.width() == 0); - } - } - } - } - } - } - ios.precision(16); - {} - ios.precision(60); - {} - } - } -} - -void test9() -{ - char str[200]; - output_iterator iter; - std::locale lc = std::locale::classic(); - std::locale lg(lc, new my_numpunct); - const my_facet f(1); - { - long double v = -0.; - std::ios ios(0); - scientific(ios); - // %e - { - ios.precision(0); - { - nouppercase(ios); - { - noshowpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0e+00"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0e+00*******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******************-0e+00"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*******************0e+00"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0e+00"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0e+00*******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******************-0e+00"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*******************0e+00"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.e+00"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.e+00******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************-0.e+00"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-******************0.e+00"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;e+00"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;e+00******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************-0;e+00"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-******************0;e+00"); - assert(ios.width() == 0); - } - } - } - } - showpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0e+00"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0e+00*******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******************-0e+00"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*******************0e+00"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0e+00"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0e+00*******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******************-0e+00"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*******************0e+00"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.e+00"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.e+00******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************-0.e+00"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-******************0.e+00"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;e+00"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;e+00******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************-0;e+00"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-******************0;e+00"); - assert(ios.width() == 0); - } - } - } - } - } - uppercase(ios); - { - noshowpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0E+00"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0E+00*******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******************-0E+00"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*******************0E+00"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0E+00"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0E+00*******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******************-0E+00"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*******************0E+00"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.E+00"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.E+00******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************-0.E+00"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-******************0.E+00"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;E+00"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;E+00******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************-0;E+00"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-******************0;E+00"); - assert(ios.width() == 0); - } - } - } - } - showpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0E+00"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0E+00*******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******************-0E+00"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*******************0E+00"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0E+00"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0E+00*******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******************-0E+00"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*******************0E+00"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.E+00"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.E+00******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************-0.E+00"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-******************0.E+00"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;E+00"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;E+00******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************-0;E+00"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-******************0;E+00"); - assert(ios.width() == 0); - } - } - } - } - } - } - ios.precision(1); - { - nouppercase(ios); - { - noshowpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.0e+00"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.0e+00*****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************-0.0e+00"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*****************0.0e+00"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;0e+00"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;0e+00*****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************-0;0e+00"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*****************0;0e+00"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.0e+00"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.0e+00*****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************-0.0e+00"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*****************0.0e+00"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;0e+00"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;0e+00*****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************-0;0e+00"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*****************0;0e+00"); - assert(ios.width() == 0); - } - } - } - } - showpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.0e+00"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.0e+00*****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************-0.0e+00"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*****************0.0e+00"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;0e+00"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;0e+00*****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************-0;0e+00"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*****************0;0e+00"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.0e+00"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.0e+00*****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************-0.0e+00"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*****************0.0e+00"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;0e+00"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;0e+00*****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************-0;0e+00"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*****************0;0e+00"); - assert(ios.width() == 0); - } - } - } - } - } - uppercase(ios); - { - noshowpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.0E+00"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.0E+00*****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************-0.0E+00"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*****************0.0E+00"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;0E+00"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;0E+00*****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************-0;0E+00"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*****************0;0E+00"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.0E+00"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.0E+00*****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************-0.0E+00"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*****************0.0E+00"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;0E+00"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;0E+00*****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************-0;0E+00"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*****************0;0E+00"); - assert(ios.width() == 0); - } - } - } - } - showpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.0E+00"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.0E+00*****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************-0.0E+00"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*****************0.0E+00"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;0E+00"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;0E+00*****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************-0;0E+00"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*****************0;0E+00"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.0E+00"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.0E+00*****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************-0.0E+00"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*****************0.0E+00"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;0E+00"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;0E+00*****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************-0;0E+00"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*****************0;0E+00"); - assert(ios.width() == 0); - } - } - } - } - } - } - ios.precision(6); - { - nouppercase(ios); - { - noshowpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.000000e+00"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.000000e+00************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "************-0.000000e+00"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-************0.000000e+00"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;000000e+00"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;000000e+00************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "************-0;000000e+00"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-************0;000000e+00"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.000000e+00"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.000000e+00************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "************-0.000000e+00"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-************0.000000e+00"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;000000e+00"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;000000e+00************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "************-0;000000e+00"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-************0;000000e+00"); - assert(ios.width() == 0); - } - } - } - } - showpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.000000e+00"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.000000e+00************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "************-0.000000e+00"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-************0.000000e+00"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;000000e+00"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;000000e+00************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "************-0;000000e+00"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-************0;000000e+00"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.000000e+00"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.000000e+00************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "************-0.000000e+00"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-************0.000000e+00"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;000000e+00"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;000000e+00************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "************-0;000000e+00"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-************0;000000e+00"); - assert(ios.width() == 0); - } - } - } - } - } - uppercase(ios); - { - noshowpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.000000E+00"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.000000E+00************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "************-0.000000E+00"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-************0.000000E+00"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;000000E+00"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;000000E+00************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "************-0;000000E+00"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-************0;000000E+00"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.000000E+00"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.000000E+00************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "************-0.000000E+00"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-************0.000000E+00"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;000000E+00"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;000000E+00************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "************-0;000000E+00"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-************0;000000E+00"); - assert(ios.width() == 0); - } - } - } - } - showpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.000000E+00"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.000000E+00************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "************-0.000000E+00"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-************0.000000E+00"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;000000E+00"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;000000E+00************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "************-0;000000E+00"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-************0;000000E+00"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.000000E+00"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0.000000E+00************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "************-0.000000E+00"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-************0.000000E+00"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;000000E+00"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0;000000E+00************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "************-0;000000E+00"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-************0;000000E+00"); - assert(ios.width() == 0); - } - } - } - } - } - } - ios.precision(16); - { - } - ios.precision(60); - { - } - } - } -} - -void test10() -{ - char str[200]; - output_iterator iter; - std::locale lc = std::locale::classic(); - std::locale lg(lc, new my_numpunct); - const my_facet f(1); - { - long double v = 1234567890.125; - std::ios ios(0); - scientific(ios); - // %e - { - ios.precision(0); - { - nouppercase(ios); - { - noshowpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1e+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1e+09********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********************1e+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********************1e+09"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1e+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1e+09********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********************1e+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********************1e+09"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1.e+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1.e+09*******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******************1.e+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******************1.e+09"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1;e+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1;e+09*******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******************1;e+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******************1;e+09"); - assert(ios.width() == 0); - } - } - } - } - showpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1e+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1e+09*******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******************+1e+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+*******************1e+09"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1e+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1e+09*******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******************+1e+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+*******************1e+09"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1.e+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1.e+09******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************+1.e+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+******************1.e+09"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1;e+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1;e+09******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************+1;e+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+******************1;e+09"); - assert(ios.width() == 0); - } - } - } - } - } - uppercase(ios); - { - noshowpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1E+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1E+09********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********************1E+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********************1E+09"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1E+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1E+09********************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********************1E+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********************1E+09"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1.E+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1.E+09*******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******************1.E+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******************1.E+09"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1;E+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1;E+09*******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******************1;E+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******************1;E+09"); - assert(ios.width() == 0); - } - } - } - } - showpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1E+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1E+09*******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******************+1E+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+*******************1E+09"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1E+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1E+09*******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******************+1E+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+*******************1E+09"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1.E+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1.E+09******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************+1.E+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+******************1.E+09"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1;E+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1;E+09******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************+1;E+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+******************1;E+09"); - assert(ios.width() == 0); - } - } - } - } - } - } - ios.precision(1); - { - nouppercase(ios); - { - noshowpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1.2e+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1.2e+09******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************1.2e+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************1.2e+09"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1;2e+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1;2e+09******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************1;2e+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************1;2e+09"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1.2e+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1.2e+09******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************1.2e+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************1.2e+09"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1;2e+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1;2e+09******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************1;2e+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************1;2e+09"); - assert(ios.width() == 0); - } - } - } - } - showpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1.2e+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1.2e+09*****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************+1.2e+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+*****************1.2e+09"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1;2e+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1;2e+09*****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************+1;2e+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+*****************1;2e+09"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1.2e+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1.2e+09*****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************+1.2e+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+*****************1.2e+09"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1;2e+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1;2e+09*****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************+1;2e+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+*****************1;2e+09"); - assert(ios.width() == 0); - } - } - } - } - } - uppercase(ios); - { - noshowpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1.2E+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1.2E+09******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************1.2E+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************1.2E+09"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1;2E+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1;2E+09******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************1;2E+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************1;2E+09"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1.2E+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1.2E+09******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************1.2E+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************1.2E+09"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1;2E+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1;2E+09******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************1;2E+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************1;2E+09"); - assert(ios.width() == 0); - } - } - } - } - showpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1.2E+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1.2E+09*****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************+1.2E+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+*****************1.2E+09"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1;2E+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1;2E+09*****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************+1;2E+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+*****************1;2E+09"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1.2E+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1.2E+09*****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************+1.2E+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+*****************1.2E+09"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1;2E+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1;2E+09*****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************+1;2E+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+*****************1;2E+09"); - assert(ios.width() == 0); - } - } - } - } - } - } - ios.precision(6); - { - } - ios.precision(16); - { - } - ios.precision(60); - { - nouppercase(ios); - { - noshowpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1.234567890125000000000000000000000000000000000000000000000000e+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1.234567890125000000000000000000000000000000000000000000000000e+09"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1.234567890125000000000000000000000000000000000000000000000000e+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1.234567890125000000000000000000000000000000000000000000000000e+09"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1;234567890125000000000000000000000000000000000000000000000000e+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1;234567890125000000000000000000000000000000000000000000000000e+09"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1;234567890125000000000000000000000000000000000000000000000000e+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1;234567890125000000000000000000000000000000000000000000000000e+09"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1.234567890125000000000000000000000000000000000000000000000000e+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1.234567890125000000000000000000000000000000000000000000000000e+09"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1.234567890125000000000000000000000000000000000000000000000000e+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1.234567890125000000000000000000000000000000000000000000000000e+09"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1;234567890125000000000000000000000000000000000000000000000000e+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1;234567890125000000000000000000000000000000000000000000000000e+09"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1;234567890125000000000000000000000000000000000000000000000000e+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1;234567890125000000000000000000000000000000000000000000000000e+09"); - assert(ios.width() == 0); - } - } - } - } - showpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1.234567890125000000000000000000000000000000000000000000000000e+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1.234567890125000000000000000000000000000000000000000000000000e+09"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1.234567890125000000000000000000000000000000000000000000000000e+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1.234567890125000000000000000000000000000000000000000000000000e+09"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1;234567890125000000000000000000000000000000000000000000000000e+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1;234567890125000000000000000000000000000000000000000000000000e+09"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1;234567890125000000000000000000000000000000000000000000000000e+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1;234567890125000000000000000000000000000000000000000000000000e+09"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1.234567890125000000000000000000000000000000000000000000000000e+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1.234567890125000000000000000000000000000000000000000000000000e+09"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1.234567890125000000000000000000000000000000000000000000000000e+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1.234567890125000000000000000000000000000000000000000000000000e+09"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1;234567890125000000000000000000000000000000000000000000000000e+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1;234567890125000000000000000000000000000000000000000000000000e+09"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1;234567890125000000000000000000000000000000000000000000000000e+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1;234567890125000000000000000000000000000000000000000000000000e+09"); - assert(ios.width() == 0); - } - } - } - } - } - uppercase(ios); - { - noshowpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1.234567890125000000000000000000000000000000000000000000000000E+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1.234567890125000000000000000000000000000000000000000000000000E+09"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1.234567890125000000000000000000000000000000000000000000000000E+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1.234567890125000000000000000000000000000000000000000000000000E+09"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1;234567890125000000000000000000000000000000000000000000000000E+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1;234567890125000000000000000000000000000000000000000000000000E+09"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1;234567890125000000000000000000000000000000000000000000000000E+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1;234567890125000000000000000000000000000000000000000000000000E+09"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1.234567890125000000000000000000000000000000000000000000000000E+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1.234567890125000000000000000000000000000000000000000000000000E+09"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1.234567890125000000000000000000000000000000000000000000000000E+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1.234567890125000000000000000000000000000000000000000000000000E+09"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1;234567890125000000000000000000000000000000000000000000000000E+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1;234567890125000000000000000000000000000000000000000000000000E+09"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1;234567890125000000000000000000000000000000000000000000000000E+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1;234567890125000000000000000000000000000000000000000000000000E+09"); - assert(ios.width() == 0); - } - } - } - } - showpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1.234567890125000000000000000000000000000000000000000000000000E+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1.234567890125000000000000000000000000000000000000000000000000E+09"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1.234567890125000000000000000000000000000000000000000000000000E+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1.234567890125000000000000000000000000000000000000000000000000E+09"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1;234567890125000000000000000000000000000000000000000000000000E+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1;234567890125000000000000000000000000000000000000000000000000E+09"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1;234567890125000000000000000000000000000000000000000000000000E+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1;234567890125000000000000000000000000000000000000000000000000E+09"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1.234567890125000000000000000000000000000000000000000000000000E+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1.234567890125000000000000000000000000000000000000000000000000E+09"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1.234567890125000000000000000000000000000000000000000000000000E+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1.234567890125000000000000000000000000000000000000000000000000E+09"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1;234567890125000000000000000000000000000000000000000000000000E+09"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1;234567890125000000000000000000000000000000000000000000000000E+09"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1;234567890125000000000000000000000000000000000000000000000000E+09"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1;234567890125000000000000000000000000000000000000000000000000E+09"); - assert(ios.width() == 0); - } - } - } - } - } - } - } - } -} - -void test11() -{ - char str[200]; - output_iterator iter; - std::locale lc = std::locale::classic(); - std::locale lg(lc, new my_numpunct); - const my_facet f(1); - { - long double v = -0.; - std::ios ios(0); - hexfloat(ios); - // %a - { - ios.precision(0); - { - nouppercase(ios); - { - noshowpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0p+0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0p+0******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************-0x0p+0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-******************0x0p+0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0p+0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0p+0******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************-0x0p+0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-******************0x0p+0"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0.p+0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0.p+0*****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************-0x0.p+0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*****************0x0.p+0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0;p+0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0;p+0*****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************-0x0;p+0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*****************0x0;p+0"); - assert(ios.width() == 0); - } - } - } - } - showpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0p+0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0p+0******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************-0x0p+0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-******************0x0p+0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0p+0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0p+0******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************-0x0p+0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-******************0x0p+0"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0.p+0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0.p+0*****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************-0x0.p+0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*****************0x0.p+0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0;p+0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0;p+0*****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************-0x0;p+0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*****************0x0;p+0"); - assert(ios.width() == 0); - } - } - } - } - } - uppercase(ios); - { - noshowpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0P+0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0P+0******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************-0X0P+0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-******************0X0P+0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0P+0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0P+0******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************-0X0P+0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-******************0X0P+0"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0.P+0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0.P+0*****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************-0X0.P+0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*****************0X0.P+0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0;P+0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0;P+0*****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************-0X0;P+0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*****************0X0;P+0"); - assert(ios.width() == 0); - } - } - } - } - showpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0P+0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0P+0******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************-0X0P+0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-******************0X0P+0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0P+0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0P+0******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************-0X0P+0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-******************0X0P+0"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0.P+0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0.P+0*****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************-0X0.P+0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*****************0X0.P+0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0;P+0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0;P+0*****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************-0X0;P+0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*****************0X0;P+0"); - assert(ios.width() == 0); - } - } - } - } - } - } - ios.precision(1); - { - nouppercase(ios); - { - noshowpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0p+0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0p+0******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************-0x0p+0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-******************0x0p+0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0p+0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0p+0******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************-0x0p+0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-******************0x0p+0"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0.p+0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0.p+0*****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************-0x0.p+0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*****************0x0.p+0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0;p+0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0;p+0*****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************-0x0;p+0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*****************0x0;p+0"); - assert(ios.width() == 0); - } - } - } - } - showpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0p+0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0p+0******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************-0x0p+0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-******************0x0p+0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0p+0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0p+0******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************-0x0p+0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-******************0x0p+0"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0.p+0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0.p+0*****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************-0x0.p+0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*****************0x0.p+0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0;p+0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0;p+0*****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************-0x0;p+0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*****************0x0;p+0"); - assert(ios.width() == 0); - } - } - } - } - } - uppercase(ios); - { - noshowpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0P+0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0P+0******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************-0X0P+0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-******************0X0P+0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0P+0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0P+0******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************-0X0P+0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-******************0X0P+0"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0.P+0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0.P+0*****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************-0X0.P+0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*****************0X0.P+0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0;P+0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0;P+0*****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************-0X0;P+0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*****************0X0;P+0"); - assert(ios.width() == 0); - } - } - } - } - showpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0P+0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0P+0******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************-0X0P+0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-******************0X0P+0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0P+0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0P+0******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************-0X0P+0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-******************0X0P+0"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0.P+0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0.P+0*****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************-0X0.P+0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*****************0X0.P+0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0;P+0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0;P+0*****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************-0X0;P+0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*****************0X0;P+0"); - assert(ios.width() == 0); - } - } - } - } - } - } - ios.precision(6); - { - nouppercase(ios); - { - noshowpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0p+0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0p+0******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************-0x0p+0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-******************0x0p+0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0p+0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0p+0******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************-0x0p+0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-******************0x0p+0"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0.p+0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0.p+0*****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************-0x0.p+0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*****************0x0.p+0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0;p+0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0;p+0*****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************-0x0;p+0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*****************0x0;p+0"); - assert(ios.width() == 0); - } - } - } - } - showpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0p+0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0p+0******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************-0x0p+0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-******************0x0p+0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0p+0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0p+0******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************-0x0p+0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-******************0x0p+0"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0.p+0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0.p+0*****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************-0x0.p+0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*****************0x0.p+0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0;p+0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0;p+0*****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************-0x0;p+0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*****************0x0;p+0"); - assert(ios.width() == 0); - } - } - } - } - } - uppercase(ios); - { - noshowpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0P+0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0P+0******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************-0X0P+0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-******************0X0P+0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0P+0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0P+0******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************-0X0P+0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-******************0X0P+0"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0.P+0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0.P+0*****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************-0X0.P+0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*****************0X0.P+0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0;P+0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0;P+0*****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************-0X0;P+0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*****************0X0;P+0"); - assert(ios.width() == 0); - } - } - } - } - showpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0P+0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0P+0******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************-0X0P+0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-******************0X0P+0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0P+0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0P+0******************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************-0X0P+0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-******************0X0P+0"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0.P+0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0.P+0*****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************-0X0.P+0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*****************0X0.P+0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0;P+0"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0;P+0*****************"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************-0X0;P+0"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*****************0X0;P+0"); - assert(ios.width() == 0); - } - } - } - } - } - } - ios.precision(16); - { - } - ios.precision(60); - { - } - } - } -} - -void test12() -{ - char str[200]; - output_iterator iter; - std::locale lc = std::locale::classic(); - std::locale lg(lc, new my_numpunct); - const my_facet f(1); - { - long double v = 1234567890.125; - std::ios ios(0); - hexfloat(ios); - // %a - { - ios.precision(0); - { - nouppercase(ios); - { - noshowpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x9.32c05a44p+27"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x9.32c05a44p+27*********"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*********0x9.32c05a44p+27"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x*********9.32c05a44p+27"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x9;32c05a44p+27"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x9;32c05a44p+27*********"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*********0x9;32c05a44p+27"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x*********9;32c05a44p+27"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x9.32c05a44p+27"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x9.32c05a44p+27*********"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*********0x9.32c05a44p+27"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x*********9.32c05a44p+27"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x9;32c05a44p+27"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x9;32c05a44p+27*********"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*********0x9;32c05a44p+27"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x*********9;32c05a44p+27"); - assert(ios.width() == 0); - } - } - } - } - showpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0x9.32c05a44p+27"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0x9.32c05a44p+27********"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********+0x9.32c05a44p+27"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+********0x9.32c05a44p+27"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0x9;32c05a44p+27"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0x9;32c05a44p+27********"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********+0x9;32c05a44p+27"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+********0x9;32c05a44p+27"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0x9.32c05a44p+27"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0x9.32c05a44p+27********"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********+0x9.32c05a44p+27"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+********0x9.32c05a44p+27"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0x9;32c05a44p+27"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0x9;32c05a44p+27********"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********+0x9;32c05a44p+27"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+********0x9;32c05a44p+27"); - assert(ios.width() == 0); - } - } - } - } - } - uppercase(ios); - { - noshowpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0X9.32C05A44P+27"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0X9.32C05A44P+27*********"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*********0X9.32C05A44P+27"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0X*********9.32C05A44P+27"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0X9;32C05A44P+27"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0X9;32C05A44P+27*********"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*********0X9;32C05A44P+27"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0X*********9;32C05A44P+27"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0X9.32C05A44P+27"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0X9.32C05A44P+27*********"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*********0X9.32C05A44P+27"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0X*********9.32C05A44P+27"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0X9;32C05A44P+27"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0X9;32C05A44P+27*********"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*********0X9;32C05A44P+27"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0X*********9;32C05A44P+27"); - assert(ios.width() == 0); - } - } - } - } - showpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0X9.32C05A44P+27"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0X9.32C05A44P+27********"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********+0X9.32C05A44P+27"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+********0X9.32C05A44P+27"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0X9;32C05A44P+27"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0X9;32C05A44P+27********"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********+0X9;32C05A44P+27"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+********0X9;32C05A44P+27"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0X9.32C05A44P+27"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0X9.32C05A44P+27********"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********+0X9.32C05A44P+27"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+********0X9.32C05A44P+27"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0X9;32C05A44P+27"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0X9;32C05A44P+27********"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********+0X9;32C05A44P+27"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+********0X9;32C05A44P+27"); - assert(ios.width() == 0); - } - } - } - } - } - } - ios.precision(1); - { - nouppercase(ios); - { - noshowpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x9.32c05a44p+27"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x9.32c05a44p+27*********"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*********0x9.32c05a44p+27"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x*********9.32c05a44p+27"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x9;32c05a44p+27"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x9;32c05a44p+27*********"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*********0x9;32c05a44p+27"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x*********9;32c05a44p+27"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x9.32c05a44p+27"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x9.32c05a44p+27*********"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*********0x9.32c05a44p+27"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x*********9.32c05a44p+27"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x9;32c05a44p+27"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x9;32c05a44p+27*********"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*********0x9;32c05a44p+27"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x*********9;32c05a44p+27"); - assert(ios.width() == 0); - } - } - } - } - showpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0x9.32c05a44p+27"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0x9.32c05a44p+27********"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********+0x9.32c05a44p+27"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+********0x9.32c05a44p+27"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0x9;32c05a44p+27"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0x9;32c05a44p+27********"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********+0x9;32c05a44p+27"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+********0x9;32c05a44p+27"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0x9.32c05a44p+27"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0x9.32c05a44p+27********"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********+0x9.32c05a44p+27"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+********0x9.32c05a44p+27"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0x9;32c05a44p+27"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0x9;32c05a44p+27********"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********+0x9;32c05a44p+27"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+********0x9;32c05a44p+27"); - assert(ios.width() == 0); - } - } - } - } - } - uppercase(ios); - { - noshowpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0X9.32C05A44P+27"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0X9.32C05A44P+27*********"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*********0X9.32C05A44P+27"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0X*********9.32C05A44P+27"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0X9;32C05A44P+27"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0X9;32C05A44P+27*********"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*********0X9;32C05A44P+27"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0X*********9;32C05A44P+27"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0X9.32C05A44P+27"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0X9.32C05A44P+27*********"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*********0X9.32C05A44P+27"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0X*********9.32C05A44P+27"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0X9;32C05A44P+27"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0X9;32C05A44P+27*********"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*********0X9;32C05A44P+27"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0X*********9;32C05A44P+27"); - assert(ios.width() == 0); - } - } - } - } - showpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0X9.32C05A44P+27"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0X9.32C05A44P+27********"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********+0X9.32C05A44P+27"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+********0X9.32C05A44P+27"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0X9;32C05A44P+27"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0X9;32C05A44P+27********"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********+0X9;32C05A44P+27"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+********0X9;32C05A44P+27"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0X9.32C05A44P+27"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0X9.32C05A44P+27********"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********+0X9.32C05A44P+27"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+********0X9.32C05A44P+27"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0X9;32C05A44P+27"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0X9;32C05A44P+27********"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********+0X9;32C05A44P+27"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+********0X9;32C05A44P+27"); - assert(ios.width() == 0); - } - } - } - } - } - } - ios.precision(6); - { - } - ios.precision(16); - { - } - ios.precision(60); - { - nouppercase(ios); - { - noshowpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x9.32c05a44p+27"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x9.32c05a44p+27*********"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*********0x9.32c05a44p+27"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x*********9.32c05a44p+27"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x9;32c05a44p+27"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x9;32c05a44p+27*********"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*********0x9;32c05a44p+27"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x*********9;32c05a44p+27"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x9.32c05a44p+27"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x9.32c05a44p+27*********"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*********0x9.32c05a44p+27"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x*********9.32c05a44p+27"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x9;32c05a44p+27"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x9;32c05a44p+27*********"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*********0x9;32c05a44p+27"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x*********9;32c05a44p+27"); - assert(ios.width() == 0); - } - } - } - } - showpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0x9.32c05a44p+27"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0x9.32c05a44p+27********"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********+0x9.32c05a44p+27"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+********0x9.32c05a44p+27"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0x9;32c05a44p+27"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0x9;32c05a44p+27********"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********+0x9;32c05a44p+27"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+********0x9;32c05a44p+27"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0x9.32c05a44p+27"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0x9.32c05a44p+27********"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********+0x9.32c05a44p+27"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+********0x9.32c05a44p+27"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0x9;32c05a44p+27"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0x9;32c05a44p+27********"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********+0x9;32c05a44p+27"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+********0x9;32c05a44p+27"); - assert(ios.width() == 0); - } - } - } - } - } - uppercase(ios); - { - noshowpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0X9.32C05A44P+27"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0X9.32C05A44P+27*********"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*********0X9.32C05A44P+27"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0X*********9.32C05A44P+27"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0X9;32C05A44P+27"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0X9;32C05A44P+27*********"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*********0X9;32C05A44P+27"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0X*********9;32C05A44P+27"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0X9.32C05A44P+27"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0X9.32C05A44P+27*********"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*********0X9.32C05A44P+27"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0X*********9.32C05A44P+27"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0X9;32C05A44P+27"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0X9;32C05A44P+27*********"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*********0X9;32C05A44P+27"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0X*********9;32C05A44P+27"); - assert(ios.width() == 0); - } - } - } - } - showpos(ios); - { - noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0X9.32C05A44P+27"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0X9.32C05A44P+27********"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********+0X9.32C05A44P+27"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+********0X9.32C05A44P+27"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0X9;32C05A44P+27"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0X9;32C05A44P+27********"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********+0X9;32C05A44P+27"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+********0X9;32C05A44P+27"); - assert(ios.width() == 0); - } - } - } - showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0X9.32C05A44P+27"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0X9.32C05A44P+27********"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********+0X9.32C05A44P+27"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+********0X9.32C05A44P+27"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0X9;32C05A44P+27"); - assert(ios.width() == 0); - } - ios.width(25); - left(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0X9;32C05A44P+27********"); - assert(ios.width() == 0); - } - ios.width(25); - right(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********+0X9;32C05A44P+27"); - assert(ios.width() == 0); - } - ios.width(25); - internal(ios); - { - iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+********0X9;32C05A44P+27"); - assert(ios.width() == 0); - } - } - } - } - } - } - } - } -} - -int main() -{ - test1(); - test2(); - test3(); - test4(); - test5(); - test6(); - test7(); - test8(); - test9(); - test10(); - test11(); - test12(); - char str[200]; - output_iterator iter; - std::locale lc = std::locale::classic(); - std::locale lg(lc, new my_numpunct); - const my_facet f(1); - { - long double v = -INFINITY; - } - { - long double v = std::nan(""); - } - - { - long double v = +0.; - } - { - long double v = -INFINITY; - } - { - long double v = std::nan(""); - } - { - long double v = -INFINITY; - } - { - long double v = std::nan(""); - } -} diff --git a/test/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_long_long.pass.cpp b/test/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_long_long.pass.cpp deleted file mode 100644 index 1ee1bfd0..00000000 --- a/test/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_long_long.pass.cpp +++ /dev/null @@ -1,344 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// class num_put - -// iter_type put(iter_type s, ios_base& iob, char_type fill, long long v) const; - -#include -#include -#include -#include -#include "iterators.h" - -typedef std::num_put > F; - -class my_facet - : public F -{ -public: - explicit my_facet(std::size_t refs = 0) - : F(refs) {} -}; - -class my_numpunct - : public std::numpunct -{ -public: - my_numpunct() : std::numpunct() {} - -protected: - virtual char_type do_thousands_sep() const {return '_';} - virtual std::string do_grouping() const {return std::string("\1\2\3");} -}; - -int main() -{ - const my_facet f(1); - { - std::ios ios(0); - long long v = 0; - char str[50]; - output_iterator iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0"); - } - { - std::ios ios(0); - long long v = 1; - char str[50]; - output_iterator iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1"); - } - { - std::ios ios(0); - long long v = -1; - char str[50]; - output_iterator iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-1"); - } - { - std::ios ios(0); - long long v = -1000; - char str[50]; - output_iterator iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-1000"); - } - { - std::ios ios(0); - long long v = 1000; - char str[50]; - output_iterator iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1000"); - } - { - std::ios ios(0); - showpos(ios); - long long v = 1000; - char str[50]; - output_iterator iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1000"); - } - { - std::ios ios(0); - oct(ios); - long long v = 1000; - char str[50]; - output_iterator iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1750"); - } - { - std::ios ios(0); - oct(ios); - showbase(ios); - long long v = 1000; - char str[50]; - output_iterator iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "01750"); - } - { - std::ios ios(0); - hex(ios); - long long v = 1000; - char str[50]; - output_iterator iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "3e8"); - } - { - std::ios ios(0); - hex(ios); - showbase(ios); - long long v = 1000; - char str[50]; - output_iterator iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x3e8"); - } - { - std::ios ios(0); - hex(ios); - showbase(ios); - uppercase(ios); - long long v = 1000; - char str[50]; - output_iterator iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0X3E8"); - } - { - std::ios ios(0); - ios.imbue(std::locale(std::locale::classic(), new my_numpunct)); - hex(ios); - showbase(ios); - uppercase(ios); - long long v = 1000; - char str[50]; - output_iterator iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0X3E_8"); - } - { - std::ios ios(0); - ios.imbue(std::locale(std::locale::classic(), new my_numpunct)); - hex(ios); - showbase(ios); - long long v = 2147483647; - char str[50]; - output_iterator iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x7f_fff_ff_f"); - } - { - std::ios ios(0); - ios.imbue(std::locale(std::locale::classic(), new my_numpunct)); - oct(ios); - long long v = 0123467; - char str[50]; - output_iterator iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "123_46_7"); - } - { - std::ios ios(0); - ios.imbue(std::locale(std::locale::classic(), new my_numpunct)); - oct(ios); - showbase(ios); - long long v = 0123467; - char str[50]; - output_iterator iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0_123_46_7"); - } - { - std::ios ios(0); - ios.imbue(std::locale(std::locale::classic(), new my_numpunct)); - oct(ios); - showbase(ios); - right(ios); - ios.width(15); - long long v = 0123467; - char str[50]; - output_iterator iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****0_123_46_7"); - } - { - std::ios ios(0); - ios.imbue(std::locale(std::locale::classic(), new my_numpunct)); - oct(ios); - showbase(ios); - left(ios); - ios.width(15); - long long v = 0123467; - char str[50]; - output_iterator iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0_123_46_7*****"); - } - { - std::ios ios(0); - ios.imbue(std::locale(std::locale::classic(), new my_numpunct)); - oct(ios); - showbase(ios); - internal(ios); - ios.width(15); - long long v = 0123467; - char str[50]; - output_iterator iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****0_123_46_7"); - assert(ios.width() == 0); - } - { - std::ios ios(0); - ios.imbue(std::locale(std::locale::classic(), new my_numpunct)); - hex(ios); - showbase(ios); - right(ios); - ios.width(15); - long long v = 2147483647; - char str[50]; - output_iterator iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**0x7f_fff_ff_f"); - } - { - std::ios ios(0); - ios.imbue(std::locale(std::locale::classic(), new my_numpunct)); - hex(ios); - showbase(ios); - left(ios); - ios.width(15); - long long v = 2147483647; - char str[50]; - output_iterator iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x7f_fff_ff_f**"); - } - { - std::ios ios(0); - ios.imbue(std::locale(std::locale::classic(), new my_numpunct)); - hex(ios); - showbase(ios); - internal(ios); - ios.width(15); - long long v = 2147483647; - char str[50]; - output_iterator iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x**7f_fff_ff_f"); - assert(ios.width() == 0); - } - { - std::ios ios(0); - ios.imbue(std::locale(std::locale::classic(), new my_numpunct)); - showpos(ios); - long long v = 1000; - right(ios); - ios.width(10); - char str[50]; - output_iterator iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***+1_00_0"); - assert(ios.width() == 0); - } - { - std::ios ios(0); - ios.imbue(std::locale(std::locale::classic(), new my_numpunct)); - showpos(ios); - long long v = 1000; - left(ios); - ios.width(10); - char str[50]; - output_iterator iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+1_00_0***"); - assert(ios.width() == 0); - } - { - std::ios ios(0); - ios.imbue(std::locale(std::locale::classic(), new my_numpunct)); - showpos(ios); - long long v = 1000; - internal(ios); - ios.width(10); - char str[50]; - output_iterator iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+***1_00_0"); - assert(ios.width() == 0); - } - { - std::ios ios(0); - ios.imbue(std::locale(std::locale::classic(), new my_numpunct)); - long long v = -1000; - right(ios); - showpos(ios); - ios.width(10); - char str[50]; - output_iterator iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "***-1_00_0"); - assert(ios.width() == 0); - } - { - std::ios ios(0); - ios.imbue(std::locale(std::locale::classic(), new my_numpunct)); - long long v = -1000; - left(ios); - ios.width(10); - char str[50]; - output_iterator iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-1_00_0***"); - assert(ios.width() == 0); - } - { - std::ios ios(0); - ios.imbue(std::locale(std::locale::classic(), new my_numpunct)); - long long v = -1000; - internal(ios); - ios.width(10); - char str[50]; - output_iterator iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-***1_00_0"); - assert(ios.width() == 0); - } -} diff --git a/test/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_pointer.xfail.pass.cpp b/test/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_pointer.xfail.pass.cpp deleted file mode 100644 index c3769d89..00000000 --- a/test/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_pointer.xfail.pass.cpp +++ /dev/null @@ -1,43 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// class num_put - -// iter_type put(iter_type s, ios_base& iob, char_type fill, void* v) const; - -#include -#include -#include -#include -#include "iterators.h" - -typedef std::num_put > F; - -class my_facet - : public F -{ -public: - explicit my_facet(std::size_t refs = 0) - : F(refs) {} -}; - -int main() -{ - const my_facet f(1); - { - std::ios ios(0); - void* v = 0; - char str[50]; - output_iterator iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x0"); - } -} diff --git a/test/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_unsigned_long.pass.cpp b/test/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_unsigned_long.pass.cpp deleted file mode 100644 index 57fb2261..00000000 --- a/test/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_unsigned_long.pass.cpp +++ /dev/null @@ -1,374 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// class num_put - -// iter_type put(iter_type s, ios_base& iob, char_type fill, unsigned long v) const; - -#include -#include -#include -#include -#include "iterators.h" - -typedef std::num_put > F; - -class my_facet - : public F -{ -public: - explicit my_facet(std::size_t refs = 0) - : F(refs) {} -}; - -class my_numpunct - : public std::numpunct -{ -public: - my_numpunct() : std::numpunct() {} - -protected: - virtual char_type do_thousands_sep() const {return '_';} - virtual std::string do_grouping() const {return std::string("\1\2\3");} -}; - -int main() -{ - const my_facet f(1); - { - std::ios ios(0); - unsigned long v = 0; - char str[50]; - std::ios_base::iostate err = ios.goodbit; - output_iterator iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0"); - } - { - std::ios ios(0); - unsigned long v = 1; - char str[50]; - std::ios_base::iostate err = ios.goodbit; - output_iterator iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1"); - } - { - std::ios ios(0); - unsigned long v = -1; - char str[50]; - std::ios_base::iostate err = ios.goodbit; - output_iterator iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == (sizeof(unsigned long) == 4 ? "4294967295" : "18446744073709551615")); - } - { - std::ios ios(0); - unsigned long v = -1000; - char str[50]; - std::ios_base::iostate err = ios.goodbit; - output_iterator iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == (sizeof(unsigned long) == 4 ? "4294966296" : "18446744073709550616")); - } - { - std::ios ios(0); - unsigned long v = 1000; - char str[50]; - std::ios_base::iostate err = ios.goodbit; - output_iterator iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1000"); - } - { - std::ios ios(0); - showpos(ios); - unsigned long v = 1000; - char str[50]; - std::ios_base::iostate err = ios.goodbit; - output_iterator iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1000"); - } - { - std::ios ios(0); - oct(ios); - unsigned long v = 1000; - char str[50]; - std::ios_base::iostate err = ios.goodbit; - output_iterator iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1750"); - } - { - std::ios ios(0); - oct(ios); - showbase(ios); - unsigned long v = 1000; - char str[50]; - std::ios_base::iostate err = ios.goodbit; - output_iterator iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "01750"); - } - { - std::ios ios(0); - hex(ios); - unsigned long v = 1000; - char str[50]; - std::ios_base::iostate err = ios.goodbit; - output_iterator iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "3e8"); - } - { - std::ios ios(0); - hex(ios); - showbase(ios); - unsigned long v = 1000; - char str[50]; - std::ios_base::iostate err = ios.goodbit; - output_iterator iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x3e8"); - } - { - std::ios ios(0); - hex(ios); - showbase(ios); - uppercase(ios); - unsigned long v = 1000; - char str[50]; - std::ios_base::iostate err = ios.goodbit; - output_iterator iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0X3E8"); - } - { - std::ios ios(0); - ios.imbue(std::locale(std::locale::classic(), new my_numpunct)); - hex(ios); - showbase(ios); - uppercase(ios); - unsigned long v = 1000; - char str[50]; - std::ios_base::iostate err = ios.goodbit; - output_iterator iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0X3E_8"); - } - { - std::ios ios(0); - ios.imbue(std::locale(std::locale::classic(), new my_numpunct)); - hex(ios); - showbase(ios); - unsigned long v = 2147483647; - char str[50]; - std::ios_base::iostate err = ios.goodbit; - output_iterator iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x7f_fff_ff_f"); - } - { - std::ios ios(0); - ios.imbue(std::locale(std::locale::classic(), new my_numpunct)); - oct(ios); - unsigned long v = 0123467; - char str[50]; - std::ios_base::iostate err = ios.goodbit; - output_iterator iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "123_46_7"); - } - { - std::ios ios(0); - ios.imbue(std::locale(std::locale::classic(), new my_numpunct)); - oct(ios); - showbase(ios); - unsigned long v = 0123467; - char str[50]; - std::ios_base::iostate err = ios.goodbit; - output_iterator iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0_123_46_7"); - } - { - std::ios ios(0); - ios.imbue(std::locale(std::locale::classic(), new my_numpunct)); - oct(ios); - showbase(ios); - right(ios); - ios.width(15); - unsigned long v = 0123467; - char str[50]; - std::ios_base::iostate err = ios.goodbit; - output_iterator iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****0_123_46_7"); - } - { - std::ios ios(0); - ios.imbue(std::locale(std::locale::classic(), new my_numpunct)); - oct(ios); - showbase(ios); - left(ios); - ios.width(15); - unsigned long v = 0123467; - char str[50]; - std::ios_base::iostate err = ios.goodbit; - output_iterator iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0_123_46_7*****"); - } - { - std::ios ios(0); - ios.imbue(std::locale(std::locale::classic(), new my_numpunct)); - oct(ios); - showbase(ios); - internal(ios); - ios.width(15); - unsigned long v = 0123467; - char str[50]; - std::ios_base::iostate err = ios.goodbit; - output_iterator iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****0_123_46_7"); - assert(ios.width() == 0); - } - { - std::ios ios(0); - ios.imbue(std::locale(std::locale::classic(), new my_numpunct)); - hex(ios); - showbase(ios); - right(ios); - ios.width(15); - unsigned long v = 2147483647; - char str[50]; - std::ios_base::iostate err = ios.goodbit; - output_iterator iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**0x7f_fff_ff_f"); - } - { - std::ios ios(0); - ios.imbue(std::locale(std::locale::classic(), new my_numpunct)); - hex(ios); - showbase(ios); - left(ios); - ios.width(15); - unsigned long v = 2147483647; - char str[50]; - std::ios_base::iostate err = ios.goodbit; - output_iterator iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x7f_fff_ff_f**"); - } - { - std::ios ios(0); - ios.imbue(std::locale(std::locale::classic(), new my_numpunct)); - hex(ios); - showbase(ios); - internal(ios); - ios.width(15); - unsigned long v = 2147483647; - char str[50]; - std::ios_base::iostate err = ios.goodbit; - output_iterator iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x**7f_fff_ff_f"); - assert(ios.width() == 0); - } - { - std::ios ios(0); - ios.imbue(std::locale(std::locale::classic(), new my_numpunct)); - showpos(ios); - unsigned long v = 1000; - right(ios); - ios.width(10); - char str[50]; - std::ios_base::iostate err = ios.goodbit; - output_iterator iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "****1_00_0"); - assert(ios.width() == 0); - } - { - std::ios ios(0); - ios.imbue(std::locale(std::locale::classic(), new my_numpunct)); - showpos(ios); - unsigned long v = 1000; - left(ios); - ios.width(10); - char str[50]; - std::ios_base::iostate err = ios.goodbit; - output_iterator iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1_00_0****"); - assert(ios.width() == 0); - } - { - std::ios ios(0); - ios.imbue(std::locale(std::locale::classic(), new my_numpunct)); - showpos(ios); - unsigned long v = 1000; - internal(ios); - ios.width(10); - char str[50]; - std::ios_base::iostate err = ios.goodbit; - output_iterator iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "****1_00_0"); - assert(ios.width() == 0); - } - { - std::ios ios(0); - ios.imbue(std::locale(std::locale::classic(), new my_numpunct)); - unsigned long v = -1000; - right(ios); - showpos(ios); - ios.width(10); - char str[50]; - std::ios_base::iostate err = ios.goodbit; - output_iterator iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == (sizeof(unsigned long) == 4 ? "4_294_966_29_6" - : "18_446_744_073_709_550_61_6")); - assert(ios.width() == 0); - } - { - std::ios ios(0); - ios.imbue(std::locale(std::locale::classic(), new my_numpunct)); - unsigned long v = -1000; - left(ios); - ios.width(10); - char str[50]; - std::ios_base::iostate err = ios.goodbit; - output_iterator iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == (sizeof(unsigned long) == 4 ? "4_294_966_29_6" - : "18_446_744_073_709_550_61_6")); - assert(ios.width() == 0); - } - { - std::ios ios(0); - ios.imbue(std::locale(std::locale::classic(), new my_numpunct)); - unsigned long v = -1000; - internal(ios); - ios.width(10); - char str[50]; - std::ios_base::iostate err = ios.goodbit; - output_iterator iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == (sizeof(unsigned long) == 4 ? "4_294_966_29_6" - : "18_446_744_073_709_550_61_6")); - assert(ios.width() == 0); - } -} diff --git a/test/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_unsigned_long_long.pass.cpp b/test/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_unsigned_long_long.pass.cpp deleted file mode 100644 index ed1b25c7..00000000 --- a/test/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_unsigned_long_long.pass.cpp +++ /dev/null @@ -1,344 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// class num_put - -// iter_type put(iter_type s, ios_base& iob, char_type fill, unsigned long long v) const; - -#include -#include -#include -#include -#include "iterators.h" - -typedef std::num_put > F; - -class my_facet - : public F -{ -public: - explicit my_facet(std::size_t refs = 0) - : F(refs) {} -}; - -class my_numpunct - : public std::numpunct -{ -public: - my_numpunct() : std::numpunct() {} - -protected: - virtual char_type do_thousands_sep() const {return '_';} - virtual std::string do_grouping() const {return std::string("\1\2\3");} -}; - -int main() -{ - const my_facet f(1); - { - std::ios ios(0); - unsigned long long v = 0; - char str[50]; - output_iterator iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0"); - } - { - std::ios ios(0); - unsigned long long v = 1; - char str[50]; - output_iterator iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1"); - } - { - std::ios ios(0); - unsigned long long v = -1; - char str[50]; - output_iterator iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == (sizeof(unsigned long long) == 4 ? "4294967295" : "18446744073709551615")); - } - { - std::ios ios(0); - unsigned long long v = -1000; - char str[50]; - output_iterator iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "18446744073709550616"); - } - { - std::ios ios(0); - unsigned long long v = 1000; - char str[50]; - output_iterator iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1000"); - } - { - std::ios ios(0); - showpos(ios); - unsigned long long v = 1000; - char str[50]; - output_iterator iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1000"); - } - { - std::ios ios(0); - oct(ios); - unsigned long long v = 1000; - char str[50]; - output_iterator iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1750"); - } - { - std::ios ios(0); - oct(ios); - showbase(ios); - unsigned long long v = 1000; - char str[50]; - output_iterator iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "01750"); - } - { - std::ios ios(0); - hex(ios); - unsigned long long v = 1000; - char str[50]; - output_iterator iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "3e8"); - } - { - std::ios ios(0); - hex(ios); - showbase(ios); - unsigned long long v = 1000; - char str[50]; - output_iterator iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x3e8"); - } - { - std::ios ios(0); - hex(ios); - showbase(ios); - uppercase(ios); - unsigned long long v = 1000; - char str[50]; - output_iterator iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0X3E8"); - } - { - std::ios ios(0); - ios.imbue(std::locale(std::locale::classic(), new my_numpunct)); - hex(ios); - showbase(ios); - uppercase(ios); - unsigned long long v = 1000; - char str[50]; - output_iterator iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0X3E_8"); - } - { - std::ios ios(0); - ios.imbue(std::locale(std::locale::classic(), new my_numpunct)); - hex(ios); - showbase(ios); - unsigned long long v = 2147483647; - char str[50]; - output_iterator iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x7f_fff_ff_f"); - } - { - std::ios ios(0); - ios.imbue(std::locale(std::locale::classic(), new my_numpunct)); - oct(ios); - unsigned long long v = 0123467; - char str[50]; - output_iterator iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "123_46_7"); - } - { - std::ios ios(0); - ios.imbue(std::locale(std::locale::classic(), new my_numpunct)); - oct(ios); - showbase(ios); - unsigned long long v = 0123467; - char str[50]; - output_iterator iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0_123_46_7"); - } - { - std::ios ios(0); - ios.imbue(std::locale(std::locale::classic(), new my_numpunct)); - oct(ios); - showbase(ios); - right(ios); - ios.width(15); - unsigned long long v = 0123467; - char str[50]; - output_iterator iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****0_123_46_7"); - } - { - std::ios ios(0); - ios.imbue(std::locale(std::locale::classic(), new my_numpunct)); - oct(ios); - showbase(ios); - left(ios); - ios.width(15); - unsigned long long v = 0123467; - char str[50]; - output_iterator iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0_123_46_7*****"); - } - { - std::ios ios(0); - ios.imbue(std::locale(std::locale::classic(), new my_numpunct)); - oct(ios); - showbase(ios); - internal(ios); - ios.width(15); - unsigned long long v = 0123467; - char str[50]; - output_iterator iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****0_123_46_7"); - assert(ios.width() == 0); - } - { - std::ios ios(0); - ios.imbue(std::locale(std::locale::classic(), new my_numpunct)); - hex(ios); - showbase(ios); - right(ios); - ios.width(15); - unsigned long long v = 2147483647; - char str[50]; - output_iterator iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "**0x7f_fff_ff_f"); - } - { - std::ios ios(0); - ios.imbue(std::locale(std::locale::classic(), new my_numpunct)); - hex(ios); - showbase(ios); - left(ios); - ios.width(15); - unsigned long long v = 2147483647; - char str[50]; - output_iterator iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x7f_fff_ff_f**"); - } - { - std::ios ios(0); - ios.imbue(std::locale(std::locale::classic(), new my_numpunct)); - hex(ios); - showbase(ios); - internal(ios); - ios.width(15); - unsigned long long v = 2147483647; - char str[50]; - output_iterator iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x**7f_fff_ff_f"); - assert(ios.width() == 0); - } - { - std::ios ios(0); - ios.imbue(std::locale(std::locale::classic(), new my_numpunct)); - showpos(ios); - unsigned long long v = 1000; - right(ios); - ios.width(10); - char str[50]; - output_iterator iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "****1_00_0"); - assert(ios.width() == 0); - } - { - std::ios ios(0); - ios.imbue(std::locale(std::locale::classic(), new my_numpunct)); - showpos(ios); - unsigned long long v = 1000; - left(ios); - ios.width(10); - char str[50]; - output_iterator iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "1_00_0****"); - assert(ios.width() == 0); - } - { - std::ios ios(0); - ios.imbue(std::locale(std::locale::classic(), new my_numpunct)); - showpos(ios); - unsigned long long v = 1000; - internal(ios); - ios.width(10); - char str[50]; - output_iterator iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "****1_00_0"); - assert(ios.width() == 0); - } - { - std::ios ios(0); - ios.imbue(std::locale(std::locale::classic(), new my_numpunct)); - unsigned long long v = -1000; - right(ios); - showpos(ios); - ios.width(10); - char str[50]; - output_iterator iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "18_446_744_073_709_550_61_6"); - assert(ios.width() == 0); - } - { - std::ios ios(0); - ios.imbue(std::locale(std::locale::classic(), new my_numpunct)); - unsigned long long v = -1000; - left(ios); - ios.width(10); - char str[50]; - output_iterator iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "18_446_744_073_709_550_61_6"); - assert(ios.width() == 0); - } - { - std::ios ios(0); - ios.imbue(std::locale(std::locale::classic(), new my_numpunct)); - unsigned long long v = -1000; - internal(ios); - ios.width(10); - char str[50]; - output_iterator iter = f.put(output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "18_446_744_073_709_550_61_6"); - assert(ios.width() == 0); - } -} diff --git a/test/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.virtuals/tested_elsewhere.pass.cpp b/test/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.virtuals/tested_elsewhere.pass.cpp deleted file mode 100644 index b58f5c55..00000000 --- a/test/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.virtuals/tested_elsewhere.pass.cpp +++ /dev/null @@ -1,12 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -int main() -{ -} diff --git a/test/localization/locale.categories/category.numeric/locale.nm.put/types.pass.cpp b/test/localization/locale.categories/category.numeric/locale.nm.put/types.pass.cpp deleted file mode 100644 index f6f1e5c2..00000000 --- a/test/localization/locale.categories/category.numeric/locale.nm.put/types.pass.cpp +++ /dev/null @@ -1,32 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template > -// class num_put -// : public locale::facet -// { -// public: -// typedef charT char_type; -// typedef OutputIterator iter_type; - -#include -#include -#include - -int main() -{ - static_assert((std::is_base_of >::value), ""); - static_assert((std::is_base_of >::value), ""); - static_assert((std::is_same::char_type, char>::value), ""); - static_assert((std::is_same::char_type, wchar_t>::value), ""); - static_assert((std::is_same::iter_type, std::ostreambuf_iterator >::value), ""); - static_assert((std::is_same::iter_type, std::ostreambuf_iterator >::value), ""); -} diff --git a/test/localization/locale.categories/category.numeric/locale.num.get/ctor.pass.cpp b/test/localization/locale.categories/category.numeric/locale.num.get/ctor.pass.cpp deleted file mode 100644 index 71af9cdc..00000000 --- a/test/localization/locale.categories/category.numeric/locale.num.get/ctor.pass.cpp +++ /dev/null @@ -1,52 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// class num_get - -// explicit num_get(size_t refs = 0); - -#include -#include - -typedef std::num_get F; - -class my_facet - : public F -{ -public: - static int count; - - explicit my_facet(std::size_t refs = 0) - : F(refs) {++count;} - - ~my_facet() {--count;} -}; - -int my_facet::count = 0; - -int main() -{ - { - std::locale l(std::locale::classic(), new my_facet); - assert(my_facet::count == 1); - } - assert(my_facet::count == 0); - { - my_facet f(1); - assert(my_facet::count == 1); - { - std::locale l(std::locale::classic(), &f); - assert(my_facet::count == 1); - } - assert(my_facet::count == 1); - } - assert(my_facet::count == 0); -} diff --git a/test/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_bool.xfail.pass.cpp b/test/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_bool.xfail.pass.cpp deleted file mode 100644 index ea966234..00000000 --- a/test/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_bool.xfail.pass.cpp +++ /dev/null @@ -1,230 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// class num_get - -// iter_type get(iter_type in, iter_type end, ios_base&, -// ios_base::iostate& err, bool& v) const; - -#include -#include -#include -#include -#include "iterators.h" - -typedef std::num_get > F; - -class my_facet - : public F -{ -public: - explicit my_facet(std::size_t refs = 0) - : F(refs) {} -}; - -class p1 - : public std::numpunct -{ -public: - p1() : std::numpunct() {} - -protected: - virtual string_type do_truename() const {return "a";} - virtual string_type do_falsename() const {return "abb";} -}; - -class p2 - : public std::numpunct -{ -public: - p2() : std::numpunct() {} - -protected: - virtual string_type do_truename() const {return "a";} - virtual string_type do_falsename() const {return "ab";} -}; - -int main() -{ - const my_facet f(1); - std::ios ios(0); - { - const char str[] = "1"; - std::ios_base::iostate err = ios.goodbit; - bool b; - input_iterator iter = - f.get(input_iterator(str), - input_iterator(str+sizeof(str)), - ios, err, b); - assert(iter.base() == str+sizeof(str)-1); - assert(err == ios.goodbit); - assert(b == true); - } - { - const char str[] = "0"; - std::ios_base::iostate err = ios.goodbit; - bool b; - input_iterator iter = - f.get(input_iterator(str), - input_iterator(str+sizeof(str)), - ios, err, b); - assert(iter.base() == str+sizeof(str)-1); - assert(err == ios.goodbit); - assert(b == false); - } - { - const char str[] = "12"; - std::ios_base::iostate err = ios.goodbit; - bool b; - input_iterator iter = - f.get(input_iterator(str), - input_iterator(str+sizeof(str)), - ios, err, b); - assert(iter.base() == str+sizeof(str)-1); - assert(err == ios.failbit); - assert(b == true); - } - { - const char str[] = "*12"; - std::ios_base::iostate err = ios.goodbit; - bool b; - input_iterator iter = - f.get(input_iterator(str), - input_iterator(str+sizeof(str)), - ios, err, b); - assert(iter.base() == str+0); - assert(err == ios.failbit); - assert(b == false); - } - boolalpha(ios); - { - const char str[] = "1"; - std::ios_base::iostate err = ios.goodbit; - bool b; - input_iterator iter = - f.get(input_iterator(str), - input_iterator(str+sizeof(str)), - ios, err, b); - assert(iter.base() == str+0); - assert(err == ios.failbit); - assert(b == false); - } - { - const char str[] = "true"; - std::ios_base::iostate err = ios.goodbit; - bool b; - input_iterator iter = - f.get(input_iterator(str), - input_iterator(str+sizeof(str)), - ios, err, b); - assert(iter.base() == str+sizeof(str)-1); - assert(err == ios.goodbit); - assert(b == true); - } - { - const char str[] = "false"; - std::ios_base::iostate err = ios.goodbit; - bool b; - input_iterator iter = - f.get(input_iterator(str), - input_iterator(str+sizeof(str)), - ios, err, b); - assert(iter.base() == str+sizeof(str)-1); - assert(err == ios.goodbit); - assert(b == false); - } - ios.imbue(std::locale(ios.getloc(), new p1)); - { - const char str[] = "a"; - std::ios_base::iostate err = ios.goodbit; - bool b; - input_iterator iter = - f.get(input_iterator(str), - input_iterator(str+1), - ios, err, b); - assert(iter.base() == str+1); - assert(err == ios.eofbit); - assert(b == true); - } - { - const char str[] = "abc"; - std::ios_base::iostate err = ios.goodbit; - bool b; - input_iterator iter = - f.get(input_iterator(str), - input_iterator(str+3), - ios, err, b); - assert(iter.base() == str+2); - assert(err == ios.failbit); - assert(b == false); - } - { - const char str[] = "acc"; - std::ios_base::iostate err = ios.goodbit; - bool b; - input_iterator iter = - f.get(input_iterator(str), - input_iterator(str+3), - ios, err, b); - assert(iter.base() == str+1); - assert(err == ios.goodbit); - assert(b == true); - } - ios.imbue(std::locale(ios.getloc(), new p2)); - { - const char str[] = "a"; - std::ios_base::iostate err = ios.goodbit; - bool b; - input_iterator iter = - f.get(input_iterator(str), - input_iterator(str+1), - ios, err, b); - assert(iter.base() == str+1); - assert(err == ios.eofbit); - assert(b == true); - } - { - const char str[] = "ab"; - std::ios_base::iostate err = ios.goodbit; - bool b; - input_iterator iter = - f.get(input_iterator(str), - input_iterator(str+2), - ios, err, b); - assert(iter.base() == str+2); - assert(err == ios.eofbit); - assert(b == false); - } - { - const char str[] = "abc"; - std::ios_base::iostate err = ios.goodbit; - bool b; - input_iterator iter = - f.get(input_iterator(str), - input_iterator(str+3), - ios, err, b); - assert(iter.base() == str+2); - assert(err == ios.goodbit); - assert(b == false); - } - { - const char str[] = "ac"; - std::ios_base::iostate err = ios.goodbit; - bool b; - input_iterator iter = - f.get(input_iterator(str), - input_iterator(str+2), - ios, err, b); - assert(iter.base() == str+1); - assert(err == ios.goodbit); - assert(b == true); - } -} diff --git a/test/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_double.fail.cpp b/test/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_double.fail.cpp deleted file mode 100644 index cf30ea34..00000000 --- a/test/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_double.fail.cpp +++ /dev/null @@ -1,228 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// class num_get - -// iter_type get(iter_type in, iter_type end, ios_base&, -// ios_base::iostate& err, double& v) const; - -#include -#include -#include -#include -#include -#include "iterators.h" - -typedef std::num_get > F; - -class my_facet - : public F -{ -public: - explicit my_facet(std::size_t refs = 0) - : F(refs) {} -}; - -class my_numpunct - : public std::numpunct -{ -public: - my_numpunct() : std::numpunct() {} - -protected: - virtual char_type do_decimal_point() const {return ';';} - virtual char_type do_thousands_sep() const {return '_';} - virtual std::string do_grouping() const {return std::string("\1\2\3");} -}; - -int main() -{ - const my_facet f(1); - std::ios ios(0); - double v = -1; - { - const char str[] = "123"; - assert((ios.flags() & ios.basefield) == ios.dec); - assert(ios.getloc().name() == "C"); - std::ios_base::iostate err = ios.goodbit; - input_iterator iter = - f.get(input_iterator(str), - input_iterator(str+sizeof(str)), - ios, err, v); - assert(iter.base() == str+sizeof(str)-1); - assert(err == ios.goodbit); - assert(v == 123); - } - { - const char str[] = "-123"; - std::ios_base::iostate err = ios.goodbit; - input_iterator iter = - f.get(input_iterator(str), - input_iterator(str+sizeof(str)), - ios, err, v); - assert(iter.base() == str+sizeof(str)-1); - assert(err == ios.goodbit); - assert(v == -123); - } - { - const char str[] = "123.5"; - std::ios_base::iostate err = ios.goodbit; - input_iterator iter = - f.get(input_iterator(str), - input_iterator(str+sizeof(str)), - ios, err, v); - assert(iter.base() == str+sizeof(str)-1); - assert(err == ios.goodbit); - assert(v == 123.5); - } - { - const char str[] = "125e-1"; - hex(ios); - std::ios_base::iostate err = ios.goodbit; - input_iterator iter = - f.get(input_iterator(str), - input_iterator(str+sizeof(str)), - ios, err, v); - assert(iter.base() == str+sizeof(str)-1); - assert(err == ios.goodbit); - assert(v == 125e-1); - } - { - const char str[] = "0x125p-1"; - hex(ios); - std::ios_base::iostate err = ios.goodbit; - input_iterator iter = - f.get(input_iterator(str), - input_iterator(str+sizeof(str)), - ios, err, v); - assert(iter.base() == str+sizeof(str)-1); - assert(err == ios.goodbit); - assert(v == 0x125p-1); - } - { - const char str[] = "inf"; - hex(ios); - std::ios_base::iostate err = ios.goodbit; - input_iterator iter = - f.get(input_iterator(str), - input_iterator(str+sizeof(str)), - ios, err, v); - assert(iter.base() == str+sizeof(str)-1); - assert(err == ios.goodbit); - assert(v == INFINITY); - } - { - const char str[] = "INF"; - hex(ios); - std::ios_base::iostate err = ios.goodbit; - input_iterator iter = - f.get(input_iterator(str), - input_iterator(str+sizeof(str)), - ios, err, v); - assert(iter.base() == str+sizeof(str)-1); - assert(err == ios.goodbit); - assert(v == INFINITY); - } - { - const char str[] = "-inf"; - hex(ios); - std::ios_base::iostate err = ios.goodbit; - input_iterator iter = - f.get(input_iterator(str), - input_iterator(str+sizeof(str)), - ios, err, v); - assert(iter.base() == str+sizeof(str)-1); - assert(err == ios.goodbit); - assert(v == -INFINITY); - } - { - const char str[] = "-INF"; - hex(ios); - std::ios_base::iostate err = ios.goodbit; - input_iterator iter = - f.get(input_iterator(str), - input_iterator(str+sizeof(str)), - ios, err, v); - assert(iter.base() == str+sizeof(str)-1); - assert(err == ios.goodbit); - assert(v == -INFINITY); - } - { - const char str[] = "nan"; - hex(ios); - std::ios_base::iostate err = ios.goodbit; - input_iterator iter = - f.get(input_iterator(str), - input_iterator(str+sizeof(str)), - ios, err, v); - assert(iter.base() == str+sizeof(str)-1); - assert(err == ios.goodbit); - assert(std::isnan(v)); - } - { - const char str[] = "NAN"; - hex(ios); - std::ios_base::iostate err = ios.goodbit; - input_iterator iter = - f.get(input_iterator(str), - input_iterator(str+sizeof(str)), - ios, err, v); - assert(iter.base() == str+sizeof(str)-1); - assert(err == ios.goodbit); - assert(std::isnan(v)); - } - { - v = -1; - const char str[] = "123_456_78_9;125"; - std::ios_base::iostate err = ios.goodbit; - input_iterator iter = - f.get(input_iterator(str), - input_iterator(str+sizeof(str)), - ios, err, v); - assert(iter.base() == str+3); - assert(err == ios.goodbit); - assert(v == 123); - } - ios.imbue(std::locale(std::locale(), new my_numpunct)); - { - v = -1; - const char str[] = "123_456_78_9;125"; - std::ios_base::iostate err = ios.goodbit; - input_iterator iter = - f.get(input_iterator(str), - input_iterator(str+sizeof(str)), - ios, err, v); - assert(iter.base() == str+sizeof(str)-1); - assert(err == ios.goodbit); - assert(v == 123456789.125); - } - { - v = -1; - const char str[] = "1_2_3_4_5_6_7_8_9_0_1_2_3_4_5_6_7_8_9_0_1_2_3_4_5_6_7_8_9_0_" - "1_2_3_4_5_6_7_8_9_0_1_2_3_4_5_6_7_8_9_0_1_2_3_4_5_6_7_8_9_0_" - "1_2_3_4_5_6_7_8_9_0_1_2_3_4_5_6_7_8_9_0_1_2_3_4_5_6_7_8_9_0_" - "1_2_3_4_5_6_7_8_9_0_1_2_3_4_5_6_7_8_9_0_1_2_3_4_5_6_7_8_9_0_" - "1_2_3_4_5_6_7_8_9_0_1_2_3_4_5_6_7_8_9_0_1_2_3_4_5_6_7_8_9_0_" - "1_2_3_4_5_6_7_8_9_0_1_2_3_4_5_6_7_8_9_0_1_2_3_4_5_6_7_8_9_0_" - "1_2_3_4_5_6_7_8_9_0_1_2_3_4_5_6_7_8_9_0_1_2_3_4_5_6_7_8_9_0_" - "1_2_3_4_5_6_7_8_9_0_1_2_3_4_5_6_7_8_9_0_1_2_3_4_5_6_7_8_9_0_" - "1_2_3_4_5_6_7_8_9_0_1_2_3_4_5_6_7_8_9_0_1_2_3_4_5_6_7_8_9_0_" - "1_2_3_4_5_6_7_8_9_0_1_2_3_4_5_6_7_8_9_0_1_2_3_4_5_6_7_8_9_0_" - "1_2_3_4_5_6_7_8_9_0_1_2_3_4_5_6_7_8_9_0_1_2_3_4_5_6_7_8_9_0_"; - std::ios_base::iostate err = ios.goodbit; - input_iterator iter = - f.get(input_iterator(str), - input_iterator(str+sizeof(str)), - ios, err, v); - assert(iter.base() == str+sizeof(str)-1); - assert(err == ios.failbit); - } -} diff --git a/test/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_float.fail.cpp b/test/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_float.fail.cpp deleted file mode 100644 index 00f9400e..00000000 --- a/test/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_float.fail.cpp +++ /dev/null @@ -1,170 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// class num_get - -// iter_type get(iter_type in, iter_type end, ios_base&, -// ios_base::iostate& err, float& v) const; - -#include -#include -#include -#include -#include -#include "iterators.h" - -typedef std::num_get > F; - -class my_facet - : public F -{ -public: - explicit my_facet(std::size_t refs = 0) - : F(refs) {} -}; - -int main() -{ - const my_facet f(1); - std::ios ios(0); - float v = -1; - { - const char str[] = "123"; - assert((ios.flags() & ios.basefield) == ios.dec); - assert(ios.getloc().name() == "C"); - std::ios_base::iostate err = ios.goodbit; - input_iterator iter = - f.get(input_iterator(str), - input_iterator(str+sizeof(str)), - ios, err, v); - assert(iter.base() == str+sizeof(str)-1); - assert(err == ios.goodbit); - assert(v == 123); - } - { - const char str[] = "-123"; - std::ios_base::iostate err = ios.goodbit; - input_iterator iter = - f.get(input_iterator(str), - input_iterator(str+sizeof(str)), - ios, err, v); - assert(iter.base() == str+sizeof(str)-1); - assert(err == ios.goodbit); - assert(v == -123); - } - { - const char str[] = "123.5"; - std::ios_base::iostate err = ios.goodbit; - input_iterator iter = - f.get(input_iterator(str), - input_iterator(str+sizeof(str)), - ios, err, v); - assert(iter.base() == str+sizeof(str)-1); - assert(err == ios.goodbit); - assert(v == 123.5); - } - { - const char str[] = "125e-1"; - hex(ios); - std::ios_base::iostate err = ios.goodbit; - input_iterator iter = - f.get(input_iterator(str), - input_iterator(str+sizeof(str)), - ios, err, v); - assert(iter.base() == str+sizeof(str)-1); - assert(err == ios.goodbit); - assert(v == 125e-1); - } - { - const char str[] = "0x125p-1"; - hex(ios); - std::ios_base::iostate err = ios.goodbit; - input_iterator iter = - f.get(input_iterator(str), - input_iterator(str+sizeof(str)), - ios, err, v); - assert(iter.base() == str+sizeof(str)-1); - assert(err == ios.goodbit); - assert(v == 0x125p-1); - } - { - const char str[] = "inf"; - hex(ios); - std::ios_base::iostate err = ios.goodbit; - input_iterator iter = - f.get(input_iterator(str), - input_iterator(str+sizeof(str)), - ios, err, v); - assert(iter.base() == str+sizeof(str)-1); - assert(err == ios.goodbit); - assert(v == INFINITY); - } - { - const char str[] = "INF"; - hex(ios); - std::ios_base::iostate err = ios.goodbit; - input_iterator iter = - f.get(input_iterator(str), - input_iterator(str+sizeof(str)), - ios, err, v); - assert(iter.base() == str+sizeof(str)-1); - assert(err == ios.goodbit); - assert(v == INFINITY); - } - { - const char str[] = "-inf"; - hex(ios); - std::ios_base::iostate err = ios.goodbit; - input_iterator iter = - f.get(input_iterator(str), - input_iterator(str+sizeof(str)), - ios, err, v); - assert(iter.base() == str+sizeof(str)-1); - assert(err == ios.goodbit); - assert(v == -INFINITY); - } - { - const char str[] = "-INF"; - hex(ios); - std::ios_base::iostate err = ios.goodbit; - input_iterator iter = - f.get(input_iterator(str), - input_iterator(str+sizeof(str)), - ios, err, v); - assert(iter.base() == str+sizeof(str)-1); - assert(err == ios.goodbit); - assert(v == -INFINITY); - } - { - const char str[] = "nan"; - hex(ios); - std::ios_base::iostate err = ios.goodbit; - input_iterator iter = - f.get(input_iterator(str), - input_iterator(str+sizeof(str)), - ios, err, v); - assert(iter.base() == str+sizeof(str)-1); - assert(err == ios.goodbit); - assert(std::isnan(v)); - } - { - const char str[] = "NAN"; - hex(ios); - std::ios_base::iostate err = ios.goodbit; - input_iterator iter = - f.get(input_iterator(str), - input_iterator(str+sizeof(str)), - ios, err, v); - assert(iter.base() == str+sizeof(str)-1); - assert(err == ios.goodbit); - assert(std::isnan(v)); - } -} diff --git a/test/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_long.xfail.pass.cpp b/test/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_long.xfail.pass.cpp deleted file mode 100644 index 8bcaaa93..00000000 --- a/test/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_long.xfail.pass.cpp +++ /dev/null @@ -1,507 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// class num_get - -// iter_type get(iter_type in, iter_type end, ios_base&, -// ios_base::iostate& err, long& v) const; - -#include -#include -#include -#include -#include "iterators.h" - -typedef std::num_get > F; - -class my_facet - : public F -{ -public: - explicit my_facet(std::size_t refs = 0) - : F(refs) {} -}; - -class my_numpunct - : public std::numpunct -{ -public: - my_numpunct() : std::numpunct() {} - -protected: - virtual char_type do_thousands_sep() const {return '_';} - virtual std::string do_grouping() const {return std::string("\1\2\3");} -}; - -int main() -{ - const my_facet f(1); - std::ios ios(0); - long v = -1; - { - const char str[] = "123"; - assert((ios.flags() & ios.basefield) == ios.dec); - assert(ios.getloc().name() == "C"); - std::ios_base::iostate err = ios.goodbit; - input_iterator iter = - f.get(input_iterator(str), - input_iterator(str+sizeof(str)), - ios, err, v); - assert(iter.base() == str+3); - assert(err == ios.goodbit); - assert(v == 123); - } - { - const char str[] = "-123"; - assert((ios.flags() & ios.basefield) == ios.dec); - assert(ios.getloc().name() == "C"); - std::ios_base::iostate err = ios.goodbit; - input_iterator iter = - f.get(input_iterator(str), - input_iterator(str+sizeof(str)), - ios, err, v); - assert(iter.base() == str+4); - assert(err == ios.goodbit); - assert(v == -123); - } - { - const char str[] = "123"; - oct(ios); - std::ios_base::iostate err = ios.goodbit; - input_iterator iter = - f.get(input_iterator(str), - input_iterator(str+sizeof(str)), - ios, err, v); - assert(iter.base() == str+3); - assert(err == ios.goodbit); - assert(v == 83); - } - { - const char str[] = "123"; - hex(ios); - std::ios_base::iostate err = ios.goodbit; - input_iterator iter = - f.get(input_iterator(str), - input_iterator(str+sizeof(str)), - ios, err, v); - assert(iter.base() == str+3); - assert(err == ios.goodbit); - assert(v == 291); - } - { - const char str[] = "0x123"; - hex(ios); - std::ios_base::iostate err = ios.goodbit; - input_iterator iter = - f.get(input_iterator(str), - input_iterator(str+sizeof(str)), - ios, err, v); - assert(iter.base() == str+sizeof(str)-1); - assert(err == ios.goodbit); - assert(v == 291); - } - { - const char str[] = "123"; - ios.setf(0, ios.basefield); - std::ios_base::iostate err = ios.goodbit; - input_iterator iter = - f.get(input_iterator(str), - input_iterator(str+sizeof(str)), - ios, err, v); - assert(iter.base() == str+sizeof(str)-1); - assert(err == ios.goodbit); - assert(v == 123); - } - { - const char str[] = "0x123"; - ios.setf(0, ios.basefield); - std::ios_base::iostate err = ios.goodbit; - input_iterator iter = - f.get(input_iterator(str), - input_iterator(str+sizeof(str)), - ios, err, v); - assert(iter.base() == str+sizeof(str)-1); - assert(err == ios.goodbit); - assert(v == 291); - } - { - const char str[] = "0123"; - ios.setf(0, ios.basefield); - std::ios_base::iostate err = ios.goodbit; - input_iterator iter = - f.get(input_iterator(str), - input_iterator(str+sizeof(str)), - ios, err, v); - assert(iter.base() == str+sizeof(str)-1); - assert(err == ios.goodbit); - assert(v == 83); - } - dec(ios); - ios.imbue(std::locale(std::locale(), new my_numpunct)); - { - v = -1; - const char str[] = "123"; - std::ios_base::iostate err = ios.goodbit; - input_iterator iter = - f.get(input_iterator(str), - input_iterator(str+sizeof(str)), - ios, err, v); - assert(iter.base() == str+sizeof(str)-1); - assert(err == ios.failbit); - assert(v == 123); - } - { - v = -1; - const char str[] = "+1"; - std::ios_base::iostate err = ios.goodbit; - input_iterator iter = - f.get(input_iterator(str), - input_iterator(str+sizeof(str)), - ios, err, v); - assert(iter.base() == str+sizeof(str)-1); - assert(err == ios.goodbit); - assert(v == 1); - } - { - v = -1; - const char str[] = "+1_"; - std::ios_base::iostate err = ios.goodbit; - input_iterator iter = - f.get(input_iterator(str), - input_iterator(str+sizeof(str)), - ios, err, v); - assert(iter.base() == str+sizeof(str)-1); - assert(err == ios.failbit); - assert(v == 1); - } - { - v = -1; - const char str[] = "+_1"; - std::ios_base::iostate err = ios.goodbit; - input_iterator iter = - f.get(input_iterator(str), - input_iterator(str+sizeof(str)), - ios, err, v); - assert(iter.base() == str+sizeof(str)-1); - assert(err == ios.failbit); - assert(v == 1); - } - { - v = -1; - const char str[] = "_+1"; - std::ios_base::iostate err = ios.goodbit; - input_iterator iter = - f.get(input_iterator(str), - input_iterator(str+sizeof(str)), - ios, err, v); - assert(iter.base() == str+sizeof(str)-1); - assert(err == ios.failbit); - assert(v == 1); - } - { - v = -1; - const char str[] = "+1__"; - std::ios_base::iostate err = ios.goodbit; - input_iterator iter = - f.get(input_iterator(str), - input_iterator(str+sizeof(str)), - ios, err, v); - assert(iter.base() == str+sizeof(str)-1); - assert(err == ios.failbit); - assert(v == 1); - } - { - v = -1; - const char str[] = "+_1_"; - std::ios_base::iostate err = ios.goodbit; - input_iterator iter = - f.get(input_iterator(str), - input_iterator(str+sizeof(str)), - ios, err, v); - assert(iter.base() == str+sizeof(str)-1); - assert(err == ios.failbit); - assert(v == 1); - } - { - v = -1; - const char str[] = "_+1_"; - std::ios_base::iostate err = ios.goodbit; - input_iterator iter = - f.get(input_iterator(str), - input_iterator(str+sizeof(str)), - ios, err, v); - assert(iter.base() == str+sizeof(str)-1); - assert(err == ios.failbit); - assert(v == 1); - } - { - v = -1; - const char str[] = "+__1"; - std::ios_base::iostate err = ios.goodbit; - input_iterator iter = - f.get(input_iterator(str), - input_iterator(str+sizeof(str)), - ios, err, v); - assert(iter.base() == str+sizeof(str)-1); - assert(err == ios.failbit); - assert(v == 1); - } - { - v = -1; - const char str[] = "_+_1"; - std::ios_base::iostate err = ios.goodbit; - input_iterator iter = - f.get(input_iterator(str), - input_iterator(str+sizeof(str)), - ios, err, v); - assert(iter.base() == str+sizeof(str)-1); - assert(err == ios.failbit); - assert(v == 1); - } - { - v = -1; - const char str[] = "__+1"; - std::ios_base::iostate err = ios.goodbit; - input_iterator iter = - f.get(input_iterator(str), - input_iterator(str+sizeof(str)), - ios, err, v); - assert(iter.base() == str+sizeof(str)-1); - assert(err == ios.failbit); - assert(v == 1); - } - { - v = -1; - const char str[] = "+1_2"; - std::ios_base::iostate err = ios.goodbit; - input_iterator iter = - f.get(input_iterator(str), - input_iterator(str+sizeof(str)), - ios, err, v); - assert(iter.base() == str+sizeof(str)-1); - assert(err == ios.goodbit); - assert(v == 12); - } - { - v = -1; - const char str[] = "+12_"; - std::ios_base::iostate err = ios.goodbit; - input_iterator iter = - f.get(input_iterator(str), - input_iterator(str+sizeof(str)), - ios, err, v); - assert(iter.base() == str+sizeof(str)-1); - assert(err == ios.failbit); - assert(v == 12); - } - { - v = -1; - const char str[] = "+_12"; - std::ios_base::iostate err = ios.goodbit; - input_iterator iter = - f.get(input_iterator(str), - input_iterator(str+sizeof(str)), - ios, err, v); - assert(iter.base() == str+sizeof(str)-1); - assert(err == ios.failbit); - assert(v == 12); - } - { - v = -1; - const char str[] = "+1__2"; - std::ios_base::iostate err = ios.goodbit; - input_iterator iter = - f.get(input_iterator(str), - input_iterator(str+sizeof(str)), - ios, err, v); - assert(iter.base() == str+sizeof(str)-1); - assert(err == ios.failbit); - assert(v == 12); - } - { - v = -1; - const char str[] = "+12_3"; - std::ios_base::iostate err = ios.goodbit; - input_iterator iter = - f.get(input_iterator(str), - input_iterator(str+sizeof(str)), - ios, err, v); - assert(iter.base() == str+sizeof(str)-1); - assert(err == ios.goodbit); - assert(v == 123); - } - { - v = -1; - const char str[] = "+1_23"; - std::ios_base::iostate err = ios.goodbit; - input_iterator iter = - f.get(input_iterator(str), - input_iterator(str+sizeof(str)), - ios, err, v); - assert(iter.base() == str+sizeof(str)-1); - assert(err == ios.failbit); - assert(v == 123); - } - { - v = -1; - const char str[] = "+1_23_4"; - std::ios_base::iostate err = ios.goodbit; - input_iterator iter = - f.get(input_iterator(str), - input_iterator(str+sizeof(str)), - ios, err, v); - assert(iter.base() == str+sizeof(str)-1); - assert(err == ios.goodbit); - assert(v == 1234); - } - { - v = -1; - const char str[] = "+123_4"; - std::ios_base::iostate err = ios.goodbit; - input_iterator iter = - f.get(input_iterator(str), - input_iterator(str+sizeof(str)), - ios, err, v); - assert(iter.base() == str+sizeof(str)-1); - assert(err == ios.failbit); - assert(v == 1234); - } - { - v = -1; - const char str[] = "+12_34"; - std::ios_base::iostate err = ios.goodbit; - input_iterator iter = - f.get(input_iterator(str), - input_iterator(str+sizeof(str)), - ios, err, v); - assert(iter.base() == str+sizeof(str)-1); - assert(err == ios.failbit); - assert(v == 1234); - } - { - v = -1; - const char str[] = "+12_34_5"; - std::ios_base::iostate err = ios.goodbit; - input_iterator iter = - f.get(input_iterator(str), - input_iterator(str+sizeof(str)), - ios, err, v); - assert(iter.base() == str+sizeof(str)-1); - assert(err == ios.goodbit); - assert(v == 12345); - } - { - v = -1; - const char str[] = "+123_45_6"; - std::ios_base::iostate err = ios.goodbit; - input_iterator iter = - f.get(input_iterator(str), - input_iterator(str+sizeof(str)), - ios, err, v); - assert(iter.base() == str+sizeof(str)-1); - assert(err == ios.goodbit); - assert(v == 123456); - } - { - v = -1; - const char str[] = "+1_23_45_6"; - std::ios_base::iostate err = ios.goodbit; - input_iterator iter = - f.get(input_iterator(str), - input_iterator(str+sizeof(str)), - ios, err, v); - assert(iter.base() == str+sizeof(str)-1); - assert(err == ios.failbit); - assert(v == 123456); - } - { - v = -1; - const char str[] = "+1_234_56_7"; - std::ios_base::iostate err = ios.goodbit; - input_iterator iter = - f.get(input_iterator(str), - input_iterator(str+sizeof(str)), - ios, err, v); - assert(iter.base() == str+sizeof(str)-1); - assert(err == ios.goodbit); - assert(v == 1234567); - } - { - v = -1; - const char str[] = "+1_234_567_89_0"; - std::ios_base::iostate err = ios.goodbit; - input_iterator iter = - f.get(input_iterator(str), - input_iterator(str+sizeof(str)), - ios, err, v); - assert(iter.base() == str+sizeof(str)-1); - assert(err == ios.goodbit); - assert(v == 1234567890); - } - { - v = -1; - const char str[] = "-1_234_567_89_0"; - std::ios_base::iostate err = ios.goodbit; - input_iterator iter = - f.get(input_iterator(str), - input_iterator(str+sizeof(str)), - ios, err, v); - assert(iter.base() == str+sizeof(str)-1); - assert(err == ios.goodbit); - assert(v == -1234567890); - } - { - v = -1; - const char str[] = "1_234_567_89_0"; - std::ios_base::iostate err = ios.goodbit; - input_iterator iter = - f.get(input_iterator(str), - input_iterator(str+sizeof(str)), - ios, err, v); - assert(iter.base() == str+sizeof(str)-1); - assert(err == ios.goodbit); - assert(v == 1234567890); - } - { - v = -1; - const char str[] = "1234_567_89_0"; - std::ios_base::iostate err = ios.goodbit; - input_iterator iter = - f.get(input_iterator(str), - input_iterator(str+sizeof(str)), - ios, err, v); - assert(iter.base() == str+sizeof(str)-1); - assert(err == ios.failbit); - assert(v == 1234567890); - } - { - v = -1; - const char str[] = "1_2_3_4_5_6_7_8_9_0_1_2_3_4_5_6_7_8_9_0_1_2_3_4_5_6_7_8_9_0_" - "1_2_3_4_5_6_7_8_9_0_1_2_3_4_5_6_7_8_9_0_1_2_3_4_5_6_7_8_9_0_" - "1_2_3_4_5_6_7_8_9_0_1_2_3_4_5_6_7_8_9_0_1_2_3_4_5_6_7_8_9_0_" - "1_2_3_4_5_6_7_8_9_0_1_2_3_4_5_6_7_8_9_0_1_2_3_4_5_6_7_8_9_0_" - "1_2_3_4_5_6_7_8_9_0_1_2_3_4_5_6_7_8_9_0_1_2_3_4_5_6_7_8_9_0_" - "1_2_3_4_5_6_7_8_9_0_1_2_3_4_5_6_7_8_9_0_1_2_3_4_5_6_7_8_9_0_" - "1_2_3_4_5_6_7_8_9_0_1_2_3_4_5_6_7_8_9_0_1_2_3_4_5_6_7_8_9_0_" - "1_2_3_4_5_6_7_8_9_0_1_2_3_4_5_6_7_8_9_0_1_2_3_4_5_6_7_8_9_0_" - "1_2_3_4_5_6_7_8_9_0_1_2_3_4_5_6_7_8_9_0_1_2_3_4_5_6_7_8_9_0_" - "1_2_3_4_5_6_7_8_9_0_1_2_3_4_5_6_7_8_9_0_1_2_3_4_5_6_7_8_9_0_" - "1_2_3_4_5_6_7_8_9_0_1_2_3_4_5_6_7_8_9_0_1_2_3_4_5_6_7_8_9_0_"; - std::ios_base::iostate err = ios.goodbit; - input_iterator iter = - f.get(input_iterator(str), - input_iterator(str+sizeof(str)), - ios, err, v); - assert(iter.base() == str+sizeof(str)-1); - assert(err == ios.failbit); - assert(v == std::numeric_limits::max()); - } -} diff --git a/test/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_long_double.fail.cpp b/test/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_long_double.fail.cpp deleted file mode 100644 index 89019fe2..00000000 --- a/test/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_long_double.fail.cpp +++ /dev/null @@ -1,170 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// class num_get - -// iter_type get(iter_type in, iter_type end, ios_base&, -// ios_base::iostate& err, long double& v) const; - -#include -#include -#include -#include -#include -#include "iterators.h" - -typedef std::num_get > F; - -class my_facet - : public F -{ -public: - explicit my_facet(std::size_t refs = 0) - : F(refs) {} -}; - -int main() -{ - const my_facet f(1); - std::ios ios(0); - long double v = -1; - { - const char str[] = "123"; - assert((ios.flags() & ios.basefield) == ios.dec); - assert(ios.getloc().name() == "C"); - std::ios_base::iostate err = ios.goodbit; - input_iterator iter = - f.get(input_iterator(str), - input_iterator(str+sizeof(str)), - ios, err, v); - assert(iter.base() == str+sizeof(str)-1); - assert(err == ios.goodbit); - assert(v == 123); - } - { - const char str[] = "-123"; - std::ios_base::iostate err = ios.goodbit; - input_iterator iter = - f.get(input_iterator(str), - input_iterator(str+sizeof(str)), - ios, err, v); - assert(iter.base() == str+sizeof(str)-1); - assert(err == ios.goodbit); - assert(v == -123); - } - { - const char str[] = "123.5"; - std::ios_base::iostate err = ios.goodbit; - input_iterator iter = - f.get(input_iterator(str), - input_iterator(str+sizeof(str)), - ios, err, v); - assert(iter.base() == str+sizeof(str)-1); - assert(err == ios.goodbit); - assert(v == 123.5); - } - { - const char str[] = "125e-1"; - hex(ios); - std::ios_base::iostate err = ios.goodbit; - input_iterator iter = - f.get(input_iterator(str), - input_iterator(str+sizeof(str)), - ios, err, v); - assert(iter.base() == str+sizeof(str)-1); - assert(err == ios.goodbit); - assert(v == 125e-1); - } - { - const char str[] = "0x125p-1"; - hex(ios); - std::ios_base::iostate err = ios.goodbit; - input_iterator iter = - f.get(input_iterator(str), - input_iterator(str+sizeof(str)), - ios, err, v); - assert(iter.base() == str+sizeof(str)-1); - assert(err == ios.goodbit); - assert(v == 0x125p-1); - } - { - const char str[] = "inf"; - hex(ios); - std::ios_base::iostate err = ios.goodbit; - input_iterator iter = - f.get(input_iterator(str), - input_iterator(str+sizeof(str)), - ios, err, v); - assert(iter.base() == str+sizeof(str)-1); - assert(err == ios.goodbit); - assert(v == INFINITY); - } - { - const char str[] = "INF"; - hex(ios); - std::ios_base::iostate err = ios.goodbit; - input_iterator iter = - f.get(input_iterator(str), - input_iterator(str+sizeof(str)), - ios, err, v); - assert(iter.base() == str+sizeof(str)-1); - assert(err == ios.goodbit); - assert(v == INFINITY); - } - { - const char str[] = "-inf"; - hex(ios); - std::ios_base::iostate err = ios.goodbit; - input_iterator iter = - f.get(input_iterator(str), - input_iterator(str+sizeof(str)), - ios, err, v); - assert(iter.base() == str+sizeof(str)-1); - assert(err == ios.goodbit); - assert(v == -INFINITY); - } - { - const char str[] = "-INF"; - hex(ios); - std::ios_base::iostate err = ios.goodbit; - input_iterator iter = - f.get(input_iterator(str), - input_iterator(str+sizeof(str)), - ios, err, v); - assert(iter.base() == str+sizeof(str)-1); - assert(err == ios.goodbit); - assert(v == -INFINITY); - } - { - const char str[] = "nan"; - hex(ios); - std::ios_base::iostate err = ios.goodbit; - input_iterator iter = - f.get(input_iterator(str), - input_iterator(str+sizeof(str)), - ios, err, v); - assert(iter.base() == str+sizeof(str)-1); - assert(err == ios.goodbit); - assert(std::isnan(v)); - } - { - const char str[] = "NAN"; - hex(ios); - std::ios_base::iostate err = ios.goodbit; - input_iterator iter = - f.get(input_iterator(str), - input_iterator(str+sizeof(str)), - ios, err, v); - assert(iter.base() == str+sizeof(str)-1); - assert(err == ios.goodbit); - assert(std::isnan(v)); - } -} diff --git a/test/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_long_long.xfail.pass.cpp b/test/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_long_long.xfail.pass.cpp deleted file mode 100644 index 520ae0fb..00000000 --- a/test/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_long_long.xfail.pass.cpp +++ /dev/null @@ -1,105 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// class num_get - -// iter_type get(iter_type in, iter_type end, ios_base&, -// ios_base::iostate& err, long long& v) const; - -#include -#include -#include -#include -#include "iterators.h" - -typedef std::num_get > F; - -class my_facet - : public F -{ -public: - explicit my_facet(std::size_t refs = 0) - : F(refs) {} -}; - -class my_numpunct - : public std::numpunct -{ -public: - my_numpunct() : std::numpunct() {} - -protected: - virtual char_type do_thousands_sep() const {return '_';} - virtual std::string do_grouping() const {return std::string("\1\2\3");} -}; - -int main() -{ - const my_facet f(1); - std::ios ios(0); - long long v = -1; - { - const char str[] = "0"; - std::ios_base::iostate err = ios.goodbit; - input_iterator iter = - f.get(input_iterator(str), - input_iterator(str+sizeof(str)), - ios, err, v); - assert(iter.base() == str+sizeof(str)-1); - assert(err == ios.goodbit); - assert(v == 0); - } - { - const char str[] = "1"; - std::ios_base::iostate err = ios.goodbit; - input_iterator iter = - f.get(input_iterator(str), - input_iterator(str+sizeof(str)), - ios, err, v); - assert(iter.base() == str+sizeof(str)-1); - assert(err == ios.goodbit); - assert(v == 1); - } - { - const char str[] = "-1"; - std::ios_base::iostate err = ios.goodbit; - input_iterator iter = - f.get(input_iterator(str), - input_iterator(str+sizeof(str)), - ios, err, v); - assert(iter.base() == str+sizeof(str)-1); - assert(err == ios.goodbit); - assert(v == -1); - } - hex(ios); - { - const char str[] = "0x7FFFFFFFFFFFFFFF"; - std::ios_base::iostate err = ios.goodbit; - input_iterator iter = - f.get(input_iterator(str), - input_iterator(str+sizeof(str)), - ios, err, v); - assert(iter.base() == str+sizeof(str)-1); - assert(err == ios.goodbit); - assert(v == 0x7FFFFFFFFFFFFFFFLL); - } - { - const char str[] = "-0x8000000000000000"; - std::ios_base::iostate err = ios.goodbit; - input_iterator iter = - f.get(input_iterator(str), - input_iterator(str+sizeof(str)), - ios, err, v); - assert(iter.base() == str+sizeof(str)-1); - assert(err == ios.goodbit); - assert(v == 0x8000000000000000LL); - } -} diff --git a/test/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_pointer.pass.cpp b/test/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_pointer.pass.cpp deleted file mode 100644 index d4a9b811..00000000 --- a/test/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_pointer.pass.cpp +++ /dev/null @@ -1,61 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// class num_get - -// iter_type get(iter_type in, iter_type end, ios_base&, -// ios_base::iostate& err, void*& v) const; - -#include -#include -#include -#include -#include "iterators.h" - -typedef std::num_get > F; - -class my_facet - : public F -{ -public: - explicit my_facet(std::size_t refs = 0) - : F(refs) {} -}; - -int main() -{ - const my_facet f(1); - std::ios ios(0); - { - const char str[] = "0x0"; - std::ios_base::iostate err = ios.goodbit; - void* p; - input_iterator iter = - f.get(input_iterator(str), - input_iterator(str+sizeof(str)), - ios, err, p); - assert(iter.base() == str+sizeof(str)-1); - assert(err == ios.goodbit); - assert(p == 0); - } - { - const char str[] = "0x73"; - std::ios_base::iostate err = ios.goodbit; - void* p; - input_iterator iter = - f.get(input_iterator(str), - input_iterator(str+sizeof(str)), - ios, err, p); - assert(iter.base() == str+sizeof(str)-1); - assert(err == ios.goodbit); - assert(p == (void*)0x73); - } -} diff --git a/test/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_unsigned_int.xfail.pass.cpp b/test/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_unsigned_int.xfail.pass.cpp deleted file mode 100644 index 327000a6..00000000 --- a/test/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_unsigned_int.xfail.pass.cpp +++ /dev/null @@ -1,83 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// class num_get - -// iter_type get(iter_type in, iter_type end, ios_base&, -// ios_base::iostate& err, unsigned int& v) const; - -#include -#include -#include -#include -#include "iterators.h" - -typedef std::num_get > F; - -class my_facet - : public F -{ -public: - explicit my_facet(std::size_t refs = 0) - : F(refs) {} -}; - -class my_numpunct - : public std::numpunct -{ -public: - my_numpunct() : std::numpunct() {} - -protected: - virtual char_type do_thousands_sep() const {return '_';} - virtual std::string do_grouping() const {return std::string("\1\2\3");} -}; - -int main() -{ - const my_facet f(1); - std::ios ios(0); - unsigned int v = -1; - { - const char str[] = "0"; - std::ios_base::iostate err = ios.goodbit; - input_iterator iter = - f.get(input_iterator(str), - input_iterator(str+sizeof(str)), - ios, err, v); - assert(iter.base() == str+sizeof(str)-1); - assert(err == ios.goodbit); - assert(v == 0); - } - { - const char str[] = "1"; - std::ios_base::iostate err = ios.goodbit; - input_iterator iter = - f.get(input_iterator(str), - input_iterator(str+sizeof(str)), - ios, err, v); - assert(iter.base() == str+sizeof(str)-1); - assert(err == ios.goodbit); - assert(v == 1); - } - hex(ios); - { - const char str[] = "0xFFFFFFFF"; - std::ios_base::iostate err = ios.goodbit; - input_iterator iter = - f.get(input_iterator(str), - input_iterator(str+sizeof(str)), - ios, err, v); - assert(iter.base() == str+sizeof(str)-1); - assert(err == ios.goodbit); - assert(v == 0xFFFFFFFF); - } -} diff --git a/test/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_unsigned_long.xfail.pass.cpp b/test/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_unsigned_long.xfail.pass.cpp deleted file mode 100644 index b3f74a9c..00000000 --- a/test/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_unsigned_long.xfail.pass.cpp +++ /dev/null @@ -1,83 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// class num_get - -// iter_type get(iter_type in, iter_type end, ios_base&, -// ios_base::iostate& err, unsigned long& v) const; - -#include -#include -#include -#include -#include "iterators.h" - -typedef std::num_get > F; - -class my_facet - : public F -{ -public: - explicit my_facet(std::size_t refs = 0) - : F(refs) {} -}; - -class my_numpunct - : public std::numpunct -{ -public: - my_numpunct() : std::numpunct() {} - -protected: - virtual char_type do_thousands_sep() const {return '_';} - virtual std::string do_grouping() const {return std::string("\1\2\3");} -}; - -int main() -{ - const my_facet f(1); - std::ios ios(0); - unsigned long v = -1; - { - const char str[] = "0"; - std::ios_base::iostate err = ios.goodbit; - input_iterator iter = - f.get(input_iterator(str), - input_iterator(str+sizeof(str)), - ios, err, v); - assert(iter.base() == str+sizeof(str)-1); - assert(err == ios.goodbit); - assert(v == 0); - } - { - const char str[] = "1"; - std::ios_base::iostate err = ios.goodbit; - input_iterator iter = - f.get(input_iterator(str), - input_iterator(str+sizeof(str)), - ios, err, v); - assert(iter.base() == str+sizeof(str)-1); - assert(err == ios.goodbit); - assert(v == 1); - } - hex(ios); - { - const char str[] = "0xFFFFFFFF"; - std::ios_base::iostate err = ios.goodbit; - input_iterator iter = - f.get(input_iterator(str), - input_iterator(str+sizeof(str)), - ios, err, v); - assert(iter.base() == str+sizeof(str)-1); - assert(err == ios.goodbit); - assert(v == 0xFFFFFFFF); - } -} diff --git a/test/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_unsigned_long_long.xfail.pass.cpp b/test/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_unsigned_long_long.xfail.pass.cpp deleted file mode 100644 index f6ba0b15..00000000 --- a/test/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_unsigned_long_long.xfail.pass.cpp +++ /dev/null @@ -1,83 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// class num_get - -// iter_type get(iter_type in, iter_type end, ios_base&, -// ios_base::iostate& err, unsigned long long& v) const; - -#include -#include -#include -#include -#include "iterators.h" - -typedef std::num_get > F; - -class my_facet - : public F -{ -public: - explicit my_facet(std::size_t refs = 0) - : F(refs) {} -}; - -class my_numpunct - : public std::numpunct -{ -public: - my_numpunct() : std::numpunct() {} - -protected: - virtual char_type do_thousands_sep() const {return '_';} - virtual std::string do_grouping() const {return std::string("\1\2\3");} -}; - -int main() -{ - const my_facet f(1); - std::ios ios(0); - unsigned long long v = -1; - { - const char str[] = "0"; - std::ios_base::iostate err = ios.goodbit; - input_iterator iter = - f.get(input_iterator(str), - input_iterator(str+sizeof(str)), - ios, err, v); - assert(iter.base() == str+sizeof(str)-1); - assert(err == ios.goodbit); - assert(v == 0); - } - { - const char str[] = "1"; - std::ios_base::iostate err = ios.goodbit; - input_iterator iter = - f.get(input_iterator(str), - input_iterator(str+sizeof(str)), - ios, err, v); - assert(iter.base() == str+sizeof(str)-1); - assert(err == ios.goodbit); - assert(v == 1); - } - hex(ios); - { - const char str[] = "0xFFFFFFFFFFFFFFFF"; - std::ios_base::iostate err = ios.goodbit; - input_iterator iter = - f.get(input_iterator(str), - input_iterator(str+sizeof(str)), - ios, err, v); - assert(iter.base() == str+sizeof(str)-1); - assert(err == ios.goodbit); - assert(v == 0xFFFFFFFFFFFFFFFFULL); - } -} diff --git a/test/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_unsigned_short.xfail.pass.cpp b/test/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_unsigned_short.xfail.pass.cpp deleted file mode 100644 index f7bb8c3c..00000000 --- a/test/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_unsigned_short.xfail.pass.cpp +++ /dev/null @@ -1,83 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// class num_get - -// iter_type get(iter_type in, iter_type end, ios_base&, -// ios_base::iostate& err, unsigned short& v) const; - -#include -#include -#include -#include -#include "iterators.h" - -typedef std::num_get > F; - -class my_facet - : public F -{ -public: - explicit my_facet(std::size_t refs = 0) - : F(refs) {} -}; - -class my_numpunct - : public std::numpunct -{ -public: - my_numpunct() : std::numpunct() {} - -protected: - virtual char_type do_thousands_sep() const {return '_';} - virtual std::string do_grouping() const {return std::string("\1\2\3");} -}; - -int main() -{ - const my_facet f(1); - std::ios ios(0); - unsigned short v = -1; - { - const char str[] = "0"; - std::ios_base::iostate err = ios.goodbit; - input_iterator iter = - f.get(input_iterator(str), - input_iterator(str+sizeof(str)), - ios, err, v); - assert(iter.base() == str+sizeof(str)-1); - assert(err == ios.goodbit); - assert(v == 0); - } - { - const char str[] = "1"; - std::ios_base::iostate err = ios.goodbit; - input_iterator iter = - f.get(input_iterator(str), - input_iterator(str+sizeof(str)), - ios, err, v); - assert(iter.base() == str+sizeof(str)-1); - assert(err == ios.goodbit); - assert(v == 1); - } - hex(ios); - { - const char str[] = "0xFFFF"; - std::ios_base::iostate err = ios.goodbit; - input_iterator iter = - f.get(input_iterator(str), - input_iterator(str+sizeof(str)), - ios, err, v); - assert(iter.base() == str+sizeof(str)-1); - assert(err == ios.goodbit); - assert(v == 0xFFFF); - } -} diff --git a/test/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/iterators.h b/test/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/iterators.h deleted file mode 100644 index bbdeede9..00000000 --- a/test/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/iterators.h +++ /dev/null @@ -1,251 +0,0 @@ -#ifndef ITERATORS_H -#define ITERATORS_H - -#include - -template -class input_iterator -{ - It it_; - - template friend class input_iterator; -public: - typedef std::input_iterator_tag iterator_category; - typedef typename std::iterator_traits::value_type value_type; - typedef typename std::iterator_traits::difference_type difference_type; - typedef It pointer; - typedef typename std::iterator_traits::reference reference; - - It base() const {return it_;} - - input_iterator() : it_() {} - explicit input_iterator(It it) : it_(it) {} - template - input_iterator(const input_iterator& u) :it_(u.it_) {} - - reference operator*() const {return *it_;} - pointer operator->() const {return it_;} - - input_iterator& operator++() {++it_; return *this;} - input_iterator operator++(int) - {input_iterator tmp(*this); ++(*this); return tmp;} - - friend bool operator==(const input_iterator& x, const input_iterator& y) - {return x.it_ == y.it_;} - friend bool operator!=(const input_iterator& x, const input_iterator& y) - {return !(x == y);} -}; - -template -inline -bool -operator==(const input_iterator& x, const input_iterator& y) -{ - return x.base() == y.base(); -} - -template -inline -bool -operator!=(const input_iterator& x, const input_iterator& y) -{ - return !(x == y); -} - -template -class forward_iterator -{ - It it_; - - template friend class forward_iterator; -public: - typedef std::forward_iterator_tag iterator_category; - typedef typename std::iterator_traits::value_type value_type; - typedef typename std::iterator_traits::difference_type difference_type; - typedef It pointer; - typedef typename std::iterator_traits::reference reference; - - It base() const {return it_;} - - forward_iterator() : it_() {} - explicit forward_iterator(It it) : it_(it) {} - template - forward_iterator(const forward_iterator& u) :it_(u.it_) {} - - reference operator*() const {return *it_;} - pointer operator->() const {return it_;} - - forward_iterator& operator++() {++it_; return *this;} - forward_iterator operator++(int) - {forward_iterator tmp(*this); ++(*this); return tmp;} - - friend bool operator==(const forward_iterator& x, const forward_iterator& y) - {return x.it_ == y.it_;} - friend bool operator!=(const forward_iterator& x, const forward_iterator& y) - {return !(x == y);} -}; - -template -inline -bool -operator==(const forward_iterator& x, const forward_iterator& y) -{ - return x.base() == y.base(); -} - -template -inline -bool -operator!=(const forward_iterator& x, const forward_iterator& y) -{ - return !(x == y); -} - -template -class bidirectional_iterator -{ - It it_; - - template friend class bidirectional_iterator; -public: - typedef std::bidirectional_iterator_tag iterator_category; - typedef typename std::iterator_traits::value_type value_type; - typedef typename std::iterator_traits::difference_type difference_type; - typedef It pointer; - typedef typename std::iterator_traits::reference reference; - - It base() const {return it_;} - - bidirectional_iterator() : it_() {} - explicit bidirectional_iterator(It it) : it_(it) {} - template - bidirectional_iterator(const bidirectional_iterator& u) :it_(u.it_) {} - - reference operator*() const {return *it_;} - pointer operator->() const {return it_;} - - bidirectional_iterator& operator++() {++it_; return *this;} - bidirectional_iterator operator++(int) - {bidirectional_iterator tmp(*this); ++(*this); return tmp;} - - bidirectional_iterator& operator--() {--it_; return *this;} - bidirectional_iterator operator--(int) - {bidirectional_iterator tmp(*this); --(*this); return tmp;} -}; - -template -inline -bool -operator==(const bidirectional_iterator& x, const bidirectional_iterator& y) -{ - return x.base() == y.base(); -} - -template -inline -bool -operator!=(const bidirectional_iterator& x, const bidirectional_iterator& y) -{ - return !(x == y); -} - -template -class random_access_iterator -{ - It it_; - - template friend class random_access_iterator; -public: - typedef std::random_access_iterator_tag iterator_category; - typedef typename std::iterator_traits::value_type value_type; - typedef typename std::iterator_traits::difference_type difference_type; - typedef It pointer; - typedef typename std::iterator_traits::reference reference; - - It base() const {return it_;} - - random_access_iterator() : it_() {} - explicit random_access_iterator(It it) : it_(it) {} - template - random_access_iterator(const random_access_iterator& u) :it_(u.it_) {} - - reference operator*() const {return *it_;} - pointer operator->() const {return it_;} - - random_access_iterator& operator++() {++it_; return *this;} - random_access_iterator operator++(int) - {random_access_iterator tmp(*this); ++(*this); return tmp;} - - random_access_iterator& operator--() {--it_; return *this;} - random_access_iterator operator--(int) - {random_access_iterator tmp(*this); --(*this); return tmp;} - - random_access_iterator& operator+=(difference_type n) {it_ += n; return *this;} - random_access_iterator operator+(difference_type n) const - {random_access_iterator tmp(*this); tmp += n; return tmp;} - friend random_access_iterator operator+(difference_type n, random_access_iterator x) - {x += n; return x;} - random_access_iterator& operator-=(difference_type n) {return *this += -n;} - random_access_iterator operator-(difference_type n) const - {random_access_iterator tmp(*this); tmp -= n; return tmp;} - - reference operator[](difference_type n) const {return it_[n];} -}; - -template -inline -bool -operator==(const random_access_iterator& x, const random_access_iterator& y) -{ - return x.base() == y.base(); -} - -template -inline -bool -operator!=(const random_access_iterator& x, const random_access_iterator& y) -{ - return !(x == y); -} - -template -inline -bool -operator<(const random_access_iterator& x, const random_access_iterator& y) -{ - return x.base() < y.base(); -} - -template -inline -bool -operator<=(const random_access_iterator& x, const random_access_iterator& y) -{ - return !(y < x); -} - -template -inline -bool -operator>(const random_access_iterator& x, const random_access_iterator& y) -{ - return y < x; -} - -template -inline -bool -operator>=(const random_access_iterator& x, const random_access_iterator& y) -{ - return !(x < y); -} - -template -inline -typename std::iterator_traits::difference_type -operator-(const random_access_iterator& x, const random_access_iterator& y) -{ - return x.base() - y.base(); -} - -#endif // ITERATORS_H diff --git a/test/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/test_min_max.xfail.pass.cpp b/test/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/test_min_max.xfail.pass.cpp deleted file mode 100644 index c60ecc52..00000000 --- a/test/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/test_min_max.xfail.pass.cpp +++ /dev/null @@ -1,53 +0,0 @@ -#include -#include -#include -#include -#include - -using namespace std; - -template -void check_limits() -{ - T minv = numeric_limits::min(); - T maxv = numeric_limits::max(); - - ostringstream miniss, maxiss; - assert(miniss << minv); - assert(maxiss << maxv); - std::string mins = miniss.str(); - std::string maxs = maxiss.str(); - - istringstream maxoss(maxs), minoss(mins); - - T new_minv, new_maxv; - assert(maxoss >> new_maxv); - assert(minoss >> new_minv); - - assert(new_minv == minv); - assert(new_maxv == maxv); - - if(mins == "0") - mins = "-1"; - else - mins[mins.size() - 1]++; - - maxs[maxs.size() - 1]++; - - istringstream maxoss2(maxs), minoss2(mins); - - assert(! (maxoss2 >> new_maxv)); - assert(! (minoss2 >> new_minv)); -} - -int main(void) -{ - check_limits(); - check_limits(); - check_limits(); - check_limits(); - check_limits(); - check_limits(); - check_limits(); - check_limits(); -} diff --git a/test/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.virtuals/tested_elsewhere.pass.cpp b/test/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.virtuals/tested_elsewhere.pass.cpp deleted file mode 100644 index b58f5c55..00000000 --- a/test/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.virtuals/tested_elsewhere.pass.cpp +++ /dev/null @@ -1,12 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -int main() -{ -} diff --git a/test/localization/locale.categories/category.numeric/locale.num.get/types.pass.cpp b/test/localization/locale.categories/category.numeric/locale.num.get/types.pass.cpp deleted file mode 100644 index b87b4b99..00000000 --- a/test/localization/locale.categories/category.numeric/locale.num.get/types.pass.cpp +++ /dev/null @@ -1,32 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template > -// class num_get -// : public locale::facet -// { -// public: -// typedef charT char_type; -// typedef InputIterator iter_type; - -#include -#include -#include - -int main() -{ - static_assert((std::is_base_of >::value), ""); - static_assert((std::is_base_of >::value), ""); - static_assert((std::is_same::char_type, char>::value), ""); - static_assert((std::is_same::char_type, wchar_t>::value), ""); - static_assert((std::is_same::iter_type, std::istreambuf_iterator >::value), ""); - static_assert((std::is_same::iter_type, std::istreambuf_iterator >::value), ""); -} diff --git a/test/localization/locale.categories/category.numeric/nothing_to_do.pass.cpp b/test/localization/locale.categories/category.numeric/nothing_to_do.pass.cpp deleted file mode 100644 index b58f5c55..00000000 --- a/test/localization/locale.categories/category.numeric/nothing_to_do.pass.cpp +++ /dev/null @@ -1,12 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -int main() -{ -} diff --git a/test/localization/locale.categories/category.time/locale.time.get.byname/date_order.xfail.pass.cpp b/test/localization/locale.categories/category.time/locale.time.get.byname/date_order.xfail.pass.cpp deleted file mode 100644 index 5c34b0ed..00000000 --- a/test/localization/locale.categories/category.time/locale.time.get.byname/date_order.xfail.pass.cpp +++ /dev/null @@ -1,48 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// class time_get_byname - -// dateorder date_order() const; - -#include -#include -#include "iterators.h" - -typedef std::time_get_byname > F; - -class my_facet - : public F -{ -public: - explicit my_facet(const std::string& nm, std::size_t refs = 0) - : F(nm, refs) {} -}; - -int main() -{ - { - const my_facet f("en_US", 1); - assert(f.date_order() == std::time_base::mdy); - } - { - const my_facet f("fr_FR", 1); - assert(f.date_order() == std::time_base::dmy); - } - { - const my_facet f("ru_RU", 1); - assert(f.date_order() == std::time_base::dmy); - } - { - const my_facet f("zh_CN", 1); - assert(f.date_order() == std::time_base::ymd); - } -} diff --git a/test/localization/locale.categories/category.time/locale.time.get.byname/date_order_wide.xfail.pass.cpp b/test/localization/locale.categories/category.time/locale.time.get.byname/date_order_wide.xfail.pass.cpp deleted file mode 100644 index f02e34b0..00000000 --- a/test/localization/locale.categories/category.time/locale.time.get.byname/date_order_wide.xfail.pass.cpp +++ /dev/null @@ -1,48 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// class time_get_byname - -// dateorder date_order() const; - -#include -#include -#include "iterators.h" - -typedef std::time_get_byname > F; - -class my_facet - : public F -{ -public: - explicit my_facet(const std::string& nm, std::size_t refs = 0) - : F(nm, refs) {} -}; - -int main() -{ - { - const my_facet f("en_US", 1); - assert(f.date_order() == std::time_base::mdy); - } - { - const my_facet f("fr_FR", 1); - assert(f.date_order() == std::time_base::dmy); - } - { - const my_facet f("ru_RU", 1); - assert(f.date_order() == std::time_base::dmy); - } - { - const my_facet f("zh_CN", 1); - assert(f.date_order() == std::time_base::ymd); - } -} diff --git a/test/localization/locale.categories/category.time/locale.time.get.byname/get_date.xfail.pass.cpp b/test/localization/locale.categories/category.time/locale.time.get.byname/get_date.xfail.pass.cpp deleted file mode 100644 index 0dbf9dae..00000000 --- a/test/localization/locale.categories/category.time/locale.time.get.byname/get_date.xfail.pass.cpp +++ /dev/null @@ -1,87 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// class time_get_byname - -// iter_type -// get_date(iter_type s, iter_type end, ios_base& str, -// ios_base::iostate& err, tm* t) const; - -#include -#include -#include "iterators.h" - -typedef input_iterator I; - -typedef std::time_get_byname F; - -class my_facet - : public F -{ -public: - explicit my_facet(const std::string& nm, std::size_t refs = 0) - : F(nm, refs) {} -}; - -int main() -{ - std::ios ios(0); - std::ios_base::iostate err; - std::tm t; - { - const my_facet f("en_US", 1); - const char in[] = "06/10/2009"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_date(I(in), I(in+sizeof(in)/sizeof(in[0])-1), ios, err, &t); - assert(i.base() == in+sizeof(in)/sizeof(in[0])-1); - assert(t.tm_mon == 5); - assert(t.tm_mday == 10); - assert(t.tm_year == 109); - assert(err == std::ios_base::eofbit); - } - { - const my_facet f("fr_FR", 1); - const char in[] = "10.06.2009"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_date(I(in), I(in+sizeof(in)/sizeof(in[0])-1), ios, err, &t); - assert(i.base() == in+sizeof(in)/sizeof(in[0])-1); - assert(t.tm_mon == 5); - assert(t.tm_mday == 10); - assert(t.tm_year == 109); - assert(err == std::ios_base::eofbit); - } - { - const my_facet f("ru_RU", 1); - const char in[] = "10.06.2009"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_date(I(in), I(in+sizeof(in)/sizeof(in[0])-1), ios, err, &t); - assert(i.base() == in+sizeof(in)/sizeof(in[0])-1); - assert(t.tm_mon == 5); - assert(t.tm_mday == 10); - assert(t.tm_year == 109); - assert(err == std::ios_base::eofbit); - } - { - const my_facet f("zh_CN", 1); - const char in[] = "2009/06/10"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_date(I(in), I(in+sizeof(in)/sizeof(in[0])-1), ios, err, &t); - assert(i.base() == in+sizeof(in)/sizeof(in[0])-1); - assert(t.tm_mon == 5); - assert(t.tm_mday == 10); - assert(t.tm_year == 109); - assert(err == std::ios_base::eofbit); - } -} diff --git a/test/localization/locale.categories/category.time/locale.time.get.byname/get_date_wide.xfail.pass.cpp b/test/localization/locale.categories/category.time/locale.time.get.byname/get_date_wide.xfail.pass.cpp deleted file mode 100644 index 29e35efc..00000000 --- a/test/localization/locale.categories/category.time/locale.time.get.byname/get_date_wide.xfail.pass.cpp +++ /dev/null @@ -1,87 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// class time_get_byname - -// iter_type -// get_date(iter_type s, iter_type end, ios_base& str, -// ios_base::iostate& err, tm* t) const; - -#include -#include -#include "iterators.h" - -typedef input_iterator I; - -typedef std::time_get_byname F; - -class my_facet - : public F -{ -public: - explicit my_facet(const std::string& nm, std::size_t refs = 0) - : F(nm, refs) {} -}; - -int main() -{ - std::ios ios(0); - std::ios_base::iostate err; - std::tm t; - { - const my_facet f("en_US", 1); - const wchar_t in[] = L"06/10/2009"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_date(I(in), I(in+sizeof(in)/sizeof(in[0])-1), ios, err, &t); - assert(i.base() == in+sizeof(in)/sizeof(in[0])-1); - assert(t.tm_mon == 5); - assert(t.tm_mday == 10); - assert(t.tm_year == 109); - assert(err == std::ios_base::eofbit); - } - { - const my_facet f("fr_FR", 1); - const wchar_t in[] = L"10.06.2009"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_date(I(in), I(in+sizeof(in)/sizeof(in[0])-1), ios, err, &t); - assert(i.base() == in+sizeof(in)/sizeof(in[0])-1); - assert(t.tm_mon == 5); - assert(t.tm_mday == 10); - assert(t.tm_year == 109); - assert(err == std::ios_base::eofbit); - } - { - const my_facet f("ru_RU", 1); - const wchar_t in[] = L"10.06.2009"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_date(I(in), I(in+sizeof(in)/sizeof(in[0])-1), ios, err, &t); - assert(i.base() == in+sizeof(in)/sizeof(in[0])-1); - assert(t.tm_mon == 5); - assert(t.tm_mday == 10); - assert(t.tm_year == 109); - assert(err == std::ios_base::eofbit); - } - { - const my_facet f("zh_CN", 1); - const wchar_t in[] = L"2009/06/10"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_date(I(in), I(in+sizeof(in)/sizeof(in[0])-1), ios, err, &t); - assert(i.base() == in+sizeof(in)/sizeof(in[0])-1); - assert(t.tm_mon == 5); - assert(t.tm_mday == 10); - assert(t.tm_year == 109); - assert(err == std::ios_base::eofbit); - } -} diff --git a/test/localization/locale.categories/category.time/locale.time.get.byname/get_monthname.xfail.pass.cpp b/test/localization/locale.categories/category.time/locale.time.get.byname/get_monthname.xfail.pass.cpp deleted file mode 100644 index eb6f225e..00000000 --- a/test/localization/locale.categories/category.time/locale.time.get.byname/get_monthname.xfail.pass.cpp +++ /dev/null @@ -1,79 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// class time_get_byname - -// iter_type -// get_monthname(iter_type s, iter_type end, ios_base& str, -// ios_base::iostate& err, tm* t) const; - -#include -#include -#include "iterators.h" - -typedef input_iterator I; - -typedef std::time_get_byname F; - -class my_facet - : public F -{ -public: - explicit my_facet(const std::string& nm, std::size_t refs = 0) - : F(nm, refs) {} -}; - -int main() -{ - std::ios ios(0); - std::ios_base::iostate err; - std::tm t; - { - const my_facet f("en_US", 1); - const char in[] = "June"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_monthname(I(in), I(in+sizeof(in)/sizeof(in[0])-1), ios, err, &t); - assert(i.base() == in+sizeof(in)/sizeof(in[0])-1); - assert(t.tm_mon == 5); - assert(err == std::ios_base::eofbit); - } - { - const my_facet f("fr_FR", 1); - const char in[] = "juin"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_monthname(I(in), I(in+sizeof(in)/sizeof(in[0])-1), ios, err, &t); - assert(i.base() == in+sizeof(in)/sizeof(in[0])-1); - assert(t.tm_mon == 5); - assert(err == std::ios_base::eofbit); - } - { - const my_facet f("ru_RU", 1); - const char in[] = "\xD0\xB8\xD1\x8E\xD0\xBD\xD1\x8F"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_monthname(I(in), I(in+sizeof(in)/sizeof(in[0])-1), ios, err, &t); - assert(i.base() == in+sizeof(in)/sizeof(in[0])-1); - assert(t.tm_mon == 5); - assert(err == std::ios_base::eofbit); - } - { - const my_facet f("zh_CN", 1); - const char in[] = "\xE5\x85\xAD\xE6\x9C\x88"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_monthname(I(in), I(in+sizeof(in)/sizeof(in[0])-1), ios, err, &t); - assert(i.base() == in+sizeof(in)/sizeof(in[0])-1); - assert(t.tm_mon == 5); - assert(err == std::ios_base::eofbit); - } -} diff --git a/test/localization/locale.categories/category.time/locale.time.get.byname/get_monthname_wide.xfail.pass.cpp b/test/localization/locale.categories/category.time/locale.time.get.byname/get_monthname_wide.xfail.pass.cpp deleted file mode 100644 index ae4e8283..00000000 --- a/test/localization/locale.categories/category.time/locale.time.get.byname/get_monthname_wide.xfail.pass.cpp +++ /dev/null @@ -1,88 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// class time_get_byname - -// iter_type -// get_monthname(iter_type s, iter_type end, ios_base& str, -// ios_base::iostate& err, tm* t) const; - -#include -#include -#include "iterators.h" - -typedef input_iterator I; - -typedef std::time_get_byname F; - -class my_facet - : public F -{ -public: - explicit my_facet(const std::string& nm, std::size_t refs = 0) - : F(nm, refs) {} -}; - -typedef std::time_put_byname F2; -class my_facet2 - : public F2 -{ -public: - explicit my_facet2(const std::string& nm, std::size_t refs = 0) - : F2(nm, refs) {} -}; - -int main() -{ - std::ios ios(0); - std::ios_base::iostate err; - std::tm t; - { - const my_facet f("en_US", 1); - const wchar_t in[] = L"June"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_monthname(I(in), I(in+sizeof(in)/sizeof(in[0])-1), ios, err, &t); - assert(i.base() == in+sizeof(in)/sizeof(in[0])-1); - assert(t.tm_mon == 5); - assert(err == std::ios_base::eofbit); - } - { - const my_facet f("fr_FR", 1); - const wchar_t in[] = L"juin"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_monthname(I(in), I(in+sizeof(in)/sizeof(in[0])-1), ios, err, &t); - assert(i.base() == in+sizeof(in)/sizeof(in[0])-1); - assert(t.tm_mon == 5); - assert(err == std::ios_base::eofbit); - } - { - const my_facet f("ru_RU", 1); - const wchar_t in[] = L"\x438\x44E\x43D\x44F"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_monthname(I(in), I(in+sizeof(in)/sizeof(in[0])-1), ios, err, &t); - assert(i.base() == in+sizeof(in)/sizeof(in[0])-1); - assert(t.tm_mon == 5); - assert(err == std::ios_base::eofbit); - } - { - const my_facet f("zh_CN", 1); - const wchar_t in[] = L"\x516D\x6708"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_monthname(I(in), I(in+sizeof(in)/sizeof(in[0])-1), ios, err, &t); - assert(i.base() == in+sizeof(in)/sizeof(in[0])-1); - assert(t.tm_mon == 5); - assert(err == std::ios_base::eofbit); - } -} diff --git a/test/localization/locale.categories/category.time/locale.time.get.byname/get_one.xfail.pass.cpp b/test/localization/locale.categories/category.time/locale.time.get.byname/get_one.xfail.pass.cpp deleted file mode 100644 index b2ebcf36..00000000 --- a/test/localization/locale.categories/category.time/locale.time.get.byname/get_one.xfail.pass.cpp +++ /dev/null @@ -1,158 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// class time_get_byname - -// iter_type get(iter_type s, iter_type end, ios_base& f, -// ios_base::iostate& err, tm *t, char format, char modifier = 0) const; - -#include -#include -#include "iterators.h" - -typedef input_iterator I; - -typedef std::time_get_byname F; - -class my_facet - : public F -{ -public: - explicit my_facet(const std::string& nm, std::size_t refs = 0) - : F(nm, refs) {} -}; - -int main() -{ - std::ios ios(0); - std::ios_base::iostate err; - std::tm t; - { - const my_facet f("en_US", 1); - const char in[] = "Sat Dec 31 23:55:59 2061"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get(I(in), I(in+sizeof(in)/sizeof(in[0])-1), ios, err, &t, 'c'); - assert(i.base() == in+sizeof(in)/sizeof(in[0])-1); - assert(t.tm_sec == 59); - assert(t.tm_min == 55); - assert(t.tm_hour == 23); - assert(t.tm_mday == 31); - assert(t.tm_mon == 11); - assert(t.tm_year == 161); - assert(t.tm_wday == 6); - assert(err == std::ios_base::eofbit); - } - { - const my_facet f("en_US", 1); - const char in[] = "23:55:59"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get(I(in), I(in+sizeof(in)/sizeof(in[0])-1), ios, err, &t, 'X'); - assert(i.base() == in+sizeof(in)/sizeof(in[0])-1); - assert(t.tm_sec == 59); - assert(t.tm_min == 55); - assert(t.tm_hour == 23); - assert(err == std::ios_base::eofbit); - } - { - const my_facet f("fr_FR", 1); - const char in[] = "Sam 31 d""\xC3\xA9""c 23:55:59 2061"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get(I(in), I(in+sizeof(in)/sizeof(in[0])-1), ios, err, &t, 'c'); - assert(i.base() == in+sizeof(in)/sizeof(in[0])-1); - assert(t.tm_sec == 59); - assert(t.tm_min == 55); - assert(t.tm_hour == 23); - assert(t.tm_mday == 31); - assert(t.tm_mon == 11); - assert(t.tm_year == 161); - assert(t.tm_wday == 6); - assert(err == std::ios_base::eofbit); - } - { - const my_facet f("fr_FR", 1); - const char in[] = "23:55:59"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get(I(in), I(in+sizeof(in)/sizeof(in[0])-1), ios, err, &t, 'X'); - assert(i.base() == in+sizeof(in)/sizeof(in[0])-1); - assert(t.tm_sec == 59); - assert(t.tm_min == 55); - assert(t.tm_hour == 23); - assert(err == std::ios_base::eofbit); - } - { - const my_facet f("ru_RU", 1); - const char in[] = "\xD1\x81\xD1\x83\xD0\xB1\xD0\xB1" - "\xD0\xBE\xD1\x82\xD0\xB0" - ", 31 " - "\xD0\xB4\xD0\xB5\xD0\xBA\xD0\xB0" - "\xD0\xB1\xD1\x80\xD1\x8F" - " 2061 " - "\xD0\xB3" - ". 23:55:59"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get(I(in), I(in+sizeof(in)/sizeof(in[0])-1), ios, err, &t, 'c'); - assert(i.base() == in+sizeof(in)/sizeof(in[0])-1); - assert(t.tm_sec == 59); - assert(t.tm_min == 55); - assert(t.tm_hour == 23); - assert(t.tm_mday == 31); - assert(t.tm_mon == 11); - assert(t.tm_year == 161); - assert(t.tm_wday == 6); - assert(err == std::ios_base::eofbit); - } - { - const my_facet f("ru_RU", 1); - const char in[] = "23:55:59"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get(I(in), I(in+sizeof(in)/sizeof(in[0])-1), ios, err, &t, 'X'); - assert(i.base() == in+sizeof(in)/sizeof(in[0])-1); - assert(t.tm_sec == 59); - assert(t.tm_min == 55); - assert(t.tm_hour == 23); - assert(err == std::ios_base::eofbit); - } - { - const my_facet f("zh_CN", 1); - const char in[] = "\xE5\x85\xAD" - " 12/31 23:55:59 2061"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get(I(in), I(in+sizeof(in)/sizeof(in[0])-1), ios, err, &t, 'c'); - assert(i.base() == in+sizeof(in)/sizeof(in[0])-1); - assert(t.tm_sec == 59); - assert(t.tm_min == 55); - assert(t.tm_hour == 23); - assert(t.tm_mday == 31); - assert(t.tm_mon == 11); - assert(t.tm_year == 161); - assert(t.tm_wday == 6); - assert(err == std::ios_base::eofbit); - } - { - const my_facet f("zh_CN", 1); - const char in[] = "23""\xE6\x97\xB6""55""\xE5\x88\x86""59""\xE7\xA7\x92"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get(I(in), I(in+sizeof(in)/sizeof(in[0])-1), ios, err, &t, 'X'); - assert(i.base() == in+sizeof(in)/sizeof(in[0])-1); - assert(t.tm_sec == 59); - assert(t.tm_min == 55); - assert(t.tm_hour == 23); - assert(err == std::ios_base::eofbit); - } -} diff --git a/test/localization/locale.categories/category.time/locale.time.get.byname/get_one_wide.xfail.pass.cpp b/test/localization/locale.categories/category.time/locale.time.get.byname/get_one_wide.xfail.pass.cpp deleted file mode 100644 index 7e9deb34..00000000 --- a/test/localization/locale.categories/category.time/locale.time.get.byname/get_one_wide.xfail.pass.cpp +++ /dev/null @@ -1,156 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// class time_get_byname - -// iter_type get(iter_type s, iter_type end, ios_base& f, -// ios_base::iostate& err, tm *t, char format, char modifier = 0) const; - -#include -#include -#include "iterators.h" - -typedef input_iterator I; - -typedef std::time_get_byname F; - -class my_facet - : public F -{ -public: - explicit my_facet(const std::string& nm, std::size_t refs = 0) - : F(nm, refs) {} -}; - -int main() -{ - std::ios ios(0); - std::ios_base::iostate err; - std::tm t; - { - const my_facet f("en_US", 1); - const wchar_t in[] = L"Sat Dec 31 23:55:59 2061"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get(I(in), I(in+sizeof(in)/sizeof(in[0])-1), ios, err, &t, 'c'); - assert(i.base() == in+sizeof(in)/sizeof(in[0])-1); - assert(t.tm_sec == 59); - assert(t.tm_min == 55); - assert(t.tm_hour == 23); - assert(t.tm_mday == 31); - assert(t.tm_mon == 11); - assert(t.tm_year == 161); - assert(t.tm_wday == 6); - assert(err == std::ios_base::eofbit); - } - { - const my_facet f("en_US", 1); - const wchar_t in[] = L"23:55:59"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get(I(in), I(in+sizeof(in)/sizeof(in[0])-1), ios, err, &t, 'X'); - assert(i.base() == in+sizeof(in)/sizeof(in[0])-1); - assert(t.tm_sec == 59); - assert(t.tm_min == 55); - assert(t.tm_hour == 23); - assert(err == std::ios_base::eofbit); - } - { - const my_facet f("fr_FR", 1); - const wchar_t in[] = L"Sam 31 d""\xE9""c 23:55:59 2061"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get(I(in), I(in+sizeof(in)/sizeof(in[0])-1), ios, err, &t, 'c'); - assert(i.base() == in+sizeof(in)/sizeof(in[0])-1); - assert(t.tm_sec == 59); - assert(t.tm_min == 55); - assert(t.tm_hour == 23); - assert(t.tm_mday == 31); - assert(t.tm_mon == 11); - assert(t.tm_year == 161); - assert(t.tm_wday == 6); - assert(err == std::ios_base::eofbit); - } - { - const my_facet f("fr_FR", 1); - const wchar_t in[] = L"23:55:59"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get(I(in), I(in+sizeof(in)/sizeof(in[0])-1), ios, err, &t, 'X'); - assert(i.base() == in+sizeof(in)/sizeof(in[0])-1); - assert(t.tm_sec == 59); - assert(t.tm_min == 55); - assert(t.tm_hour == 23); - assert(err == std::ios_base::eofbit); - } - { - const my_facet f("ru_RU", 1); - const wchar_t in[] = L"\x441\x443\x431\x431\x43E\x442\x430" - ", 31 " - "\x434\x435\x43A\x430\x431\x440\x44F" - " 2061 " - "\x433" - ". 23:55:59"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get(I(in), I(in+sizeof(in)/sizeof(in[0])-1), ios, err, &t, 'c'); - assert(i.base() == in+sizeof(in)/sizeof(in[0])-1); - assert(t.tm_sec == 59); - assert(t.tm_min == 55); - assert(t.tm_hour == 23); - assert(t.tm_mday == 31); - assert(t.tm_mon == 11); - assert(t.tm_year == 161); - assert(t.tm_wday == 6); - assert(err == std::ios_base::eofbit); - } - { - const my_facet f("ru_RU", 1); - const wchar_t in[] = L"23:55:59"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get(I(in), I(in+sizeof(in)/sizeof(in[0])-1), ios, err, &t, 'X'); - assert(i.base() == in+sizeof(in)/sizeof(in[0])-1); - assert(t.tm_sec == 59); - assert(t.tm_min == 55); - assert(t.tm_hour == 23); - assert(err == std::ios_base::eofbit); - } - { - const my_facet f("zh_CN", 1); - const wchar_t in[] = L"\x516D" - " 12/31 23:55:59 2061"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get(I(in), I(in+sizeof(in)/sizeof(in[0])-1), ios, err, &t, 'c'); - assert(i.base() == in+sizeof(in)/sizeof(in[0])-1); - assert(t.tm_sec == 59); - assert(t.tm_min == 55); - assert(t.tm_hour == 23); - assert(t.tm_mday == 31); - assert(t.tm_mon == 11); - assert(t.tm_year == 161); - assert(t.tm_wday == 6); - assert(err == std::ios_base::eofbit); - } - { - const my_facet f("zh_CN", 1); - const wchar_t in[] = L"23""\x65F6""55""\x5206""59""\x79D2"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get(I(in), I(in+sizeof(in)/sizeof(in[0])-1), ios, err, &t, 'X'); - assert(i.base() == in+sizeof(in)/sizeof(in[0])-1); - assert(t.tm_sec == 59); - assert(t.tm_min == 55); - assert(t.tm_hour == 23); - assert(err == std::ios_base::eofbit); - } -} diff --git a/test/localization/locale.categories/category.time/locale.time.get.byname/get_time.xfail.pass.cpp b/test/localization/locale.categories/category.time/locale.time.get.byname/get_time.xfail.pass.cpp deleted file mode 100644 index 68ec9f73..00000000 --- a/test/localization/locale.categories/category.time/locale.time.get.byname/get_time.xfail.pass.cpp +++ /dev/null @@ -1,87 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// class time_get_byname - -// iter_type -// get_time(iter_type s, iter_type end, ios_base& str, -// ios_base::iostate& err, tm* t) const; - -#include -#include -#include "iterators.h" - -typedef input_iterator I; - -typedef std::time_get_byname F; - -class my_facet - : public F -{ -public: - explicit my_facet(const std::string& nm, std::size_t refs = 0) - : F(nm, refs) {} -}; - -int main() -{ - std::ios ios(0); - std::ios_base::iostate err; - std::tm t; - { - const my_facet f("en_US", 1); - const char in[] = "13:14:15"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_time(I(in), I(in+sizeof(in)-1), ios, err, &t); - assert(i.base() == in+sizeof(in)-1); - assert(t.tm_hour == 13); - assert(t.tm_min == 14); - assert(t.tm_sec == 15); - assert(err == std::ios_base::eofbit); - } - { - const my_facet f("fr_FR", 1); - const char in[] = "13:14:15"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_time(I(in), I(in+sizeof(in)-1), ios, err, &t); - assert(i.base() == in+sizeof(in)-1); - assert(t.tm_hour == 13); - assert(t.tm_min == 14); - assert(t.tm_sec == 15); - assert(err == std::ios_base::eofbit); - } - { - const my_facet f("ru_RU", 1); - const char in[] = "13:14:15"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_time(I(in), I(in+sizeof(in)-1), ios, err, &t); - assert(i.base() == in+sizeof(in)-1); - assert(t.tm_hour == 13); - assert(t.tm_min == 14); - assert(t.tm_sec == 15); - assert(err == std::ios_base::eofbit); - } - { - const my_facet f("zh_CN", 1); - const char in[] = "13:14:15"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_time(I(in), I(in+sizeof(in)-1), ios, err, &t); - assert(i.base() == in+sizeof(in)-1); - assert(t.tm_hour == 13); - assert(t.tm_min == 14); - assert(t.tm_sec == 15); - assert(err == std::ios_base::eofbit); - } -} diff --git a/test/localization/locale.categories/category.time/locale.time.get.byname/get_time_wide.xfail.pass.cpp b/test/localization/locale.categories/category.time/locale.time.get.byname/get_time_wide.xfail.pass.cpp deleted file mode 100644 index 0ef69a1b..00000000 --- a/test/localization/locale.categories/category.time/locale.time.get.byname/get_time_wide.xfail.pass.cpp +++ /dev/null @@ -1,87 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// class time_get_byname - -// iter_type -// get_time(iter_type s, iter_type end, ios_base& str, -// ios_base::iostate& err, tm* t) const; - -#include -#include -#include "iterators.h" - -typedef input_iterator I; - -typedef std::time_get_byname F; - -class my_facet - : public F -{ -public: - explicit my_facet(const std::string& nm, std::size_t refs = 0) - : F(nm, refs) {} -}; - -int main() -{ - std::ios ios(0); - std::ios_base::iostate err; - std::tm t; - { - const my_facet f("en_US", 1); - const wchar_t in[] = L"13:14:15"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_time(I(in), I(in+sizeof(in)/sizeof(in[0])-1), ios, err, &t); - assert(i.base() == in+sizeof(in)/sizeof(in[0])-1); - assert(t.tm_hour == 13); - assert(t.tm_min == 14); - assert(t.tm_sec == 15); - assert(err == std::ios_base::eofbit); - } - { - const my_facet f("fr_FR", 1); - const wchar_t in[] = L"13:14:15"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_time(I(in), I(in+sizeof(in)/sizeof(in[0])-1), ios, err, &t); - assert(i.base() == in+sizeof(in)/sizeof(in[0])-1); - assert(t.tm_hour == 13); - assert(t.tm_min == 14); - assert(t.tm_sec == 15); - assert(err == std::ios_base::eofbit); - } - { - const my_facet f("ru_RU", 1); - const wchar_t in[] = L"13:14:15"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_time(I(in), I(in+sizeof(in)/sizeof(in[0])-1), ios, err, &t); - assert(i.base() == in+sizeof(in)/sizeof(in[0])-1); - assert(t.tm_hour == 13); - assert(t.tm_min == 14); - assert(t.tm_sec == 15); - assert(err == std::ios_base::eofbit); - } - { - const my_facet f("zh_CN", 1); - const wchar_t in[] = L"13:14:15"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_time(I(in), I(in+sizeof(in)/sizeof(in[0])-1), ios, err, &t); - assert(i.base() == in+sizeof(in)/sizeof(in[0])-1); - assert(t.tm_hour == 13); - assert(t.tm_min == 14); - assert(t.tm_sec == 15); - assert(err == std::ios_base::eofbit); - } -} diff --git a/test/localization/locale.categories/category.time/locale.time.get.byname/get_weekday.xfail.pass.cpp b/test/localization/locale.categories/category.time/locale.time.get.byname/get_weekday.xfail.pass.cpp deleted file mode 100644 index 7752f37e..00000000 --- a/test/localization/locale.categories/category.time/locale.time.get.byname/get_weekday.xfail.pass.cpp +++ /dev/null @@ -1,81 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// class time_get_byname - -// iter_type -// get_weekday(iter_type s, iter_type end, ios_base& str, -// ios_base::iostate& err, tm* t) const; - -#include -#include -#include "iterators.h" - -typedef input_iterator I; - -typedef std::time_get_byname F; - -class my_facet - : public F -{ -public: - explicit my_facet(const std::string& nm, std::size_t refs = 0) - : F(nm, refs) {} -}; - -int main() -{ - std::ios ios(0); - std::ios_base::iostate err; - std::tm t; - { - const my_facet f("en_US", 1); - const char in[] = "Monday"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_weekday(I(in), I(in+sizeof(in)/sizeof(in[0])-1), ios, err, &t); - assert(i.base() == in+sizeof(in)/sizeof(in[0])-1); - assert(t.tm_wday == 1); - assert(err == std::ios_base::eofbit); - } - { - const my_facet f("fr_FR", 1); - const char in[] = "Lundi"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_weekday(I(in), I(in+sizeof(in)/sizeof(in[0])-1), ios, err, &t); - assert(i.base() == in+sizeof(in)/sizeof(in[0])-1); - assert(t.tm_wday == 1); - assert(err == std::ios_base::eofbit); - } - { - const my_facet f("ru_RU", 1); - const char in[] = "\xD0\xBF\xD0\xBE\xD0\xBD\xD0\xB5" - "\xD0\xB4\xD0\xB5\xD0\xBB\xD1\x8C" - "\xD0\xBD\xD0\xB8\xD0\xBA"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_weekday(I(in), I(in+sizeof(in)/sizeof(in[0])-1), ios, err, &t); - assert(i.base() == in+sizeof(in)/sizeof(in[0])-1); - assert(t.tm_wday == 1); - assert(err == std::ios_base::eofbit); - } - { - const my_facet f("zh_CN", 1); - const char in[] = "\xE6\x98\x9F\xE6\x9C\x9F\xE4\xB8\x80"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_weekday(I(in), I(in+sizeof(in)/sizeof(in[0])-1), ios, err, &t); - assert(i.base() == in+sizeof(in)/sizeof(in[0])-1); - assert(t.tm_wday == 1); - assert(err == std::ios_base::eofbit); - } -} diff --git a/test/localization/locale.categories/category.time/locale.time.get.byname/get_weekday_wide.xfail.pass.cpp b/test/localization/locale.categories/category.time/locale.time.get.byname/get_weekday_wide.xfail.pass.cpp deleted file mode 100644 index 69a5504e..00000000 --- a/test/localization/locale.categories/category.time/locale.time.get.byname/get_weekday_wide.xfail.pass.cpp +++ /dev/null @@ -1,79 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// class time_get_byname - -// iter_type -// get_weekday(iter_type s, iter_type end, ios_base& str, -// ios_base::iostate& err, tm* t) const; - -#include -#include -#include "iterators.h" - -typedef input_iterator I; - -typedef std::time_get_byname F; - -class my_facet - : public F -{ -public: - explicit my_facet(const std::string& nm, std::size_t refs = 0) - : F(nm, refs) {} -}; - -int main() -{ - std::ios ios(0); - std::ios_base::iostate err; - std::tm t; - { - const my_facet f("en_US", 1); - const wchar_t in[] = L"Monday"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_weekday(I(in), I(in+sizeof(in)/sizeof(in[0])-1), ios, err, &t); - assert(i.base() == in+sizeof(in)/sizeof(in[0])-1); - assert(t.tm_wday == 1); - assert(err == std::ios_base::eofbit); - } - { - const my_facet f("fr_FR", 1); - const wchar_t in[] = L"Lundi"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_weekday(I(in), I(in+sizeof(in)/sizeof(in[0])-1), ios, err, &t); - assert(i.base() == in+sizeof(in)/sizeof(in[0])-1); - assert(t.tm_wday == 1); - assert(err == std::ios_base::eofbit); - } - { - const my_facet f("ru_RU", 1); - const wchar_t in[] = L"\x43F\x43E\x43D\x435\x434\x435\x43B\x44C\x43D\x438\x43A"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_weekday(I(in), I(in+sizeof(in)/sizeof(in[0])-1), ios, err, &t); - assert(i.base() == in+sizeof(in)/sizeof(in[0])-1); - assert(t.tm_wday == 1); - assert(err == std::ios_base::eofbit); - } - { - const my_facet f("zh_CN", 1); - const wchar_t in[] = L"\x661F\x671F\x4E00"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_weekday(I(in), I(in+sizeof(in)/sizeof(in[0])-1), ios, err, &t); - assert(i.base() == in+sizeof(in)/sizeof(in[0])-1); - assert(t.tm_wday == 1); - assert(err == std::ios_base::eofbit); - } -} diff --git a/test/localization/locale.categories/category.time/locale.time.get.byname/get_year.xfail.pass.cpp b/test/localization/locale.categories/category.time/locale.time.get.byname/get_year.xfail.pass.cpp deleted file mode 100644 index bb00c0e7..00000000 --- a/test/localization/locale.categories/category.time/locale.time.get.byname/get_year.xfail.pass.cpp +++ /dev/null @@ -1,78 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// class time_get_byname - -// iter_type get_year(iter_type s, iter_type end, ios_base& str, -// ios_base::iostate& err, tm* t) const; - -#include -#include -#include "iterators.h" - -typedef input_iterator I; - -typedef std::time_get_byname F; - -class my_facet - : public F -{ -public: - explicit my_facet(const std::string& nm, std::size_t refs = 0) - : F(nm, refs) {} -}; - -int main() -{ - std::ios ios(0); - std::ios_base::iostate err; - std::tm t; - { - const my_facet f("en_US", 1); - const char in[] = "2009"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_year(I(in), I(in+sizeof(in)/sizeof(in[0])-1), ios, err, &t); - assert(i.base() == in+sizeof(in)/sizeof(in[0])-1); - assert(t.tm_year == 109); - assert(err == std::ios_base::eofbit); - } - { - const my_facet f("fr_FR", 1); - const char in[] = "2009"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_year(I(in), I(in+sizeof(in)/sizeof(in[0])-1), ios, err, &t); - assert(i.base() == in+sizeof(in)/sizeof(in[0])-1); - assert(t.tm_year == 109); - assert(err == std::ios_base::eofbit); - } - { - const my_facet f("ru_RU", 1); - const char in[] = "2009"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_year(I(in), I(in+sizeof(in)/sizeof(in[0])-1), ios, err, &t); - assert(i.base() == in+sizeof(in)/sizeof(in[0])-1); - assert(t.tm_year == 109); - assert(err == std::ios_base::eofbit); - } - { - const my_facet f("zh_CN", 1); - const char in[] = "2009"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_year(I(in), I(in+sizeof(in)/sizeof(in[0])-1), ios, err, &t); - assert(i.base() == in+sizeof(in)/sizeof(in[0])-1); - assert(t.tm_year == 109); - assert(err == std::ios_base::eofbit); - } -} diff --git a/test/localization/locale.categories/category.time/locale.time.get.byname/get_year_wide.xfail.pass.cpp b/test/localization/locale.categories/category.time/locale.time.get.byname/get_year_wide.xfail.pass.cpp deleted file mode 100644 index a89ac86f..00000000 --- a/test/localization/locale.categories/category.time/locale.time.get.byname/get_year_wide.xfail.pass.cpp +++ /dev/null @@ -1,78 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// class time_get_byname - -// iter_type get_year(iter_type s, iter_type end, ios_base& str, -// ios_base::iostate& err, tm* t) const; - -#include -#include -#include "iterators.h" - -typedef input_iterator I; - -typedef std::time_get_byname F; - -class my_facet - : public F -{ -public: - explicit my_facet(const std::string& nm, std::size_t refs = 0) - : F(nm, refs) {} -}; - -int main() -{ - std::ios ios(0); - std::ios_base::iostate err; - std::tm t; - { - const my_facet f("en_US", 1); - const wchar_t in[] = L"2009"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_year(I(in), I(in+sizeof(in)/sizeof(in[0])-1), ios, err, &t); - assert(i.base() == in+sizeof(in)/sizeof(in[0])-1); - assert(t.tm_year == 109); - assert(err == std::ios_base::eofbit); - } - { - const my_facet f("fr_FR", 1); - const wchar_t in[] = L"2009"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_year(I(in), I(in+sizeof(in)/sizeof(in[0])-1), ios, err, &t); - assert(i.base() == in+sizeof(in)/sizeof(in[0])-1); - assert(t.tm_year == 109); - assert(err == std::ios_base::eofbit); - } - { - const my_facet f("ru_RU", 1); - const wchar_t in[] = L"2009"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_year(I(in), I(in+sizeof(in)/sizeof(in[0])-1), ios, err, &t); - assert(i.base() == in+sizeof(in)/sizeof(in[0])-1); - assert(t.tm_year == 109); - assert(err == std::ios_base::eofbit); - } - { - const my_facet f("zh_CN", 1); - const wchar_t in[] = L"2009"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_year(I(in), I(in+sizeof(in)/sizeof(in[0])-1), ios, err, &t); - assert(i.base() == in+sizeof(in)/sizeof(in[0])-1); - assert(t.tm_year == 109); - assert(err == std::ios_base::eofbit); - } -} diff --git a/test/localization/locale.categories/category.time/locale.time.get.byname/iterators.h b/test/localization/locale.categories/category.time/locale.time.get.byname/iterators.h deleted file mode 100644 index 7b0f6338..00000000 --- a/test/localization/locale.categories/category.time/locale.time.get.byname/iterators.h +++ /dev/null @@ -1,55 +0,0 @@ -#ifndef ITERATORS_H -#define ITERATORS_H - -#include - -template -class input_iterator -{ - It it_; - - template friend class input_iterator; -public: - typedef std::input_iterator_tag iterator_category; - typedef typename std::iterator_traits::value_type value_type; - typedef typename std::iterator_traits::difference_type difference_type; - typedef It pointer; - typedef typename std::iterator_traits::reference reference; - - It base() const {return it_;} - - input_iterator() : it_() {} - explicit input_iterator(It it) : it_(it) {} - template - input_iterator(const input_iterator& u) :it_(u.it_) {} - - reference operator*() const {return *it_;} - pointer operator->() const {return it_;} - - input_iterator& operator++() {++it_; return *this;} - input_iterator operator++(int) - {input_iterator tmp(*this); ++(*this); return tmp;} - - friend bool operator==(const input_iterator& x, const input_iterator& y) - {return x.it_ == y.it_;} - friend bool operator!=(const input_iterator& x, const input_iterator& y) - {return !(x == y);} -}; - -template -inline -bool -operator==(const input_iterator& x, const input_iterator& y) -{ - return x.base() == y.base(); -} - -template -inline -bool -operator!=(const input_iterator& x, const input_iterator& y) -{ - return !(x == y); -} - -#endif // ITERATORS_H diff --git a/test/localization/locale.categories/category.time/locale.time.get/ctor.pass.cpp b/test/localization/locale.categories/category.time/locale.time.get/ctor.pass.cpp deleted file mode 100644 index c6c4359e..00000000 --- a/test/localization/locale.categories/category.time/locale.time.get/ctor.pass.cpp +++ /dev/null @@ -1,52 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// class time_get - -// explicit time_get(size_t refs = 0); - -#include -#include - -typedef std::time_get F; - -class my_facet - : public F -{ -public: - static int count; - - explicit my_facet(std::size_t refs = 0) - : F(refs) {++count;} - - ~my_facet() {--count;} -}; - -int my_facet::count = 0; - -int main() -{ - { - std::locale l(std::locale::classic(), new my_facet); - assert(my_facet::count == 1); - } - assert(my_facet::count == 0); - { - my_facet f(1); - assert(my_facet::count == 1); - { - std::locale l(std::locale::classic(), &f); - assert(my_facet::count == 1); - } - assert(my_facet::count == 1); - } - assert(my_facet::count == 0); -} diff --git a/test/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/date_order.pass.cpp b/test/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/date_order.pass.cpp deleted file mode 100644 index 4def37cb..00000000 --- a/test/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/date_order.pass.cpp +++ /dev/null @@ -1,34 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// class time_get - -// dateorder date_order() const; - -#include -#include -#include "iterators.h" - -typedef std::time_get > F; - -class my_facet - : public F -{ -public: - explicit my_facet(std::size_t refs = 0) - : F(refs) {} -}; - -int main() -{ - const my_facet f(1); - assert(f.date_order() == std::time_base::mdy); -} diff --git a/test/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_date.pass.cpp b/test/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_date.pass.cpp deleted file mode 100644 index 8378ebdb..00000000 --- a/test/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_date.pass.cpp +++ /dev/null @@ -1,51 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// class time_get - -// iter_type -// get_date(iter_type s, iter_type end, ios_base& str, -// ios_base::iostate& err, tm* t) const; - -#include -#include -#include "iterators.h" - -typedef input_iterator I; - -typedef std::time_get F; - -class my_facet - : public F -{ -public: - explicit my_facet(std::size_t refs = 0) - : F(refs) {} -}; - -int main() -{ - const my_facet f(1); - std::ios ios(0); - std::ios_base::iostate err; - std::tm t; - { - const char in[] = "5/5/5"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_date(I(in), I(in+sizeof(in)-1), ios, err, &t); - assert(i.base() == in+sizeof(in)-1); - assert(t.tm_mon == 4); - assert(t.tm_mday == 5); - assert(t.tm_year == 105); - assert(err == std::ios_base::eofbit); - } -} diff --git a/test/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_date_wide.xfail.pass.cpp b/test/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_date_wide.xfail.pass.cpp deleted file mode 100644 index 2b4b8877..00000000 --- a/test/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_date_wide.xfail.pass.cpp +++ /dev/null @@ -1,51 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// class time_get - -// iter_type -// get_date(iter_type s, iter_type end, ios_base& str, -// ios_base::iostate& err, tm* t) const; - -#include -#include -#include "iterators.h" - -typedef input_iterator I; - -typedef std::time_get F; - -class my_facet - : public F -{ -public: - explicit my_facet(std::size_t refs = 0) - : F(refs) {} -}; - -int main() -{ - const my_facet f(1); - std::ios ios(0); - std::ios_base::iostate err; - std::tm t; - { - const wchar_t in[] = L"5/5/5"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_date(I(in), I(in+sizeof(in)/sizeof(in[0])-1), ios, err, &t); - assert(i.base() == in+sizeof(in)/sizeof(in[0])-1); - assert(t.tm_mon == 4); - assert(t.tm_mday == 5); - assert(t.tm_year == 105); - assert(err == std::ios_base::eofbit); - } -} diff --git a/test/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_many.xfail.pass.cpp b/test/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_many.xfail.pass.cpp deleted file mode 100644 index 823c581b..00000000 --- a/test/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_many.xfail.pass.cpp +++ /dev/null @@ -1,68 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// class time_get - -// iter_type -// get(iter_type s, iter_type end, ios_base& f, ios_base::iostate& err, tm *t, -// const char_type *fmt, const char_type *fmtend) const; - -#include -#include -#include "iterators.h" - -typedef input_iterator I; - -typedef std::time_get F; - -class my_facet - : public F -{ -public: - explicit my_facet(std::size_t refs = 0) - : F(refs) {} -}; - -int main() -{ - const my_facet f(1); - std::ios ios(0); - std::ios_base::iostate err; - std::tm t; - { - const char in[] = "2009 May 9, 10:27pm"; - const char fmt[] = "%Y %b %d, %I:%M%p"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get(I(in), I(in+sizeof(in)-1), ios, err, &t, fmt, fmt+sizeof(fmt)-1); - assert(i.base() == in+sizeof(in)-1); - assert(t.tm_year == 109); - assert(t.tm_mon == 4); - assert(t.tm_mday == 9); - assert(t.tm_hour == 22); - assert(t.tm_min == 27); - assert(err == std::ios_base::eofbit); - } - { - const char in[] = "10:27PM May 9, 2009"; - const char fmt[] = "%I:%M%p %b %d, %Y"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get(I(in), I(in+sizeof(in)-1), ios, err, &t, fmt, fmt+sizeof(fmt)-1); - assert(i.base() == in+sizeof(in)-1); - assert(t.tm_year == 109); - assert(t.tm_mon == 4); - assert(t.tm_mday == 9); - assert(t.tm_hour == 22); - assert(t.tm_min == 27); - assert(err == std::ios_base::eofbit); - } -} diff --git a/test/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_monthname.xfail.pass.cpp b/test/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_monthname.xfail.pass.cpp deleted file mode 100644 index 30d32b07..00000000 --- a/test/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_monthname.xfail.pass.cpp +++ /dev/null @@ -1,265 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// class time_get - -// iter_type -// get_monthname(iter_type s, iter_type end, ios_base& str, -// ios_base::iostate& err, tm* t) const; - -#include -#include -#include "iterators.h" - -typedef input_iterator I; - -typedef std::time_get F; - -class my_facet - : public F -{ -public: - explicit my_facet(std::size_t refs = 0) - : F(refs) {} -}; - -int main() -{ - const my_facet f(1); - std::ios ios(0); - std::ios_base::iostate err; - std::tm t; - { - const char in[] = "Jan"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_monthname(I(in), I(in+sizeof(in)-1), ios, err, &t); - assert(i.base() == in+3); - assert(t.tm_mon == 0); - assert(err == std::ios_base::eofbit); - } - { - const char in[] = "Feb"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_monthname(I(in), I(in+sizeof(in)-1), ios, err, &t); - assert(i.base() == in+3); - assert(t.tm_mon == 1); - assert(err == std::ios_base::eofbit); - } - { - const char in[] = "Mar"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_monthname(I(in), I(in+sizeof(in)-1), ios, err, &t); - assert(i.base() == in+3); - assert(t.tm_mon == 2); - assert(err == std::ios_base::eofbit); - } - { - const char in[] = "Apr"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_monthname(I(in), I(in+sizeof(in)-1), ios, err, &t); - assert(i.base() == in+3); - assert(t.tm_mon == 3); - assert(err == std::ios_base::eofbit); - } - { - const char in[] = "May"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_monthname(I(in), I(in+sizeof(in)-1), ios, err, &t); - assert(i.base() == in+3); - assert(t.tm_mon == 4); - assert(err == std::ios_base::eofbit); - } - { - const char in[] = "Jun"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_monthname(I(in), I(in+sizeof(in)-1), ios, err, &t); - assert(i.base() == in+3); - assert(t.tm_mon == 5); - assert(err == std::ios_base::eofbit); - } - { - const char in[] = "Jul"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_monthname(I(in), I(in+sizeof(in)-1), ios, err, &t); - assert(i.base() == in+3); - assert(t.tm_mon == 6); - assert(err == std::ios_base::eofbit); - } - { - const char in[] = "Aug"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_monthname(I(in), I(in+sizeof(in)-1), ios, err, &t); - assert(i.base() == in+3); - assert(t.tm_mon == 7); - assert(err == std::ios_base::eofbit); - } - { - const char in[] = "Sep"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_monthname(I(in), I(in+sizeof(in)-1), ios, err, &t); - assert(i.base() == in+3); - assert(t.tm_mon == 8); - assert(err == std::ios_base::eofbit); - } - { - const char in[] = "Oct"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_monthname(I(in), I(in+sizeof(in)-1), ios, err, &t); - assert(i.base() == in+3); - assert(t.tm_mon == 9); - assert(err == std::ios_base::eofbit); - } - { - const char in[] = "Nov"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_monthname(I(in), I(in+sizeof(in)-1), ios, err, &t); - assert(i.base() == in+3); - assert(t.tm_mon == 10); - assert(err == std::ios_base::eofbit); - } - { - const char in[] = "Dec"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_monthname(I(in), I(in+sizeof(in)-1), ios, err, &t); - assert(i.base() == in+3); - assert(t.tm_mon == 11); - assert(err == std::ios_base::eofbit); - } - { - const char in[] = "January"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_monthname(I(in), I(in+sizeof(in)-1), ios, err, &t); - assert(i.base() == in+7); - assert(t.tm_mon == 0); - assert(err == std::ios_base::eofbit); - } - { - const char in[] = "February"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_monthname(I(in), I(in+sizeof(in)-1), ios, err, &t); - assert(i.base() == in+8); - assert(t.tm_mon == 1); - assert(err == std::ios_base::eofbit); - } - { - const char in[] = "March"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_monthname(I(in), I(in+sizeof(in)-1), ios, err, &t); - assert(i.base() == in+5); - assert(t.tm_mon == 2); - assert(err == std::ios_base::eofbit); - } - { - const char in[] = "April"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_monthname(I(in), I(in+sizeof(in)-1), ios, err, &t); - assert(i.base() == in+5); - assert(t.tm_mon == 3); - assert(err == std::ios_base::eofbit); - } - { - const char in[] = "May"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_monthname(I(in), I(in+sizeof(in)-1), ios, err, &t); - assert(i.base() == in+3); - assert(t.tm_mon == 4); - assert(err == std::ios_base::eofbit); - } - { - const char in[] = "June"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_monthname(I(in), I(in+sizeof(in)-1), ios, err, &t); - assert(i.base() == in+4); - assert(t.tm_mon == 5); - assert(err == std::ios_base::eofbit); - } - { - const char in[] = "July"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_monthname(I(in), I(in+sizeof(in)-1), ios, err, &t); - assert(i.base() == in+4); - assert(t.tm_mon == 6); - assert(err == std::ios_base::eofbit); - } - { - const char in[] = "August"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_monthname(I(in), I(in+sizeof(in)-1), ios, err, &t); - assert(i.base() == in+6); - assert(t.tm_mon == 7); - assert(err == std::ios_base::eofbit); - } - { - const char in[] = "September"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_monthname(I(in), I(in+sizeof(in)-1), ios, err, &t); - assert(i.base() == in+9); - assert(t.tm_mon == 8); - assert(err == std::ios_base::eofbit); - } - { - const char in[] = "October"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_monthname(I(in), I(in+sizeof(in)-1), ios, err, &t); - assert(i.base() == in+7); - assert(t.tm_mon == 9); - assert(err == std::ios_base::eofbit); - } - { - const char in[] = "November"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_monthname(I(in), I(in+sizeof(in)-1), ios, err, &t); - assert(i.base() == in+8); - assert(t.tm_mon == 10); - assert(err == std::ios_base::eofbit); - } - { - const char in[] = "December"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_monthname(I(in), I(in+sizeof(in)-1), ios, err, &t); - assert(i.base() == in+8); - assert(t.tm_mon == 11); - assert(err == std::ios_base::eofbit); - } - { - const char in[] = "Decemper"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_monthname(I(in), I(in+sizeof(in)-1), ios, err, &t); - assert(i.base() == in+5); - assert(t.tm_mon == 0); - assert(err == std::ios_base::failbit); - } -} diff --git a/test/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_monthname_wide.xfail.pass.cpp b/test/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_monthname_wide.xfail.pass.cpp deleted file mode 100644 index a0dc0a0e..00000000 --- a/test/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_monthname_wide.xfail.pass.cpp +++ /dev/null @@ -1,265 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// class time_get - -// iter_type -// get_monthname(iter_type s, iter_type end, ios_base& str, -// ios_base::iostate& err, tm* t) const; - -#include -#include -#include "iterators.h" - -typedef input_iterator I; - -typedef std::time_get F; - -class my_facet - : public F -{ -public: - explicit my_facet(std::size_t refs = 0) - : F(refs) {} -}; - -int main() -{ - const my_facet f(1); - std::ios ios(0); - std::ios_base::iostate err; - std::tm t; - { - const wchar_t in[] = L"Jan"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_monthname(I(in), I(in+sizeof(in)/sizeof(in[0])-1), ios, err, &t); - assert(i.base() == in+3); - assert(t.tm_mon == 0); - assert(err == std::ios_base::eofbit); - } - { - const wchar_t in[] = L"Feb"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_monthname(I(in), I(in+sizeof(in)/sizeof(in[0])-1), ios, err, &t); - assert(i.base() == in+3); - assert(t.tm_mon == 1); - assert(err == std::ios_base::eofbit); - } - { - const wchar_t in[] = L"Mar"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_monthname(I(in), I(in+sizeof(in)/sizeof(in[0])-1), ios, err, &t); - assert(i.base() == in+3); - assert(t.tm_mon == 2); - assert(err == std::ios_base::eofbit); - } - { - const wchar_t in[] = L"Apr"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_monthname(I(in), I(in+sizeof(in)/sizeof(in[0])-1), ios, err, &t); - assert(i.base() == in+3); - assert(t.tm_mon == 3); - assert(err == std::ios_base::eofbit); - } - { - const wchar_t in[] = L"May"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_monthname(I(in), I(in+sizeof(in)/sizeof(in[0])-1), ios, err, &t); - assert(i.base() == in+3); - assert(t.tm_mon == 4); - assert(err == std::ios_base::eofbit); - } - { - const wchar_t in[] = L"Jun"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_monthname(I(in), I(in+sizeof(in)/sizeof(in[0])-1), ios, err, &t); - assert(i.base() == in+3); - assert(t.tm_mon == 5); - assert(err == std::ios_base::eofbit); - } - { - const wchar_t in[] = L"Jul"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_monthname(I(in), I(in+sizeof(in)/sizeof(in[0])-1), ios, err, &t); - assert(i.base() == in+3); - assert(t.tm_mon == 6); - assert(err == std::ios_base::eofbit); - } - { - const wchar_t in[] = L"Aug"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_monthname(I(in), I(in+sizeof(in)/sizeof(in[0])-1), ios, err, &t); - assert(i.base() == in+3); - assert(t.tm_mon == 7); - assert(err == std::ios_base::eofbit); - } - { - const wchar_t in[] = L"Sep"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_monthname(I(in), I(in+sizeof(in)/sizeof(in[0])-1), ios, err, &t); - assert(i.base() == in+3); - assert(t.tm_mon == 8); - assert(err == std::ios_base::eofbit); - } - { - const wchar_t in[] = L"Oct"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_monthname(I(in), I(in+sizeof(in)/sizeof(in[0])-1), ios, err, &t); - assert(i.base() == in+3); - assert(t.tm_mon == 9); - assert(err == std::ios_base::eofbit); - } - { - const wchar_t in[] = L"Nov"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_monthname(I(in), I(in+sizeof(in)/sizeof(in[0])-1), ios, err, &t); - assert(i.base() == in+3); - assert(t.tm_mon == 10); - assert(err == std::ios_base::eofbit); - } - { - const wchar_t in[] = L"Dec"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_monthname(I(in), I(in+sizeof(in)/sizeof(in[0])-1), ios, err, &t); - assert(i.base() == in+3); - assert(t.tm_mon == 11); - assert(err == std::ios_base::eofbit); - } - { - const wchar_t in[] = L"January"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_monthname(I(in), I(in+sizeof(in)/sizeof(in[0])-1), ios, err, &t); - assert(i.base() == in+7); - assert(t.tm_mon == 0); - assert(err == std::ios_base::eofbit); - } - { - const wchar_t in[] = L"February"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_monthname(I(in), I(in+sizeof(in)/sizeof(in[0])-1), ios, err, &t); - assert(i.base() == in+8); - assert(t.tm_mon == 1); - assert(err == std::ios_base::eofbit); - } - { - const wchar_t in[] = L"March"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_monthname(I(in), I(in+sizeof(in)/sizeof(in[0])-1), ios, err, &t); - assert(i.base() == in+5); - assert(t.tm_mon == 2); - assert(err == std::ios_base::eofbit); - } - { - const wchar_t in[] = L"April"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_monthname(I(in), I(in+sizeof(in)/sizeof(in[0])-1), ios, err, &t); - assert(i.base() == in+5); - assert(t.tm_mon == 3); - assert(err == std::ios_base::eofbit); - } - { - const wchar_t in[] = L"May"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_monthname(I(in), I(in+sizeof(in)/sizeof(in[0])-1), ios, err, &t); - assert(i.base() == in+3); - assert(t.tm_mon == 4); - assert(err == std::ios_base::eofbit); - } - { - const wchar_t in[] = L"June"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_monthname(I(in), I(in+sizeof(in)/sizeof(in[0])-1), ios, err, &t); - assert(i.base() == in+4); - assert(t.tm_mon == 5); - assert(err == std::ios_base::eofbit); - } - { - const wchar_t in[] = L"July"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_monthname(I(in), I(in+sizeof(in)/sizeof(in[0])-1), ios, err, &t); - assert(i.base() == in+4); - assert(t.tm_mon == 6); - assert(err == std::ios_base::eofbit); - } - { - const wchar_t in[] = L"August"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_monthname(I(in), I(in+sizeof(in)/sizeof(in[0])-1), ios, err, &t); - assert(i.base() == in+6); - assert(t.tm_mon == 7); - assert(err == std::ios_base::eofbit); - } - { - const wchar_t in[] = L"September"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_monthname(I(in), I(in+sizeof(in)/sizeof(in[0])-1), ios, err, &t); - assert(i.base() == in+9); - assert(t.tm_mon == 8); - assert(err == std::ios_base::eofbit); - } - { - const wchar_t in[] = L"October"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_monthname(I(in), I(in+sizeof(in)/sizeof(in[0])-1), ios, err, &t); - assert(i.base() == in+7); - assert(t.tm_mon == 9); - assert(err == std::ios_base::eofbit); - } - { - const wchar_t in[] = L"November"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_monthname(I(in), I(in+sizeof(in)/sizeof(in[0])-1), ios, err, &t); - assert(i.base() == in+8); - assert(t.tm_mon == 10); - assert(err == std::ios_base::eofbit); - } - { - const wchar_t in[] = L"December"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_monthname(I(in), I(in+sizeof(in)/sizeof(in[0])-1), ios, err, &t); - assert(i.base() == in+8); - assert(t.tm_mon == 11); - assert(err == std::ios_base::eofbit); - } - { - const wchar_t in[] = L"Decemper"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_monthname(I(in), I(in+sizeof(in)/sizeof(in[0])-1), ios, err, &t); - assert(i.base() == in+5); - assert(t.tm_mon == 0); - assert(err == std::ios_base::failbit); - } -} diff --git a/test/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_one.xfail.pass.cpp b/test/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_one.xfail.pass.cpp deleted file mode 100644 index 65ab1b17..00000000 --- a/test/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_one.xfail.pass.cpp +++ /dev/null @@ -1,305 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// class time_get - -// iter_type get(iter_type s, iter_type end, ios_base& f, -// ios_base::iostate& err, tm *t, char format, char modifier = 0) const; - -#include -#include -#include "iterators.h" - -typedef input_iterator I; - -typedef std::time_get F; - -class my_facet - : public F -{ -public: - explicit my_facet(std::size_t refs = 0) - : F(refs) {} -}; - -int main() -{ - const my_facet f(1); - std::ios ios(0); - std::ios_base::iostate err; - std::tm t; - { - const char in[] = "mon"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get(I(in), I(in+sizeof(in)-1), ios, err, &t, 'a'); - assert(i.base() == in+sizeof(in)-1); - assert(t.tm_wday == 1); - assert(err == std::ios_base::eofbit); - } - { - const char in[] = "wednesdaY"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get(I(in), I(in+sizeof(in)-1), ios, err, &t, 'A'); - assert(i.base() == in+sizeof(in)-1); - assert(t.tm_wday == 3); - assert(err == std::ios_base::eofbit); - } - { - const char in[] = "June"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get(I(in), I(in+sizeof(in)-1), ios, err, &t, 'b'); - assert(i.base() == in+sizeof(in)-1); - assert(t.tm_mon == 5); - assert(err == std::ios_base::eofbit); - } - { - const char in[] = "Jul"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get(I(in), I(in+sizeof(in)-1), ios, err, &t, 'B'); - assert(i.base() == in+sizeof(in)-1); - assert(t.tm_mon == 6); - assert(err == std::ios_base::eofbit); - } - { - const char in[] = "Thu Jun 6 09:49:10 2009"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get(I(in), I(in+sizeof(in)-1), ios, err, &t, 'c'); - assert(i.base() == in+sizeof(in)-1); - assert(t.tm_wday == 4); - assert(t.tm_mon == 5); - assert(t.tm_mday == 6); - assert(t.tm_hour == 9); - assert(t.tm_min == 49); - assert(t.tm_sec == 10); - assert(t.tm_year == 109); - assert(err == std::ios_base::eofbit); - } - { - const char in[] = "11"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get(I(in), I(in+sizeof(in)-1), ios, err, &t, 'd'); - assert(i.base() == in+sizeof(in)-1); - assert(t.tm_mday == 11); - assert(err == std::ios_base::eofbit); - } - { - const char in[] = "2/1/1"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get(I(in), I(in+sizeof(in)-1), ios, err, &t, 'D'); - assert(i.base() == in+sizeof(in)-1); - assert(t.tm_mon == 1); - assert(t.tm_mday == 1); - assert(t.tm_year == 101); - assert(err == std::ios_base::eofbit); - } - { - const char in[] = "11"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get(I(in), I(in+sizeof(in)-1), ios, err, &t, 'e'); - assert(i.base() == in+sizeof(in)-1); - assert(t.tm_mday == 11); - assert(err == std::ios_base::eofbit); - } - { - const char in[] = "June"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get(I(in), I(in+sizeof(in)-1), ios, err, &t, 'h'); - assert(i.base() == in+sizeof(in)-1); - assert(t.tm_mon == 5); - assert(err == std::ios_base::eofbit); - } - { - const char in[] = "19"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get(I(in), I(in+sizeof(in)-1), ios, err, &t, 'H'); - assert(i.base() == in+sizeof(in)-1); - assert(t.tm_hour == 19); - assert(err == std::ios_base::eofbit); - } - { - const char in[] = "12"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get(I(in), I(in+sizeof(in)-1), ios, err, &t, 'm'); - assert(i.base() == in+sizeof(in)-1); - assert(t.tm_mon == 11); - assert(err == std::ios_base::eofbit); - } - { - const char in[] = "59"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get(I(in), I(in+sizeof(in)-1), ios, err, &t, 'M'); - assert(i.base() == in+sizeof(in)-1); - assert(t.tm_min == 59); - assert(err == std::ios_base::eofbit); - } - { - const char in[] = "\t\n "; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get(I(in), I(in+sizeof(in)-1), ios, err, &t, 'n'); - assert(i.base() == in+sizeof(in)-1); - assert(err == std::ios_base::eofbit); - } - { - const char in[] = "09:49:10 PM"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get(I(in), I(in+sizeof(in)-1), ios, err, &t, 'r'); - assert(i.base() == in+sizeof(in)-1); - assert(t.tm_hour == 21); - assert(t.tm_min == 49); - assert(t.tm_sec == 10); - assert(err == std::ios_base::eofbit); - } - { - const char in[] = "09:49:10 AM"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get(I(in), I(in+sizeof(in)-1), ios, err, &t, 'r'); - assert(i.base() == in+sizeof(in)-1); - assert(t.tm_hour == 9); - assert(t.tm_min == 49); - assert(t.tm_sec == 10); - assert(err == std::ios_base::eofbit); - } - { - const char in[] = "12:49:10 AM"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get(I(in), I(in+sizeof(in)-1), ios, err, &t, 'r'); - assert(i.base() == in+sizeof(in)-1); - assert(t.tm_hour == 0); - assert(t.tm_min == 49); - assert(t.tm_sec == 10); - assert(err == std::ios_base::eofbit); - } - { - const char in[] = "12:49:10 PM"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get(I(in), I(in+sizeof(in)-1), ios, err, &t, 'r'); - assert(i.base() == in+sizeof(in)-1); - assert(t.tm_hour == 12); - assert(t.tm_min == 49); - assert(t.tm_sec == 10); - assert(err == std::ios_base::eofbit); - } - { - const char in[] = "09:49"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get(I(in), I(in+sizeof(in)-1), ios, err, &t, 'R'); - assert(i.base() == in+sizeof(in)-1); - assert(t.tm_hour == 9); - assert(t.tm_min == 49); - assert(t.tm_sec == 0); - assert(err == std::ios_base::eofbit); - } - { - const char in[] = "60"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get(I(in), I(in+sizeof(in)-1), ios, err, &t, 'S'); - assert(i.base() == in+sizeof(in)-1); - assert(t.tm_hour == 0); - assert(t.tm_min == 0); - assert(t.tm_sec == 60); - assert(err == std::ios_base::eofbit); - } - { - const char in[] = "\t\n "; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get(I(in), I(in+sizeof(in)-1), ios, err, &t, 't'); - assert(i.base() == in+sizeof(in)-1); - assert(err == std::ios_base::eofbit); - } - { - const char in[] = "21:49:10"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get(I(in), I(in+sizeof(in)-1), ios, err, &t, 'T'); - assert(i.base() == in+sizeof(in)-1); - assert(t.tm_hour == 21); - assert(t.tm_min == 49); - assert(t.tm_sec == 10); - assert(err == std::ios_base::eofbit); - } - { - const char in[] = "3"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get(I(in), I(in+sizeof(in)-1), ios, err, &t, 'w'); - assert(i.base() == in+sizeof(in)-1); - assert(t.tm_wday == 3); - assert(err == std::ios_base::eofbit); - } - { - const char in[] = "06/06/09"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get(I(in), I(in+sizeof(in)-1), ios, err, &t, 'x'); - assert(i.base() == in+sizeof(in)-1); - assert(t.tm_mon == 5); - assert(t.tm_mday == 6); - assert(t.tm_year == 109); - assert(err == std::ios_base::eofbit); - } - { - const char in[] = "21:49:10"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get(I(in), I(in+sizeof(in)-1), ios, err, &t, 'X'); - assert(i.base() == in+sizeof(in)-1); - assert(t.tm_hour == 21); - assert(t.tm_min == 49); - assert(t.tm_sec == 10); - assert(err == std::ios_base::eofbit); - } - { - const char in[] = "68"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get(I(in), I(in+sizeof(in)-1), ios, err, &t, 'y'); - assert(i.base() == in+sizeof(in)-1); - assert(t.tm_year == 168); - assert(err == std::ios_base::eofbit); - } - { - const char in[] = "68"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get(I(in), I(in+sizeof(in)-1), ios, err, &t, 'Y'); - assert(i.base() == in+sizeof(in)-1); - assert(t.tm_year == -1832); - assert(err == std::ios_base::eofbit); - } - { - const char in[] = "%"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get(I(in), I(in+sizeof(in)-1), ios, err, &t, '%'); - assert(i.base() == in+sizeof(in)-1); - assert(err == std::ios_base::eofbit); - } -} diff --git a/test/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_time.xfail.pass.cpp b/test/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_time.xfail.pass.cpp deleted file mode 100644 index ea90c44c..00000000 --- a/test/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_time.xfail.pass.cpp +++ /dev/null @@ -1,117 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// class time_get - -// iter_type -// get_time(iter_type s, iter_type end, ios_base& str, -// ios_base::iostate& err, tm* t) const; - -#include -#include -#include "iterators.h" - -typedef input_iterator I; - -typedef std::time_get F; - -class my_facet - : public F -{ -public: - explicit my_facet(std::size_t refs = 0) - : F(refs) {} -}; - -int main() -{ - const my_facet f(1); - std::ios ios(0); - std::ios_base::iostate err; - std::tm t; - { - const char in[] = "0:0:0"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_time(I(in), I(in+sizeof(in)-1), ios, err, &t); - assert(i.base() == in+sizeof(in)-1); - assert(t.tm_hour == 0); - assert(t.tm_min == 0); - assert(t.tm_sec == 0); - assert(err == std::ios_base::eofbit); - } - { - const char in[] = "23:59:60"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_time(I(in), I(in+sizeof(in)-1), ios, err, &t); - assert(i.base() == in+sizeof(in)-1); - assert(t.tm_hour == 23); - assert(t.tm_min == 59); - assert(t.tm_sec == 60); - assert(err == std::ios_base::eofbit); - } - { - const char in[] = "24:59:60"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_time(I(in), I(in+sizeof(in)-1), ios, err, &t); - assert(i.base() == in+2); - assert(t.tm_hour == 0); - assert(t.tm_min == 0); - assert(t.tm_sec == 0); - assert(err == std::ios_base::failbit); - } - { - const char in[] = "23:60:60"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_time(I(in), I(in+sizeof(in)-1), ios, err, &t); - assert(i.base() == in+5); -// assert(t.tm_hour == 0); -// assert(t.tm_min == 0); -// assert(t.tm_sec == 0); - assert(err == std::ios_base::failbit); - } - { - const char in[] = "23:59:61"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_time(I(in), I(in+sizeof(in)-1), ios, err, &t); - assert(i.base() == in+8); -// assert(t.tm_hour == 0); -// assert(t.tm_min == 0); -// assert(t.tm_sec == 0); - assert(err == (std::ios_base::failbit | std::ios_base::eofbit)); - } - { - const char in[] = "2:43:221"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_time(I(in), I(in+sizeof(in)-1), ios, err, &t); - assert(i.base() == in+7); - assert(t.tm_hour == 2); - assert(t.tm_min == 43); - assert(t.tm_sec == 22); - assert(err == std::ios_base::goodbit); - } - { - const char in[] = "2.43:221"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_time(I(in), I(in+sizeof(in)-1), ios, err, &t); - assert(i.base() == in+1); -// assert(t.tm_hour == 0); -// assert(t.tm_min == 0); -// assert(t.tm_sec == 0); - assert(err == std::ios_base::failbit); - } -} diff --git a/test/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_time_wide.xfail.pass.cpp b/test/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_time_wide.xfail.pass.cpp deleted file mode 100644 index dee08416..00000000 --- a/test/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_time_wide.xfail.pass.cpp +++ /dev/null @@ -1,117 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// class time_get - -// iter_type -// get_time(iter_type s, iter_type end, ios_base& str, -// ios_base::iostate& err, tm* t) const; - -#include -#include -#include "iterators.h" - -typedef input_iterator I; - -typedef std::time_get F; - -class my_facet - : public F -{ -public: - explicit my_facet(std::size_t refs = 0) - : F(refs) {} -}; - -int main() -{ - const my_facet f(1); - std::ios ios(0); - std::ios_base::iostate err; - std::tm t; - { - const wchar_t in[] = L"0:0:0"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_time(I(in), I(in+sizeof(in)/sizeof(in[0])-1), ios, err, &t); - assert(i.base() == in+sizeof(in)/sizeof(in[0])-1); - assert(t.tm_hour == 0); - assert(t.tm_min == 0); - assert(t.tm_sec == 0); - assert(err == std::ios_base::eofbit); - } - { - const wchar_t in[] = L"23:59:60"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_time(I(in), I(in+sizeof(in)/sizeof(in[0])-1), ios, err, &t); - assert(i.base() == in+sizeof(in)/sizeof(in[0])-1); - assert(t.tm_hour == 23); - assert(t.tm_min == 59); - assert(t.tm_sec == 60); - assert(err == std::ios_base::eofbit); - } - { - const wchar_t in[] = L"24:59:60"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_time(I(in), I(in+sizeof(in)/sizeof(in[0])-1), ios, err, &t); - assert(i.base() == in+2); - assert(t.tm_hour == 0); - assert(t.tm_min == 0); - assert(t.tm_sec == 0); - assert(err == std::ios_base::failbit); - } - { - const wchar_t in[] = L"23:60:60"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_time(I(in), I(in+sizeof(in)/sizeof(in[0])-1), ios, err, &t); - assert(i.base() == in+5); -// assert(t.tm_hour == 0); -// assert(t.tm_min == 0); -// assert(t.tm_sec == 0); - assert(err == std::ios_base::failbit); - } - { - const wchar_t in[] = L"23:59:61"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_time(I(in), I(in+sizeof(in)/sizeof(in[0])-1), ios, err, &t); - assert(i.base() == in+8); -// assert(t.tm_hour == 0); -// assert(t.tm_min == 0); -// assert(t.tm_sec == 0); - assert(err == (std::ios_base::failbit | std::ios_base::eofbit)); - } - { - const wchar_t in[] = L"2:43:221"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_time(I(in), I(in+sizeof(in)/sizeof(in[0])-1), ios, err, &t); - assert(i.base() == in+7); - assert(t.tm_hour == 2); - assert(t.tm_min == 43); - assert(t.tm_sec == 22); - assert(err == std::ios_base::goodbit); - } - { - const wchar_t in[] = L"2.43:221"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_time(I(in), I(in+sizeof(in)/sizeof(in[0])-1), ios, err, &t); - assert(i.base() == in+1); -// assert(t.tm_hour == 0); -// assert(t.tm_min == 0); -// assert(t.tm_sec == 0); - assert(err == std::ios_base::failbit); - } -} diff --git a/test/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_weekday.xfail.pass.cpp b/test/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_weekday.xfail.pass.cpp deleted file mode 100644 index 5c412eaf..00000000 --- a/test/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_weekday.xfail.pass.cpp +++ /dev/null @@ -1,220 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// class time_get - -// iter_type -// get_weekday(iter_type s, iter_type end, ios_base& str, -// ios_base::iostate& err, tm* t) const; - -#include -#include -#include "iterators.h" - -typedef input_iterator I; - -typedef std::time_get F; - -class my_facet - : public F -{ -public: - explicit my_facet(std::size_t refs = 0) - : F(refs) {} -}; - -int main() -{ - const my_facet f(1); - std::ios ios(0); - std::ios_base::iostate err; - std::tm t; - { - const char in[] = "Sun"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_weekday(I(in), I(in+sizeof(in)-1), ios, err, &t); - assert(i.base() == in+3); - assert(t.tm_wday == 0); - assert(err == std::ios_base::eofbit); - } - { - const char in[] = "Suny"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_weekday(I(in), I(in+sizeof(in)-1), ios, err, &t); - assert(i.base() == in+3); - assert(t.tm_wday == 0); - assert(err == std::ios_base::goodbit); - } - { - const char in[] = "Sund"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_weekday(I(in), I(in+sizeof(in)-1), ios, err, &t); - assert(i.base() == in+4); - assert(t.tm_wday == 0); - assert(err == (std::ios_base::failbit | std::ios_base::eofbit)); - } - { - const char in[] = "sun"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_weekday(I(in), I(in+sizeof(in)-1), ios, err, &t); - assert(i.base() == in+3); - assert(t.tm_wday == 0); - assert(err == std::ios_base::eofbit); - } - { - const char in[] = "sunday"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_weekday(I(in), I(in+sizeof(in)-1), ios, err, &t); - assert(i.base() == in+6); - assert(t.tm_wday == 0); - assert(err == std::ios_base::eofbit); - } - { - const char in[] = "Mon"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_weekday(I(in), I(in+sizeof(in)-1), ios, err, &t); - assert(i.base() == in+3); - assert(t.tm_wday == 1); - assert(err == std::ios_base::eofbit); - } - { - const char in[] = "Mony"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_weekday(I(in), I(in+sizeof(in)-1), ios, err, &t); - assert(i.base() == in+3); - assert(t.tm_wday == 1); - assert(err == std::ios_base::goodbit); - } - { - const char in[] = "Mond"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_weekday(I(in), I(in+sizeof(in)-1), ios, err, &t); - assert(i.base() == in+4); - assert(t.tm_wday == 0); - assert(err == (std::ios_base::failbit | std::ios_base::eofbit)); - } - { - const char in[] = "mon"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_weekday(I(in), I(in+sizeof(in)-1), ios, err, &t); - assert(i.base() == in+3); - assert(t.tm_wday == 1); - assert(err == std::ios_base::eofbit); - } - { - const char in[] = "monday"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_weekday(I(in), I(in+sizeof(in)-1), ios, err, &t); - assert(i.base() == in+6); - assert(t.tm_wday == 1); - assert(err == std::ios_base::eofbit); - } - { - const char in[] = "Tue"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_weekday(I(in), I(in+sizeof(in)-1), ios, err, &t); - assert(i.base() == in+3); - assert(t.tm_wday == 2); - assert(err == std::ios_base::eofbit); - } - { - const char in[] = "Tuesday"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_weekday(I(in), I(in+sizeof(in)-1), ios, err, &t); - assert(i.base() == in+7); - assert(t.tm_wday == 2); - assert(err == std::ios_base::eofbit); - } - { - const char in[] = "Wed"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_weekday(I(in), I(in+sizeof(in)-1), ios, err, &t); - assert(i.base() == in+3); - assert(t.tm_wday == 3); - assert(err == std::ios_base::eofbit); - } - { - const char in[] = "Wednesday"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_weekday(I(in), I(in+sizeof(in)-1), ios, err, &t); - assert(i.base() == in+9); - assert(t.tm_wday == 3); - assert(err == std::ios_base::eofbit); - } - { - const char in[] = "Thu"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_weekday(I(in), I(in+sizeof(in)-1), ios, err, &t); - assert(i.base() == in+3); - assert(t.tm_wday == 4); - assert(err == std::ios_base::eofbit); - } - { - const char in[] = "Thursday"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_weekday(I(in), I(in+sizeof(in)-1), ios, err, &t); - assert(i.base() == in+8); - assert(t.tm_wday == 4); - assert(err == std::ios_base::eofbit); - } - { - const char in[] = "Fri"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_weekday(I(in), I(in+sizeof(in)-1), ios, err, &t); - assert(i.base() == in+3); - assert(t.tm_wday == 5); - assert(err == std::ios_base::eofbit); - } - { - const char in[] = "Friday"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_weekday(I(in), I(in+sizeof(in)-1), ios, err, &t); - assert(i.base() == in+6); - assert(t.tm_wday == 5); - assert(err == std::ios_base::eofbit); - } - { - const char in[] = "Sat"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_weekday(I(in), I(in+sizeof(in)-1), ios, err, &t); - assert(i.base() == in+3); - assert(t.tm_wday == 6); - assert(err == std::ios_base::eofbit); - } - { - const char in[] = "Saturday"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_weekday(I(in), I(in+sizeof(in)-1), ios, err, &t); - assert(i.base() == in+8); - assert(t.tm_wday == 6); - assert(err == std::ios_base::eofbit); - } -} diff --git a/test/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_weekday_wide.xfail.pass.cpp b/test/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_weekday_wide.xfail.pass.cpp deleted file mode 100644 index 7377421f..00000000 --- a/test/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_weekday_wide.xfail.pass.cpp +++ /dev/null @@ -1,220 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// class time_get - -// iter_type -// get_weekday(iter_type s, iter_type end, ios_base& str, -// ios_base::iostate& err, tm* t) const; - -#include -#include -#include "iterators.h" - -typedef input_iterator I; - -typedef std::time_get F; - -class my_facet - : public F -{ -public: - explicit my_facet(std::size_t refs = 0) - : F(refs) {} -}; - -int main() -{ - const my_facet f(1); - std::ios ios(0); - std::ios_base::iostate err; - std::tm t; - { - const wchar_t in[] = L"Sun"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_weekday(I(in), I(in+sizeof(in)/sizeof(in[0])-1), ios, err, &t); - assert(i.base() == in+3); - assert(t.tm_wday == 0); - assert(err == std::ios_base::eofbit); - } - { - const wchar_t in[] = L"Suny"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_weekday(I(in), I(in+sizeof(in)/sizeof(in[0])-1), ios, err, &t); - assert(i.base() == in+3); - assert(t.tm_wday == 0); - assert(err == std::ios_base::goodbit); - } - { - const wchar_t in[] = L"Sund"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_weekday(I(in), I(in+sizeof(in)/sizeof(in[0])-1), ios, err, &t); - assert(i.base() == in+4); - assert(t.tm_wday == 0); - assert(err == (std::ios_base::failbit | std::ios_base::eofbit)); - } - { - const wchar_t in[] = L"sun"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_weekday(I(in), I(in+sizeof(in)/sizeof(in[0])-1), ios, err, &t); - assert(i.base() == in+3); - assert(t.tm_wday == 0); - assert(err == std::ios_base::eofbit); - } - { - const wchar_t in[] = L"sunday"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_weekday(I(in), I(in+sizeof(in)/sizeof(in[0])-1), ios, err, &t); - assert(i.base() == in+6); - assert(t.tm_wday == 0); - assert(err == std::ios_base::eofbit); - } - { - const wchar_t in[] = L"Mon"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_weekday(I(in), I(in+sizeof(in)/sizeof(in[0])-1), ios, err, &t); - assert(i.base() == in+3); - assert(t.tm_wday == 1); - assert(err == std::ios_base::eofbit); - } - { - const wchar_t in[] = L"Mony"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_weekday(I(in), I(in+sizeof(in)/sizeof(in[0])-1), ios, err, &t); - assert(i.base() == in+3); - assert(t.tm_wday == 1); - assert(err == std::ios_base::goodbit); - } - { - const wchar_t in[] = L"Mond"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_weekday(I(in), I(in+sizeof(in)/sizeof(in[0])-1), ios, err, &t); - assert(i.base() == in+4); - assert(t.tm_wday == 0); - assert(err == (std::ios_base::failbit | std::ios_base::eofbit)); - } - { - const wchar_t in[] = L"mon"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_weekday(I(in), I(in+sizeof(in)/sizeof(in[0])-1), ios, err, &t); - assert(i.base() == in+3); - assert(t.tm_wday == 1); - assert(err == std::ios_base::eofbit); - } - { - const wchar_t in[] = L"monday"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_weekday(I(in), I(in+sizeof(in)/sizeof(in[0])-1), ios, err, &t); - assert(i.base() == in+6); - assert(t.tm_wday == 1); - assert(err == std::ios_base::eofbit); - } - { - const wchar_t in[] = L"Tue"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_weekday(I(in), I(in+sizeof(in)/sizeof(in[0])-1), ios, err, &t); - assert(i.base() == in+3); - assert(t.tm_wday == 2); - assert(err == std::ios_base::eofbit); - } - { - const wchar_t in[] = L"Tuesday"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_weekday(I(in), I(in+sizeof(in)/sizeof(in[0])-1), ios, err, &t); - assert(i.base() == in+7); - assert(t.tm_wday == 2); - assert(err == std::ios_base::eofbit); - } - { - const wchar_t in[] = L"Wed"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_weekday(I(in), I(in+sizeof(in)/sizeof(in[0])-1), ios, err, &t); - assert(i.base() == in+3); - assert(t.tm_wday == 3); - assert(err == std::ios_base::eofbit); - } - { - const wchar_t in[] = L"Wednesday"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_weekday(I(in), I(in+sizeof(in)/sizeof(in[0])-1), ios, err, &t); - assert(i.base() == in+9); - assert(t.tm_wday == 3); - assert(err == std::ios_base::eofbit); - } - { - const wchar_t in[] = L"Thu"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_weekday(I(in), I(in+sizeof(in)/sizeof(in[0])-1), ios, err, &t); - assert(i.base() == in+3); - assert(t.tm_wday == 4); - assert(err == std::ios_base::eofbit); - } - { - const wchar_t in[] = L"Thursday"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_weekday(I(in), I(in+sizeof(in)/sizeof(in[0])-1), ios, err, &t); - assert(i.base() == in+8); - assert(t.tm_wday == 4); - assert(err == std::ios_base::eofbit); - } - { - const wchar_t in[] = L"Fri"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_weekday(I(in), I(in+sizeof(in)/sizeof(in[0])-1), ios, err, &t); - assert(i.base() == in+3); - assert(t.tm_wday == 5); - assert(err == std::ios_base::eofbit); - } - { - const wchar_t in[] = L"Friday"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_weekday(I(in), I(in+sizeof(in)/sizeof(in[0])-1), ios, err, &t); - assert(i.base() == in+6); - assert(t.tm_wday == 5); - assert(err == std::ios_base::eofbit); - } - { - const wchar_t in[] = L"Sat"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_weekday(I(in), I(in+sizeof(in)/sizeof(in[0])-1), ios, err, &t); - assert(i.base() == in+3); - assert(t.tm_wday == 6); - assert(err == std::ios_base::eofbit); - } - { - const wchar_t in[] = L"Saturday"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_weekday(I(in), I(in+sizeof(in)/sizeof(in[0])-1), ios, err, &t); - assert(i.base() == in+8); - assert(t.tm_wday == 6); - assert(err == std::ios_base::eofbit); - } -} diff --git a/test/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_year.pass.cpp b/test/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_year.pass.cpp deleted file mode 100644 index bc487bb5..00000000 --- a/test/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_year.pass.cpp +++ /dev/null @@ -1,138 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// class time_get - -// iter_type get_year(iter_type s, iter_type end, ios_base& str, -// ios_base::iostate& err, tm* t) const; - -#include -#include -#include "iterators.h" - -typedef input_iterator I; - -typedef std::time_get F; - -class my_facet - : public F -{ -public: - explicit my_facet(std::size_t refs = 0) - : F(refs) {} -}; - -int main() -{ - const my_facet f(1); - std::ios ios(0); - std::ios_base::iostate err; - std::tm t; - { - const char in[] = "0"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_year(I(in), I(in+sizeof(in)-1), ios, err, &t); - assert(i.base() == in+sizeof(in)-1); - assert(t.tm_year == 100); - assert(err == std::ios_base::eofbit); - } - { - const char in[] = "00"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_year(I(in), I(in+sizeof(in)-1), ios, err, &t); - assert(i.base() == in+sizeof(in)-1); - assert(t.tm_year == 100); - assert(err == std::ios_base::eofbit); - } - { - const char in[] = "1"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_year(I(in), I(in+sizeof(in)-1), ios, err, &t); - assert(i.base() == in+sizeof(in)-1); - assert(t.tm_year == 101); - assert(err == std::ios_base::eofbit); - } - { - const char in[] = "68"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_year(I(in), I(in+sizeof(in)-1), ios, err, &t); - assert(i.base() == in+sizeof(in)-1); - assert(t.tm_year == 168); - assert(err == std::ios_base::eofbit); - } - { - const char in[] = "69"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_year(I(in), I(in+sizeof(in)-1), ios, err, &t); - assert(i.base() == in+sizeof(in)-1); - assert(t.tm_year == 69); - assert(err == std::ios_base::eofbit); - } - { - const char in[] = "99"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_year(I(in), I(in+sizeof(in)-1), ios, err, &t); - assert(i.base() == in+sizeof(in)-1); - assert(t.tm_year == 99); - assert(err == std::ios_base::eofbit); - } - { - const char in[] = "100"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_year(I(in), I(in+sizeof(in)-1), ios, err, &t); - assert(i.base() == in+sizeof(in)-1); - assert(t.tm_year == -1800); - assert(err == std::ios_base::eofbit); - } - { - const char in[] = "1900"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_year(I(in), I(in+sizeof(in)-1), ios, err, &t); - assert(i.base() == in+sizeof(in)-1); - assert(t.tm_year == 0); - assert(err == std::ios_base::eofbit); - } - { - const char in[] = "1968"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_year(I(in), I(in+sizeof(in)-1), ios, err, &t); - assert(i.base() == in+sizeof(in)-1); - assert(t.tm_year == 68); - assert(err == std::ios_base::eofbit); - } - { - const char in[] = "2000"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_year(I(in), I(in+sizeof(in)-1), ios, err, &t); - assert(i.base() == in+sizeof(in)-1); - assert(t.tm_year == 100); - assert(err == std::ios_base::eofbit); - } - { - const char in[] = "2999c"; - err = std::ios_base::goodbit; - t = std::tm(); - I i = f.get_year(I(in), I(in+sizeof(in)-1), ios, err, &t); - assert(i.base() == in+sizeof(in)-2); - assert(t.tm_year == 1099); - assert(err == std::ios_base::goodbit); - } -} diff --git a/test/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/iterators.h b/test/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/iterators.h deleted file mode 100644 index 7b0f6338..00000000 --- a/test/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/iterators.h +++ /dev/null @@ -1,55 +0,0 @@ -#ifndef ITERATORS_H -#define ITERATORS_H - -#include - -template -class input_iterator -{ - It it_; - - template friend class input_iterator; -public: - typedef std::input_iterator_tag iterator_category; - typedef typename std::iterator_traits::value_type value_type; - typedef typename std::iterator_traits::difference_type difference_type; - typedef It pointer; - typedef typename std::iterator_traits::reference reference; - - It base() const {return it_;} - - input_iterator() : it_() {} - explicit input_iterator(It it) : it_(it) {} - template - input_iterator(const input_iterator& u) :it_(u.it_) {} - - reference operator*() const {return *it_;} - pointer operator->() const {return it_;} - - input_iterator& operator++() {++it_; return *this;} - input_iterator operator++(int) - {input_iterator tmp(*this); ++(*this); return tmp;} - - friend bool operator==(const input_iterator& x, const input_iterator& y) - {return x.it_ == y.it_;} - friend bool operator!=(const input_iterator& x, const input_iterator& y) - {return !(x == y);} -}; - -template -inline -bool -operator==(const input_iterator& x, const input_iterator& y) -{ - return x.base() == y.base(); -} - -template -inline -bool -operator!=(const input_iterator& x, const input_iterator& y) -{ - return !(x == y); -} - -#endif // ITERATORS_H diff --git a/test/localization/locale.categories/category.time/locale.time.get/locale.time.get.virtuals/tested_elsewhere.pass.cpp b/test/localization/locale.categories/category.time/locale.time.get/locale.time.get.virtuals/tested_elsewhere.pass.cpp deleted file mode 100644 index b58f5c55..00000000 --- a/test/localization/locale.categories/category.time/locale.time.get/locale.time.get.virtuals/tested_elsewhere.pass.cpp +++ /dev/null @@ -1,12 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -int main() -{ -} diff --git a/test/localization/locale.categories/category.time/locale.time.get/time_base.pass.cpp b/test/localization/locale.categories/category.time/locale.time.get/time_base.pass.cpp deleted file mode 100644 index 28bc3aa8..00000000 --- a/test/localization/locale.categories/category.time/locale.time.get/time_base.pass.cpp +++ /dev/null @@ -1,29 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// class time_base -// { -// public: -// enum dateorder {no_order, dmy, mdy, ymd, ydm}; -// }; - -#include -#include - -int main() -{ - std::time_base::dateorder d = std::time_base::no_order; - assert(std::time_base::no_order == 0); - assert(std::time_base::dmy == 1); - assert(std::time_base::mdy == 2); - assert(std::time_base::ymd == 3); - assert(std::time_base::ydm == 4); -} diff --git a/test/localization/locale.categories/category.time/locale.time.get/types.pass.cpp b/test/localization/locale.categories/category.time/locale.time.get/types.pass.cpp deleted file mode 100644 index f434ea57..00000000 --- a/test/localization/locale.categories/category.time/locale.time.get/types.pass.cpp +++ /dev/null @@ -1,41 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// class time_base -// { -// public: -// enum dateorder {no_order, dmy, mdy, ymd, ydm}; -// }; -// -// template > -// class time_get -// : public locale::facet, -// public time_base -// { -// public: -// typedef charT char_type; -// typedef InputIterator iter_type; - -#include -#include -#include - -int main() -{ - static_assert((std::is_base_of >::value), ""); - static_assert((std::is_base_of >::value), ""); - static_assert((std::is_base_of >::value), ""); - static_assert((std::is_base_of >::value), ""); - static_assert((std::is_same::char_type, char>::value), ""); - static_assert((std::is_same::char_type, wchar_t>::value), ""); - static_assert((std::is_same::iter_type, std::istreambuf_iterator >::value), ""); - static_assert((std::is_same::iter_type, std::istreambuf_iterator >::value), ""); -} diff --git a/test/localization/locale.categories/category.time/locale.time.put.byname/iterators.h b/test/localization/locale.categories/category.time/locale.time.put.byname/iterators.h deleted file mode 100644 index fa6e1004..00000000 --- a/test/localization/locale.categories/category.time/locale.time.put.byname/iterators.h +++ /dev/null @@ -1,33 +0,0 @@ -#ifndef ITERATORS_H -#define ITERATORS_H - -#include - -template -class output_iterator -{ - It it_; - - template friend class output_iterator; -public: - typedef std::output_iterator_tag iterator_category; - typedef typename std::iterator_traits::value_type value_type; - typedef typename std::iterator_traits::difference_type difference_type; - typedef It pointer; - typedef typename std::iterator_traits::reference reference; - - It base() const {return it_;} - - output_iterator() : it_() {} - explicit output_iterator(It it) : it_(it) {} - template - output_iterator(const output_iterator& u) :it_(u.it_) {} - - reference operator*() const {return *it_;} - - output_iterator& operator++() {++it_; return *this;} - output_iterator operator++(int) - {output_iterator tmp(*this); ++(*this); return tmp;} -}; - -#endif // ITERATORS_H diff --git a/test/localization/locale.categories/category.time/locale.time.put.byname/put1.xfail.pass.cpp b/test/localization/locale.categories/category.time/locale.time.put.byname/put1.xfail.pass.cpp deleted file mode 100644 index 9595a00f..00000000 --- a/test/localization/locale.categories/category.time/locale.time.put.byname/put1.xfail.pass.cpp +++ /dev/null @@ -1,69 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template > -// class time_put_byname -// : public time_put -// { -// public: -// explicit time_put_byname(const char* nm, size_t refs = 0); -// explicit time_put_byname(const string& nm, size_t refs = 0); -// -// protected: -// ~time_put_byname(); -// }; - -#include -#include -#include "iterators.h" - -typedef std::time_put_byname > F; - -class my_facet - : public F -{ -public: - explicit my_facet(const std::string& nm, std::size_t refs = 0) - : F(nm, refs) {} -}; - -int main() -{ - char str[200]; - output_iterator iter; - tm t; - t.tm_sec = 6; - t.tm_min = 3; - t.tm_hour = 13; - t.tm_mday = 2; - t.tm_mon = 4; - t.tm_year = 109; - t.tm_wday = 6; - t.tm_yday = -1; - t.tm_isdst = 1; - std::ios ios(0); - { - const my_facet f("en_US", 1); - std::string pat("Today is %A which is abreviated %a."); - iter = f.put(output_iterator(str), ios, '*', &t, - pat.data(), pat.data() + pat.size()); - std::string ex(str, iter.base()); - assert(ex == "Today is Saturday which is abreviated Sat."); - } - { - const my_facet f("fr_FR", 1); - std::string pat("Today is %A which is abreviated %a."); - iter = f.put(output_iterator(str), ios, '*', &t, - pat.data(), pat.data() + pat.size()); - std::string ex(str, iter.base()); - assert(ex == "Today is Samedi which is abreviated Sam."); - } -} diff --git a/test/localization/locale.categories/category.time/locale.time.put/ctor.pass.cpp b/test/localization/locale.categories/category.time/locale.time.put/ctor.pass.cpp deleted file mode 100644 index c22980a6..00000000 --- a/test/localization/locale.categories/category.time/locale.time.put/ctor.pass.cpp +++ /dev/null @@ -1,52 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// class time_put - -// explicit time_put(size_t refs = 0); - -#include -#include - -typedef std::time_put F; - -class my_facet - : public F -{ -public: - static int count; - - explicit my_facet(std::size_t refs = 0) - : F(refs) {++count;} - - ~my_facet() {--count;} -}; - -int my_facet::count = 0; - -int main() -{ - { - std::locale l(std::locale::classic(), new my_facet); - assert(my_facet::count == 1); - } - assert(my_facet::count == 0); - { - my_facet f(1); - assert(my_facet::count == 1); - { - std::locale l(std::locale::classic(), &f); - assert(my_facet::count == 1); - } - assert(my_facet::count == 1); - } - assert(my_facet::count == 0); -} diff --git a/test/localization/locale.categories/category.time/locale.time.put/locale.time.put.members/iterators.h b/test/localization/locale.categories/category.time/locale.time.put/locale.time.put.members/iterators.h deleted file mode 100644 index fa6e1004..00000000 --- a/test/localization/locale.categories/category.time/locale.time.put/locale.time.put.members/iterators.h +++ /dev/null @@ -1,33 +0,0 @@ -#ifndef ITERATORS_H -#define ITERATORS_H - -#include - -template -class output_iterator -{ - It it_; - - template friend class output_iterator; -public: - typedef std::output_iterator_tag iterator_category; - typedef typename std::iterator_traits::value_type value_type; - typedef typename std::iterator_traits::difference_type difference_type; - typedef It pointer; - typedef typename std::iterator_traits::reference reference; - - It base() const {return it_;} - - output_iterator() : it_() {} - explicit output_iterator(It it) : it_(it) {} - template - output_iterator(const output_iterator& u) :it_(u.it_) {} - - reference operator*() const {return *it_;} - - output_iterator& operator++() {++it_; return *this;} - output_iterator operator++(int) - {output_iterator tmp(*this); ++(*this); return tmp;} -}; - -#endif // ITERATORS_H diff --git a/test/localization/locale.categories/category.time/locale.time.put/locale.time.put.members/put1.xfail.pass.cpp b/test/localization/locale.categories/category.time/locale.time.put/locale.time.put.members/put1.xfail.pass.cpp deleted file mode 100644 index 81727604..00000000 --- a/test/localization/locale.categories/category.time/locale.time.put/locale.time.put.members/put1.xfail.pass.cpp +++ /dev/null @@ -1,61 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// class time_put - -// iter_type put(iter_type s, ios_base& str, char_type fill, const tm* t, -// const charT* pattern, const charT* pat_end) const; - -#include -#include -#include "iterators.h" - -typedef std::time_put > F; - -class my_facet - : public F -{ -public: - explicit my_facet(std::size_t refs = 0) - : F(refs) {} -}; - -int main() -{ - const my_facet f(1); - char str[200]; - output_iterator iter; - tm t; - t.tm_sec = 6; - t.tm_min = 3; - t.tm_hour = 13; - t.tm_mday = 2; - t.tm_mon = 4; - t.tm_year = 109; - t.tm_wday = 6; - t.tm_yday = -1; - t.tm_isdst = 1; - std::ios ios(0); - { - std::string pat("Today is %A which is abreviated %a."); - iter = f.put(output_iterator(str), ios, '*', &t, - pat.data(), pat.data() + pat.size()); - std::string ex(str, iter.base()); - assert(ex == "Today is Saturday which is abreviated Sat."); - } - { - std::string pat("The number of the month is %Om."); - iter = f.put(output_iterator(str), ios, '*', &t, - pat.data(), pat.data() + pat.size()); - std::string ex(str, iter.base()); - assert(ex == "The number of the month is 05."); - } -} diff --git a/test/localization/locale.categories/category.time/locale.time.put/locale.time.put.members/put2.xfail.pass.cpp b/test/localization/locale.categories/category.time/locale.time.put/locale.time.put.members/put2.xfail.pass.cpp deleted file mode 100644 index 1fc5022d..00000000 --- a/test/localization/locale.categories/category.time/locale.time.put/locale.time.put.members/put2.xfail.pass.cpp +++ /dev/null @@ -1,367 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// class time_put - -// iter_type put(iter_type s, ios_base& str, char_type fill, const tm* t, -// char format, char modifier = 0) const; - -#include -#include -#include "iterators.h" - -typedef std::time_put > F; - -class my_facet - : public F -{ -public: - explicit my_facet(std::size_t refs = 0) - : F(refs) {} -}; - -int main() -{ - const my_facet f(1); - char str[200]; - output_iterator iter; - tm t = {0}; - t.tm_sec = 6; - t.tm_min = 3; - t.tm_hour = 13; - t.tm_mday = 2; - t.tm_mon = 4; - t.tm_year = 109; - t.tm_wday = 6; - t.tm_yday = -1; - t.tm_isdst = 1; - std::ios ios(0); - { - iter = f.put(output_iterator(str), ios, '*', &t, 'A'); - std::string ex(str, iter.base()); - assert(ex == "Saturday"); - } - { - iter = f.put(output_iterator(str), ios, '*', &t, 'a'); - std::string ex(str, iter.base()); - assert(ex == "Sat"); - } - { - iter = f.put(output_iterator(str), ios, '*', &t, 'B'); - std::string ex(str, iter.base()); - assert(ex == "May"); - } - { - iter = f.put(output_iterator(str), ios, '*', &t, 'b'); - std::string ex(str, iter.base()); - assert(ex == "May"); - } - { - iter = f.put(output_iterator(str), ios, '*', &t, 'C'); - std::string ex(str, iter.base()); - assert(ex == "20"); - } - { - iter = f.put(output_iterator(str), ios, '*', &t, 'c'); - std::string ex(str, iter.base()); - assert(ex == "Sat May 2 13:03:06 2009"); - } - { - iter = f.put(output_iterator(str), ios, '*', &t, 'D'); - std::string ex(str, iter.base()); - assert(ex == "05/02/09"); - } - { - iter = f.put(output_iterator(str), ios, '*', &t, 'd'); - std::string ex(str, iter.base()); - assert(ex == "02"); - } - { - iter = f.put(output_iterator(str), ios, '*', &t, 'c', 'E'); - std::string ex(str, iter.base()); - assert(ex == "Sat May 2 13:03:06 2009"); - } - { - iter = f.put(output_iterator(str), ios, '*', &t, 'C', 'E'); - std::string ex(str, iter.base()); - assert(ex == "20"); - } - { - iter = f.put(output_iterator(str), ios, '*', &t, 'x', 'E'); - std::string ex(str, iter.base()); - assert(ex == "05/02/09"); - } - { - iter = f.put(output_iterator(str), ios, '*', &t, 'X', 'E'); - std::string ex(str, iter.base()); - assert(ex == "13:03:06"); - } - { - iter = f.put(output_iterator(str), ios, '*', &t, 'y', 'E'); - std::string ex(str, iter.base()); - assert(ex == "09"); - } - { - iter = f.put(output_iterator(str), ios, '*', &t, 'Y', 'E'); - std::string ex(str, iter.base()); - assert(ex == "2009"); - } - { - iter = f.put(output_iterator(str), ios, '*', &t, 'd', 'O'); - std::string ex(str, iter.base()); - assert(ex == "02"); - } - { - iter = f.put(output_iterator(str), ios, '*', &t, 'e', 'O'); - std::string ex(str, iter.base()); - assert(ex == " 2"); - } - { - iter = f.put(output_iterator(str), ios, '*', &t, 'H', 'O'); - std::string ex(str, iter.base()); - assert(ex == "13"); - } - { - iter = f.put(output_iterator(str), ios, '*', &t, 'I', 'O'); - std::string ex(str, iter.base()); - assert(ex == "01"); - } - { - iter = f.put(output_iterator(str), ios, '*', &t, 'm', 'O'); - std::string ex(str, iter.base()); - assert(ex == "05"); - } - { - iter = f.put(output_iterator(str), ios, '*', &t, 'M', 'O'); - std::string ex(str, iter.base()); - assert(ex == "03"); - } - { - iter = f.put(output_iterator(str), ios, '*', &t, 'S', 'O'); - std::string ex(str, iter.base()); - assert(ex == "06"); - } - { - iter = f.put(output_iterator(str), ios, '*', &t, 'u', 'O'); - std::string ex(str, iter.base()); - assert(ex == "6"); - } - { - iter = f.put(output_iterator(str), ios, '*', &t, 'U', 'O'); - std::string ex(str, iter.base()); - assert(ex == "00"); - } - { - iter = f.put(output_iterator(str), ios, '*', &t, 'V', 'O'); - std::string ex(str, iter.base()); - assert(ex == "52"); - } - { - iter = f.put(output_iterator(str), ios, '*', &t, 'w', 'O'); - std::string ex(str, iter.base()); - assert(ex == "6"); - } - { - iter = f.put(output_iterator(str), ios, '*', &t, 'W', 'O'); - std::string ex(str, iter.base()); - assert(ex == "00"); - } - { - iter = f.put(output_iterator(str), ios, '*', &t, 'y', 'O'); - std::string ex(str, iter.base()); - assert(ex == "09"); - } - { - iter = f.put(output_iterator(str), ios, '*', &t, 'B', 'O'); - std::string ex(str, iter.base()); - assert(ex == "May"); - } - { - iter = f.put(output_iterator(str), ios, '*', &t, 'e'); - std::string ex(str, iter.base()); - assert(ex == " 2"); - } - { - iter = f.put(output_iterator(str), ios, '*', &t, 'F'); - std::string ex(str, iter.base()); - assert(ex == "2009-05-02"); - } - { - iter = f.put(output_iterator(str), ios, '*', &t, 'G'); - std::string ex(str, iter.base()); - assert(ex == "2008"); - } - { - iter = f.put(output_iterator(str), ios, '*', &t, 'g'); - std::string ex(str, iter.base()); - assert(ex == "08"); - } - { - iter = f.put(output_iterator(str), ios, '*', &t, 'H'); - std::string ex(str, iter.base()); - assert(ex == "13"); - } - { - iter = f.put(output_iterator(str), ios, '*', &t, 'h'); - std::string ex(str, iter.base()); - assert(ex == "May"); - } - { - iter = f.put(output_iterator(str), ios, '*', &t, 'I'); - std::string ex(str, iter.base()); - assert(ex == "01"); - } - { - iter = f.put(output_iterator(str), ios, '*', &t, 'j'); - std::string ex(str, iter.base()); - assert(ex == "000"); - } - { - iter = f.put(output_iterator(str), ios, '*', &t, 'k'); - std::string ex(str, iter.base()); - assert(ex == "13"); - } - { - iter = f.put(output_iterator(str), ios, '*', &t, 'l'); - std::string ex(str, iter.base()); - assert(ex == " 1"); - } - { - iter = f.put(output_iterator(str), ios, '*', &t, 'M'); - std::string ex(str, iter.base()); - assert(ex == "03"); - } - { - iter = f.put(output_iterator(str), ios, '*', &t, 'm'); - std::string ex(str, iter.base()); - assert(ex == "05"); - } - { - iter = f.put(output_iterator(str), ios, '*', &t, 'n'); - std::string ex(str, iter.base()); - assert(ex == "\n"); - } - { - iter = f.put(output_iterator(str), ios, '*', &t, 'p'); - std::string ex(str, iter.base()); - assert(ex == "PM"); - } - { - iter = f.put(output_iterator(str), ios, '*', &t, 'R'); - std::string ex(str, iter.base()); - assert(ex == "13:03"); - } - { - iter = f.put(output_iterator(str), ios, '*', &t, 'r'); - std::string ex(str, iter.base()); - assert(ex == "01:03:06 PM"); - } - { - iter = f.put(output_iterator(str), ios, '*', &t, 'S'); - std::string ex(str, iter.base()); - assert(ex == "06"); - } - { - iter = f.put(output_iterator(str), ios, '*', &t, 's'); - std::string ex(str, iter.base()); -// assert(ex == "1241283786"); depends on time zone - } - { - iter = f.put(output_iterator(str), ios, '*', &t, 'T'); - std::string ex(str, iter.base()); - assert(ex == "13:03:06"); - } - { - iter = f.put(output_iterator(str), ios, '*', &t, 't'); - std::string ex(str, iter.base()); - assert(ex == "\t"); - } - { - iter = f.put(output_iterator(str), ios, '*', &t, 'U'); - std::string ex(str, iter.base()); - assert(ex == "00"); - } - { - iter = f.put(output_iterator(str), ios, '*', &t, 'u'); - std::string ex(str, iter.base()); - assert(ex == "6"); - } - { - iter = f.put(output_iterator(str), ios, '*', &t, 'V'); - std::string ex(str, iter.base()); - assert(ex == "52"); - } - { - iter = f.put(output_iterator(str), ios, '*', &t, 'v'); - std::string ex(str, iter.base()); - assert(ex == " 2-May-2009"); - } - { - iter = f.put(output_iterator(str), ios, '*', &t, 'W'); - std::string ex(str, iter.base()); - assert(ex == "00"); - } - { - iter = f.put(output_iterator(str), ios, '*', &t, 'w'); - std::string ex(str, iter.base()); - assert(ex == "6"); - } - { - iter = f.put(output_iterator(str), ios, '*', &t, 'X'); - std::string ex(str, iter.base()); - assert(ex == "13:03:06"); - } - { - iter = f.put(output_iterator(str), ios, '*', &t, 'x'); - std::string ex(str, iter.base()); - assert(ex == "05/02/09"); - } - { - iter = f.put(output_iterator(str), ios, '*', &t, 'Y'); - std::string ex(str, iter.base()); - assert(ex == "2009"); - } - { - iter = f.put(output_iterator(str), ios, '*', &t, 'y'); - std::string ex(str, iter.base()); - assert(ex == "09"); - } - { - iter = f.put(output_iterator(str), ios, '*', &t, 'Z'); - std::string ex(str, iter.base()); -// assert(ex == "EDT"); depends on time zone - } - { - iter = f.put(output_iterator(str), ios, '*', &t, 'z'); - std::string ex(str, iter.base()); -// assert(ex == "-0400"); depends on time zone - } - { - iter = f.put(output_iterator(str), ios, '*', &t, '+'); - std::string ex(str, iter.base()); -// assert(ex == "Sat May 2 13:03:06 EDT 2009"); depends on time zone - } - { - iter = f.put(output_iterator(str), ios, '*', &t, '%'); - std::string ex(str, iter.base()); - assert(ex == "%"); - } - { - iter = f.put(output_iterator(str), ios, '*', &t, '%', 'J'); - std::string ex(str, iter.base()); - assert(ex == "J%"); - } - { - iter = f.put(output_iterator(str), ios, '*', &t, 'J'); - std::string ex(str, iter.base()); - assert(ex == "J"); - } -} diff --git a/test/localization/locale.categories/category.time/locale.time.put/locale.time.put.virtuals/tested_elsewhere.pass.cpp b/test/localization/locale.categories/category.time/locale.time.put/locale.time.put.virtuals/tested_elsewhere.pass.cpp deleted file mode 100644 index b58f5c55..00000000 --- a/test/localization/locale.categories/category.time/locale.time.put/locale.time.put.virtuals/tested_elsewhere.pass.cpp +++ /dev/null @@ -1,12 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -int main() -{ -} diff --git a/test/localization/locale.categories/category.time/locale.time.put/types.pass.cpp b/test/localization/locale.categories/category.time/locale.time.put/types.pass.cpp deleted file mode 100644 index db9d3fbf..00000000 --- a/test/localization/locale.categories/category.time/locale.time.put/types.pass.cpp +++ /dev/null @@ -1,32 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template > -// class time_put -// : public locale::facet -// { -// public: -// typedef charT char_type; -// typedef OutputIterator iter_type; - -#include -#include -#include - -int main() -{ - static_assert((std::is_base_of >::value), ""); - static_assert((std::is_base_of >::value), ""); - static_assert((std::is_same::char_type, char>::value), ""); - static_assert((std::is_same::char_type, wchar_t>::value), ""); - static_assert((std::is_same::iter_type, std::ostreambuf_iterator >::value), ""); - static_assert((std::is_same::iter_type, std::ostreambuf_iterator >::value), ""); -} diff --git a/test/localization/locale.categories/category.time/nothing_to_do.pass.cpp b/test/localization/locale.categories/category.time/nothing_to_do.pass.cpp deleted file mode 100644 index b58f5c55..00000000 --- a/test/localization/locale.categories/category.time/nothing_to_do.pass.cpp +++ /dev/null @@ -1,12 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -int main() -{ -} diff --git a/test/localization/locale.categories/facet.numpunct/locale.numpunct.byname/decimal_point.xfail.pass.cpp b/test/localization/locale.categories/facet.numpunct/locale.numpunct.byname/decimal_point.xfail.pass.cpp deleted file mode 100644 index 4ca97089..00000000 --- a/test/localization/locale.categories/facet.numpunct/locale.numpunct.byname/decimal_point.xfail.pass.cpp +++ /dev/null @@ -1,60 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template class numpunct_byname; - -// char_type decimal_point() const; - -#include -#include - -int main() -{ - { - std::locale l("C"); - { - typedef char C; - const std::numpunct& np = std::use_facet >(l); - assert(np.decimal_point() == '.'); - } - { - typedef wchar_t C; - const std::numpunct& np = std::use_facet >(l); - assert(np.decimal_point() == L'.'); - } - } - { - std::locale l("en_US"); - { - typedef char C; - const std::numpunct& np = std::use_facet >(l); - assert(np.decimal_point() == '.'); - } - { - typedef wchar_t C; - const std::numpunct& np = std::use_facet >(l); - assert(np.decimal_point() == L'.'); - } - } - { - std::locale l("fr_FR"); - { - typedef char C; - const std::numpunct& np = std::use_facet >(l); - assert(np.decimal_point() == ','); - } - { - typedef wchar_t C; - const std::numpunct& np = std::use_facet >(l); - assert(np.decimal_point() == L','); - } - } -} diff --git a/test/localization/locale.categories/facet.numpunct/locale.numpunct.byname/grouping.xfail.pass.cpp b/test/localization/locale.categories/facet.numpunct/locale.numpunct.byname/grouping.xfail.pass.cpp deleted file mode 100644 index 48014627..00000000 --- a/test/localization/locale.categories/facet.numpunct/locale.numpunct.byname/grouping.xfail.pass.cpp +++ /dev/null @@ -1,60 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template class numpunct_byname; - -// string grouping() const; - -#include -#include - -int main() -{ - { - std::locale l("C"); - { - typedef char C; - const std::numpunct& np = std::use_facet >(l); - assert(np.grouping() == ""); - } - { - typedef wchar_t C; - const std::numpunct& np = std::use_facet >(l); - assert(np.grouping() == ""); - } - } - { - std::locale l("en_US"); - { - typedef char C; - const std::numpunct& np = std::use_facet >(l); - assert(np.grouping() == "\3\3"); - } - { - typedef wchar_t C; - const std::numpunct& np = std::use_facet >(l); - assert(np.grouping() == "\3\3"); - } - } - { - std::locale l("fr_FR"); - { - typedef char C; - const std::numpunct& np = std::use_facet >(l); - assert(np.grouping() == "\x7F"); - } - { - typedef wchar_t C; - const std::numpunct& np = std::use_facet >(l); - assert(np.grouping() == "\x7F"); - } - } -} diff --git a/test/localization/locale.categories/facet.numpunct/locale.numpunct.byname/thousands_sep.pass.cpp b/test/localization/locale.categories/facet.numpunct/locale.numpunct.byname/thousands_sep.pass.cpp deleted file mode 100644 index badef13c..00000000 --- a/test/localization/locale.categories/facet.numpunct/locale.numpunct.byname/thousands_sep.pass.cpp +++ /dev/null @@ -1,60 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template class numpunct_byname; - -// char_type thousands_sep() const; - -#include -#include - -int main() -{ - { - std::locale l("C"); - { - typedef char C; - const std::numpunct& np = std::use_facet >(l); - assert(np.thousands_sep() == ','); - } - { - typedef wchar_t C; - const std::numpunct& np = std::use_facet >(l); - assert(np.thousands_sep() == L','); - } - } - { - std::locale l("en_US"); - { - typedef char C; - const std::numpunct& np = std::use_facet >(l); - assert(np.thousands_sep() == ','); - } - { - typedef wchar_t C; - const std::numpunct& np = std::use_facet >(l); - assert(np.thousands_sep() == L','); - } - } - { - std::locale l("fr_FR"); - { - typedef char C; - const std::numpunct& np = std::use_facet >(l); - assert(np.thousands_sep() == ','); - } - { - typedef wchar_t C; - const std::numpunct& np = std::use_facet >(l); - assert(np.thousands_sep() == L','); - } - } -} diff --git a/test/localization/locale.categories/facet.numpunct/locale.numpunct/ctor.pass.cpp b/test/localization/locale.categories/facet.numpunct/locale.numpunct/ctor.pass.cpp deleted file mode 100644 index 6ac45969..00000000 --- a/test/localization/locale.categories/facet.numpunct/locale.numpunct/ctor.pass.cpp +++ /dev/null @@ -1,66 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template class numpunct; - -// explicit numpunct(size_t refs = 0); - -#include -#include - -template -class my_facet - : public std::numpunct -{ -public: - static int count; - - explicit my_facet(std::size_t refs = 0) - : std::numpunct(refs) {++count;} - - ~my_facet() {--count;} -}; - -template int my_facet::count = 0; - -int main() -{ - { - std::locale l(std::locale::classic(), new my_facet); - assert(my_facet::count == 1); - } - assert(my_facet::count == 0); - { - my_facet f(1); - assert(my_facet::count == 1); - { - std::locale l(std::locale::classic(), &f); - assert(my_facet::count == 1); - } - assert(my_facet::count == 1); - } - assert(my_facet::count == 0); - { - std::locale l(std::locale::classic(), new my_facet); - assert(my_facet::count == 1); - } - assert(my_facet::count == 0); - { - my_facet f(1); - assert(my_facet::count == 1); - { - std::locale l(std::locale::classic(), &f); - assert(my_facet::count == 1); - } - assert(my_facet::count == 1); - } - assert(my_facet::count == 0); -} diff --git a/test/localization/locale.categories/facet.numpunct/locale.numpunct/facet.numpunct.members/decimal_point.pass.cpp b/test/localization/locale.categories/facet.numpunct/locale.numpunct/facet.numpunct.members/decimal_point.pass.cpp deleted file mode 100644 index c89e3f4c..00000000 --- a/test/localization/locale.categories/facet.numpunct/locale.numpunct/facet.numpunct.members/decimal_point.pass.cpp +++ /dev/null @@ -1,32 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template class numpunct; - -// char_type decimal_point() const; - -#include -#include - -int main() -{ - std::locale l = std::locale::classic(); - { - typedef char C; - const std::numpunct& np = std::use_facet >(l); - assert(np.decimal_point() == '.'); - } - { - typedef wchar_t C; - const std::numpunct& np = std::use_facet >(l); - assert(np.decimal_point() == L'.'); - } -} diff --git a/test/localization/locale.categories/facet.numpunct/locale.numpunct/facet.numpunct.members/falsename.pass.cpp b/test/localization/locale.categories/facet.numpunct/locale.numpunct/facet.numpunct.members/falsename.pass.cpp deleted file mode 100644 index b4800558..00000000 --- a/test/localization/locale.categories/facet.numpunct/locale.numpunct/facet.numpunct.members/falsename.pass.cpp +++ /dev/null @@ -1,32 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template class numpunct; - -// string_type falsename() const; - -#include -#include - -int main() -{ - std::locale l = std::locale::classic(); - { - typedef char C; - const std::numpunct& np = std::use_facet >(l); - assert(np.falsename() == std::string("false")); - } - { - typedef wchar_t C; - const std::numpunct& np = std::use_facet >(l); - assert(np.falsename() == std::wstring(L"false")); - } -} diff --git a/test/localization/locale.categories/facet.numpunct/locale.numpunct/facet.numpunct.members/grouping.pass.cpp b/test/localization/locale.categories/facet.numpunct/locale.numpunct/facet.numpunct.members/grouping.pass.cpp deleted file mode 100644 index f2935ba9..00000000 --- a/test/localization/locale.categories/facet.numpunct/locale.numpunct/facet.numpunct.members/grouping.pass.cpp +++ /dev/null @@ -1,32 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template class numpunct; - -// string grouping() const; - -#include -#include - -int main() -{ - std::locale l = std::locale::classic(); - { - typedef char C; - const std::numpunct& np = std::use_facet >(l); - assert(np.grouping() == std::string()); - } - { - typedef wchar_t C; - const std::numpunct& np = std::use_facet >(l); - assert(np.grouping() == std::string()); - } -} diff --git a/test/localization/locale.categories/facet.numpunct/locale.numpunct/facet.numpunct.members/thousands_sep.pass.cpp b/test/localization/locale.categories/facet.numpunct/locale.numpunct/facet.numpunct.members/thousands_sep.pass.cpp deleted file mode 100644 index 19932d65..00000000 --- a/test/localization/locale.categories/facet.numpunct/locale.numpunct/facet.numpunct.members/thousands_sep.pass.cpp +++ /dev/null @@ -1,32 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template class numpunct; - -// char_type thousands_sep() const; - -#include -#include - -int main() -{ - std::locale l = std::locale::classic(); - { - typedef char C; - const std::numpunct& np = std::use_facet >(l); - assert(np.thousands_sep() == ','); - } - { - typedef wchar_t C; - const std::numpunct& np = std::use_facet >(l); - assert(np.thousands_sep() == L','); - } -} diff --git a/test/localization/locale.categories/facet.numpunct/locale.numpunct/facet.numpunct.members/truename.pass.cpp b/test/localization/locale.categories/facet.numpunct/locale.numpunct/facet.numpunct.members/truename.pass.cpp deleted file mode 100644 index aa426d0f..00000000 --- a/test/localization/locale.categories/facet.numpunct/locale.numpunct/facet.numpunct.members/truename.pass.cpp +++ /dev/null @@ -1,32 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template class numpunct; - -// string_type truename() const; - -#include -#include - -int main() -{ - std::locale l = std::locale::classic(); - { - typedef char C; - const std::numpunct& np = std::use_facet >(l); - assert(np.truename() == std::string("true")); - } - { - typedef wchar_t C; - const std::numpunct& np = std::use_facet >(l); - assert(np.truename() == std::wstring(L"true")); - } -} diff --git a/test/localization/locale.categories/facet.numpunct/locale.numpunct/facet.numpunct.virtuals/tested_elsewhere.pass.cpp b/test/localization/locale.categories/facet.numpunct/locale.numpunct/facet.numpunct.virtuals/tested_elsewhere.pass.cpp deleted file mode 100644 index b58f5c55..00000000 --- a/test/localization/locale.categories/facet.numpunct/locale.numpunct/facet.numpunct.virtuals/tested_elsewhere.pass.cpp +++ /dev/null @@ -1,12 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -int main() -{ -} diff --git a/test/localization/locale.categories/facet.numpunct/locale.numpunct/types.pass.cpp b/test/localization/locale.categories/facet.numpunct/locale.numpunct/types.pass.cpp deleted file mode 100644 index bbdf3254..00000000 --- a/test/localization/locale.categories/facet.numpunct/locale.numpunct/types.pass.cpp +++ /dev/null @@ -1,48 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template -// class numpunct -// : public locale::facet -// { -// public: -// typedef charT char_type; -// typedef basic_string string_type; -// static locale::id id; - -#include -#include -#include - -int main() -{ - std::locale l = std::locale::classic(); - { - assert(std::has_facet >(l)); - const std::numpunct& f = std::use_facet >(l); - { - (void)std::numpunct::id; - } - static_assert((std::is_same::char_type, char>::value), ""); - static_assert((std::is_same::string_type, std::string>::value), ""); - static_assert((std::is_base_of >::value), ""); - } - { - assert(std::has_facet >(l)); - const std::numpunct& f = std::use_facet >(l); - { - (void)std::numpunct::id; - } - static_assert((std::is_same::char_type, wchar_t>::value), ""); - static_assert((std::is_same::string_type, std::wstring>::value), ""); - static_assert((std::is_base_of >::value), ""); - } -} diff --git a/test/localization/locale.categories/facet.numpunct/nothing_to_do.pass.cpp b/test/localization/locale.categories/facet.numpunct/nothing_to_do.pass.cpp deleted file mode 100644 index b58f5c55..00000000 --- a/test/localization/locale.categories/facet.numpunct/nothing_to_do.pass.cpp +++ /dev/null @@ -1,12 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -int main() -{ -} diff --git a/test/localization/locale.categories/facets.examples/nothing_to_do.pass.cpp b/test/localization/locale.categories/facets.examples/nothing_to_do.pass.cpp deleted file mode 100644 index b58f5c55..00000000 --- a/test/localization/locale.categories/facets.examples/nothing_to_do.pass.cpp +++ /dev/null @@ -1,12 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -int main() -{ -} diff --git a/test/localization/locale.stdcvt/codecvt_mode.pass.cpp b/test/localization/locale.stdcvt/codecvt_mode.pass.cpp deleted file mode 100644 index ac35fb85..00000000 --- a/test/localization/locale.stdcvt/codecvt_mode.pass.cpp +++ /dev/null @@ -1,29 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// enum codecvt_mode -// { -// consume_header = 4, -// generate_header = 2, -// little_endian = 1 -// }; - -#include -#include - -int main() -{ - assert(std::consume_header == 4); - assert(std::generate_header == 2); - assert(std::little_endian == 1); - std::codecvt_mode e = std::consume_header; - assert(e == 4); -} diff --git a/test/localization/locale.stdcvt/codecvt_utf16.pass.cpp b/test/localization/locale.stdcvt/codecvt_utf16.pass.cpp deleted file mode 100644 index 701417bd..00000000 --- a/test/localization/locale.stdcvt/codecvt_utf16.pass.cpp +++ /dev/null @@ -1,56 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template -// class codecvt_utf16 -// : public codecvt -// { -// // unspecified -// }; - -// Not a portable test - -#include -#include - -int outstanding_news = 0; - -void* operator new(std::size_t s) throw(std::bad_alloc) -{ - ++outstanding_news; - return std::malloc(s); -} - -void operator delete(void* p) throw() -{ - if (p) - { - --outstanding_news; - std::free(p); - } -} - -int main() -{ - assert(outstanding_news == 0); - { - typedef std::codecvt_utf16 C; - C c; - assert(outstanding_news == 0); - } - { - typedef std::codecvt_utf16 C; - std::locale loc(std::locale::classic(), new C); - assert(outstanding_news != 0); - } - assert(outstanding_news == 0); -} diff --git a/test/localization/locale.stdcvt/codecvt_utf16_always_noconv.pass.cpp b/test/localization/locale.stdcvt/codecvt_utf16_always_noconv.pass.cpp deleted file mode 100644 index 0b7d4cbf..00000000 --- a/test/localization/locale.stdcvt/codecvt_utf16_always_noconv.pass.cpp +++ /dev/null @@ -1,45 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template -// class codecvt_utf16 -// : public codecvt -// { -// // unspecified -// }; - -// bool always_noconv() const throw(); - -#include -#include - -int main() -{ - { - typedef std::codecvt_utf16 C; - C c; - bool r = c.always_noconv(); - assert(r == false); - } - { - typedef std::codecvt_utf16 C; - C c; - bool r = c.always_noconv(); - assert(r == false); - } - { - typedef std::codecvt_utf16 C; - C c; - bool r = c.always_noconv(); - assert(r == false); - } -} diff --git a/test/localization/locale.stdcvt/codecvt_utf16_encoding.pass.cpp b/test/localization/locale.stdcvt/codecvt_utf16_encoding.pass.cpp deleted file mode 100644 index 2d12d985..00000000 --- a/test/localization/locale.stdcvt/codecvt_utf16_encoding.pass.cpp +++ /dev/null @@ -1,45 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template -// class codecvt_utf16 -// : public codecvt -// { -// // unspecified -// }; - -// int encoding() const throw(); - -#include -#include - -int main() -{ - { - typedef std::codecvt_utf16 C; - C c; - int r = c.encoding(); - assert(r == 0); - } - { - typedef std::codecvt_utf16 C; - C c; - int r = c.encoding(); - assert(r == 0); - } - { - typedef std::codecvt_utf16 C; - C c; - int r = c.encoding(); - assert(r == 0); - } -} diff --git a/test/localization/locale.stdcvt/codecvt_utf16_in.pass.cpp b/test/localization/locale.stdcvt/codecvt_utf16_in.pass.cpp deleted file mode 100644 index 4d710c1a..00000000 --- a/test/localization/locale.stdcvt/codecvt_utf16_in.pass.cpp +++ /dev/null @@ -1,739 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template -// class codecvt_utf16 -// : public codecvt -// { -// // unspecified -// }; - -// result -// in(stateT& state, -// const externT* from, const externT* from_end, const externT*& from_next, -// internT* to, internT* to_end, internT*& to_next) const; - -#include -#include - -int main() -{ - { - typedef std::codecvt_utf16 C; - C c; - wchar_t w = 0; - char n[4] = {char(0xD8), char(0xC0), char(0xDC), char(0x03)}; - wchar_t* wp = nullptr; - std::mbstate_t m; - const char* np = nullptr; - std::codecvt_base::result r = c.in(m, n, n+4, np, &w, &w+1, wp); - assert(r == std::codecvt_base::ok); - assert(wp == &w+1); - assert(np == n+4); - assert(w == 0x40003); - - n[0] = char(0x10); - n[1] = char(0x05); - r = c.in(m, n, n+2, np, &w, &w+1, wp); - assert(r == std::codecvt_base::ok); - assert(wp == &w+1); - assert(np == n+2); - assert(w == 0x1005); - - n[0] = char(0x04); - n[1] = char(0x53); - r = c.in(m, n, n+2, np, &w, &w+1, wp); - assert(r == std::codecvt_base::ok); - assert(wp == &w+1); - assert(np == n+2); - assert(w == 0x453); - - w = 0x56; - n[0] = char(0x00); - n[1] = char(0x56); - r = c.in(m, n, n+2, np, &w, &w+1, wp); - assert(r == std::codecvt_base::ok); - assert(wp == &w+1); - assert(np == n+2); - assert(w == 0x56); - } - { - typedef std::codecvt_utf16 C; - C c; - wchar_t w = 0; - char n[4] = {char(0xD8), char(0xC0), char(0xDC), char(0x03)}; - wchar_t* wp = nullptr; - std::mbstate_t m; - const char* np = nullptr; - std::codecvt_base::result r = c.in(m, n, n+4, np, &w, &w+1, wp); - assert(r == std::codecvt_base::error); - assert(wp == &w); - assert(np == n); - assert(w == 0); - - n[0] = char(0x10); - n[1] = char(0x05); - r = c.in(m, n, n+2, np, &w, &w+1, wp); - assert(r == std::codecvt_base::error); - assert(wp == &w); - assert(np == n); - assert(w == 0); - - n[0] = char(0x04); - n[1] = char(0x53); - r = c.in(m, n, n+2, np, &w, &w+1, wp); - assert(r == std::codecvt_base::ok); - assert(wp == &w+1); - assert(np == n+2); - assert(w == 0x453); - - w = 0x56; - n[0] = char(0x00); - n[1] = char(0x56); - r = c.in(m, n, n+2, np, &w, &w+1, wp); - assert(r == std::codecvt_base::ok); - assert(wp == &w+1); - assert(np == n+2); - assert(w == 0x56); - } - { - typedef std::codecvt_utf16 C; - C c; - wchar_t w = 0; - char n[6] = {char(0xFE), char(0xFF), char(0xD8), char(0xC0), char(0xDC), char(0x03)}; - wchar_t* wp = nullptr; - std::mbstate_t m; - const char* np = nullptr; - std::codecvt_base::result r = c.in(m, n, n+6, np, &w, &w+1, wp); - assert(r == std::codecvt_base::ok); - assert(wp == &w+1); - assert(np == n+6); - assert(w == 0x40003); - - n[0] = char(0x10); - n[1] = char(0x05); - r = c.in(m, n, n+2, np, &w, &w+1, wp); - assert(r == std::codecvt_base::ok); - assert(wp == &w+1); - assert(np == n+2); - assert(w == 0x1005); - - n[0] = char(0x04); - n[1] = char(0x53); - r = c.in(m, n, n+2, np, &w, &w+1, wp); - assert(r == std::codecvt_base::ok); - assert(wp == &w+1); - assert(np == n+2); - assert(w == 0x453); - - w = 0x56; - n[0] = char(0x00); - n[1] = char(0x56); - r = c.in(m, n, n+2, np, &w, &w+1, wp); - assert(r == std::codecvt_base::ok); - assert(wp == &w+1); - assert(np == n+2); - assert(w == 0x56); - } - { - typedef std::codecvt_utf16 C; - C c; - wchar_t w = 0; - char n[4] = {char(0xC0), char(0xD8), char(0x03), char(0xDC)}; - wchar_t* wp = nullptr; - std::mbstate_t m; - const char* np = nullptr; - std::codecvt_base::result r = c.in(m, n, n+4, np, &w, &w+1, wp); - assert(r == std::codecvt_base::ok); - assert(wp == &w+1); - assert(np == n+4); - assert(w == 0x40003); - - n[1] = char(0x10); - n[0] = char(0x05); - r = c.in(m, n, n+2, np, &w, &w+1, wp); - assert(r == std::codecvt_base::ok); - assert(wp == &w+1); - assert(np == n+2); - assert(w == 0x1005); - - n[1] = char(0x04); - n[0] = char(0x53); - r = c.in(m, n, n+2, np, &w, &w+1, wp); - assert(r == std::codecvt_base::ok); - assert(wp == &w+1); - assert(np == n+2); - assert(w == 0x453); - - w = 0x56; - n[1] = char(0x00); - n[0] = char(0x56); - r = c.in(m, n, n+2, np, &w, &w+1, wp); - assert(r == std::codecvt_base::ok); - assert(wp == &w+1); - assert(np == n+2); - assert(w == 0x56); - } - { - typedef std::codecvt_utf16 C; - C c; - wchar_t w = 0; - char n[4] = {char(0xC0), char(0xD8), char(0x03), char(0xDC)}; - wchar_t* wp = nullptr; - std::mbstate_t m; - const char* np = nullptr; - std::codecvt_base::result r = c.in(m, n, n+4, np, &w, &w+1, wp); - assert(r == std::codecvt_base::error); - assert(wp == &w); - assert(np == n); - assert(w == 0); - - n[1] = char(0x10); - n[0] = char(0x05); - r = c.in(m, n, n+2, np, &w, &w+1, wp); - assert(r == std::codecvt_base::error); - assert(wp == &w); - assert(np == n); - assert(w == 0); - - n[1] = char(0x04); - n[0] = char(0x53); - r = c.in(m, n, n+2, np, &w, &w+1, wp); - assert(r == std::codecvt_base::ok); - assert(wp == &w+1); - assert(np == n+2); - assert(w == 0x453); - - w = 0x56; - n[1] = char(0x00); - n[0] = char(0x56); - r = c.in(m, n, n+2, np, &w, &w+1, wp); - assert(r == std::codecvt_base::ok); - assert(wp == &w+1); - assert(np == n+2); - assert(w == 0x56); - } - { - typedef std::codecvt_utf16 C; - C c; - wchar_t w = 0; - char n[6] = {char(0xFF), char(0xFE), char(0xC0), char(0xD8), char(0x03), char(0xDC)}; - wchar_t* wp = nullptr; - std::mbstate_t m; - const char* np = nullptr; - std::codecvt_base::result r = c.in(m, n, n+6, np, &w, &w+1, wp); - assert(r == std::codecvt_base::ok); - assert(wp == &w+1); - assert(np == n+6); - assert(w == 0x40003); - - n[1] = char(0x10); - n[0] = char(0x05); - r = c.in(m, n, n+2, np, &w, &w+1, wp); - assert(r == std::codecvt_base::ok); - assert(wp == &w+1); - assert(np == n+2); - assert(w == 0x1005); - - n[1] = char(0x04); - n[0] = char(0x53); - r = c.in(m, n, n+2, np, &w, &w+1, wp); - assert(r == std::codecvt_base::ok); - assert(wp == &w+1); - assert(np == n+2); - assert(w == 0x453); - - w = 0x56; - n[1] = char(0x00); - n[0] = char(0x56); - r = c.in(m, n, n+2, np, &w, &w+1, wp); - assert(r == std::codecvt_base::ok); - assert(wp == &w+1); - assert(np == n+2); - assert(w == 0x56); - } - { - typedef std::codecvt_utf16 C; - C c; - char32_t w = 0; - char n[4] = {char(0xD8), char(0xC0), char(0xDC), char(0x03)}; - char32_t* wp = nullptr; - std::mbstate_t m; - const char* np = nullptr; - std::codecvt_base::result r = c.in(m, n, n+4, np, &w, &w+1, wp); - assert(r == std::codecvt_base::ok); - assert(wp == &w+1); - assert(np == n+4); - assert(w == 0x40003); - - n[0] = char(0x10); - n[1] = char(0x05); - r = c.in(m, n, n+2, np, &w, &w+1, wp); - assert(r == std::codecvt_base::ok); - assert(wp == &w+1); - assert(np == n+2); - assert(w == 0x1005); - - n[0] = char(0x04); - n[1] = char(0x53); - r = c.in(m, n, n+2, np, &w, &w+1, wp); - assert(r == std::codecvt_base::ok); - assert(wp == &w+1); - assert(np == n+2); - assert(w == 0x453); - - w = 0x56; - n[0] = char(0x00); - n[1] = char(0x56); - r = c.in(m, n, n+2, np, &w, &w+1, wp); - assert(r == std::codecvt_base::ok); - assert(wp == &w+1); - assert(np == n+2); - assert(w == 0x56); - } - { - typedef std::codecvt_utf16 C; - C c; - char32_t w = 0; - char n[4] = {char(0xD8), char(0xC0), char(0xDC), char(0x03)}; - char32_t* wp = nullptr; - std::mbstate_t m; - const char* np = nullptr; - std::codecvt_base::result r = c.in(m, n, n+4, np, &w, &w+1, wp); - assert(r == std::codecvt_base::error); - assert(wp == &w); - assert(np == n); - assert(w == 0); - - n[0] = char(0x10); - n[1] = char(0x05); - r = c.in(m, n, n+2, np, &w, &w+1, wp); - assert(r == std::codecvt_base::error); - assert(wp == &w); - assert(np == n); - assert(w == 0); - - n[0] = char(0x04); - n[1] = char(0x53); - r = c.in(m, n, n+2, np, &w, &w+1, wp); - assert(r == std::codecvt_base::ok); - assert(wp == &w+1); - assert(np == n+2); - assert(w == 0x453); - - w = 0x56; - n[0] = char(0x00); - n[1] = char(0x56); - r = c.in(m, n, n+2, np, &w, &w+1, wp); - assert(r == std::codecvt_base::ok); - assert(wp == &w+1); - assert(np == n+2); - assert(w == 0x56); - } - { - typedef std::codecvt_utf16 C; - C c; - char32_t w = 0; - char n[6] = {char(0xFE), char(0xFF), char(0xD8), char(0xC0), char(0xDC), char(0x03)}; - char32_t* wp = nullptr; - std::mbstate_t m; - const char* np = nullptr; - std::codecvt_base::result r = c.in(m, n, n+6, np, &w, &w+1, wp); - assert(r == std::codecvt_base::ok); - assert(wp == &w+1); - assert(np == n+6); - assert(w == 0x40003); - - n[0] = char(0x10); - n[1] = char(0x05); - r = c.in(m, n, n+2, np, &w, &w+1, wp); - assert(r == std::codecvt_base::ok); - assert(wp == &w+1); - assert(np == n+2); - assert(w == 0x1005); - - n[0] = char(0x04); - n[1] = char(0x53); - r = c.in(m, n, n+2, np, &w, &w+1, wp); - assert(r == std::codecvt_base::ok); - assert(wp == &w+1); - assert(np == n+2); - assert(w == 0x453); - - w = 0x56; - n[0] = char(0x00); - n[1] = char(0x56); - r = c.in(m, n, n+2, np, &w, &w+1, wp); - assert(r == std::codecvt_base::ok); - assert(wp == &w+1); - assert(np == n+2); - assert(w == 0x56); - } - { - typedef std::codecvt_utf16 C; - C c; - char32_t w = 0; - char n[4] = {char(0xC0), char(0xD8), char(0x03), char(0xDC)}; - char32_t* wp = nullptr; - std::mbstate_t m; - const char* np = nullptr; - std::codecvt_base::result r = c.in(m, n, n+4, np, &w, &w+1, wp); - assert(r == std::codecvt_base::ok); - assert(wp == &w+1); - assert(np == n+4); - assert(w == 0x40003); - - n[1] = char(0x10); - n[0] = char(0x05); - r = c.in(m, n, n+2, np, &w, &w+1, wp); - assert(r == std::codecvt_base::ok); - assert(wp == &w+1); - assert(np == n+2); - assert(w == 0x1005); - - n[1] = char(0x04); - n[0] = char(0x53); - r = c.in(m, n, n+2, np, &w, &w+1, wp); - assert(r == std::codecvt_base::ok); - assert(wp == &w+1); - assert(np == n+2); - assert(w == 0x453); - - w = 0x56; - n[1] = char(0x00); - n[0] = char(0x56); - r = c.in(m, n, n+2, np, &w, &w+1, wp); - assert(r == std::codecvt_base::ok); - assert(wp == &w+1); - assert(np == n+2); - assert(w == 0x56); - } - { - typedef std::codecvt_utf16 C; - C c; - char32_t w = 0; - char n[4] = {char(0xC0), char(0xD8), char(0x03), char(0xDC)}; - char32_t* wp = nullptr; - std::mbstate_t m; - const char* np = nullptr; - std::codecvt_base::result r = c.in(m, n, n+4, np, &w, &w+1, wp); - assert(r == std::codecvt_base::error); - assert(wp == &w); - assert(np == n); - assert(w == 0); - - n[1] = char(0x10); - n[0] = char(0x05); - r = c.in(m, n, n+2, np, &w, &w+1, wp); - assert(r == std::codecvt_base::error); - assert(wp == &w); - assert(np == n); - assert(w == 0); - - n[1] = char(0x04); - n[0] = char(0x53); - r = c.in(m, n, n+2, np, &w, &w+1, wp); - assert(r == std::codecvt_base::ok); - assert(wp == &w+1); - assert(np == n+2); - assert(w == 0x453); - - w = 0x56; - n[1] = char(0x00); - n[0] = char(0x56); - r = c.in(m, n, n+2, np, &w, &w+1, wp); - assert(r == std::codecvt_base::ok); - assert(wp == &w+1); - assert(np == n+2); - assert(w == 0x56); - } - { - typedef std::codecvt_utf16 C; - C c; - char32_t w = 0; - char n[6] = {char(0xFF), char(0xFE), char(0xC0), char(0xD8), char(0x03), char(0xDC)}; - char32_t* wp = nullptr; - std::mbstate_t m; - const char* np = nullptr; - std::codecvt_base::result r = c.in(m, n, n+6, np, &w, &w+1, wp); - assert(r == std::codecvt_base::ok); - assert(wp == &w+1); - assert(np == n+6); - assert(w == 0x40003); - - n[1] = char(0x10); - n[0] = char(0x05); - r = c.in(m, n, n+2, np, &w, &w+1, wp); - assert(r == std::codecvt_base::ok); - assert(wp == &w+1); - assert(np == n+2); - assert(w == 0x1005); - - n[1] = char(0x04); - n[0] = char(0x53); - r = c.in(m, n, n+2, np, &w, &w+1, wp); - assert(r == std::codecvt_base::ok); - assert(wp == &w+1); - assert(np == n+2); - assert(w == 0x453); - - w = 0x56; - n[1] = char(0x00); - n[0] = char(0x56); - r = c.in(m, n, n+2, np, &w, &w+1, wp); - assert(r == std::codecvt_base::ok); - assert(wp == &w+1); - assert(np == n+2); - assert(w == 0x56); - } - - { - typedef std::codecvt_utf16 C; - C c; - char16_t w = 0; - char n[4] = {char(0xD8), char(0xC0), char(0xDC), char(0x03)}; - char16_t* wp = nullptr; - std::mbstate_t m; - const char* np = nullptr; - std::codecvt_base::result r = c.in(m, n, n+4, np, &w, &w+1, wp); - assert(r == std::codecvt_base::error); - assert(wp == &w); - assert(np == n); - assert(w == 0); - - n[0] = char(0x10); - n[1] = char(0x05); - r = c.in(m, n, n+2, np, &w, &w+1, wp); - assert(r == std::codecvt_base::ok); - assert(wp == &w+1); - assert(np == n+2); - assert(w == 0x1005); - - n[0] = char(0x04); - n[1] = char(0x53); - r = c.in(m, n, n+2, np, &w, &w+1, wp); - assert(r == std::codecvt_base::ok); - assert(wp == &w+1); - assert(np == n+2); - assert(w == 0x453); - - w = 0x56; - n[0] = char(0x00); - n[1] = char(0x56); - r = c.in(m, n, n+2, np, &w, &w+1, wp); - assert(r == std::codecvt_base::ok); - assert(wp == &w+1); - assert(np == n+2); - assert(w == 0x56); - } - { - typedef std::codecvt_utf16 C; - C c; - char16_t w = 0; - char n[4] = {char(0xD8), char(0xC0), char(0xDC), char(0x03)}; - char16_t* wp = nullptr; - std::mbstate_t m; - const char* np = nullptr; - std::codecvt_base::result r = c.in(m, n, n+4, np, &w, &w+1, wp); - assert(r == std::codecvt_base::error); - assert(wp == &w); - assert(np == n); - assert(w == 0); - - n[0] = char(0x10); - n[1] = char(0x05); - r = c.in(m, n, n+2, np, &w, &w+1, wp); - assert(r == std::codecvt_base::error); - assert(wp == &w); - assert(np == n); - assert(w == 0); - - n[0] = char(0x04); - n[1] = char(0x53); - r = c.in(m, n, n+2, np, &w, &w+1, wp); - assert(r == std::codecvt_base::ok); - assert(wp == &w+1); - assert(np == n+2); - assert(w == 0x453); - - w = 0x56; - n[0] = char(0x00); - n[1] = char(0x56); - r = c.in(m, n, n+2, np, &w, &w+1, wp); - assert(r == std::codecvt_base::ok); - assert(wp == &w+1); - assert(np == n+2); - assert(w == 0x56); - } - { - typedef std::codecvt_utf16 C; - C c; - char16_t w = 0; - char n[6] = {char(0xFE), char(0xFF), char(0xD8), char(0xC0), char(0xDC), char(0x03)}; - char16_t* wp = nullptr; - std::mbstate_t m; - const char* np = nullptr; - std::codecvt_base::result r = c.in(m, n, n+6, np, &w, &w+1, wp); - assert(r == std::codecvt_base::error); - assert(wp == &w); - assert(np == n+2); - assert(w == 0); - - n[0] = char(0x10); - n[1] = char(0x05); - r = c.in(m, n, n+2, np, &w, &w+1, wp); - assert(r == std::codecvt_base::ok); - assert(wp == &w+1); - assert(np == n+2); - assert(w == 0x1005); - - n[0] = char(0x04); - n[1] = char(0x53); - r = c.in(m, n, n+2, np, &w, &w+1, wp); - assert(r == std::codecvt_base::ok); - assert(wp == &w+1); - assert(np == n+2); - assert(w == 0x453); - - w = 0x56; - n[0] = char(0x00); - n[1] = char(0x56); - r = c.in(m, n, n+2, np, &w, &w+1, wp); - assert(r == std::codecvt_base::ok); - assert(wp == &w+1); - assert(np == n+2); - assert(w == 0x56); - } - { - typedef std::codecvt_utf16 C; - C c; - char16_t w = 0; - char n[4] = {char(0xC0), char(0xD8), char(0x03), char(0xDC)}; - char16_t* wp = nullptr; - std::mbstate_t m; - const char* np = nullptr; - std::codecvt_base::result r = c.in(m, n, n+4, np, &w, &w+1, wp); - assert(r == std::codecvt_base::error); - assert(wp == &w); - assert(np == n); - assert(w == 0); - - n[1] = char(0x10); - n[0] = char(0x05); - r = c.in(m, n, n+2, np, &w, &w+1, wp); - assert(r == std::codecvt_base::ok); - assert(wp == &w+1); - assert(np == n+2); - assert(w == 0x1005); - - n[1] = char(0x04); - n[0] = char(0x53); - r = c.in(m, n, n+2, np, &w, &w+1, wp); - assert(r == std::codecvt_base::ok); - assert(wp == &w+1); - assert(np == n+2); - assert(w == 0x453); - - w = 0x56; - n[1] = char(0x00); - n[0] = char(0x56); - r = c.in(m, n, n+2, np, &w, &w+1, wp); - assert(r == std::codecvt_base::ok); - assert(wp == &w+1); - assert(np == n+2); - assert(w == 0x56); - } - { - typedef std::codecvt_utf16 C; - C c; - char16_t w = 0; - char n[4] = {char(0xC0), char(0xD8), char(0x03), char(0xDC)}; - char16_t* wp = nullptr; - std::mbstate_t m; - const char* np = nullptr; - std::codecvt_base::result r = c.in(m, n, n+4, np, &w, &w+1, wp); - assert(r == std::codecvt_base::error); - assert(wp == &w); - assert(np == n); - assert(w == 0); - - n[1] = char(0x10); - n[0] = char(0x05); - r = c.in(m, n, n+2, np, &w, &w+1, wp); - assert(r == std::codecvt_base::error); - assert(wp == &w); - assert(np == n); - assert(w == 0); - - n[1] = char(0x04); - n[0] = char(0x53); - r = c.in(m, n, n+2, np, &w, &w+1, wp); - assert(r == std::codecvt_base::ok); - assert(wp == &w+1); - assert(np == n+2); - assert(w == 0x453); - - w = 0x56; - n[1] = char(0x00); - n[0] = char(0x56); - r = c.in(m, n, n+2, np, &w, &w+1, wp); - assert(r == std::codecvt_base::ok); - assert(wp == &w+1); - assert(np == n+2); - assert(w == 0x56); - } - { - typedef std::codecvt_utf16 C; - C c; - char16_t w = 0; - char n[6] = {char(0xFF), char(0xFE), char(0xC0), char(0xD8), char(0x03), char(0xDC)}; - char16_t* wp = nullptr; - std::mbstate_t m; - const char* np = nullptr; - std::codecvt_base::result r = c.in(m, n, n+6, np, &w, &w+1, wp); - assert(r == std::codecvt_base::error); - assert(wp == &w); - assert(np == n+2); - assert(w == 0); - - n[1] = char(0x10); - n[0] = char(0x05); - r = c.in(m, n, n+2, np, &w, &w+1, wp); - assert(r == std::codecvt_base::ok); - assert(wp == &w+1); - assert(np == n+2); - assert(w == 0x1005); - - n[1] = char(0x04); - n[0] = char(0x53); - r = c.in(m, n, n+2, np, &w, &w+1, wp); - assert(r == std::codecvt_base::ok); - assert(wp == &w+1); - assert(np == n+2); - assert(w == 0x453); - - w = 0x56; - n[1] = char(0x00); - n[0] = char(0x56); - r = c.in(m, n, n+2, np, &w, &w+1, wp); - assert(r == std::codecvt_base::ok); - assert(wp == &w+1); - assert(np == n+2); - assert(w == 0x56); - } -} diff --git a/test/localization/locale.stdcvt/codecvt_utf16_length.pass.cpp b/test/localization/locale.stdcvt/codecvt_utf16_length.pass.cpp deleted file mode 100644 index 463a9fba..00000000 --- a/test/localization/locale.stdcvt/codecvt_utf16_length.pass.cpp +++ /dev/null @@ -1,449 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template -// class codecvt_utf16 -// : public codecvt -// { -// // unspecified -// }; - -// int length(stateT& state, const externT* from, const externT* from_end, -// size_t max) const; - -#include -#include - -int main() -{ - { - typedef std::codecvt_utf16 C; - C c; - char n[4] = {char(0xD8), char(0xC0), char(0xDC), char(0x03)}; - std::mbstate_t m; - int r = c.length(m, n, n+4, 2); - assert(r == 4); - - n[0] = char(0x10); - n[1] = char(0x05); - r = c.length(m, n, n+2, 2); - assert(r == 2); - - n[0] = char(0x04); - n[1] = char(0x53); - r = c.length(m, n, n+2, 2); - assert(r == 2); - - n[0] = char(0x00); - n[1] = char(0x56); - r = c.length(m, n, n+2, 2); - assert(r == 2); - } - { - typedef std::codecvt_utf16 C; - C c; - char n[4] = {char(0xD8), char(0xC0), char(0xDC), char(0x03)}; - std::mbstate_t m; - int r = c.length(m, n, n+4, 2); - assert(r == 0); - - n[0] = char(0x10); - n[1] = char(0x05); - r = c.length(m, n, n+2, 2); - assert(r == 0); - - n[0] = char(0x04); - n[1] = char(0x53); - r = c.length(m, n, n+2, 2); - assert(r == 2); - - n[0] = char(0x00); - n[1] = char(0x56); - r = c.length(m, n, n+2, 2); - assert(r == 2); - } - { - typedef std::codecvt_utf16 C; - C c; - char n[6] = {char(0xFE), char(0xFF), char(0xD8), char(0xC0), char(0xDC), char(0x03)}; - std::mbstate_t m; - int r = c.length(m, n, n+6, 2); - assert(r == 6); - - n[0] = char(0x10); - n[1] = char(0x05); - r = c.length(m, n, n+2, 2); - assert(r == 2); - - n[0] = char(0x04); - n[1] = char(0x53); - r = c.length(m, n, n+2, 2); - assert(r == 2); - - n[0] = char(0x00); - n[1] = char(0x56); - r = c.length(m, n, n+2, 2); - assert(r == 2); - } - { - typedef std::codecvt_utf16 C; - C c; - char n[4] = {char(0xC0), char(0xD8), char(0x03), char(0xDC)}; - std::mbstate_t m; - int r = c.length(m, n, n+4, 2); - assert(r == 4); - - n[1] = char(0x10); - n[0] = char(0x05); - r = c.length(m, n, n+2, 2); - assert(r == 2); - - n[1] = char(0x04); - n[0] = char(0x53); - r = c.length(m, n, n+2, 2); - assert(r == 2); - - n[1] = char(0x00); - n[0] = char(0x56); - r = c.length(m, n, n+2, 2); - assert(r == 2); - } - { - typedef std::codecvt_utf16 C; - C c; - char n[4] = {char(0xC0), char(0xD8), char(0x03), char(0xDC)}; - std::mbstate_t m; - int r = c.length(m, n, n+4, 2); - assert(r == 0); - - n[1] = char(0x10); - n[0] = char(0x05); - r = c.length(m, n, n+2, 2); - assert(r == 0); - - n[1] = char(0x04); - n[0] = char(0x53); - r = c.length(m, n, n+2, 2); - assert(r == 2); - - n[1] = char(0x00); - n[0] = char(0x56); - r = c.length(m, n, n+2, 2); - assert(r == 2); - } - { - typedef std::codecvt_utf16 C; - C c; - char n[6] = {char(0xFF), char(0xFE), char(0xC0), char(0xD8), char(0x03), char(0xDC)}; - std::mbstate_t m; - int r = c.length(m, n, n+6, 2); - assert(r == 6); - - n[1] = char(0x10); - n[0] = char(0x05); - r = c.length(m, n, n+2, 2); - assert(r == 2); - - n[1] = char(0x04); - n[0] = char(0x53); - r = c.length(m, n, n+2, 2); - assert(r == 2); - - n[1] = char(0x00); - n[0] = char(0x56); - r = c.length(m, n, n+2, 2); - assert(r == 2); - } - { - typedef std::codecvt_utf16 C; - C c; - char n[4] = {char(0xD8), char(0xC0), char(0xDC), char(0x03)}; - std::mbstate_t m; - int r = c.length(m, n, n+4, 2); - assert(r == 4); - - n[0] = char(0x10); - n[1] = char(0x05); - r = c.length(m, n, n+2, 2); - assert(r == 2); - - n[0] = char(0x04); - n[1] = char(0x53); - r = c.length(m, n, n+2, 2); - assert(r == 2); - - n[0] = char(0x00); - n[1] = char(0x56); - r = c.length(m, n, n+2, 2); - assert(r == 2); - } - { - typedef std::codecvt_utf16 C; - C c; - char n[4] = {char(0xD8), char(0xC0), char(0xDC), char(0x03)}; - std::mbstate_t m; - int r = c.length(m, n, n+4, 2); - assert(r == 0); - - n[0] = char(0x10); - n[1] = char(0x05); - r = c.length(m, n, n+2, 2); - assert(r == 0); - - n[0] = char(0x04); - n[1] = char(0x53); - r = c.length(m, n, n+2, 2); - assert(r == 2); - - n[0] = char(0x00); - n[1] = char(0x56); - r = c.length(m, n, n+2, 2); - assert(r == 2); - } - { - typedef std::codecvt_utf16 C; - C c; - char n[6] = {char(0xFE), char(0xFF), char(0xD8), char(0xC0), char(0xDC), char(0x03)}; - std::mbstate_t m; - int r = c.length(m, n, n+6, 2); - assert(r == 6); - - n[0] = char(0x10); - n[1] = char(0x05); - r = c.length(m, n, n+2, 2); - assert(r == 2); - - n[0] = char(0x04); - n[1] = char(0x53); - r = c.length(m, n, n+2, 2); - assert(r == 2); - - n[0] = char(0x00); - n[1] = char(0x56); - r = c.length(m, n, n+2, 2); - assert(r == 2); - } - { - typedef std::codecvt_utf16 C; - C c; - char n[4] = {char(0xC0), char(0xD8), char(0x03), char(0xDC)}; - std::mbstate_t m; - int r = c.length(m, n, n+4, 2); - assert(r == 4); - - n[1] = char(0x10); - n[0] = char(0x05); - r = c.length(m, n, n+2, 2); - assert(r == 2); - - n[1] = char(0x04); - n[0] = char(0x53); - r = c.length(m, n, n+2, 2); - assert(r == 2); - - n[1] = char(0x00); - n[0] = char(0x56); - r = c.length(m, n, n+2, 2); - assert(r == 2); - } - { - typedef std::codecvt_utf16 C; - C c; - char n[4] = {char(0xC0), char(0xD8), char(0x03), char(0xDC)}; - std::mbstate_t m; - int r = c.length(m, n, n+4, 2); - assert(r == 0); - - n[1] = char(0x10); - n[0] = char(0x05); - r = c.length(m, n, n+2, 2); - assert(r == 0); - - n[1] = char(0x04); - n[0] = char(0x53); - r = c.length(m, n, n+2, 2); - assert(r == 2); - - n[1] = char(0x00); - n[0] = char(0x56); - r = c.length(m, n, n+2, 2); - assert(r == 2); - } - { - typedef std::codecvt_utf16 C; - C c; - char n[6] = {char(0xFF), char(0xFE), char(0xC0), char(0xD8), char(0x03), char(0xDC)}; - std::mbstate_t m; - int r = c.length(m, n, n+6, 2); - assert(r == 6); - - n[1] = char(0x10); - n[0] = char(0x05); - r = c.length(m, n, n+2, 2); - assert(r == 2); - - n[1] = char(0x04); - n[0] = char(0x53); - r = c.length(m, n, n+2, 2); - assert(r == 2); - - n[1] = char(0x00); - n[0] = char(0x56); - r = c.length(m, n, n+2, 2); - assert(r == 2); - } - - { - typedef std::codecvt_utf16 C; - C c; - char n[4] = {char(0xD8), char(0xC0), char(0xDC), char(0x03)}; - std::mbstate_t m; - int r = c.length(m, n, n+4, 2); - assert(r == 0); - - n[0] = char(0x10); - n[1] = char(0x05); - r = c.length(m, n, n+2, 2); - assert(r == 2); - - n[0] = char(0x04); - n[1] = char(0x53); - r = c.length(m, n, n+2, 2); - assert(r == 2); - - n[0] = char(0x00); - n[1] = char(0x56); - r = c.length(m, n, n+2, 2); - assert(r == 2); - } - { - typedef std::codecvt_utf16 C; - C c; - char n[4] = {char(0xD8), char(0xC0), char(0xDC), char(0x03)}; - std::mbstate_t m; - int r = c.length(m, n, n+4, 2); - assert(r == 0); - - n[0] = char(0x10); - n[1] = char(0x05); - r = c.length(m, n, n+2, 2); - assert(r == 0); - - n[0] = char(0x04); - n[1] = char(0x53); - r = c.length(m, n, n+2, 2); - assert(r == 2); - - n[0] = char(0x00); - n[1] = char(0x56); - r = c.length(m, n, n+2, 2); - assert(r == 2); - } - { - typedef std::codecvt_utf16 C; - C c; - char n[6] = {char(0xFE), char(0xFF), char(0xD8), char(0xC0), char(0xDC), char(0x03)}; - std::mbstate_t m; - int r = c.length(m, n, n+6, 2); - assert(r == 2); - - n[0] = char(0x10); - n[1] = char(0x05); - r = c.length(m, n, n+2, 2); - assert(r == 2); - - n[0] = char(0x04); - n[1] = char(0x53); - r = c.length(m, n, n+2, 2); - assert(r == 2); - - n[0] = char(0x00); - n[1] = char(0x56); - r = c.length(m, n, n+2, 2); - assert(r == 2); - } - { - typedef std::codecvt_utf16 C; - C c; - char n[4] = {char(0xC0), char(0xD8), char(0x03), char(0xDC)}; - std::mbstate_t m; - int r = c.length(m, n, n+4, 2); - assert(r == 0); - - n[1] = char(0x10); - n[0] = char(0x05); - r = c.length(m, n, n+2, 2); - assert(r == 2); - - n[1] = char(0x04); - n[0] = char(0x53); - r = c.length(m, n, n+2, 2); - assert(r == 2); - - n[1] = char(0x00); - n[0] = char(0x56); - r = c.length(m, n, n+2, 2); - assert(r == 2); - } - { - typedef std::codecvt_utf16 C; - C c; - char n[4] = {char(0xC0), char(0xD8), char(0x03), char(0xDC)}; - std::mbstate_t m; - int r = c.length(m, n, n+4, 2); - assert(r == 0); - - n[1] = char(0x10); - n[0] = char(0x05); - r = c.length(m, n, n+2, 2); - assert(r == 0); - - n[1] = char(0x04); - n[0] = char(0x53); - r = c.length(m, n, n+2, 2); - assert(r == 2); - - n[1] = char(0x00); - n[0] = char(0x56); - r = c.length(m, n, n+2, 2); - assert(r == 2); - } - { - typedef std::codecvt_utf16 C; - C c; - char n[6] = {char(0xFF), char(0xFE), char(0xC0), char(0xD8), char(0x03), char(0xDC)}; - std::mbstate_t m; - int r = c.length(m, n, n+6, 2); - assert(r == 2); - - n[1] = char(0x10); - n[0] = char(0x05); - r = c.length(m, n, n+2, 2); - assert(r == 2); - - n[1] = char(0x04); - n[0] = char(0x53); - r = c.length(m, n, n+2, 2); - assert(r == 2); - - n[1] = char(0x00); - n[0] = char(0x56); - r = c.length(m, n, n+2, 2); - assert(r == 2); - } -} diff --git a/test/localization/locale.stdcvt/codecvt_utf16_max_length.pass.cpp b/test/localization/locale.stdcvt/codecvt_utf16_max_length.pass.cpp deleted file mode 100644 index 29bb58d5..00000000 --- a/test/localization/locale.stdcvt/codecvt_utf16_max_length.pass.cpp +++ /dev/null @@ -1,63 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template -// class codecvt_utf16 -// : public codecvt -// { -// // unspecified -// }; - -// int max_length() const throw(); - -#include -#include - -int main() -{ - { - typedef std::codecvt_utf16 C; - C c; - int r = c.max_length(); - assert(r == 4); - } - { - typedef std::codecvt_utf16 C; - C c; - int r = c.max_length(); - assert(r == 6); - } - { - typedef std::codecvt_utf16 C; - C c; - int r = c.max_length(); - assert(r == 2); - } - { - typedef std::codecvt_utf16 C; - C c; - int r = c.max_length(); - assert(r == 4); - } - { - typedef std::codecvt_utf16 C; - C c; - int r = c.max_length(); - assert(r == 4); - } - { - typedef std::codecvt_utf16 C; - C c; - int r = c.max_length(); - assert(r == 6); - } -} diff --git a/test/localization/locale.stdcvt/codecvt_utf16_out.pass.cpp b/test/localization/locale.stdcvt/codecvt_utf16_out.pass.cpp deleted file mode 100644 index 2eb6978b..00000000 --- a/test/localization/locale.stdcvt/codecvt_utf16_out.pass.cpp +++ /dev/null @@ -1,331 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template -// class codecvt_utf16 -// : public codecvt -// { -// // unspecified -// }; - -// result -// out(stateT& state, -// const internT* from, const internT* from_end, const internT*& from_next, -// externT* to, externT* to_end, externT*& to_next) const; - -#include -#include - -int main() -{ - { - typedef std::codecvt_utf16 C; - C c; - wchar_t w = 0x40003; - char n[4] = {0}; - const wchar_t* wp = nullptr; - std::mbstate_t m; - char* np = nullptr; - std::codecvt_base::result r = c.out(m, &w, &w+1, wp, n, n+4, np); - assert(r == std::codecvt_base::ok); - assert(wp == &w+1); - assert(np == n+4); - assert(n[0] == char(0xD8)); - assert(n[1] == char(0xC0)); - assert(n[2] == char(0xDC)); - assert(n[3] == char(0x03)); - - w = 0x1005; - r = c.out(m, &w, &w+1, wp, n, n+4, np); - assert(r == std::codecvt_base::ok); - assert(wp == &w+1); - assert(np == n+2); - assert(n[0] == char(0x10)); - assert(n[1] == char(0x05)); - assert(n[2] == char(0xDC)); - assert(n[3] == char(0x03)); - - w = 0x453; - r = c.out(m, &w, &w+1, wp, n, n+4, np); - assert(r == std::codecvt_base::ok); - assert(wp == &w+1); - assert(np == n+2); - assert(n[0] == char(0x04)); - assert(n[1] == char(0x53)); - assert(n[2] == char(0xDC)); - assert(n[3] == char(0x03)); - - w = 0x56; - r = c.out(m, &w, &w+1, wp, n, n+4, np); - assert(r == std::codecvt_base::ok); - assert(wp == &w+1); - assert(np == n+2); - assert(n[0] == char(0x00)); - assert(n[1] == char(0x56)); - assert(n[2] == char(0xDC)); - assert(n[3] == char(0x03)); - } - { - typedef std::codecvt_utf16 C; - C c; - wchar_t w = 0x40003; - char n[4] = {0}; - const wchar_t* wp = nullptr; - std::mbstate_t m; - char* np = nullptr; - std::codecvt_base::result r = c.out(m, &w, &w+1, wp, n, n+4, np); - assert(r == std::codecvt_base::error); - assert(wp == &w); - assert(np == n); - assert(n[0] == char(0)); - assert(n[1] == char(0)); - assert(n[2] == char(0)); - assert(n[3] == char(0)); - - w = 0x1005; - r = c.out(m, &w, &w+1, wp, n, n+4, np); - assert(r == std::codecvt_base::error); - assert(wp == &w); - assert(np == n); - assert(n[0] == char(0)); - assert(n[1] == char(0)); - assert(n[2] == char(0)); - assert(n[3] == char(0)); - - w = 0x453; - r = c.out(m, &w, &w+1, wp, n, n+4, np); - assert(r == std::codecvt_base::ok); - assert(wp == &w+1); - assert(np == n+2); - assert(n[0] == char(0x04)); - assert(n[1] == char(0x53)); - assert(n[2] == char(0)); - assert(n[3] == char(0)); - - w = 0x56; - r = c.out(m, &w, &w+1, wp, n, n+4, np); - assert(r == std::codecvt_base::ok); - assert(wp == &w+1); - assert(np == n+2); - assert(n[0] == char(0x00)); - assert(n[1] == char(0x56)); - assert(n[2] == char(0)); - assert(n[3] == char(0)); - } - { - typedef std::codecvt_utf16 C; - C c; - wchar_t w = 0x40003; - char n[6] = {0}; - const wchar_t* wp = nullptr; - std::mbstate_t m; - char* np = nullptr; - std::codecvt_base::result r = c.out(m, &w, &w+1, wp, n, n+6, np); - assert(r == std::codecvt_base::ok); - assert(wp == &w+1); - assert(np == n+6); - assert(n[0] == char(0xFE)); - assert(n[1] == char(0xFF)); - assert(n[2] == char(0xD8)); - assert(n[3] == char(0xC0)); - assert(n[4] == char(0xDC)); - assert(n[5] == char(0x03)); - - w = 0x1005; - r = c.out(m, &w, &w+1, wp, n, n+6, np); - assert(r == std::codecvt_base::ok); - assert(wp == &w+1); - assert(np == n+4); - assert(n[0] == char(0xFE)); - assert(n[1] == char(0xFF)); - assert(n[2] == char(0x10)); - assert(n[3] == char(0x05)); - assert(n[4] == char(0xDC)); - assert(n[5] == char(0x03)); - - w = 0x453; - r = c.out(m, &w, &w+1, wp, n, n+6, np); - assert(r == std::codecvt_base::ok); - assert(wp == &w+1); - assert(np == n+4); - assert(n[0] == char(0xFE)); - assert(n[1] == char(0xFF)); - assert(n[2] == char(0x04)); - assert(n[3] == char(0x53)); - assert(n[4] == char(0xDC)); - assert(n[5] == char(0x03)); - - w = 0x56; - r = c.out(m, &w, &w+1, wp, n, n+6, np); - assert(r == std::codecvt_base::ok); - assert(wp == &w+1); - assert(np == n+4); - assert(n[0] == char(0xFE)); - assert(n[1] == char(0xFF)); - assert(n[2] == char(0x00)); - assert(n[3] == char(0x56)); - assert(n[4] == char(0xDC)); - assert(n[5] == char(0x03)); - } - - { - typedef std::codecvt_utf16 C; - C c; - wchar_t w = 0x40003; - char n[4] = {0}; - const wchar_t* wp = nullptr; - std::mbstate_t m; - char* np = nullptr; - std::codecvt_base::result r = c.out(m, &w, &w+1, wp, n, n+4, np); - assert(r == std::codecvt_base::ok); - assert(wp == &w+1); - assert(np == n+4); - assert(n[1] == char(0xD8)); - assert(n[0] == char(0xC0)); - assert(n[3] == char(0xDC)); - assert(n[2] == char(0x03)); - - w = 0x1005; - r = c.out(m, &w, &w+1, wp, n, n+4, np); - assert(r == std::codecvt_base::ok); - assert(wp == &w+1); - assert(np == n+2); - assert(n[1] == char(0x10)); - assert(n[0] == char(0x05)); - assert(n[3] == char(0xDC)); - assert(n[2] == char(0x03)); - - w = 0x453; - r = c.out(m, &w, &w+1, wp, n, n+4, np); - assert(r == std::codecvt_base::ok); - assert(wp == &w+1); - assert(np == n+2); - assert(n[1] == char(0x04)); - assert(n[0] == char(0x53)); - assert(n[3] == char(0xDC)); - assert(n[2] == char(0x03)); - - w = 0x56; - r = c.out(m, &w, &w+1, wp, n, n+4, np); - assert(r == std::codecvt_base::ok); - assert(wp == &w+1); - assert(np == n+2); - assert(n[1] == char(0x00)); - assert(n[0] == char(0x56)); - assert(n[3] == char(0xDC)); - assert(n[2] == char(0x03)); - } - { - typedef std::codecvt_utf16 C; - C c; - wchar_t w = 0x40003; - char n[4] = {0}; - const wchar_t* wp = nullptr; - std::mbstate_t m; - char* np = nullptr; - std::codecvt_base::result r = c.out(m, &w, &w+1, wp, n, n+4, np); - assert(r == std::codecvt_base::error); - assert(wp == &w); - assert(np == n); - assert(n[1] == char(0)); - assert(n[0] == char(0)); - assert(n[3] == char(0)); - assert(n[2] == char(0)); - - w = 0x1005; - r = c.out(m, &w, &w+1, wp, n, n+4, np); - assert(r == std::codecvt_base::error); - assert(wp == &w); - assert(np == n); - assert(n[1] == char(0)); - assert(n[0] == char(0)); - assert(n[3] == char(0)); - assert(n[2] == char(0)); - - w = 0x453; - r = c.out(m, &w, &w+1, wp, n, n+4, np); - assert(r == std::codecvt_base::ok); - assert(wp == &w+1); - assert(np == n+2); - assert(n[1] == char(0x04)); - assert(n[0] == char(0x53)); - assert(n[3] == char(0)); - assert(n[2] == char(0)); - - w = 0x56; - r = c.out(m, &w, &w+1, wp, n, n+4, np); - assert(r == std::codecvt_base::ok); - assert(wp == &w+1); - assert(np == n+2); - assert(n[1] == char(0x00)); - assert(n[0] == char(0x56)); - assert(n[3] == char(0)); - assert(n[2] == char(0)); - } - { - typedef std::codecvt_utf16 C; - C c; - wchar_t w = 0x40003; - char n[6] = {0}; - const wchar_t* wp = nullptr; - std::mbstate_t m; - char* np = nullptr; - std::codecvt_base::result r = c.out(m, &w, &w+1, wp, n, n+6, np); - assert(r == std::codecvt_base::ok); - assert(wp == &w+1); - assert(np == n+6); - assert(n[1] == char(0xFE)); - assert(n[0] == char(0xFF)); - assert(n[3] == char(0xD8)); - assert(n[2] == char(0xC0)); - assert(n[5] == char(0xDC)); - assert(n[4] == char(0x03)); - - w = 0x1005; - r = c.out(m, &w, &w+1, wp, n, n+6, np); - assert(r == std::codecvt_base::ok); - assert(wp == &w+1); - assert(np == n+4); - assert(n[1] == char(0xFE)); - assert(n[0] == char(0xFF)); - assert(n[3] == char(0x10)); - assert(n[2] == char(0x05)); - assert(n[5] == char(0xDC)); - assert(n[4] == char(0x03)); - - w = 0x453; - r = c.out(m, &w, &w+1, wp, n, n+6, np); - assert(r == std::codecvt_base::ok); - assert(wp == &w+1); - assert(np == n+4); - assert(n[1] == char(0xFE)); - assert(n[0] == char(0xFF)); - assert(n[3] == char(0x04)); - assert(n[2] == char(0x53)); - assert(n[5] == char(0xDC)); - assert(n[4] == char(0x03)); - - w = 0x56; - r = c.out(m, &w, &w+1, wp, n, n+6, np); - assert(r == std::codecvt_base::ok); - assert(wp == &w+1); - assert(np == n+4); - assert(n[1] == char(0xFE)); - assert(n[0] == char(0xFF)); - assert(n[3] == char(0x00)); - assert(n[2] == char(0x56)); - assert(n[5] == char(0xDC)); - assert(n[4] == char(0x03)); - } -} diff --git a/test/localization/locale.stdcvt/codecvt_utf16_unshift.pass.cpp b/test/localization/locale.stdcvt/codecvt_utf16_unshift.pass.cpp deleted file mode 100644 index 463d2f92..00000000 --- a/test/localization/locale.stdcvt/codecvt_utf16_unshift.pass.cpp +++ /dev/null @@ -1,56 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template -// class codecvt_utf16 -// : public codecvt -// { -// // unspecified -// }; - -// result -// unshift(stateT& state, -// externT* to, externT* to_end, externT*& to_next) const; - -#include -#include - -int main() -{ - { - typedef std::codecvt_utf16 C; - C c; - char n[4] = {0}; - std::mbstate_t m; - char* np = nullptr; - std::codecvt_base::result r = c.unshift(m, n, n+4, np); - assert(r == std::codecvt_base::noconv); - } - { - typedef std::codecvt_utf16 C; - C c; - char n[4] = {0}; - std::mbstate_t m; - char* np = nullptr; - std::codecvt_base::result r = c.unshift(m, n, n+4, np); - assert(r == std::codecvt_base::noconv); - } - { - typedef std::codecvt_utf16 C; - C c; - char n[4] = {0}; - std::mbstate_t m; - char* np = nullptr; - std::codecvt_base::result r = c.unshift(m, n, n+4, np); - assert(r == std::codecvt_base::noconv); - } -} diff --git a/test/localization/locale.stdcvt/codecvt_utf8.pass.cpp b/test/localization/locale.stdcvt/codecvt_utf8.pass.cpp deleted file mode 100644 index 545798df..00000000 --- a/test/localization/locale.stdcvt/codecvt_utf8.pass.cpp +++ /dev/null @@ -1,56 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template -// class codecvt_utf8 -// : public codecvt -// { -// // unspecified -// }; - -// Not a portable test - -#include -#include - -int outstanding_news = 0; - -void* operator new(std::size_t s) throw(std::bad_alloc) -{ - ++outstanding_news; - return std::malloc(s); -} - -void operator delete(void* p) throw() -{ - if (p) - { - --outstanding_news; - std::free(p); - } -} - -int main() -{ - assert(outstanding_news == 0); - { - typedef std::codecvt_utf8 C; - C c; - assert(outstanding_news == 0); - } - { - typedef std::codecvt_utf8 C; - std::locale loc(std::locale::classic(), new C); - assert(outstanding_news != 0); - } - assert(outstanding_news == 0); -} diff --git a/test/localization/locale.stdcvt/codecvt_utf8_always_noconv.pass.cpp b/test/localization/locale.stdcvt/codecvt_utf8_always_noconv.pass.cpp deleted file mode 100644 index 963c269f..00000000 --- a/test/localization/locale.stdcvt/codecvt_utf8_always_noconv.pass.cpp +++ /dev/null @@ -1,45 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template -// class codecvt_utf8 -// : public codecvt -// { -// // unspecified -// }; - -// bool always_noconv() const throw(); - -#include -#include - -int main() -{ - { - typedef std::codecvt_utf8 C; - C c; - bool r = c.always_noconv(); - assert(r == false); - } - { - typedef std::codecvt_utf8 C; - C c; - bool r = c.always_noconv(); - assert(r == false); - } - { - typedef std::codecvt_utf8 C; - C c; - bool r = c.always_noconv(); - assert(r == false); - } -} diff --git a/test/localization/locale.stdcvt/codecvt_utf8_encoding.pass.cpp b/test/localization/locale.stdcvt/codecvt_utf8_encoding.pass.cpp deleted file mode 100644 index b17752cb..00000000 --- a/test/localization/locale.stdcvt/codecvt_utf8_encoding.pass.cpp +++ /dev/null @@ -1,45 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template -// class codecvt_utf8 -// : public codecvt -// { -// // unspecified -// }; - -// int encoding() const throw(); - -#include -#include - -int main() -{ - { - typedef std::codecvt_utf8 C; - C c; - int r = c.encoding(); - assert(r == 0); - } - { - typedef std::codecvt_utf8 C; - C c; - int r = c.encoding(); - assert(r == 0); - } - { - typedef std::codecvt_utf8 C; - C c; - int r = c.encoding(); - assert(r == 0); - } -} diff --git a/test/localization/locale.stdcvt/codecvt_utf8_in.pass.cpp b/test/localization/locale.stdcvt/codecvt_utf8_in.pass.cpp deleted file mode 100644 index 382ea122..00000000 --- a/test/localization/locale.stdcvt/codecvt_utf8_in.pass.cpp +++ /dev/null @@ -1,360 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template -// class codecvt_utf8 -// : public codecvt -// { -// // unspecified -// }; - -// result -// in(stateT& state, -// const externT* from, const externT* from_end, const externT*& from_next, -// internT* to, internT* to_end, internT*& to_next) const; - -#include -#include - -int main() -{ - { - typedef std::codecvt_utf8 C; - C c; - wchar_t w = 0; - char n[4] = {char(0xF1), char(0x80), char(0x80), char(0x83)}; - wchar_t* wp = nullptr; - std::mbstate_t m; - const char* np = nullptr; - std::codecvt_base::result r = c.in(m, n, n+4, np, &w, &w+1, wp); - assert(r == std::codecvt_base::ok); - assert(wp == &w+1); - assert(np == n+4); - assert(w == 0x40003); - - n[0] = char(0xE1); - n[1] = char(0x80); - n[2] = char(0x85); - r = c.in(m, n, n+3, np, &w, &w+1, wp); - assert(r == std::codecvt_base::ok); - assert(wp == &w+1); - assert(np == n+3); - assert(w == 0x1005); - - n[0] = char(0xD1); - n[1] = char(0x93); - r = c.in(m, n, n+2, np, &w, &w+1, wp); - assert(r == std::codecvt_base::ok); - assert(wp == &w+1); - assert(np == n+2); - assert(w == 0x453); - - w = 0x56; - n[0] = char(0x56); - r = c.in(m, n, n+1, np, &w, &w+1, wp); - assert(r == std::codecvt_base::ok); - assert(wp == &w+1); - assert(np == n+1); - assert(w == 0x56); - } - { - typedef std::codecvt_utf8 C; - C c; - wchar_t w = 0; - char n[4] = {char(0xF1), char(0x80), char(0x80), char(0x83)}; - wchar_t* wp = nullptr; - std::mbstate_t m; - const char* np = nullptr; - std::codecvt_base::result r = c.in(m, n, n+4, np, &w, &w+1, wp); - assert(r == std::codecvt_base::error); - assert(wp == &w); - assert(np == n); - assert(w == 0); - - n[0] = char(0xE1); - n[1] = char(0x80); - n[2] = char(0x85); - r = c.in(m, n, n+3, np, &w, &w+1, wp); - assert(r == std::codecvt_base::error); - assert(wp == &w); - assert(np == n); - assert(w == 0); - - n[0] = char(0xD1); - n[1] = char(0x93); - r = c.in(m, n, n+2, np, &w, &w+1, wp); - assert(r == std::codecvt_base::ok); - assert(wp == &w+1); - assert(np == n+2); - assert(w == 0x453); - - w = 0x56; - n[0] = char(0x56); - r = c.in(m, n, n+1, np, &w, &w+1, wp); - assert(r == std::codecvt_base::ok); - assert(wp == &w+1); - assert(np == n+1); - assert(w == 0x56); - } - { - typedef std::codecvt_utf8 C; - C c; - wchar_t w = 0; - char n[7] = {char(0xEF), char(0xBB), char(0xBF), char(0xF1), char(0x80), char(0x80), char(0x83)}; - wchar_t* wp = nullptr; - std::mbstate_t m; - const char* np = nullptr; - std::codecvt_base::result r = c.in(m, n, n+7, np, &w, &w+1, wp); - assert(r == std::codecvt_base::ok); - assert(wp == &w+1); - assert(np == n+7); - assert(w == 0x40003); - - n[0] = char(0xE1); - n[1] = char(0x80); - n[2] = char(0x85); - r = c.in(m, n, n+3, np, &w, &w+1, wp); - assert(r == std::codecvt_base::ok); - assert(wp == &w+1); - assert(np == n+3); - assert(w == 0x1005); - - n[0] = char(0xEF); - n[1] = char(0xBB); - n[2] = char(0xBF); - n[3] = char(0xD1); - n[4] = char(0x93); - r = c.in(m, n, n+5, np, &w, &w+1, wp); - assert(r == std::codecvt_base::ok); - assert(wp == &w+1); - assert(np == n+5); - assert(w == 0x453); - - w = 0x56; - n[0] = char(0x56); - r = c.in(m, n, n+1, np, &w, &w+1, wp); - assert(r == std::codecvt_base::ok); - assert(wp == &w+1); - assert(np == n+1); - assert(w == 0x56); - } - { - typedef std::codecvt_utf8 C; - C c; - char32_t w = 0; - char n[4] = {char(0xF1), char(0x80), char(0x80), char(0x83)}; - char32_t* wp = nullptr; - std::mbstate_t m; - const char* np = nullptr; - std::codecvt_base::result r = c.in(m, n, n+4, np, &w, &w+1, wp); - assert(r == std::codecvt_base::ok); - assert(wp == &w+1); - assert(np == n+4); - assert(w == 0x40003); - - n[0] = char(0xE1); - n[1] = char(0x80); - n[2] = char(0x85); - r = c.in(m, n, n+3, np, &w, &w+1, wp); - assert(r == std::codecvt_base::ok); - assert(wp == &w+1); - assert(np == n+3); - assert(w == 0x1005); - - n[0] = char(0xD1); - n[1] = char(0x93); - r = c.in(m, n, n+2, np, &w, &w+1, wp); - assert(r == std::codecvt_base::ok); - assert(wp == &w+1); - assert(np == n+2); - assert(w == 0x453); - - w = 0x56; - n[0] = char(0x56); - r = c.in(m, n, n+1, np, &w, &w+1, wp); - assert(r == std::codecvt_base::ok); - assert(wp == &w+1); - assert(np == n+1); - assert(w == 0x56); - } - { - typedef std::codecvt_utf8 C; - C c; - char32_t w = 0; - char n[4] = {char(0xF1), char(0x80), char(0x80), char(0x83)}; - char32_t* wp = nullptr; - std::mbstate_t m; - const char* np = nullptr; - std::codecvt_base::result r = c.in(m, n, n+4, np, &w, &w+1, wp); - assert(r == std::codecvt_base::error); - assert(wp == &w); - assert(np == n); - assert(w == 0); - - n[0] = char(0xE1); - n[1] = char(0x80); - n[2] = char(0x85); - r = c.in(m, n, n+3, np, &w, &w+1, wp); - assert(r == std::codecvt_base::error); - assert(wp == &w); - assert(np == n); - assert(w == 0); - - n[0] = char(0xD1); - n[1] = char(0x93); - r = c.in(m, n, n+2, np, &w, &w+1, wp); - assert(r == std::codecvt_base::ok); - assert(wp == &w+1); - assert(np == n+2); - assert(w == 0x453); - - w = 0x56; - n[0] = char(0x56); - r = c.in(m, n, n+1, np, &w, &w+1, wp); - assert(r == std::codecvt_base::ok); - assert(wp == &w+1); - assert(np == n+1); - assert(w == 0x56); - } - { - typedef std::codecvt_utf8 C; - C c; - char32_t w = 0; - char n[7] = {char(0xEF), char(0xBB), char(0xBF), char(0xF1), char(0x80), char(0x80), char(0x83)}; - char32_t* wp = nullptr; - std::mbstate_t m; - const char* np = nullptr; - std::codecvt_base::result r = c.in(m, n, n+7, np, &w, &w+1, wp); - assert(r == std::codecvt_base::ok); - assert(wp == &w+1); - assert(np == n+7); - assert(w == 0x40003); - - n[0] = char(0xE1); - n[1] = char(0x80); - n[2] = char(0x85); - r = c.in(m, n, n+3, np, &w, &w+1, wp); - assert(r == std::codecvt_base::ok); - assert(wp == &w+1); - assert(np == n+3); - assert(w == 0x1005); - - n[0] = char(0xEF); - n[1] = char(0xBB); - n[2] = char(0xBF); - n[3] = char(0xD1); - n[4] = char(0x93); - r = c.in(m, n, n+5, np, &w, &w+1, wp); - assert(r == std::codecvt_base::ok); - assert(wp == &w+1); - assert(np == n+5); - assert(w == 0x453); - - w = 0x56; - n[0] = char(0x56); - r = c.in(m, n, n+1, np, &w, &w+1, wp); - assert(r == std::codecvt_base::ok); - assert(wp == &w+1); - assert(np == n+1); - assert(w == 0x56); - } - { - typedef std::codecvt_utf8 C; - C c; - char16_t w = 0; - char n[3] = {char(0xE1), char(0x80), char(0x85)}; - char16_t* wp = nullptr; - std::mbstate_t m; - const char* np = nullptr; - std::codecvt_base::result r = c.in(m, n, n+3, np, &w, &w+1, wp); - assert(r == std::codecvt_base::ok); - assert(wp == &w+1); - assert(np == n+3); - assert(w == 0x1005); - - n[0] = char(0xD1); - n[1] = char(0x93); - r = c.in(m, n, n+2, np, &w, &w+1, wp); - assert(r == std::codecvt_base::ok); - assert(wp == &w+1); - assert(np == n+2); - assert(w == 0x453); - - w = 0x56; - n[0] = char(0x56); - r = c.in(m, n, n+1, np, &w, &w+1, wp); - assert(r == std::codecvt_base::ok); - assert(wp == &w+1); - assert(np == n+1); - assert(w == 0x56); - } - { - typedef std::codecvt_utf8 C; - C c; - char16_t w = 0; - char n[3] = {char(0xE1), char(0x80), char(0x85)}; - char16_t* wp = nullptr; - std::mbstate_t m; - const char* np = nullptr; - std::codecvt_base::result r = c.in(m, n, n+3, np, &w, &w+1, wp); - assert(r == std::codecvt_base::error); - assert(wp == &w); - assert(np == n); - assert(w == 0); - - n[0] = char(0xD1); - n[1] = char(0x93); - r = c.in(m, n, n+2, np, &w, &w+1, wp); - assert(r == std::codecvt_base::ok); - assert(wp == &w+1); - assert(np == n+2); - assert(w == 0x453); - - w = 0x56; - n[0] = char(0x56); - r = c.in(m, n, n+1, np, &w, &w+1, wp); - assert(r == std::codecvt_base::ok); - assert(wp == &w+1); - assert(np == n+1); - assert(w == 0x56); - } - { - typedef std::codecvt_utf8 C; - C c; - char16_t w = 0; - char n[6] = {char(0xEF), char(0xBB), char(0xBF), char(0xE1), char(0x80), char(0x85)}; - char16_t* wp = nullptr; - std::mbstate_t m; - const char* np = nullptr; - std::codecvt_base::result r = c.in(m, n, n+6, np, &w, &w+1, wp); - assert(r == std::codecvt_base::ok); - assert(wp == &w+1); - assert(np == n+6); - assert(w == 0x1005); - - n[0] = char(0xD1); - n[1] = char(0x93); - r = c.in(m, n, n+2, np, &w, &w+1, wp); - assert(r == std::codecvt_base::ok); - assert(wp == &w+1); - assert(np == n+2); - assert(w == 0x453); - - w = 0x56; - n[0] = char(0x56); - r = c.in(m, n, n+1, np, &w, &w+1, wp); - assert(r == std::codecvt_base::ok); - assert(wp == &w+1); - assert(np == n+1); - assert(w == 0x56); - } -} diff --git a/test/localization/locale.stdcvt/codecvt_utf8_length.pass.cpp b/test/localization/locale.stdcvt/codecvt_utf8_length.pass.cpp deleted file mode 100644 index 7239b4c8..00000000 --- a/test/localization/locale.stdcvt/codecvt_utf8_length.pass.cpp +++ /dev/null @@ -1,244 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template -// class codecvt_utf8 -// : public codecvt -// { -// // unspecified -// }; - -// int length(stateT& state, const externT* from, const externT* from_end, -// size_t max) const; - -#include -#include - -int main() -{ - { - typedef std::codecvt_utf8 C; - C c; - char n[4] = {char(0xF1), char(0x80), char(0x80), char(0x83)}; - std::mbstate_t m; - int r = c.length(m, n, n+4, 1); - assert(r == 4); - - n[0] = char(0xE1); - n[1] = char(0x80); - n[2] = char(0x85); - r = c.length(m, n, n+3, 2); - assert(r == 3); - - n[0] = char(0xD1); - n[1] = char(0x93); - r = c.length(m, n, n+2, 3); - assert(r == 2); - - n[0] = char(0x56); - r = c.length(m, n, n+1, 3); - assert(r == 1); - } - { - typedef std::codecvt_utf8 C; - C c; - char n[4] = {char(0xF1), char(0x80), char(0x80), char(0x83)}; - std::mbstate_t m; - int r = c.length(m, n, n+4, 1); - assert(r == 0); - - n[0] = char(0xE1); - n[1] = char(0x80); - n[2] = char(0x85); - r = c.length(m, n, n+3, 2); - assert(r == 0); - - n[0] = char(0xD1); - n[1] = char(0x93); - r = c.length(m, n, n+2, 3); - assert(r == 2); - - n[0] = char(0x56); - r = c.length(m, n, n+1, 3); - assert(r == 1); - } - { - typedef std::codecvt_utf8 C; - C c; - char n[7] = {char(0xEF), char(0xBB), char(0xBF), char(0xF1), char(0x80), char(0x80), char(0x83)}; - std::mbstate_t m; - int r = c.length(m, n, n+7, 1); - assert(r == 7); - - n[0] = char(0xE1); - n[1] = char(0x80); - n[2] = char(0x85); - r = c.length(m, n, n+3, 2); - assert(r == 3); - - n[0] = char(0xEF); - n[1] = char(0xBB); - n[2] = char(0xBF); - n[3] = char(0xD1); - n[4] = char(0x93); - r = c.length(m, n, n+5, 3); - assert(r == 5); - - n[0] = char(0x56); - r = c.length(m, n, n+1, 3); - assert(r == 1); - } - { - typedef std::codecvt_utf8 C; - C c; - char n[4] = {char(0xF1), char(0x80), char(0x80), char(0x83)}; - std::mbstate_t m; - int r = c.length(m, n, n+4, 1); - assert(r == 4); - - n[0] = char(0xE1); - n[1] = char(0x80); - n[2] = char(0x85); - r = c.length(m, n, n+3, 2); - assert(r == 3); - - n[0] = char(0xD1); - n[1] = char(0x93); - r = c.length(m, n, n+2, 3); - assert(r == 2); - - n[0] = char(0x56); - r = c.length(m, n, n+1, 3); - assert(r == 1); - } - { - typedef std::codecvt_utf8 C; - C c; - char n[4] = {char(0xF1), char(0x80), char(0x80), char(0x83)}; - std::mbstate_t m; - int r = c.length(m, n, n+4, 1); - assert(r == 0); - - n[0] = char(0xE1); - n[1] = char(0x80); - n[2] = char(0x85); - r = c.length(m, n, n+3, 2); - assert(r == 0); - - n[0] = char(0xD1); - n[1] = char(0x93); - r = c.length(m, n, n+2, 3); - assert(r == 2); - - n[0] = char(0x56); - r = c.length(m, n, n+1, 3); - assert(r == 1); - } - { - typedef std::codecvt_utf8 C; - C c; - char n[7] = {char(0xEF), char(0xBB), char(0xBF), char(0xF1), char(0x80), char(0x80), char(0x83)}; - std::mbstate_t m; - int r = c.length(m, n, n+7, 1); - assert(r == 7); - - n[0] = char(0xE1); - n[1] = char(0x80); - n[2] = char(0x85); - r = c.length(m, n, n+3, 2); - assert(r == 3); - - n[0] = char(0xEF); - n[1] = char(0xBB); - n[2] = char(0xBF); - n[3] = char(0xD1); - n[4] = char(0x93); - r = c.length(m, n, n+5, 3); - assert(r == 5); - - n[0] = char(0x56); - r = c.length(m, n, n+1, 3); - assert(r == 1); - } - { - typedef std::codecvt_utf8 C; - C c; - char n[4] = {char(0xF1), char(0x80), char(0x80), char(0x83)}; - std::mbstate_t m; - int r = c.length(m, n, n+4, 1); - assert(r == 0); - - n[0] = char(0xE1); - n[1] = char(0x80); - n[2] = char(0x85); - r = c.length(m, n, n+3, 2); - assert(r == 3); - - n[0] = char(0xD1); - n[1] = char(0x93); - r = c.length(m, n, n+2, 3); - assert(r == 2); - - n[0] = char(0x56); - r = c.length(m, n, n+1, 3); - assert(r == 1); - } - { - typedef std::codecvt_utf8 C; - C c; - char n[4] = {char(0xF1), char(0x80), char(0x80), char(0x83)}; - std::mbstate_t m; - int r = c.length(m, n, n+4, 1); - assert(r == 0); - - n[0] = char(0xE1); - n[1] = char(0x80); - n[2] = char(0x85); - r = c.length(m, n, n+3, 2); - assert(r == 0); - - n[0] = char(0xD1); - n[1] = char(0x93); - r = c.length(m, n, n+2, 3); - assert(r == 2); - - n[0] = char(0x56); - r = c.length(m, n, n+1, 3); - assert(r == 1); - } - { - typedef std::codecvt_utf8 C; - C c; - char n[7] = {char(0xEF), char(0xBB), char(0xBF), char(0xF1), char(0x80), char(0x80), char(0x83)}; - std::mbstate_t m; - int r = c.length(m, n, n+7, 1); - assert(r == 3); - - n[0] = char(0xE1); - n[1] = char(0x80); - n[2] = char(0x85); - r = c.length(m, n, n+3, 2); - assert(r == 3); - - n[0] = char(0xEF); - n[1] = char(0xBB); - n[2] = char(0xBF); - n[3] = char(0xD1); - n[4] = char(0x93); - r = c.length(m, n, n+5, 3); - assert(r == 5); - - n[0] = char(0x56); - r = c.length(m, n, n+1, 3); - assert(r == 1); - } -} diff --git a/test/localization/locale.stdcvt/codecvt_utf8_max_length.pass.cpp b/test/localization/locale.stdcvt/codecvt_utf8_max_length.pass.cpp deleted file mode 100644 index 70e23f8f..00000000 --- a/test/localization/locale.stdcvt/codecvt_utf8_max_length.pass.cpp +++ /dev/null @@ -1,63 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template -// class codecvt_utf8 -// : public codecvt -// { -// // unspecified -// }; - -// int max_length() const throw(); - -#include -#include - -int main() -{ - { - typedef std::codecvt_utf8 C; - C c; - int r = c.max_length(); - assert(r == 4); - } - { - typedef std::codecvt_utf8 C; - C c; - int r = c.max_length(); - assert(r == 7); - } - { - typedef std::codecvt_utf8 C; - C c; - int r = c.max_length(); - assert(r == 3); - } - { - typedef std::codecvt_utf8 C; - C c; - int r = c.max_length(); - assert(r == 6); - } - { - typedef std::codecvt_utf8 C; - C c; - int r = c.max_length(); - assert(r == 4); - } - { - typedef std::codecvt_utf8 C; - C c; - int r = c.max_length(); - assert(r == 7); - } -} diff --git a/test/localization/locale.stdcvt/codecvt_utf8_out.pass.cpp b/test/localization/locale.stdcvt/codecvt_utf8_out.pass.cpp deleted file mode 100644 index 02cf7cf9..00000000 --- a/test/localization/locale.stdcvt/codecvt_utf8_out.pass.cpp +++ /dev/null @@ -1,456 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template -// class codecvt_utf8 -// : public codecvt -// { -// // unspecified -// }; - -// result -// out(stateT& state, -// const internT* from, const internT* from_end, const internT*& from_next, -// externT* to, externT* to_end, externT*& to_next) const; - -#include -#include - -int main() -{ - { - typedef std::codecvt_utf8 C; - C c; - wchar_t w = 0x40003; - char n[4] = {0}; - const wchar_t* wp = nullptr; - std::mbstate_t m; - char* np = nullptr; - std::codecvt_base::result r = c.out(m, &w, &w+1, wp, n, n+4, np); - assert(r == std::codecvt_base::ok); - assert(wp == &w+1); - assert(np == n+4); - assert(n[0] == char(0xF1)); - assert(n[1] == char(0x80)); - assert(n[2] == char(0x80)); - assert(n[3] == char(0x83)); - - w = 0x1005; - r = c.out(m, &w, &w+1, wp, n, n+4, np); - assert(r == std::codecvt_base::ok); - assert(wp == &w+1); - assert(np == n+3); - assert(n[0] == char(0xE1)); - assert(n[1] == char(0x80)); - assert(n[2] == char(0x85)); - assert(n[3] == char(0x83)); - - w = 0x453; - r = c.out(m, &w, &w+1, wp, n, n+4, np); - assert(r == std::codecvt_base::ok); - assert(wp == &w+1); - assert(np == n+2); - assert(n[0] == char(0xD1)); - assert(n[1] == char(0x93)); - assert(n[2] == char(0x85)); - assert(n[3] == char(0x83)); - - w = 0x56; - r = c.out(m, &w, &w+1, wp, n, n+4, np); - assert(r == std::codecvt_base::ok); - assert(wp == &w+1); - assert(np == n+1); - assert(n[0] == char(0x56)); - assert(n[1] == char(0x93)); - assert(n[2] == char(0x85)); - assert(n[3] == char(0x83)); - } - { - typedef std::codecvt_utf8 C; - C c; - wchar_t w = 0x40003; - char n[4] = {0}; - const wchar_t* wp = nullptr; - std::mbstate_t m; - char* np = nullptr; - std::codecvt_base::result r = c.out(m, &w, &w+1, wp, n, n+4, np); - assert(r == std::codecvt_base::error); - assert(wp == &w); - assert(np == n); - assert(n[0] == char(0)); - assert(n[1] == char(0)); - assert(n[2] == char(0)); - assert(n[3] == char(0)); - - w = 0x1005; - r = c.out(m, &w, &w+1, wp, n, n+4, np); - assert(r == std::codecvt_base::error); - assert(wp == &w); - assert(np == n); - assert(n[0] == char(0)); - assert(n[1] == char(0)); - assert(n[2] == char(0)); - assert(n[3] == char(0)); - - w = 0x453; - r = c.out(m, &w, &w+1, wp, n, n+4, np); - assert(r == std::codecvt_base::ok); - assert(wp == &w+1); - assert(np == n+2); - assert(n[0] == char(0xD1)); - assert(n[1] == char(0x93)); - assert(n[2] == char(0)); - assert(n[3] == char(0)); - - w = 0x56; - r = c.out(m, &w, &w+1, wp, n, n+4, np); - assert(r == std::codecvt_base::ok); - assert(wp == &w+1); - assert(np == n+1); - assert(n[0] == char(0x56)); - assert(n[1] == char(0x93)); - assert(n[2] == char(0)); - assert(n[3] == char(0)); - } - { - typedef std::codecvt_utf8 C; - C c; - wchar_t w = 0x40003; - char n[7] = {0}; - const wchar_t* wp = nullptr; - std::mbstate_t m; - char* np = nullptr; - std::codecvt_base::result r = c.out(m, &w, &w+1, wp, n, n+7, np); - assert(r == std::codecvt_base::ok); - assert(wp == &w+1); - assert(np == n+7); - assert(n[0] == char(0xEF)); - assert(n[1] == char(0xBB)); - assert(n[2] == char(0xBF)); - assert(n[3] == char(0xF1)); - assert(n[4] == char(0x80)); - assert(n[5] == char(0x80)); - assert(n[6] == char(0x83)); - - w = 0x1005; - r = c.out(m, &w, &w+1, wp, n, n+7, np); - assert(r == std::codecvt_base::ok); - assert(wp == &w+1); - assert(np == n+6); - assert(n[0] == char(0xEF)); - assert(n[1] == char(0xBB)); - assert(n[2] == char(0xBF)); - assert(n[3] == char(0xE1)); - assert(n[4] == char(0x80)); - assert(n[5] == char(0x85)); - assert(n[6] == char(0x83)); - - w = 0x453; - r = c.out(m, &w, &w+1, wp, n, n+7, np); - assert(r == std::codecvt_base::ok); - assert(wp == &w+1); - assert(np == n+5); - assert(n[0] == char(0xEF)); - assert(n[1] == char(0xBB)); - assert(n[2] == char(0xBF)); - assert(n[3] == char(0xD1)); - assert(n[4] == char(0x93)); - assert(n[5] == char(0x85)); - assert(n[6] == char(0x83)); - - w = 0x56; - r = c.out(m, &w, &w+1, wp, n, n+7, np); - assert(r == std::codecvt_base::ok); - assert(wp == &w+1); - assert(np == n+4); - assert(n[0] == char(0xEF)); - assert(n[1] == char(0xBB)); - assert(n[2] == char(0xBF)); - assert(n[3] == char(0x56)); - assert(n[4] == char(0x93)); - assert(n[5] == char(0x85)); - assert(n[6] == char(0x83)); - } - { - typedef std::codecvt_utf8 C; - C c; - char32_t w = 0x40003; - char n[4] = {0}; - const char32_t* wp = nullptr; - std::mbstate_t m; - char* np = nullptr; - std::codecvt_base::result r = c.out(m, &w, &w+1, wp, n, n+4, np); - assert(r == std::codecvt_base::ok); - assert(wp == &w+1); - assert(np == n+4); - assert(n[0] == char(0xF1)); - assert(n[1] == char(0x80)); - assert(n[2] == char(0x80)); - assert(n[3] == char(0x83)); - - w = 0x1005; - r = c.out(m, &w, &w+1, wp, n, n+4, np); - assert(r == std::codecvt_base::ok); - assert(wp == &w+1); - assert(np == n+3); - assert(n[0] == char(0xE1)); - assert(n[1] == char(0x80)); - assert(n[2] == char(0x85)); - assert(n[3] == char(0x83)); - - w = 0x453; - r = c.out(m, &w, &w+1, wp, n, n+4, np); - assert(r == std::codecvt_base::ok); - assert(wp == &w+1); - assert(np == n+2); - assert(n[0] == char(0xD1)); - assert(n[1] == char(0x93)); - assert(n[2] == char(0x85)); - assert(n[3] == char(0x83)); - - w = 0x56; - r = c.out(m, &w, &w+1, wp, n, n+4, np); - assert(r == std::codecvt_base::ok); - assert(wp == &w+1); - assert(np == n+1); - assert(n[0] == char(0x56)); - assert(n[1] == char(0x93)); - assert(n[2] == char(0x85)); - assert(n[3] == char(0x83)); - } - { - typedef std::codecvt_utf8 C; - C c; - char32_t w = 0x40003; - char n[4] = {0}; - const char32_t* wp = nullptr; - std::mbstate_t m; - char* np = nullptr; - std::codecvt_base::result r = c.out(m, &w, &w+1, wp, n, n+4, np); - assert(r == std::codecvt_base::error); - assert(wp == &w); - assert(np == n); - assert(n[0] == char(0)); - assert(n[1] == char(0)); - assert(n[2] == char(0)); - assert(n[3] == char(0)); - - w = 0x1005; - r = c.out(m, &w, &w+1, wp, n, n+4, np); - assert(r == std::codecvt_base::error); - assert(wp == &w); - assert(np == n); - assert(n[0] == char(0)); - assert(n[1] == char(0)); - assert(n[2] == char(0)); - assert(n[3] == char(0)); - - w = 0x453; - r = c.out(m, &w, &w+1, wp, n, n+4, np); - assert(r == std::codecvt_base::ok); - assert(wp == &w+1); - assert(np == n+2); - assert(n[0] == char(0xD1)); - assert(n[1] == char(0x93)); - assert(n[2] == char(0)); - assert(n[3] == char(0)); - - w = 0x56; - r = c.out(m, &w, &w+1, wp, n, n+4, np); - assert(r == std::codecvt_base::ok); - assert(wp == &w+1); - assert(np == n+1); - assert(n[0] == char(0x56)); - assert(n[1] == char(0x93)); - assert(n[2] == char(0)); - assert(n[3] == char(0)); - } - { - typedef std::codecvt_utf8 C; - C c; - char32_t w = 0x40003; - char n[7] = {0}; - const char32_t* wp = nullptr; - std::mbstate_t m; - char* np = nullptr; - std::codecvt_base::result r = c.out(m, &w, &w+1, wp, n, n+7, np); - assert(r == std::codecvt_base::ok); - assert(wp == &w+1); - assert(np == n+7); - assert(n[0] == char(0xEF)); - assert(n[1] == char(0xBB)); - assert(n[2] == char(0xBF)); - assert(n[3] == char(0xF1)); - assert(n[4] == char(0x80)); - assert(n[5] == char(0x80)); - assert(n[6] == char(0x83)); - - w = 0x1005; - r = c.out(m, &w, &w+1, wp, n, n+7, np); - assert(r == std::codecvt_base::ok); - assert(wp == &w+1); - assert(np == n+6); - assert(n[0] == char(0xEF)); - assert(n[1] == char(0xBB)); - assert(n[2] == char(0xBF)); - assert(n[3] == char(0xE1)); - assert(n[4] == char(0x80)); - assert(n[5] == char(0x85)); - assert(n[6] == char(0x83)); - - w = 0x453; - r = c.out(m, &w, &w+1, wp, n, n+7, np); - assert(r == std::codecvt_base::ok); - assert(wp == &w+1); - assert(np == n+5); - assert(n[0] == char(0xEF)); - assert(n[1] == char(0xBB)); - assert(n[2] == char(0xBF)); - assert(n[3] == char(0xD1)); - assert(n[4] == char(0x93)); - assert(n[5] == char(0x85)); - assert(n[6] == char(0x83)); - - w = 0x56; - r = c.out(m, &w, &w+1, wp, n, n+7, np); - assert(r == std::codecvt_base::ok); - assert(wp == &w+1); - assert(np == n+4); - assert(n[0] == char(0xEF)); - assert(n[1] == char(0xBB)); - assert(n[2] == char(0xBF)); - assert(n[3] == char(0x56)); - assert(n[4] == char(0x93)); - assert(n[5] == char(0x85)); - assert(n[6] == char(0x83)); - } - { - typedef std::codecvt_utf8 C; - C c; - char16_t w = 0x1005; - char n[4] = {0}; - const char16_t* wp = nullptr; - std::mbstate_t m; - char* np = nullptr; - std::codecvt_base::result r = c.out(m, &w, &w+1, wp, n, n+4, np); - assert(r == std::codecvt_base::ok); - assert(wp == &w+1); - assert(np == n+3); - assert(n[0] == char(0xE1)); - assert(n[1] == char(0x80)); - assert(n[2] == char(0x85)); - assert(n[3] == char(0)); - - w = 0x453; - r = c.out(m, &w, &w+1, wp, n, n+4, np); - assert(r == std::codecvt_base::ok); - assert(wp == &w+1); - assert(np == n+2); - assert(n[0] == char(0xD1)); - assert(n[1] == char(0x93)); - assert(n[2] == char(0x85)); - assert(n[3] == char(0)); - - w = 0x56; - r = c.out(m, &w, &w+1, wp, n, n+4, np); - assert(r == std::codecvt_base::ok); - assert(wp == &w+1); - assert(np == n+1); - assert(n[0] == char(0x56)); - assert(n[1] == char(0x93)); - assert(n[2] == char(0x85)); - assert(n[3] == char(0)); - } - { - typedef std::codecvt_utf8 C; - C c; - char16_t w = 0x1005; - char n[4] = {0}; - const char16_t* wp = nullptr; - std::mbstate_t m; - char* np = nullptr; - std::codecvt_base::result r = c.out(m, &w, &w+1, wp, n, n+4, np); - assert(r == std::codecvt_base::error); - assert(wp == &w); - assert(np == n); - assert(n[0] == char(0)); - assert(n[1] == char(0)); - assert(n[2] == char(0)); - assert(n[3] == char(0)); - - w = 0x453; - r = c.out(m, &w, &w+1, wp, n, n+4, np); - assert(r == std::codecvt_base::ok); - assert(wp == &w+1); - assert(np == n+2); - assert(n[0] == char(0xD1)); - assert(n[1] == char(0x93)); - assert(n[2] == char(0)); - assert(n[3] == char(0)); - - w = 0x56; - r = c.out(m, &w, &w+1, wp, n, n+4, np); - assert(r == std::codecvt_base::ok); - assert(wp == &w+1); - assert(np == n+1); - assert(n[0] == char(0x56)); - assert(n[1] == char(0x93)); - assert(n[2] == char(0)); - assert(n[3] == char(0)); - } - { - typedef std::codecvt_utf8 C; - C c; - char16_t w = 0x1005; - char n[7] = {0}; - const char16_t* wp = nullptr; - std::mbstate_t m; - char* np = nullptr; - std::codecvt_base::result r = c.out(m, &w, &w+1, wp, n, n+7, np); - assert(r == std::codecvt_base::ok); - assert(wp == &w+1); - assert(np == n+6); - assert(n[0] == char(0xEF)); - assert(n[1] == char(0xBB)); - assert(n[2] == char(0xBF)); - assert(n[3] == char(0xE1)); - assert(n[4] == char(0x80)); - assert(n[5] == char(0x85)); - assert(n[6] == char(0)); - - w = 0x453; - r = c.out(m, &w, &w+1, wp, n, n+7, np); - assert(r == std::codecvt_base::ok); - assert(wp == &w+1); - assert(np == n+5); - assert(n[0] == char(0xEF)); - assert(n[1] == char(0xBB)); - assert(n[2] == char(0xBF)); - assert(n[3] == char(0xD1)); - assert(n[4] == char(0x93)); - assert(n[5] == char(0x85)); - assert(n[6] == char(0)); - - w = 0x56; - r = c.out(m, &w, &w+1, wp, n, n+7, np); - assert(r == std::codecvt_base::ok); - assert(wp == &w+1); - assert(np == n+4); - assert(n[0] == char(0xEF)); - assert(n[1] == char(0xBB)); - assert(n[2] == char(0xBF)); - assert(n[3] == char(0x56)); - assert(n[4] == char(0x93)); - assert(n[5] == char(0x85)); - assert(n[6] == char(0)); - } -} diff --git a/test/localization/locale.stdcvt/codecvt_utf8_unshift.pass.cpp b/test/localization/locale.stdcvt/codecvt_utf8_unshift.pass.cpp deleted file mode 100644 index 1f0c237d..00000000 --- a/test/localization/locale.stdcvt/codecvt_utf8_unshift.pass.cpp +++ /dev/null @@ -1,56 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template -// class codecvt_utf8 -// : public codecvt -// { -// // unspecified -// }; - -// result -// unshift(stateT& state, -// externT* to, externT* to_end, externT*& to_next) const; - -#include -#include - -int main() -{ - { - typedef std::codecvt_utf8 C; - C c; - char n[4] = {0}; - std::mbstate_t m; - char* np = nullptr; - std::codecvt_base::result r = c.unshift(m, n, n+4, np); - assert(r == std::codecvt_base::noconv); - } - { - typedef std::codecvt_utf8 C; - C c; - char n[4] = {0}; - std::mbstate_t m; - char* np = nullptr; - std::codecvt_base::result r = c.unshift(m, n, n+4, np); - assert(r == std::codecvt_base::noconv); - } - { - typedef std::codecvt_utf8 C; - C c; - char n[4] = {0}; - std::mbstate_t m; - char* np = nullptr; - std::codecvt_base::result r = c.unshift(m, n, n+4, np); - assert(r == std::codecvt_base::noconv); - } -} diff --git a/test/localization/locale.stdcvt/codecvt_utf8_utf16_always_noconv.pass.cpp b/test/localization/locale.stdcvt/codecvt_utf8_utf16_always_noconv.pass.cpp deleted file mode 100644 index 7690e619..00000000 --- a/test/localization/locale.stdcvt/codecvt_utf8_utf16_always_noconv.pass.cpp +++ /dev/null @@ -1,45 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template -// class codecvt_utf8_utf16 -// : public codecvt -// { -// // unspecified -// }; - -// bool always_noconv() const throw(); - -#include -#include - -int main() -{ - { - typedef std::codecvt_utf8_utf16 C; - C c; - bool r = c.always_noconv(); - assert(r == false); - } - { - typedef std::codecvt_utf8_utf16 C; - C c; - bool r = c.always_noconv(); - assert(r == false); - } - { - typedef std::codecvt_utf8_utf16 C; - C c; - bool r = c.always_noconv(); - assert(r == false); - } -} diff --git a/test/localization/locale.stdcvt/codecvt_utf8_utf16_encoding.pass.cpp b/test/localization/locale.stdcvt/codecvt_utf8_utf16_encoding.pass.cpp deleted file mode 100644 index bc178800..00000000 --- a/test/localization/locale.stdcvt/codecvt_utf8_utf16_encoding.pass.cpp +++ /dev/null @@ -1,45 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template -// class codecvt_utf8_utf16 -// : public codecvt -// { -// // unspecified -// }; - -// int encoding() const throw(); - -#include -#include - -int main() -{ - { - typedef std::codecvt_utf8_utf16 C; - C c; - int r = c.encoding(); - assert(r == 0); - } - { - typedef std::codecvt_utf8_utf16 C; - C c; - int r = c.encoding(); - assert(r == 0); - } - { - typedef std::codecvt_utf8_utf16 C; - C c; - int r = c.encoding(); - assert(r == 0); - } -} diff --git a/test/localization/locale.stdcvt/codecvt_utf8_utf16_in.pass.cpp b/test/localization/locale.stdcvt/codecvt_utf8_utf16_in.pass.cpp deleted file mode 100644 index 0cd94176..00000000 --- a/test/localization/locale.stdcvt/codecvt_utf8_utf16_in.pass.cpp +++ /dev/null @@ -1,372 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template -// class codecvt_utf8_utf16 -// : public codecvt -// { -// // unspecified -// }; - -// result -// in(stateT& state, -// const externT* from, const externT* from_end, const externT*& from_next, -// internT* to, internT* to_end, internT*& to_next) const; - -#include -#include - -int main() -{ - { - typedef std::codecvt_utf8_utf16 C; - C c; - wchar_t w[2] = {0}; - char n[4] = {char(0xF1), char(0x80), char(0x80), char(0x83)}; - wchar_t* wp = nullptr; - std::mbstate_t m; - const char* np = nullptr; - std::codecvt_base::result r = c.in(m, n, n+4, np, w, w+2, wp); - assert(r == std::codecvt_base::ok); - assert(wp == w+2); - assert(np == n+4); - assert(w[0] == 0xD8C0); - assert(w[1] == 0xDC03); - - n[0] = char(0xE1); - n[1] = char(0x80); - n[2] = char(0x85); - r = c.in(m, n, n+3, np, w, w+2, wp); - assert(r == std::codecvt_base::ok); - assert(wp == w+1); - assert(np == n+3); - assert(w[0] == 0x1005); - - n[0] = char(0xD1); - n[1] = char(0x93); - r = c.in(m, n, n+2, np, w, w+2, wp); - assert(r == std::codecvt_base::ok); - assert(wp == w+1); - assert(np == n+2); - assert(w[0] == 0x0453); - - n[0] = char(0x56); - r = c.in(m, n, n+1, np, w, w+2, wp); - assert(r == std::codecvt_base::ok); - assert(wp == w+1); - assert(np == n+1); - assert(w[0] == 0x0056); - } - { - typedef std::codecvt_utf8_utf16 C; - C c; - wchar_t w[2] = {0}; - char n[4] = {char(0xF1), char(0x80), char(0x80), char(0x83)}; - wchar_t* wp = nullptr; - std::mbstate_t m; - const char* np = nullptr; - std::codecvt_base::result r = c.in(m, n, n+4, np, w, w+2, wp); - assert(r == std::codecvt_base::error); - assert(wp == w); - assert(np == n); - - n[0] = char(0xE1); - n[1] = char(0x80); - n[2] = char(0x85); - r = c.in(m, n, n+3, np, w, w+2, wp); - assert(r == std::codecvt_base::error); - assert(wp == w); - assert(np == n); - - n[0] = char(0xD1); - n[1] = char(0x93); - r = c.in(m, n, n+2, np, w, w+2, wp); - assert(r == std::codecvt_base::ok); - assert(wp == w+1); - assert(np == n+2); - assert(w[0] == 0x0453); - - n[0] = char(0x56); - r = c.in(m, n, n+1, np, w, w+2, wp); - assert(r == std::codecvt_base::ok); - assert(wp == w+1); - assert(np == n+1); - assert(w[0] == 0x0056); - } - { - typedef std::codecvt_utf8_utf16 C; - C c; - wchar_t w[2] = {0}; - char n[7] = {char(0xEF), char(0xBB), char(0xBF), char(0xF1), char(0x80), char(0x80), char(0x83)}; - wchar_t* wp = nullptr; - std::mbstate_t m; - const char* np = nullptr; - std::codecvt_base::result r = c.in(m, n, n+7, np, w, w+2, wp); - assert(r == std::codecvt_base::ok); - assert(wp == w+2); - assert(np == n+7); - assert(w[0] == 0xD8C0); - assert(w[1] == 0xDC03); - - n[0] = char(0xE1); - n[1] = char(0x80); - n[2] = char(0x85); - r = c.in(m, n, n+3, np, w, w+2, wp); - assert(r == std::codecvt_base::ok); - assert(wp == w+1); - assert(np == n+3); - assert(w[0] == 0x1005); - - n[0] = char(0xD1); - n[1] = char(0x93); - r = c.in(m, n, n+2, np, w, w+2, wp); - assert(r == std::codecvt_base::ok); - assert(wp == w+1); - assert(np == n+2); - assert(w[0] == 0x0453); - - n[0] = char(0x56); - r = c.in(m, n, n+1, np, w, w+2, wp); - assert(r == std::codecvt_base::ok); - assert(wp == w+1); - assert(np == n+1); - assert(w[0] == 0x0056); - } - { - typedef std::codecvt_utf8_utf16 C; - C c; - char32_t w[2] = {0}; - char n[4] = {char(0xF1), char(0x80), char(0x80), char(0x83)}; - char32_t* wp = nullptr; - std::mbstate_t m; - const char* np = nullptr; - std::codecvt_base::result r = c.in(m, n, n+4, np, w, w+2, wp); - assert(r == std::codecvt_base::ok); - assert(wp == w+2); - assert(np == n+4); - assert(w[0] == 0xD8C0); - assert(w[1] == 0xDC03); - - n[0] = char(0xE1); - n[1] = char(0x80); - n[2] = char(0x85); - r = c.in(m, n, n+3, np, w, w+2, wp); - assert(r == std::codecvt_base::ok); - assert(wp == w+1); - assert(np == n+3); - assert(w[0] == 0x1005); - - n[0] = char(0xD1); - n[1] = char(0x93); - r = c.in(m, n, n+2, np, w, w+2, wp); - assert(r == std::codecvt_base::ok); - assert(wp == w+1); - assert(np == n+2); - assert(w[0] == 0x0453); - - n[0] = char(0x56); - r = c.in(m, n, n+1, np, w, w+2, wp); - assert(r == std::codecvt_base::ok); - assert(wp == w+1); - assert(np == n+1); - assert(w[0] == 0x0056); - } - { - typedef std::codecvt_utf8_utf16 C; - C c; - char32_t w[2] = {0}; - char n[4] = {char(0xF1), char(0x80), char(0x80), char(0x83)}; - char32_t* wp = nullptr; - std::mbstate_t m; - const char* np = nullptr; - std::codecvt_base::result r = c.in(m, n, n+4, np, w, w+2, wp); - assert(r == std::codecvt_base::error); - assert(wp == w); - assert(np == n); - - n[0] = char(0xE1); - n[1] = char(0x80); - n[2] = char(0x85); - r = c.in(m, n, n+3, np, w, w+2, wp); - assert(r == std::codecvt_base::error); - assert(wp == w); - assert(np == n); - - n[0] = char(0xD1); - n[1] = char(0x93); - r = c.in(m, n, n+2, np, w, w+2, wp); - assert(r == std::codecvt_base::ok); - assert(wp == w+1); - assert(np == n+2); - assert(w[0] == 0x0453); - - n[0] = char(0x56); - r = c.in(m, n, n+1, np, w, w+2, wp); - assert(r == std::codecvt_base::ok); - assert(wp == w+1); - assert(np == n+1); - assert(w[0] == 0x0056); - } - { - typedef std::codecvt_utf8_utf16 C; - C c; - char32_t w[2] = {0}; - char n[7] = {char(0xEF), char(0xBB), char(0xBF), char(0xF1), char(0x80), char(0x80), char(0x83)}; - char32_t* wp = nullptr; - std::mbstate_t m; - const char* np = nullptr; - std::codecvt_base::result r = c.in(m, n, n+7, np, w, w+2, wp); - assert(r == std::codecvt_base::ok); - assert(wp == w+2); - assert(np == n+7); - assert(w[0] == 0xD8C0); - assert(w[1] == 0xDC03); - - n[0] = char(0xE1); - n[1] = char(0x80); - n[2] = char(0x85); - r = c.in(m, n, n+3, np, w, w+2, wp); - assert(r == std::codecvt_base::ok); - assert(wp == w+1); - assert(np == n+3); - assert(w[0] == 0x1005); - - n[0] = char(0xD1); - n[1] = char(0x93); - r = c.in(m, n, n+2, np, w, w+2, wp); - assert(r == std::codecvt_base::ok); - assert(wp == w+1); - assert(np == n+2); - assert(w[0] == 0x0453); - - n[0] = char(0x56); - r = c.in(m, n, n+1, np, w, w+2, wp); - assert(r == std::codecvt_base::ok); - assert(wp == w+1); - assert(np == n+1); - assert(w[0] == 0x0056); - } - { - typedef std::codecvt_utf8_utf16 C; - C c; - char16_t w[2] = {0}; - char n[4] = {char(0xF1), char(0x80), char(0x80), char(0x83)}; - char16_t* wp = nullptr; - std::mbstate_t m; - const char* np = nullptr; - std::codecvt_base::result r = c.in(m, n, n+4, np, w, w+2, wp); - assert(r == std::codecvt_base::ok); - assert(wp == w+2); - assert(np == n+4); - assert(w[0] == 0xD8C0); - assert(w[1] == 0xDC03); - - n[0] = char(0xE1); - n[1] = char(0x80); - n[2] = char(0x85); - r = c.in(m, n, n+3, np, w, w+2, wp); - assert(r == std::codecvt_base::ok); - assert(wp == w+1); - assert(np == n+3); - assert(w[0] == 0x1005); - - n[0] = char(0xD1); - n[1] = char(0x93); - r = c.in(m, n, n+2, np, w, w+2, wp); - assert(r == std::codecvt_base::ok); - assert(wp == w+1); - assert(np == n+2); - assert(w[0] == 0x0453); - - n[0] = char(0x56); - r = c.in(m, n, n+1, np, w, w+2, wp); - assert(r == std::codecvt_base::ok); - assert(wp == w+1); - assert(np == n+1); - assert(w[0] == 0x0056); - } - { - typedef std::codecvt_utf8_utf16 C; - C c; - char16_t w[2] = {0}; - char n[4] = {char(0xF1), char(0x80), char(0x80), char(0x83)}; - char16_t* wp = nullptr; - std::mbstate_t m; - const char* np = nullptr; - std::codecvt_base::result r = c.in(m, n, n+4, np, w, w+2, wp); - assert(r == std::codecvt_base::error); - assert(wp == w); - assert(np == n); - - n[0] = char(0xE1); - n[1] = char(0x80); - n[2] = char(0x85); - r = c.in(m, n, n+3, np, w, w+2, wp); - assert(r == std::codecvt_base::error); - assert(wp == w); - assert(np == n); - - n[0] = char(0xD1); - n[1] = char(0x93); - r = c.in(m, n, n+2, np, w, w+2, wp); - assert(r == std::codecvt_base::ok); - assert(wp == w+1); - assert(np == n+2); - assert(w[0] == 0x0453); - - n[0] = char(0x56); - r = c.in(m, n, n+1, np, w, w+2, wp); - assert(r == std::codecvt_base::ok); - assert(wp == w+1); - assert(np == n+1); - assert(w[0] == 0x0056); - } - { - typedef std::codecvt_utf8_utf16 C; - C c; - char16_t w[2] = {0}; - char n[7] = {char(0xEF), char(0xBB), char(0xBF), char(0xF1), char(0x80), char(0x80), char(0x83)}; - char16_t* wp = nullptr; - std::mbstate_t m; - const char* np = nullptr; - std::codecvt_base::result r = c.in(m, n, n+7, np, w, w+2, wp); - assert(r == std::codecvt_base::ok); - assert(wp == w+2); - assert(np == n+7); - assert(w[0] == 0xD8C0); - assert(w[1] == 0xDC03); - - n[0] = char(0xE1); - n[1] = char(0x80); - n[2] = char(0x85); - r = c.in(m, n, n+3, np, w, w+2, wp); - assert(r == std::codecvt_base::ok); - assert(wp == w+1); - assert(np == n+3); - assert(w[0] == 0x1005); - - n[0] = char(0xD1); - n[1] = char(0x93); - r = c.in(m, n, n+2, np, w, w+2, wp); - assert(r == std::codecvt_base::ok); - assert(wp == w+1); - assert(np == n+2); - assert(w[0] == 0x0453); - - n[0] = char(0x56); - r = c.in(m, n, n+1, np, w, w+2, wp); - assert(r == std::codecvt_base::ok); - assert(wp == w+1); - assert(np == n+1); - assert(w[0] == 0x0056); - } -} diff --git a/test/localization/locale.stdcvt/codecvt_utf8_utf16_length.pass.cpp b/test/localization/locale.stdcvt/codecvt_utf8_utf16_length.pass.cpp deleted file mode 100644 index 8f5be81e..00000000 --- a/test/localization/locale.stdcvt/codecvt_utf8_utf16_length.pass.cpp +++ /dev/null @@ -1,235 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template -// class codecvt_utf8_utf16 -// : public codecvt -// { -// // unspecified -// }; - -// int length(stateT& state, const externT* from, const externT* from_end, -// size_t max) const; - -#include -#include - -int main() -{ - { - typedef std::codecvt_utf8_utf16 C; - C c; - char n[4] = {char(0xF1), char(0x80), char(0x80), char(0x83)}; - std::mbstate_t m; - int r = c.length(m, n, n+4, 2); - assert(r == 4); - - n[0] = char(0xE1); - n[1] = char(0x80); - n[2] = char(0x85); - r = c.length(m, n, n+3, 2); - assert(r == 3); - - n[0] = char(0xD1); - n[1] = char(0x93); - r = c.length(m, n, n+2, 2); - assert(r == 2); - - n[0] = char(0x56); - r = c.length(m, n, n+1, 2); - assert(r == 1); - } - { - typedef std::codecvt_utf8_utf16 C; - C c; - char n[4] = {char(0xF1), char(0x80), char(0x80), char(0x83)}; - std::mbstate_t m; - int r = c.length(m, n, n+4, 2); - assert(r == 0); - - n[0] = char(0xE1); - n[1] = char(0x80); - n[2] = char(0x85); - r = c.length(m, n, n+3, 2); - assert(r == 0); - - n[0] = char(0xD1); - n[1] = char(0x93); - r = c.length(m, n, n+2, 2); - assert(r == 2); - - n[0] = char(0x56); - r = c.length(m, n, n+1, 2); - assert(r == 1); - } - { - typedef std::codecvt_utf8_utf16 C; - C c; - char n[7] = {char(0xEF), char(0xBB), char(0xBF), char(0xF1), char(0x80), char(0x80), char(0x83)}; - std::mbstate_t m; - int r = c.length(m, n, n+7, 2); - assert(r == 7); - - n[0] = char(0xE1); - n[1] = char(0x80); - n[2] = char(0x85); - r = c.length(m, n, n+3, 2); - assert(r == 3); - - n[0] = char(0xD1); - n[1] = char(0x93); - r = c.length(m, n, n+2, 2); - assert(r == 2); - - n[0] = char(0x56); - r = c.length(m, n, n+1, 2); - assert(r == 1); - } - { - typedef std::codecvt_utf8_utf16 C; - C c; - char n[4] = {char(0xF1), char(0x80), char(0x80), char(0x83)}; - std::mbstate_t m; - int r = c.length(m, n, n+4, 2); - assert(r == 4); - - n[0] = char(0xE1); - n[1] = char(0x80); - n[2] = char(0x85); - r = c.length(m, n, n+3, 2); - assert(r == 3); - - n[0] = char(0xD1); - n[1] = char(0x93); - r = c.length(m, n, n+2, 2); - assert(r == 2); - - n[0] = char(0x56); - r = c.length(m, n, n+1, 2); - assert(r == 1); - } - { - typedef std::codecvt_utf8_utf16 C; - C c; - char n[4] = {char(0xF1), char(0x80), char(0x80), char(0x83)}; - std::mbstate_t m; - int r = c.length(m, n, n+4, 2); - assert(r == 0); - - n[0] = char(0xE1); - n[1] = char(0x80); - n[2] = char(0x85); - r = c.length(m, n, n+3, 2); - assert(r == 0); - - n[0] = char(0xD1); - n[1] = char(0x93); - r = c.length(m, n, n+2, 2); - assert(r == 2); - - n[0] = char(0x56); - r = c.length(m, n, n+1, 2); - assert(r == 1); - } - { - typedef std::codecvt_utf8_utf16 C; - C c; - char n[7] = {char(0xEF), char(0xBB), char(0xBF), char(0xF1), char(0x80), char(0x80), char(0x83)}; - std::mbstate_t m; - int r = c.length(m, n, n+7, 2); - assert(r == 7); - - n[0] = char(0xE1); - n[1] = char(0x80); - n[2] = char(0x85); - r = c.length(m, n, n+3, 2); - assert(r == 3); - - n[0] = char(0xD1); - n[1] = char(0x93); - r = c.length(m, n, n+2, 2); - assert(r == 2); - - n[0] = char(0x56); - r = c.length(m, n, n+1, 2); - assert(r == 1); - } - { - typedef std::codecvt_utf8_utf16 C; - C c; - char n[4] = {char(0xF1), char(0x80), char(0x80), char(0x83)}; - std::mbstate_t m; - int r = c.length(m, n, n+4, 2); - assert(r == 4); - - n[0] = char(0xE1); - n[1] = char(0x80); - n[2] = char(0x85); - r = c.length(m, n, n+3, 2); - assert(r == 3); - - n[0] = char(0xD1); - n[1] = char(0x93); - r = c.length(m, n, n+2, 2); - assert(r == 2); - - n[0] = char(0x56); - r = c.length(m, n, n+1, 2); - assert(r == 1); - } - { - typedef std::codecvt_utf8_utf16 C; - C c; - char n[4] = {char(0xF1), char(0x80), char(0x80), char(0x83)}; - std::mbstate_t m; - int r = c.length(m, n, n+4, 2); - assert(r == 0); - - n[0] = char(0xE1); - n[1] = char(0x80); - n[2] = char(0x85); - r = c.length(m, n, n+3, 2); - assert(r == 0); - - n[0] = char(0xD1); - n[1] = char(0x93); - r = c.length(m, n, n+2, 2); - assert(r == 2); - - n[0] = char(0x56); - r = c.length(m, n, n+1, 2); - assert(r == 1); - } - { - typedef std::codecvt_utf8_utf16 C; - C c; - char n[7] = {char(0xEF), char(0xBB), char(0xBF), char(0xF1), char(0x80), char(0x80), char(0x83)}; - std::mbstate_t m; - int r = c.length(m, n, n+7, 2); - assert(r == 7); - - n[0] = char(0xE1); - n[1] = char(0x80); - n[2] = char(0x85); - r = c.length(m, n, n+3, 2); - assert(r == 3); - - n[0] = char(0xD1); - n[1] = char(0x93); - r = c.length(m, n, n+2, 2); - assert(r == 2); - - n[0] = char(0x56); - r = c.length(m, n, n+1, 2); - assert(r == 1); - } -} diff --git a/test/localization/locale.stdcvt/codecvt_utf8_utf16_max_length.pass.cpp b/test/localization/locale.stdcvt/codecvt_utf8_utf16_max_length.pass.cpp deleted file mode 100644 index ef4d0b82..00000000 --- a/test/localization/locale.stdcvt/codecvt_utf8_utf16_max_length.pass.cpp +++ /dev/null @@ -1,63 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template -// class codecvt_utf8_utf16 -// : public codecvt -// { -// // unspecified -// }; - -// int max_length() const throw(); - -#include -#include - -int main() -{ - { - typedef std::codecvt_utf8_utf16 C; - C c; - int r = c.max_length(); - assert(r == 4); - } - { - typedef std::codecvt_utf8_utf16 C; - C c; - int r = c.max_length(); - assert(r == 7); - } - { - typedef std::codecvt_utf8_utf16 C; - C c; - int r = c.max_length(); - assert(r == 4); - } - { - typedef std::codecvt_utf8_utf16 C; - C c; - int r = c.max_length(); - assert(r == 7); - } - { - typedef std::codecvt_utf8_utf16 C; - C c; - int r = c.max_length(); - assert(r == 4); - } - { - typedef std::codecvt_utf8_utf16 C; - C c; - int r = c.max_length(); - assert(r == 7); - } -} diff --git a/test/localization/locale.stdcvt/codecvt_utf8_utf16_out.pass.cpp b/test/localization/locale.stdcvt/codecvt_utf8_utf16_out.pass.cpp deleted file mode 100644 index 29c5342e..00000000 --- a/test/localization/locale.stdcvt/codecvt_utf8_utf16_out.pass.cpp +++ /dev/null @@ -1,415 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template -// class codecvt_utf8_utf16 -// : public codecvt -// { -// // unspecified -// }; - -// result -// out(stateT& state, -// const internT* from, const internT* from_end, const internT*& from_next, -// externT* to, externT* to_end, externT*& to_next) const; - -#include -#include - -int main() -{ - { - typedef std::codecvt_utf8_utf16 C; - C c; - wchar_t w[2] = {0xD8C0, 0xDC03}; - char n[4] = {0}; - const wchar_t* wp = nullptr; - std::mbstate_t m; - char* np = nullptr; - std::codecvt_base::result r = c.out(m, w, w+2, wp, n, n+4, np); - assert(r == std::codecvt_base::ok); - assert(wp == w+2); - assert(np == n+4); - assert(n[0] == char(0xF1)); - assert(n[1] == char(0x80)); - assert(n[2] == char(0x80)); - assert(n[3] == char(0x83)); - - w[0] = 0x1005; - r = c.out(m, w, w+1, wp, n, n+4, np); - assert(r == std::codecvt_base::ok); - assert(wp == w+1); - assert(np == n+3); - assert(n[0] == char(0xE1)); - assert(n[1] == char(0x80)); - assert(n[2] == char(0x85)); - - w[0] = 0x453; - r = c.out(m, w, w+1, wp, n, n+4, np); - assert(r == std::codecvt_base::ok); - assert(wp == w+1); - assert(np == n+2); - assert(n[0] == char(0xD1)); - assert(n[1] == char(0x93)); - - w[0] = 0x56; - r = c.out(m, w, w+1, wp, n, n+4, np); - assert(r == std::codecvt_base::ok); - assert(wp == w+1); - assert(np == n+1); - assert(n[0] == char(0x56)); - } - { - typedef std::codecvt_utf8_utf16 C; - C c; - wchar_t w[2] = {0xD8C0, 0xDC03}; - char n[4] = {0}; - const wchar_t* wp = nullptr; - std::mbstate_t m; - char* np = nullptr; - std::codecvt_base::result r = c.out(m, w, w+2, wp, n, n+4, np); - assert(r == std::codecvt_base::error); - assert(wp == w); - assert(np == n); - - w[0] = 0x1005; - r = c.out(m, w, w+1, wp, n, n+4, np); - assert(r == std::codecvt_base::error); - assert(wp == w); - assert(np == n); - - w[0] = 0x453; - r = c.out(m, w, w+1, wp, n, n+4, np); - assert(r == std::codecvt_base::ok); - assert(wp == w+1); - assert(np == n+2); - assert(n[0] == char(0xD1)); - assert(n[1] == char(0x93)); - - w[0] = 0x56; - r = c.out(m, w, w+1, wp, n, n+4, np); - assert(r == std::codecvt_base::ok); - assert(wp == w+1); - assert(np == n+1); - assert(n[0] == char(0x56)); - } - { - typedef std::codecvt_utf8_utf16 C; - C c; - wchar_t w[2] = {0xD8C0, 0xDC03}; - char n[7] = {0}; - const wchar_t* wp = nullptr; - std::mbstate_t m; - char* np = nullptr; - std::codecvt_base::result r = c.out(m, w, w+2, wp, n, n+7, np); - assert(r == std::codecvt_base::ok); - assert(wp == w+2); - assert(np == n+7); - assert(n[0] == char(0xEF)); - assert(n[1] == char(0xBB)); - assert(n[2] == char(0xBF)); - assert(n[3] == char(0xF1)); - assert(n[4] == char(0x80)); - assert(n[5] == char(0x80)); - assert(n[6] == char(0x83)); - - w[0] = 0x1005; - r = c.out(m, w, w+1, wp, n, n+7, np); - assert(r == std::codecvt_base::ok); - assert(wp == w+1); - assert(np == n+6); - assert(n[0] == char(0xEF)); - assert(n[1] == char(0xBB)); - assert(n[2] == char(0xBF)); - assert(n[3] == char(0xE1)); - assert(n[4] == char(0x80)); - assert(n[5] == char(0x85)); - - w[0] = 0x453; - r = c.out(m, w, w+1, wp, n, n+7, np); - assert(r == std::codecvt_base::ok); - assert(wp == w+1); - assert(np == n+5); - assert(n[0] == char(0xEF)); - assert(n[1] == char(0xBB)); - assert(n[2] == char(0xBF)); - assert(n[3] == char(0xD1)); - assert(n[4] == char(0x93)); - - w[0] = 0x56; - r = c.out(m, w, w+1, wp, n, n+7, np); - assert(r == std::codecvt_base::ok); - assert(wp == w+1); - assert(np == n+4); - assert(n[0] == char(0xEF)); - assert(n[1] == char(0xBB)); - assert(n[2] == char(0xBF)); - assert(n[3] == char(0x56)); - } - { - typedef std::codecvt_utf8_utf16 C; - C c; - char32_t w[2] = {0xD8C0, 0xDC03}; - char n[4] = {0}; - const char32_t* wp = nullptr; - std::mbstate_t m; - char* np = nullptr; - std::codecvt_base::result r = c.out(m, w, w+2, wp, n, n+4, np); - assert(r == std::codecvt_base::ok); - assert(wp == w+2); - assert(np == n+4); - assert(n[0] == char(0xF1)); - assert(n[1] == char(0x80)); - assert(n[2] == char(0x80)); - assert(n[3] == char(0x83)); - - w[0] = 0x1005; - r = c.out(m, w, w+1, wp, n, n+4, np); - assert(r == std::codecvt_base::ok); - assert(wp == w+1); - assert(np == n+3); - assert(n[0] == char(0xE1)); - assert(n[1] == char(0x80)); - assert(n[2] == char(0x85)); - - w[0] = 0x453; - r = c.out(m, w, w+1, wp, n, n+4, np); - assert(r == std::codecvt_base::ok); - assert(wp == w+1); - assert(np == n+2); - assert(n[0] == char(0xD1)); - assert(n[1] == char(0x93)); - - w[0] = 0x56; - r = c.out(m, w, w+1, wp, n, n+4, np); - assert(r == std::codecvt_base::ok); - assert(wp == w+1); - assert(np == n+1); - assert(n[0] == char(0x56)); - } - { - typedef std::codecvt_utf8_utf16 C; - C c; - char32_t w[2] = {0xD8C0, 0xDC03}; - char n[4] = {0}; - const char32_t* wp = nullptr; - std::mbstate_t m; - char* np = nullptr; - std::codecvt_base::result r = c.out(m, w, w+2, wp, n, n+4, np); - assert(r == std::codecvt_base::error); - assert(wp == w); - assert(np == n); - - w[0] = 0x1005; - r = c.out(m, w, w+1, wp, n, n+4, np); - assert(r == std::codecvt_base::error); - assert(wp == w); - assert(np == n); - - w[0] = 0x453; - r = c.out(m, w, w+1, wp, n, n+4, np); - assert(r == std::codecvt_base::ok); - assert(wp == w+1); - assert(np == n+2); - assert(n[0] == char(0xD1)); - assert(n[1] == char(0x93)); - - w[0] = 0x56; - r = c.out(m, w, w+1, wp, n, n+4, np); - assert(r == std::codecvt_base::ok); - assert(wp == w+1); - assert(np == n+1); - assert(n[0] == char(0x56)); - } - { - typedef std::codecvt_utf8_utf16 C; - C c; - char32_t w[2] = {0xD8C0, 0xDC03}; - char n[7] = {0}; - const char32_t* wp = nullptr; - std::mbstate_t m; - char* np = nullptr; - std::codecvt_base::result r = c.out(m, w, w+2, wp, n, n+7, np); - assert(r == std::codecvt_base::ok); - assert(wp == w+2); - assert(np == n+7); - assert(n[0] == char(0xEF)); - assert(n[1] == char(0xBB)); - assert(n[2] == char(0xBF)); - assert(n[3] == char(0xF1)); - assert(n[4] == char(0x80)); - assert(n[5] == char(0x80)); - assert(n[6] == char(0x83)); - - w[0] = 0x1005; - r = c.out(m, w, w+1, wp, n, n+7, np); - assert(r == std::codecvt_base::ok); - assert(wp == w+1); - assert(np == n+6); - assert(n[0] == char(0xEF)); - assert(n[1] == char(0xBB)); - assert(n[2] == char(0xBF)); - assert(n[3] == char(0xE1)); - assert(n[4] == char(0x80)); - assert(n[5] == char(0x85)); - - w[0] = 0x453; - r = c.out(m, w, w+1, wp, n, n+7, np); - assert(r == std::codecvt_base::ok); - assert(wp == w+1); - assert(np == n+5); - assert(n[0] == char(0xEF)); - assert(n[1] == char(0xBB)); - assert(n[2] == char(0xBF)); - assert(n[3] == char(0xD1)); - assert(n[4] == char(0x93)); - - w[0] = 0x56; - r = c.out(m, w, w+1, wp, n, n+7, np); - assert(r == std::codecvt_base::ok); - assert(wp == w+1); - assert(np == n+4); - assert(n[0] == char(0xEF)); - assert(n[1] == char(0xBB)); - assert(n[2] == char(0xBF)); - assert(n[3] == char(0x56)); - } - - { - typedef std::codecvt_utf8_utf16 C; - C c; - char16_t w[2] = {0xD8C0, 0xDC03}; - char n[4] = {0}; - const char16_t* wp = nullptr; - std::mbstate_t m; - char* np = nullptr; - std::codecvt_base::result r = c.out(m, w, w+2, wp, n, n+4, np); - assert(r == std::codecvt_base::ok); - assert(wp == w+2); - assert(np == n+4); - assert(n[0] == char(0xF1)); - assert(n[1] == char(0x80)); - assert(n[2] == char(0x80)); - assert(n[3] == char(0x83)); - - w[0] = 0x1005; - r = c.out(m, w, w+1, wp, n, n+4, np); - assert(r == std::codecvt_base::ok); - assert(wp == w+1); - assert(np == n+3); - assert(n[0] == char(0xE1)); - assert(n[1] == char(0x80)); - assert(n[2] == char(0x85)); - - w[0] = 0x453; - r = c.out(m, w, w+1, wp, n, n+4, np); - assert(r == std::codecvt_base::ok); - assert(wp == w+1); - assert(np == n+2); - assert(n[0] == char(0xD1)); - assert(n[1] == char(0x93)); - - w[0] = 0x56; - r = c.out(m, w, w+1, wp, n, n+4, np); - assert(r == std::codecvt_base::ok); - assert(wp == w+1); - assert(np == n+1); - assert(n[0] == char(0x56)); - } - { - typedef std::codecvt_utf8_utf16 C; - C c; - char16_t w[2] = {0xD8C0, 0xDC03}; - char n[4] = {0}; - const char16_t* wp = nullptr; - std::mbstate_t m; - char* np = nullptr; - std::codecvt_base::result r = c.out(m, w, w+2, wp, n, n+4, np); - assert(r == std::codecvt_base::error); - assert(wp == w); - assert(np == n); - - w[0] = 0x1005; - r = c.out(m, w, w+1, wp, n, n+4, np); - assert(r == std::codecvt_base::error); - assert(wp == w); - assert(np == n); - - w[0] = 0x453; - r = c.out(m, w, w+1, wp, n, n+4, np); - assert(r == std::codecvt_base::ok); - assert(wp == w+1); - assert(np == n+2); - assert(n[0] == char(0xD1)); - assert(n[1] == char(0x93)); - - w[0] = 0x56; - r = c.out(m, w, w+1, wp, n, n+4, np); - assert(r == std::codecvt_base::ok); - assert(wp == w+1); - assert(np == n+1); - assert(n[0] == char(0x56)); - } - { - typedef std::codecvt_utf8_utf16 C; - C c; - char16_t w[2] = {0xD8C0, 0xDC03}; - char n[7] = {0}; - const char16_t* wp = nullptr; - std::mbstate_t m; - char* np = nullptr; - std::codecvt_base::result r = c.out(m, w, w+2, wp, n, n+7, np); - assert(r == std::codecvt_base::ok); - assert(wp == w+2); - assert(np == n+7); - assert(n[0] == char(0xEF)); - assert(n[1] == char(0xBB)); - assert(n[2] == char(0xBF)); - assert(n[3] == char(0xF1)); - assert(n[4] == char(0x80)); - assert(n[5] == char(0x80)); - assert(n[6] == char(0x83)); - - w[0] = 0x1005; - r = c.out(m, w, w+1, wp, n, n+7, np); - assert(r == std::codecvt_base::ok); - assert(wp == w+1); - assert(np == n+6); - assert(n[0] == char(0xEF)); - assert(n[1] == char(0xBB)); - assert(n[2] == char(0xBF)); - assert(n[3] == char(0xE1)); - assert(n[4] == char(0x80)); - assert(n[5] == char(0x85)); - - w[0] = 0x453; - r = c.out(m, w, w+1, wp, n, n+7, np); - assert(r == std::codecvt_base::ok); - assert(wp == w+1); - assert(np == n+5); - assert(n[0] == char(0xEF)); - assert(n[1] == char(0xBB)); - assert(n[2] == char(0xBF)); - assert(n[3] == char(0xD1)); - assert(n[4] == char(0x93)); - - w[0] = 0x56; - r = c.out(m, w, w+1, wp, n, n+7, np); - assert(r == std::codecvt_base::ok); - assert(wp == w+1); - assert(np == n+4); - assert(n[0] == char(0xEF)); - assert(n[1] == char(0xBB)); - assert(n[2] == char(0xBF)); - assert(n[3] == char(0x56)); - } -} diff --git a/test/localization/locale.stdcvt/codecvt_utf8_utf16_unshift.pass.cpp b/test/localization/locale.stdcvt/codecvt_utf8_utf16_unshift.pass.cpp deleted file mode 100644 index 2bcade01..00000000 --- a/test/localization/locale.stdcvt/codecvt_utf8_utf16_unshift.pass.cpp +++ /dev/null @@ -1,56 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template -// class codecvt_utf8_utf16 -// : public codecvt -// { -// // unspecified -// }; - -// result -// unshift(stateT& state, -// externT* to, externT* to_end, externT*& to_next) const; - -#include -#include - -int main() -{ - { - typedef std::codecvt_utf8_utf16 C; - C c; - char n[4] = {0}; - std::mbstate_t m; - char* np = nullptr; - std::codecvt_base::result r = c.unshift(m, n, n+4, np); - assert(r == std::codecvt_base::noconv); - } - { - typedef std::codecvt_utf8_utf16 C; - C c; - char n[4] = {0}; - std::mbstate_t m; - char* np = nullptr; - std::codecvt_base::result r = c.unshift(m, n, n+4, np); - assert(r == std::codecvt_base::noconv); - } - { - typedef std::codecvt_utf8_utf16 C; - C c; - char n[4] = {0}; - std::mbstate_t m; - char* np = nullptr; - std::codecvt_base::result r = c.unshift(m, n, n+4, np); - assert(r == std::codecvt_base::noconv); - } -} diff --git a/test/localization/locale.stdcvt/version.pass.cpp b/test/localization/locale.stdcvt/version.pass.cpp deleted file mode 100644 index 38853808..00000000 --- a/test/localization/locale.stdcvt/version.pass.cpp +++ /dev/null @@ -1,20 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -#include - -#ifndef _LIBCPP_VERSION -#error _LIBCPP_VERSION not defined -#endif - -int main() -{ -} diff --git a/test/localization/locale.syn/nothing_to_do.pass.cpp b/test/localization/locale.syn/nothing_to_do.pass.cpp deleted file mode 100644 index b58f5c55..00000000 --- a/test/localization/locale.syn/nothing_to_do.pass.cpp +++ /dev/null @@ -1,12 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -int main() -{ -} diff --git a/test/localization/locales/locale.convenience/classification/isalnum.pass.cpp b/test/localization/locales/locale.convenience/classification/isalnum.pass.cpp deleted file mode 100644 index 376b3346..00000000 --- a/test/localization/locales/locale.convenience/classification/isalnum.pass.cpp +++ /dev/null @@ -1,31 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template bool isalnum (charT c, const locale& loc); - -#include -#include - -int main() -{ - std::locale l; - assert(!std::isalnum(' ', l)); - assert(!std::isalnum('<', l)); - assert(!std::isalnum('\x8', l)); - assert( std::isalnum('A', l)); - assert( std::isalnum('a', l)); - assert( std::isalnum('z', l)); - assert( std::isalnum('3', l)); - assert(!std::isalnum('.', l)); - assert( std::isalnum('f', l)); - assert( std::isalnum('9', l)); - assert(!std::isalnum('+', l)); -} diff --git a/test/localization/locales/locale.convenience/classification/isalpha.pass.cpp b/test/localization/locales/locale.convenience/classification/isalpha.pass.cpp deleted file mode 100644 index d1a0e691..00000000 --- a/test/localization/locales/locale.convenience/classification/isalpha.pass.cpp +++ /dev/null @@ -1,31 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template bool isalpha (charT c, const locale& loc); - -#include -#include - -int main() -{ - std::locale l; - assert(!std::isalpha(' ', l)); - assert(!std::isalpha('<', l)); - assert(!std::isalpha('\x8', l)); - assert( std::isalpha('A', l)); - assert( std::isalpha('a', l)); - assert( std::isalpha('z', l)); - assert(!std::isalpha('3', l)); - assert(!std::isalpha('.', l)); - assert( std::isalpha('f', l)); - assert(!std::isalpha('9', l)); - assert(!std::isalpha('+', l)); -} diff --git a/test/localization/locales/locale.convenience/classification/iscntrl.pass.cpp b/test/localization/locales/locale.convenience/classification/iscntrl.pass.cpp deleted file mode 100644 index 0bd45ac6..00000000 --- a/test/localization/locales/locale.convenience/classification/iscntrl.pass.cpp +++ /dev/null @@ -1,31 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template bool iscntrl (charT c, const locale& loc); - -#include -#include - -int main() -{ - std::locale l; - assert(!std::iscntrl(' ', l)); - assert(!std::iscntrl('<', l)); - assert( std::iscntrl('\x8', l)); - assert(!std::iscntrl('A', l)); - assert(!std::iscntrl('a', l)); - assert(!std::iscntrl('z', l)); - assert(!std::iscntrl('3', l)); - assert(!std::iscntrl('.', l)); - assert(!std::iscntrl('f', l)); - assert(!std::iscntrl('9', l)); - assert(!std::iscntrl('+', l)); -} diff --git a/test/localization/locales/locale.convenience/classification/isdigit.pass.cpp b/test/localization/locales/locale.convenience/classification/isdigit.pass.cpp deleted file mode 100644 index bdc06328..00000000 --- a/test/localization/locales/locale.convenience/classification/isdigit.pass.cpp +++ /dev/null @@ -1,31 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template bool isdigit (charT c, const locale& loc); - -#include -#include - -int main() -{ - std::locale l; - assert(!std::isdigit(' ', l)); - assert(!std::isdigit('<', l)); - assert(!std::isdigit('\x8', l)); - assert(!std::isdigit('A', l)); - assert(!std::isdigit('a', l)); - assert(!std::isdigit('z', l)); - assert( std::isdigit('3', l)); - assert(!std::isdigit('.', l)); - assert(!std::isdigit('f', l)); - assert( std::isdigit('9', l)); - assert(!std::isdigit('+', l)); -} diff --git a/test/localization/locales/locale.convenience/classification/isgraph.pass.cpp b/test/localization/locales/locale.convenience/classification/isgraph.pass.cpp deleted file mode 100644 index b294aa53..00000000 --- a/test/localization/locales/locale.convenience/classification/isgraph.pass.cpp +++ /dev/null @@ -1,31 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template bool isgraph (charT c, const locale& loc); - -#include -#include - -int main() -{ - std::locale l; - assert(!std::isgraph(' ', l)); - assert( std::isgraph('<', l)); - assert(!std::isgraph('\x8', l)); - assert( std::isgraph('A', l)); - assert( std::isgraph('a', l)); - assert( std::isgraph('z', l)); - assert( std::isgraph('3', l)); - assert( std::isgraph('.', l)); - assert( std::isgraph('f', l)); - assert( std::isgraph('9', l)); - assert( std::isgraph('+', l)); -} diff --git a/test/localization/locales/locale.convenience/classification/islower.pass.cpp b/test/localization/locales/locale.convenience/classification/islower.pass.cpp deleted file mode 100644 index e131e50b..00000000 --- a/test/localization/locales/locale.convenience/classification/islower.pass.cpp +++ /dev/null @@ -1,31 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template bool islower (charT c, const locale& loc); - -#include -#include - -int main() -{ - std::locale l; - assert(!std::islower(' ', l)); - assert(!std::islower('<', l)); - assert(!std::islower('\x8', l)); - assert(!std::islower('A', l)); - assert( std::islower('a', l)); - assert( std::islower('z', l)); - assert(!std::islower('3', l)); - assert(!std::islower('.', l)); - assert( std::islower('f', l)); - assert(!std::islower('9', l)); - assert(!std::islower('+', l)); -} diff --git a/test/localization/locales/locale.convenience/classification/isprint.pass.cpp b/test/localization/locales/locale.convenience/classification/isprint.pass.cpp deleted file mode 100644 index a8c39fae..00000000 --- a/test/localization/locales/locale.convenience/classification/isprint.pass.cpp +++ /dev/null @@ -1,31 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template bool isprint (charT c, const locale& loc); - -#include -#include - -int main() -{ - std::locale l; - assert( std::isprint(' ', l)); - assert( std::isprint('<', l)); - assert(!std::isprint('\x8', l)); - assert( std::isprint('A', l)); - assert( std::isprint('a', l)); - assert( std::isprint('z', l)); - assert( std::isprint('3', l)); - assert( std::isprint('.', l)); - assert( std::isprint('f', l)); - assert( std::isprint('9', l)); - assert( std::isprint('+', l)); -} diff --git a/test/localization/locales/locale.convenience/classification/ispunct.pass.cpp b/test/localization/locales/locale.convenience/classification/ispunct.pass.cpp deleted file mode 100644 index b606d326..00000000 --- a/test/localization/locales/locale.convenience/classification/ispunct.pass.cpp +++ /dev/null @@ -1,31 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template bool ispunct (charT c, const locale& loc); - -#include -#include - -int main() -{ - std::locale l; - assert(!std::ispunct(' ', l)); - assert( std::ispunct('<', l)); - assert(!std::ispunct('\x8', l)); - assert(!std::ispunct('A', l)); - assert(!std::ispunct('a', l)); - assert(!std::ispunct('z', l)); - assert(!std::ispunct('3', l)); - assert( std::ispunct('.', l)); - assert(!std::ispunct('f', l)); - assert(!std::ispunct('9', l)); - assert( std::ispunct('+', l)); -} diff --git a/test/localization/locales/locale.convenience/classification/isspace.pass.cpp b/test/localization/locales/locale.convenience/classification/isspace.pass.cpp deleted file mode 100644 index 884b3033..00000000 --- a/test/localization/locales/locale.convenience/classification/isspace.pass.cpp +++ /dev/null @@ -1,31 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template bool isspace (charT c, const locale& loc); - -#include -#include - -int main() -{ - std::locale l; - assert( std::isspace(' ', l)); - assert(!std::isspace('<', l)); - assert(!std::isspace('\x8', l)); - assert(!std::isspace('A', l)); - assert(!std::isspace('a', l)); - assert(!std::isspace('z', l)); - assert(!std::isspace('3', l)); - assert(!std::isspace('.', l)); - assert(!std::isspace('f', l)); - assert(!std::isspace('9', l)); - assert(!std::isspace('+', l)); -} diff --git a/test/localization/locales/locale.convenience/classification/isupper.pass.cpp b/test/localization/locales/locale.convenience/classification/isupper.pass.cpp deleted file mode 100644 index 8ce51bc7..00000000 --- a/test/localization/locales/locale.convenience/classification/isupper.pass.cpp +++ /dev/null @@ -1,31 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template bool isupper (charT c, const locale& loc); - -#include -#include - -int main() -{ - std::locale l; - assert(!std::isupper(' ', l)); - assert(!std::isupper('<', l)); - assert(!std::isupper('\x8', l)); - assert( std::isupper('A', l)); - assert(!std::isupper('a', l)); - assert(!std::isupper('z', l)); - assert(!std::isupper('3', l)); - assert(!std::isupper('.', l)); - assert(!std::isupper('f', l)); - assert(!std::isupper('9', l)); - assert(!std::isupper('+', l)); -} diff --git a/test/localization/locales/locale.convenience/classification/isxdigit.pass.cpp b/test/localization/locales/locale.convenience/classification/isxdigit.pass.cpp deleted file mode 100644 index 34076955..00000000 --- a/test/localization/locales/locale.convenience/classification/isxdigit.pass.cpp +++ /dev/null @@ -1,31 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template bool isxdigit (charT c, const locale& loc); - -#include -#include - -int main() -{ - std::locale l; - assert(!std::isxdigit(' ', l)); - assert(!std::isxdigit('<', l)); - assert(!std::isxdigit('\x8', l)); - assert( std::isxdigit('A', l)); - assert( std::isxdigit('a', l)); - assert(!std::isxdigit('z', l)); - assert( std::isxdigit('3', l)); - assert(!std::isxdigit('.', l)); - assert( std::isxdigit('f', l)); - assert( std::isxdigit('9', l)); - assert(!std::isxdigit('+', l)); -} diff --git a/test/localization/locales/locale.convenience/conversions/conversions.buffer/ctor.pass.cpp b/test/localization/locales/locale.convenience/conversions/conversions.buffer/ctor.pass.cpp deleted file mode 100644 index c9995325..00000000 --- a/test/localization/locales/locale.convenience/conversions/conversions.buffer/ctor.pass.cpp +++ /dev/null @@ -1,67 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// wbuffer_convert - -// wbuffer_convert(streambuf *bytebuf = 0, Codecvt *pcvt = new Codecvt, -// state_type state = state_type()); - -#include -#include -#include -#include -#include - -int new_called = 0; - -void* operator new(std::size_t s) throw(std::bad_alloc) -{ - ++new_called; - return std::malloc(s); -} - -void operator delete(void* p) throw() -{ - --new_called; - std::free(p); -} - -int main() -{ - typedef std::wbuffer_convert > B; - { - B b; - assert(b.rdbuf() == nullptr); - assert(new_called != 0); - } - assert(new_called == 0); - { - std::stringstream s; - B b(s.rdbuf()); - assert(b.rdbuf() == s.rdbuf()); - assert(new_called != 0); - } - assert(new_called == 0); - { - std::stringstream s; - B b(s.rdbuf(), new std::codecvt_utf8); - assert(b.rdbuf() == s.rdbuf()); - assert(new_called != 0); - } - assert(new_called == 0); - { - std::stringstream s; - B b(s.rdbuf(), new std::codecvt_utf8, std::mbstate_t()); - assert(b.rdbuf() == s.rdbuf()); - assert(new_called != 0); - } - assert(new_called == 0); -} diff --git a/test/localization/locales/locale.convenience/conversions/conversions.buffer/overflow.pass.cpp b/test/localization/locales/locale.convenience/conversions/conversions.buffer/overflow.pass.cpp deleted file mode 100644 index 24706b5a..00000000 --- a/test/localization/locales/locale.convenience/conversions/conversions.buffer/overflow.pass.cpp +++ /dev/null @@ -1,100 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// wbuffer_convert - -// int_type overflow(int_type c = traits::eof()); - -// This test is not entirely portable - -#include -#include -#include -#include - -struct test_buf - : public std::wbuffer_convert > -{ - typedef std::wbuffer_convert > base; - typedef base::char_type char_type; - typedef base::int_type int_type; - typedef base::traits_type traits_type; - - explicit test_buf(std::streambuf* sb) : base(sb) {} - - char_type* pbase() const {return base::pbase();} - char_type* pptr() const {return base::pptr();} - char_type* epptr() const {return base::epptr();} - void gbump(int n) {base::gbump(n);} - - virtual int_type overflow(int_type c = traits_type::eof()) {return base::overflow(c);} -}; - -int main() -{ - { - std::ofstream bs("overflow.dat"); - test_buf f(bs.rdbuf()); - assert(f.pbase() == 0); - assert(f.pptr() == 0); - assert(f.epptr() == 0); - assert(f.overflow(L'a') == L'a'); - assert(f.pbase() != 0); - assert(f.pptr() == f.pbase()); - assert(f.epptr() - f.pbase() == 4095); - } - { - std::ifstream bs("overflow.dat"); - test_buf f(bs.rdbuf()); - assert(f.sgetc() == L'a'); - } - std::remove("overflow.dat"); - { - std::ofstream bs("overflow.dat"); - test_buf f(bs.rdbuf()); - f.pubsetbuf(0, 0); - assert(f.pbase() == 0); - assert(f.pptr() == 0); - assert(f.epptr() == 0); - assert(f.overflow('a') == 'a'); - assert(f.pbase() == 0); - assert(f.pptr() == 0); - assert(f.epptr() == 0); - } - { - std::ifstream bs("overflow.dat"); - test_buf f(bs.rdbuf()); - assert(f.sgetc() == L'a'); - } - std::remove("overflow.dat"); - { - std::ofstream bs("overflow.dat"); - test_buf f(bs.rdbuf()); - assert(f.sputc(0x4E51) == 0x4E51); - assert(f.sputc(0x4E52) == 0x4E52); - assert(f.sputc(0x4E53) == 0x4E53); - } - { - std::ifstream f("overflow.dat"); - assert(f.is_open()); - assert(f.get() == 0xE4); - assert(f.get() == 0xB9); - assert(f.get() == 0x91); - assert(f.get() == 0xE4); - assert(f.get() == 0xB9); - assert(f.get() == 0x92); - assert(f.get() == 0xE4); - assert(f.get() == 0xB9); - assert(f.get() == 0x93); - assert(f.get() == -1); - } - std::remove("overflow.dat"); -} diff --git a/test/localization/locales/locale.convenience/conversions/conversions.buffer/pbackfail.xfail.pass.cpp b/test/localization/locales/locale.convenience/conversions/conversions.buffer/pbackfail.xfail.pass.cpp deleted file mode 100644 index 20ecc422..00000000 --- a/test/localization/locales/locale.convenience/conversions/conversions.buffer/pbackfail.xfail.pass.cpp +++ /dev/null @@ -1,59 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// wbuffer_convert - -// int_type pbackfail(int_type c = traits::eof()); - -// This test is not entirely portable - -#include -#include -#include -#include - -struct test_buf - : public std::wbuffer_convert > -{ - typedef std::wbuffer_convert > base; - typedef base::char_type char_type; - typedef base::int_type int_type; - typedef base::traits_type traits_type; - - explicit test_buf(std::streambuf* sb) : base(sb) {} - - char_type* eback() const {return base::eback();} - char_type* gptr() const {return base::gptr();} - char_type* egptr() const {return base::egptr();} - void gbump(int n) {base::gbump(n);} - - virtual int_type pbackfail(int_type c = traits_type::eof()) {return base::pbackfail(c);} -}; - -int main() -{ - { - std::ifstream bs("underflow.dat"); - test_buf f(bs.rdbuf()); - assert(f.sbumpc() == L'1'); - assert(f.sgetc() == L'2'); - assert(f.pbackfail(L'a') == -1); - } - { - std::fstream bs("underflow.dat"); - test_buf f(bs.rdbuf()); - assert(f.sbumpc() == L'1'); - assert(f.sgetc() == L'2'); - assert(f.pbackfail(L'a') == -1); - assert(f.sbumpc() == L'2'); - assert(f.sgetc() == L'3'); - } -} diff --git a/test/localization/locales/locale.convenience/conversions/conversions.buffer/rdbuf.pass.cpp b/test/localization/locales/locale.convenience/conversions/conversions.buffer/rdbuf.pass.cpp deleted file mode 100644 index ffd813f8..00000000 --- a/test/localization/locales/locale.convenience/conversions/conversions.buffer/rdbuf.pass.cpp +++ /dev/null @@ -1,31 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// wbuffer_convert - -// streambuf *rdbuf(streambuf *bytebuf); - -#include -#include -#include -#include - -int main() -{ - typedef std::wbuffer_convert > B; - { - std::stringstream s; - B b; - assert(b.rdbuf() == nullptr); - b.rdbuf(s.rdbuf()); - assert(b.rdbuf() == s.rdbuf()); - } -} diff --git a/test/localization/locales/locale.convenience/conversions/conversions.buffer/seekoff.xfail.pass.cpp b/test/localization/locales/locale.convenience/conversions/conversions.buffer/seekoff.xfail.pass.cpp deleted file mode 100644 index aa9d5e8a..00000000 --- a/test/localization/locales/locale.convenience/conversions/conversions.buffer/seekoff.xfail.pass.cpp +++ /dev/null @@ -1,58 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// wbuffer_convert - -// pos_type seekoff(off_type off, ios_base::seekdir way, -// ios_base::openmode which = ios_base::in | ios_base::out); -// pos_type seekpos(pos_type sp, -// ios_base::openmode which = ios_base::in | ios_base::out); - -// This test is not entirely portable - -#include -#include -#include -#include - -class test_codecvt - : public std::codecvt -{ - typedef std::codecvt base; -public: - explicit test_codecvt(std::size_t refs = 0) : base(refs) {} - ~test_codecvt() {} -}; - -int main() -{ - { - wchar_t buf[10]; - typedef std::wbuffer_convert test_buf; - typedef test_buf::pos_type pos_type; - std::fstream bs("seekoff.dat", std::ios::trunc | std::ios::in - | std::ios::out); - test_buf f(bs.rdbuf()); - f.pubsetbuf(buf, sizeof(buf)/sizeof(buf[0])); - f.sputn(L"abcdefghijklmnopqrstuvwxyz", 26); - assert(buf[0] == L'v'); - pos_type p = f.pubseekoff(-15, std::ios_base::cur); - assert(p == 11); - assert(f.sgetc() == L'l'); - f.pubseekoff(0, std::ios_base::beg); - assert(f.sgetc() == L'a'); - f.pubseekoff(-1, std::ios_base::end); - assert(f.sgetc() == L'z'); - assert(f.pubseekpos(p) == p); - assert(f.sgetc() == L'l'); - } - std::remove("seekoff.dat"); -} diff --git a/test/localization/locales/locale.convenience/conversions/conversions.buffer/state.pass.cpp b/test/localization/locales/locale.convenience/conversions/conversions.buffer/state.pass.cpp deleted file mode 100644 index 6abf5cee..00000000 --- a/test/localization/locales/locale.convenience/conversions/conversions.buffer/state.pass.cpp +++ /dev/null @@ -1,28 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// wbuffer_convert - -// state_type state() const; - -#include -#include -#include -#include - -int main() -{ - typedef std::wbuffer_convert > B; - { - B b; - std::mbstate_t s = b.state(); - } -} diff --git a/test/localization/locales/locale.convenience/conversions/conversions.buffer/test.xfail.pass.cpp b/test/localization/locales/locale.convenience/conversions/conversions.buffer/test.xfail.pass.cpp deleted file mode 100644 index 189ec2bd..00000000 --- a/test/localization/locales/locale.convenience/conversions/conversions.buffer/test.xfail.pass.cpp +++ /dev/null @@ -1,36 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// wbuffer_convert - -#include -#include -#include -#include - -int main() -{ - { - std::ofstream bytestream("myfile.txt"); - std::wbuffer_convert > mybuf(bytestream.rdbuf()); - std::wostream mystr(&mybuf); - mystr << L"Hello" << std::endl; - } - { - std::ifstream bytestream("myfile.txt"); - std::wbuffer_convert > mybuf(bytestream.rdbuf()); - std::wistream mystr(&mybuf); - std::wstring ws; - mystr >> ws; - assert(ws == L"Hello"); - } - std::remove("myfile.txt"); -} diff --git a/test/localization/locales/locale.convenience/conversions/conversions.buffer/underflow.dat b/test/localization/locales/locale.convenience/conversions/conversions.buffer/underflow.dat deleted file mode 100644 index e2e107ac..00000000 --- a/test/localization/locales/locale.convenience/conversions/conversions.buffer/underflow.dat +++ /dev/null @@ -1 +0,0 @@ -123456789 \ No newline at end of file diff --git a/test/localization/locales/locale.convenience/conversions/conversions.buffer/underflow.xfail.pass.cpp b/test/localization/locales/locale.convenience/conversions/conversions.buffer/underflow.xfail.pass.cpp deleted file mode 100644 index 1354c053..00000000 --- a/test/localization/locales/locale.convenience/conversions/conversions.buffer/underflow.xfail.pass.cpp +++ /dev/null @@ -1,84 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// wbuffer_convert - -// int_type underflow(); - -// This test is not entirely portable - -#include -#include -#include -#include - -struct test_buf - : public std::wbuffer_convert > -{ - typedef std::wbuffer_convert > base; - typedef base::char_type char_type; - typedef base::int_type int_type; - typedef base::traits_type traits_type; - - explicit test_buf(std::streambuf* sb) : base(sb) {} - - char_type* eback() const {return base::eback();} - char_type* gptr() const {return base::gptr();} - char_type* egptr() const {return base::egptr();} - void gbump(int n) {base::gbump(n);} - - virtual int_type underflow() {return base::underflow();} -}; - -int main() -{ - { - std::ifstream bs("underflow.dat"); - test_buf f(bs.rdbuf()); - assert(f.eback() == 0); - assert(f.gptr() == 0); - assert(f.egptr() == 0); - assert(f.underflow() == L'1'); - assert(f.eback() != 0); - assert(f.eback() == f.gptr()); - assert(*f.gptr() == L'1'); - assert(f.egptr() - f.eback() == 9); - } - { - std::ifstream bs("underflow.dat"); - test_buf f(bs.rdbuf()); - assert(f.eback() == 0); - assert(f.gptr() == 0); - assert(f.egptr() == 0); - assert(f.underflow() == L'1'); - assert(f.eback() != 0); - assert(f.eback() == f.gptr()); - assert(*f.gptr() == L'1'); - assert(f.egptr() - f.eback() == 9); - f.gbump(8); - assert(f.sgetc() == L'9'); - assert(f.eback()[0] == L'1'); - assert(f.eback()[1] == L'2'); - assert(f.eback()[2] == L'3'); - assert(f.eback()[3] == L'4'); - assert(f.gptr() - f.eback() == 8); - assert(*f.gptr() == L'9'); - assert(f.egptr() - f.gptr() == 1); - } - { - std::ifstream bs("underflow_utf8.dat"); - test_buf f(bs.rdbuf()); - assert(f.sbumpc() == 0x4E51); - assert(f.sbumpc() == 0x4E52); - assert(f.sbumpc() == 0x4E53); - assert(f.sbumpc() == -1); - } -} diff --git a/test/localization/locales/locale.convenience/conversions/conversions.buffer/underflow_utf8.dat b/test/localization/locales/locale.convenience/conversions/conversions.buffer/underflow_utf8.dat deleted file mode 100644 index ee7063e1..00000000 --- a/test/localization/locales/locale.convenience/conversions/conversions.buffer/underflow_utf8.dat +++ /dev/null @@ -1 +0,0 @@ -乑乒乓 \ No newline at end of file diff --git a/test/localization/locales/locale.convenience/conversions/conversions.character/tolower.xfail.pass.cpp b/test/localization/locales/locale.convenience/conversions/conversions.character/tolower.xfail.pass.cpp deleted file mode 100644 index 8c66ad14..00000000 --- a/test/localization/locales/locale.convenience/conversions/conversions.character/tolower.xfail.pass.cpp +++ /dev/null @@ -1,31 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template charT tolower(charT c, const locale& loc); - -#include -#include - -int main() -{ - std::locale l; - assert(std::tolower(' ', l) == ' '); - assert(std::tolower('<', l) == '<'); - assert(std::tolower('\x8', l) == '\x8'); - assert(std::tolower('A', l) == 'a'); - assert(std::tolower('a', l) == 'a'); - assert(std::tolower('z', l) == 'z'); - assert(std::tolower('3', l) == '3'); - assert(std::tolower('.', l) == '.'); - assert(std::tolower('f', l) == 'f'); - assert(std::tolower('9', l) == '9'); - assert(std::tolower('+', l) == '+'); -} diff --git a/test/localization/locales/locale.convenience/conversions/conversions.character/toupper.xfail.pass.cpp b/test/localization/locales/locale.convenience/conversions/conversions.character/toupper.xfail.pass.cpp deleted file mode 100644 index 3299a3d0..00000000 --- a/test/localization/locales/locale.convenience/conversions/conversions.character/toupper.xfail.pass.cpp +++ /dev/null @@ -1,31 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template charT toupper(charT c, const locale& loc); - -#include -#include - -int main() -{ - std::locale l; - assert(std::toupper(' ', l) == ' '); - assert(std::toupper('<', l) == '<'); - assert(std::toupper('\x8', l) == '\x8'); - assert(std::toupper('A', l) == 'A'); - assert(std::toupper('a', l) == 'A'); - assert(std::toupper('z', l) == 'Z'); - assert(std::toupper('3', l) == '3'); - assert(std::toupper('.', l) == '.'); - assert(std::toupper('f', l) == 'F'); - assert(std::toupper('9', l) == '9'); - assert(std::toupper('+', l) == '+'); -} diff --git a/test/localization/locales/locale.convenience/conversions/conversions.string/converted.pass.cpp b/test/localization/locales/locale.convenience/conversions/conversions.string/converted.pass.cpp deleted file mode 100644 index 06df1857..00000000 --- a/test/localization/locales/locale.convenience/conversions/conversions.string/converted.pass.cpp +++ /dev/null @@ -1,32 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// wstring_convert - -// size_t converted() const; - -#include -#include -#include - -int main() -{ - typedef std::codecvt_utf8 Codecvt; - typedef std::wstring_convert Myconv; - Myconv myconv; - assert(myconv.converted() == 0); - std::string bs = myconv.to_bytes(L"\x40003"); - assert(myconv.converted() == 1); - bs = myconv.to_bytes(L"\x40003\x65"); - assert(myconv.converted() == 2); - std::wstring ws = myconv.from_bytes("\xF1\x80\x80\x83"); - assert(myconv.converted() == 4); -} diff --git a/test/localization/locales/locale.convenience/conversions/conversions.string/ctor_codecvt.pass.cpp b/test/localization/locales/locale.convenience/conversions/conversions.string/ctor_codecvt.pass.cpp deleted file mode 100644 index 887d1f05..00000000 --- a/test/localization/locales/locale.convenience/conversions/conversions.string/ctor_codecvt.pass.cpp +++ /dev/null @@ -1,34 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// wstring_convert - -// wstring_convert(Codecvt* pcvt = new Codecvt); - -#include -#include -#include - -int main() -{ - { - typedef std::codecvt_utf8 Codecvt; - typedef std::wstring_convert Myconv; - Myconv myconv; - assert(myconv.converted() == 0); - } - { - typedef std::codecvt_utf8 Codecvt; - typedef std::wstring_convert Myconv; - Myconv myconv(new Codecvt); - assert(myconv.converted() == 0); - } -} diff --git a/test/localization/locales/locale.convenience/conversions/conversions.string/ctor_codecvt_state.pass.cpp b/test/localization/locales/locale.convenience/conversions/conversions.string/ctor_codecvt_state.pass.cpp deleted file mode 100644 index 7651f8ac..00000000 --- a/test/localization/locales/locale.convenience/conversions/conversions.string/ctor_codecvt_state.pass.cpp +++ /dev/null @@ -1,28 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// wstring_convert - -// wstring_convert(Codecvt* pcvt, state_type state); - -#include -#include -#include - -int main() -{ - { - typedef std::codecvt_utf8 Codecvt; - typedef std::wstring_convert Myconv; - Myconv myconv(new Codecvt, std::mbstate_t()); - assert(myconv.converted() == 0); - } -} diff --git a/test/localization/locales/locale.convenience/conversions/conversions.string/ctor_err_string.pass.cpp b/test/localization/locales/locale.convenience/conversions/conversions.string/ctor_err_string.pass.cpp deleted file mode 100644 index 62f68575..00000000 --- a/test/localization/locales/locale.convenience/conversions/conversions.string/ctor_err_string.pass.cpp +++ /dev/null @@ -1,64 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// wstring_convert - -// wstring_convert(const byte_string& byte_err, -// const wide_string& wide_err = wide_string()); - -#include -#include -#include - -int main() -{ - typedef std::codecvt_utf8 Codecvt; - typedef std::wstring_convert Myconv; - { - Myconv myconv; - try - { - myconv.to_bytes(L"\xDA83"); - assert(false); - } - catch (const std::range_error&) - { - } - try - { - myconv.from_bytes('\xA5'); - assert(false); - } - catch (const std::range_error&) - { - } - } - { - Myconv myconv("byte error"); - std::string bs = myconv.to_bytes(L"\xDA83"); - assert(bs == "byte error"); - try - { - myconv.from_bytes('\xA5'); - assert(false); - } - catch (const std::range_error&) - { - } - } - { - Myconv myconv("byte error", L"wide error"); - std::string bs = myconv.to_bytes(L"\xDA83"); - assert(bs == "byte error"); - std::wstring ws = myconv.from_bytes('\xA5'); - assert(ws == L"wide error"); - } -} diff --git a/test/localization/locales/locale.convenience/conversions/conversions.string/from_bytes.pass.cpp b/test/localization/locales/locale.convenience/conversions/conversions.string/from_bytes.pass.cpp deleted file mode 100644 index 08d3e185..00000000 --- a/test/localization/locales/locale.convenience/conversions/conversions.string/from_bytes.pass.cpp +++ /dev/null @@ -1,37 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// wstring_convert - -// wide_string from_bytes(char byte); -// wide_string from_bytes(const char* ptr); -// wide_string from_bytes(const byte_string& str); -// wide_string from_bytes(const char* first, const char* last); - -#include -#include -#include - -int main() -{ - { - std::wstring_convert > myconv; - std::string bs("\xF1\x80\x80\x83"); - std::wstring ws = myconv.from_bytes('a'); - assert(ws == L"a"); - ws = myconv.from_bytes(bs.c_str()); - assert(ws == L"\x40003"); - ws = myconv.from_bytes(bs); - assert(ws == L"\x40003"); - ws = myconv.from_bytes(bs.data(), bs.data() + bs.size()); - assert(ws == L"\x40003"); - } -} diff --git a/test/localization/locales/locale.convenience/conversions/conversions.string/state.pass.cpp b/test/localization/locales/locale.convenience/conversions/conversions.string/state.pass.cpp deleted file mode 100644 index 08dfa255..00000000 --- a/test/localization/locales/locale.convenience/conversions/conversions.string/state.pass.cpp +++ /dev/null @@ -1,25 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// wstring_convert - -// state_type state() const; - -#include -#include - -int main() -{ - typedef std::codecvt_utf8 Codecvt; - typedef std::wstring_convert Myconv; - Myconv myconv; - std::mbstate_t s = myconv.state(); -} diff --git a/test/localization/locales/locale.convenience/conversions/conversions.string/to_bytes.pass.cpp b/test/localization/locales/locale.convenience/conversions/conversions.string/to_bytes.pass.cpp deleted file mode 100644 index 4ef59891..00000000 --- a/test/localization/locales/locale.convenience/conversions/conversions.string/to_bytes.pass.cpp +++ /dev/null @@ -1,37 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// wstring_convert - -// byte_string to_bytes(Elem wchar); -// byte_string to_bytes(const Elem* wptr); -// byte_string to_bytes(const wide_string& wstr); -// byte_string to_bytes(const Elem* first, const Elem* last); - -#include -#include -#include - -int main() -{ - { - std::wstring_convert > myconv; - std::wstring ws(1, L'\x40003'); - std::string bs = myconv.to_bytes(ws[0]); - assert(bs == "\xF1\x80\x80\x83"); - bs = myconv.to_bytes(ws.c_str()); - assert(bs == "\xF1\x80\x80\x83"); - bs = myconv.to_bytes(ws); - assert(bs == "\xF1\x80\x80\x83"); - bs = myconv.to_bytes(ws.data(), ws.data() + ws.size()); - assert(bs == "\xF1\x80\x80\x83"); - } -} diff --git a/test/localization/locales/locale.convenience/conversions/conversions.string/types.pass.cpp b/test/localization/locales/locale.convenience/conversions/conversions.string/types.pass.cpp deleted file mode 100644 index d46c858f..00000000 --- a/test/localization/locales/locale.convenience/conversions/conversions.string/types.pass.cpp +++ /dev/null @@ -1,35 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template, -// class Byte_alloc = allocator> -// class wstring_convert -// { -// public: -// typedef basic_string, Byte_alloc> byte_string; -// typedef basic_string, Wide_alloc> wide_string; -// typedef typename Codecvt::state_type state_type; -// typedef typename wide_string::traits_type::int_type int_type; - -#include -#include - -int main() -{ - { - typedef std::wstring_convert > myconv; - static_assert((std::is_same::value), ""); - static_assert((std::is_same::value), ""); - static_assert((std::is_same::value), ""); - static_assert((std::is_same::int_type>::value), ""); - } -} diff --git a/test/localization/locales/locale.convenience/conversions/nothing_to_do.pass.cpp b/test/localization/locales/locale.convenience/conversions/nothing_to_do.pass.cpp deleted file mode 100644 index b58f5c55..00000000 --- a/test/localization/locales/locale.convenience/conversions/nothing_to_do.pass.cpp +++ /dev/null @@ -1,12 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -int main() -{ -} diff --git a/test/localization/locales/locale.convenience/nothing_to_do.pass.cpp b/test/localization/locales/locale.convenience/nothing_to_do.pass.cpp deleted file mode 100644 index b58f5c55..00000000 --- a/test/localization/locales/locale.convenience/nothing_to_do.pass.cpp +++ /dev/null @@ -1,12 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -int main() -{ -} diff --git a/test/localization/locales/locale.global.templates/has_facet.pass.cpp b/test/localization/locales/locale.global.templates/has_facet.pass.cpp deleted file mode 100644 index 58767f05..00000000 --- a/test/localization/locales/locale.global.templates/has_facet.pass.cpp +++ /dev/null @@ -1,32 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template bool has_facet(const locale& loc) throw(); - -#include -#include - -struct my_facet - : public std::locale::facet -{ - static std::locale::id id; -}; - -std::locale::id my_facet::id; - -int main() -{ - std::locale loc; - assert(std::has_facet >(loc)); - assert(!std::has_facet(loc)); - std::locale loc2(loc, new my_facet); - assert(std::has_facet(loc2)); -} diff --git a/test/localization/locales/locale.global.templates/use_facet.pass.cpp b/test/localization/locales/locale.global.templates/use_facet.pass.cpp deleted file mode 100644 index a40a2d2d..00000000 --- a/test/localization/locales/locale.global.templates/use_facet.pass.cpp +++ /dev/null @@ -1,52 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template const Facet& use_facet(const locale& loc); - -#include -#include - -int facet_count = 0; - -struct my_facet - : public std::locale::facet -{ - static std::locale::id id; - - bool im_alive; - - my_facet() : im_alive(true) {++facet_count;} - ~my_facet() {im_alive = false; --facet_count;} -}; - -std::locale::id my_facet::id; - -int main() -{ - try - { - const my_facet& f = std::use_facet(std::locale()); - assert(false); - } - catch (std::bad_cast&) - { - } - const my_facet* fp = 0; - { - std::locale loc(std::locale(), new my_facet); - const my_facet& f = std::use_facet(loc); - assert(f.im_alive); - fp = &f; - assert(fp->im_alive); - assert(facet_count == 1); - } - assert(facet_count == 0); -} diff --git a/test/localization/locales/locale/locale.cons/assign.pass.cpp b/test/localization/locales/locale/locale.cons/assign.pass.cpp deleted file mode 100644 index afffae99..00000000 --- a/test/localization/locales/locale/locale.cons/assign.pass.cpp +++ /dev/null @@ -1,78 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// const locale& operator=(const locale& other) throw(); - -#include -#include -#include - -int new_called = 0; - -void* operator new(std::size_t s) throw(std::bad_alloc) -{ - ++new_called; - return std::malloc(s); -} - -void operator delete(void* p) throw() -{ - --new_called; - std::free(p); -} - -void check(const std::locale& loc) -{ - assert(std::has_facet >(loc)); - assert(std::has_facet >(loc)); - - assert(std::has_facet >(loc)); - assert(std::has_facet >(loc)); - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); -} - -int main() -{ - { - std::locale loc("ru_RU"); - std::locale loc2; - loc2 = loc; - assert(loc == loc2); - check(loc); - check(loc2); - } - assert(new_called == 0); -} diff --git a/test/localization/locales/locale/locale.cons/char_pointer.xfail.pass.cpp b/test/localization/locales/locale/locale.cons/char_pointer.xfail.pass.cpp deleted file mode 100644 index b5d56134..00000000 --- a/test/localization/locales/locale/locale.cons/char_pointer.xfail.pass.cpp +++ /dev/null @@ -1,98 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// explicit locale(const char* std_name); - -#include -#include -#include - -int new_called = 0; - -void* operator new(std::size_t s) throw(std::bad_alloc) -{ - ++new_called; - return std::malloc(s); -} - -void operator delete(void* p) throw() -{ - --new_called; - std::free(p); -} - -void check(const std::locale& loc) -{ - assert(std::has_facet >(loc)); - assert(std::has_facet >(loc)); - - assert(std::has_facet >(loc)); - assert(std::has_facet >(loc)); - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); -} - -int main() -{ - { - std::locale loc("ru_RU"); - check(loc); - std::locale loc2("ru_RU"); - check(loc2); - assert(loc == loc2); - std::locale loc3("zh_CN"); - check(loc3); - assert(!(loc == loc3)); - assert(loc != loc3); - try - { - std::locale((const char*)0); - assert(false); - } - catch (std::runtime_error&) - { - } - try - { - std::locale("spazbot"); - assert(false); - } - catch (std::runtime_error&) - { - } - std::locale ok(""); - } - assert(new_called == 0); -} diff --git a/test/localization/locales/locale/locale.cons/copy.xfail.pass.cpp b/test/localization/locales/locale/locale.cons/copy.xfail.pass.cpp deleted file mode 100644 index abbeef8c..00000000 --- a/test/localization/locales/locale/locale.cons/copy.xfail.pass.cpp +++ /dev/null @@ -1,77 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// locale(const locale& other) throw(); - -#include -#include -#include - -int new_called = 0; - -void* operator new(std::size_t s) throw(std::bad_alloc) -{ - ++new_called; - return std::malloc(s); -} - -void operator delete(void* p) throw() -{ - --new_called; - std::free(p); -} - -void check(const std::locale& loc) -{ - assert(std::has_facet >(loc)); - assert(std::has_facet >(loc)); - - assert(std::has_facet >(loc)); - assert(std::has_facet >(loc)); - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); -} - -int main() -{ - { - std::locale loc("fr_FR"); - std::locale loc2 = loc; - assert(loc == loc2); - check(loc); - check(loc2); - } - assert(new_called == 0); -} diff --git a/test/localization/locales/locale/locale.cons/default.xfail.pass.cpp b/test/localization/locales/locale/locale.cons/default.xfail.pass.cpp deleted file mode 100644 index f7230474..00000000 --- a/test/localization/locales/locale/locale.cons/default.xfail.pass.cpp +++ /dev/null @@ -1,87 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// locale() throw(); - -#include -#include -#include - -int new_called = 0; - -void* operator new(std::size_t s) throw(std::bad_alloc) -{ - ++new_called; - return std::malloc(s); -} - -void operator delete(void* p) throw() -{ - --new_called; - std::free(p); -} - -void check(const std::locale& loc) -{ - assert(std::has_facet >(loc)); - assert(std::has_facet >(loc)); - - assert(std::has_facet >(loc)); - assert(std::has_facet >(loc)); - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); -} - -int main() -{ - int ok; - { - std::locale loc; - assert(new_called == 0); - assert(loc.name() == "C"); - assert(new_called == 0); - check(loc); - assert(new_called == 0); - assert(std::locale::global(std::locale("en_US")) == loc); - ok = new_called; - std::locale loc2; - assert(new_called == ok); - check(loc2); - assert(new_called == ok); - assert(loc2 == std::locale("en_US")); - assert(new_called == ok); - } - assert(new_called == ok); -} diff --git a/test/localization/locales/locale/locale.cons/locale_char_pointer_cat.pass.cpp b/test/localization/locales/locale/locale.cons/locale_char_pointer_cat.pass.cpp deleted file mode 100644 index 9d585d41..00000000 --- a/test/localization/locales/locale/locale.cons/locale_char_pointer_cat.pass.cpp +++ /dev/null @@ -1,76 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// locale(const locale& other, const char* std_name, category); - -#include -#include -#include - -int new_called = 0; - -void* operator new(std::size_t s) throw(std::bad_alloc) -{ - ++new_called; - return std::malloc(s); -} - -void operator delete(void* p) throw() -{ - --new_called; - std::free(p); -} - -void check(const std::locale& loc) -{ - assert(std::has_facet >(loc)); - assert(std::has_facet >(loc)); - - assert(std::has_facet >(loc)); - assert(std::has_facet >(loc)); - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); -} - -int main() -{ - { - std::locale loc("ru_RU"); - check(loc); - std::locale loc2(loc, "en_US", std::locale::monetary); - check(loc2); - } - assert(new_called == 0); -} diff --git a/test/localization/locales/locale/locale.cons/locale_facetptr.pass.cpp b/test/localization/locales/locale/locale.cons/locale_facetptr.pass.cpp deleted file mode 100644 index b0a8c265..00000000 --- a/test/localization/locales/locale/locale.cons/locale_facetptr.pass.cpp +++ /dev/null @@ -1,101 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template locale(const locale& other, Facet* f); - -#include -#include -#include - -int new_called = 0; - -void* operator new(std::size_t s) throw(std::bad_alloc) -{ - ++new_called; - return std::malloc(s); -} - -void operator delete(void* p) throw() -{ - --new_called; - std::free(p); -} - -void check(const std::locale& loc) -{ - assert(std::has_facet >(loc)); - assert(std::has_facet >(loc)); - - assert(std::has_facet >(loc)); - assert(std::has_facet >(loc)); - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); -} - -struct my_facet - : public std::locale::facet -{ - int test() const {return 5;} - - static std::locale::id id; -}; - -std::locale::id my_facet::id; - -int main() -{ -{ - { - std::locale loc("ru_RU"); - check(loc); - std::locale loc2(loc, new my_facet); - check(loc2); - assert((std::has_facet(loc2))); - const my_facet& f = std::use_facet(loc2); - assert(f.test() == 5); - } - assert(new_called == 0); -} -{ - { - std::locale loc; - check(loc); - std::locale loc2(loc, (std::ctype*)0); - check(loc2); - assert(loc == loc2); - } - assert(new_called == 0); -} -} diff --git a/test/localization/locales/locale/locale.cons/locale_locale_cat.pass.cpp b/test/localization/locales/locale/locale.cons/locale_locale_cat.pass.cpp deleted file mode 100644 index 899aad35..00000000 --- a/test/localization/locales/locale/locale.cons/locale_locale_cat.pass.cpp +++ /dev/null @@ -1,76 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// locale(const locale& other, const locale& one, category cats); - -#include -#include -#include - -int new_called = 0; - -void* operator new(std::size_t s) throw(std::bad_alloc) -{ - ++new_called; - return std::malloc(s); -} - -void operator delete(void* p) throw() -{ - --new_called; - std::free(p); -} - -void check(const std::locale& loc) -{ - assert(std::has_facet >(loc)); - assert(std::has_facet >(loc)); - - assert(std::has_facet >(loc)); - assert(std::has_facet >(loc)); - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); -} - -int main() -{ - { - std::locale loc("ru_RU"); - check(loc); - std::locale loc2(loc, std::locale("en_US"), std::locale::monetary); - check(loc2); - } - assert(new_called == 0); -} diff --git a/test/localization/locales/locale/locale.cons/locale_string_cat.pass.cpp b/test/localization/locales/locale/locale.cons/locale_string_cat.pass.cpp deleted file mode 100644 index 282d3734..00000000 --- a/test/localization/locales/locale/locale.cons/locale_string_cat.pass.cpp +++ /dev/null @@ -1,76 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// locale(const locale& other, const string& std_name, category cat); - -#include -#include -#include - -int new_called = 0; - -void* operator new(std::size_t s) throw(std::bad_alloc) -{ - ++new_called; - return std::malloc(s); -} - -void operator delete(void* p) throw() -{ - --new_called; - std::free(p); -} - -void check(const std::locale& loc) -{ - assert(std::has_facet >(loc)); - assert(std::has_facet >(loc)); - - assert(std::has_facet >(loc)); - assert(std::has_facet >(loc)); - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); -} - -int main() -{ - { - std::locale loc("ru_RU"); - check(loc); - std::locale loc2(loc, std::string("en_US"), std::locale::monetary); - check(loc2); - } - assert(new_called == 0); -} diff --git a/test/localization/locales/locale/locale.cons/string.pass.cpp b/test/localization/locales/locale/locale.cons/string.pass.cpp deleted file mode 100644 index 7dbeed6f..00000000 --- a/test/localization/locales/locale/locale.cons/string.pass.cpp +++ /dev/null @@ -1,81 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// explicit locale(const string& std_name); - -#include -#include -#include - -int new_called = 0; - -void* operator new(std::size_t s) throw(std::bad_alloc) -{ - ++new_called; - return std::malloc(s); -} - -void operator delete(void* p) throw() -{ - --new_called; - std::free(p); -} - -void check(const std::locale& loc) -{ - assert(std::has_facet >(loc)); - assert(std::has_facet >(loc)); - - assert(std::has_facet >(loc)); - assert(std::has_facet >(loc)); - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); -} - -int main() -{ - { - std::locale loc(std::string("ru_RU")); - check(loc); - std::locale loc2(std::string("ru_RU")); - check(loc2); - assert(loc == loc2); - std::locale loc3(std::string("zh_CN")); - check(loc3); - assert(!(loc == loc3)); - assert(loc != loc3); - } - assert(new_called == 0); -} diff --git a/test/localization/locales/locale/locale.members/combine.pass.cpp b/test/localization/locales/locale/locale.members/combine.pass.cpp deleted file mode 100644 index 8d74da02..00000000 --- a/test/localization/locales/locale/locale.members/combine.pass.cpp +++ /dev/null @@ -1,107 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template locale combine(const locale& other) const; - -#include -#include -#include - -int new_called = 0; - -void* operator new(std::size_t s) throw(std::bad_alloc) -{ - ++new_called; - return std::malloc(s); -} - -void operator delete(void* p) throw() -{ - --new_called; - std::free(p); -} - -void check(const std::locale& loc) -{ - assert(std::has_facet >(loc)); - assert(std::has_facet >(loc)); - - assert(std::has_facet >(loc)); - assert(std::has_facet >(loc)); - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); -} - -struct my_facet - : public std::locale::facet -{ - int test() const {return 5;} - - static std::locale::id id; -}; - -std::locale::id my_facet::id; - -int main() -{ -{ - { - std::locale loc; - std::locale loc2(loc, new my_facet); - std::locale loc3 = loc.combine(loc2); - check(loc3); - assert(loc3.name() == "*"); - assert((std::has_facet(loc3))); - const my_facet& f = std::use_facet(loc3); - assert(f.test() == 5); - } - assert(new_called == 0); -} -{ - { - std::locale loc; - std::locale loc2; - try - { - std::locale loc3 = loc.combine(loc2); - assert(false); - } - catch (std::runtime_error&) - { - } - } - assert(new_called == 0); -} -} diff --git a/test/localization/locales/locale/locale.members/name.xfail.pass.cpp b/test/localization/locales/locale/locale.members/name.xfail.pass.cpp deleted file mode 100644 index 0522a306..00000000 --- a/test/localization/locales/locale/locale.members/name.xfail.pass.cpp +++ /dev/null @@ -1,27 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// basic_string name() const; - -#include -#include - -int main() -{ - { - std::locale loc; - assert(loc.name() == "C"); - } - { - std::locale loc("en_US"); - assert(loc.name() == "en_US"); - } -} diff --git a/test/localization/locales/locale/locale.operators/compare.pass.cpp b/test/localization/locales/locale/locale.operators/compare.pass.cpp deleted file mode 100644 index 40740520..00000000 --- a/test/localization/locales/locale/locale.operators/compare.pass.cpp +++ /dev/null @@ -1,34 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// template -// bool operator()(const basic_string& s1, -// const basic_string& s2) const; - -#include -#include - -int main() -{ - { - std::locale l; - { - std::string s2("aaaaaaA"); - std::string s3("BaaaaaA"); - assert(l(s3, s2)); - } - { - std::wstring s2(L"aaaaaaA"); - std::wstring s3(L"BaaaaaA"); - assert(l(s3, s2)); - } - } -} diff --git a/test/localization/locales/locale/locale.operators/eq.xfail.pass.cpp b/test/localization/locales/locale/locale.operators/eq.xfail.pass.cpp deleted file mode 100644 index c8a5b512..00000000 --- a/test/localization/locales/locale/locale.operators/eq.xfail.pass.cpp +++ /dev/null @@ -1,82 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// basic_string name() const; - -#include -#include - -int main() -{ - std::locale cloc; - std::locale copy(cloc); - std::locale n1("en_US"); - std::locale n2("en_US"); - std::locale noname1 = n1.combine >(cloc); - std::locale nonamec = noname1; - std::locale noname2 = n1.combine >(cloc); - - assert(cloc == cloc); - assert(cloc == copy); - assert(cloc != n1); - assert(cloc != n2); - assert(cloc != noname1); - assert(cloc != nonamec); - assert(cloc != noname2); - - assert(copy == cloc); - assert(copy == copy); - assert(copy != n1); - assert(copy != n2); - assert(copy != noname1); - assert(copy != nonamec); - assert(copy != noname2); - - assert(n1 != cloc); - assert(n1 != copy); - assert(n1 == n1); - assert(n1 == n2); - assert(n1 != noname1); - assert(n1 != nonamec); - assert(n1 != noname2); - - assert(n2 != cloc); - assert(n2 != copy); - assert(n2 == n1); - assert(n2 == n2); - assert(n2 != noname1); - assert(n2 != nonamec); - assert(n2 != noname2); - - assert(noname1 != cloc); - assert(noname1 != copy); - assert(noname1 != n1); - assert(noname1 != n2); - assert(noname1 == noname1); - assert(noname1 == nonamec); - assert(noname1 != noname2); - - assert(nonamec != cloc); - assert(nonamec != copy); - assert(nonamec != n1); - assert(nonamec != n2); - assert(nonamec == noname1); - assert(nonamec == nonamec); - assert(nonamec != noname2); - - assert(noname2 != cloc); - assert(noname2 != copy); - assert(noname2 != n1); - assert(noname2 != n2); - assert(noname2 != noname1); - assert(noname2 != nonamec); - assert(noname2 == noname2); -} diff --git a/test/localization/locales/locale/locale.statics/classic.pass.cpp b/test/localization/locales/locale/locale.statics/classic.pass.cpp deleted file mode 100644 index 078030ce..00000000 --- a/test/localization/locales/locale/locale.statics/classic.pass.cpp +++ /dev/null @@ -1,59 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// static const locale& classic(); - -#include -#include - -void check(const std::locale& loc) -{ - assert(std::has_facet >(loc)); - assert(std::has_facet >(loc)); - - assert(std::has_facet >(loc)); - assert(std::has_facet >(loc)); - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); -} - -int main() -{ - std::locale loc = std::locale::classic(); - assert(loc.name() == "C"); - assert(loc == std::locale("C")); - check(loc); - check(std::locale("C")); -} diff --git a/test/localization/locales/locale/locale.statics/global.xfail.pass.cpp b/test/localization/locales/locale/locale.statics/global.xfail.pass.cpp deleted file mode 100644 index df4bc322..00000000 --- a/test/localization/locales/locale/locale.statics/global.xfail.pass.cpp +++ /dev/null @@ -1,61 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// static const locale& classic(); - -#include -#include - -void check(const std::locale& loc) -{ - assert(std::has_facet >(loc)); - assert(std::has_facet >(loc)); - - assert(std::has_facet >(loc)); - assert(std::has_facet >(loc)); - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); - - assert((std::has_facet >(loc))); - assert((std::has_facet >(loc))); -} - -int main() -{ - std::locale loc; - assert(loc.name() == "C"); - check(loc); - assert(std::locale::global(std::locale("en_US")) == loc); - std::locale loc2; - check(loc2); - assert(loc2 == std::locale("en_US")); -} diff --git a/test/localization/locales/locale/locale.types/locale.category/category.pass.cpp b/test/localization/locales/locale/locale.types/locale.category/category.pass.cpp deleted file mode 100644 index 0119b844..00000000 --- a/test/localization/locales/locale/locale.types/locale.category/category.pass.cpp +++ /dev/null @@ -1,41 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// typedef int category; - -#include -#include -#include - -int main() -{ - static_assert((std::is_same::value), ""); - assert(std::locale::none == 0); - assert(std::locale::collate); - assert(std::locale::ctype); - assert(std::locale::monetary); - assert(std::locale::numeric); - assert(std::locale::time); - assert(std::locale::messages); - assert((std::locale::collate - & std::locale::ctype - & std::locale::monetary - & std::locale::numeric - & std::locale::time - & std::locale::messages) == 0); - assert((std::locale::collate - | std::locale::ctype - | std::locale::monetary - | std::locale::numeric - | std::locale::time - | std::locale::messages) - == std::locale::all); -} diff --git a/test/localization/locales/locale/locale.types/locale.facet/facet.pass.cpp b/test/localization/locales/locale/locale.types/locale.facet/facet.pass.cpp deleted file mode 100644 index 4a7f77ad..00000000 --- a/test/localization/locales/locale/locale.types/locale.facet/facet.pass.cpp +++ /dev/null @@ -1,53 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// class locale::facet -// { -// protected: -// explicit facet(size_t refs = 0); -// virtual ~facet(); -// facet(const facet&) = delete; -// void operator=(const facet&) = delete; -// }; - -// This test isn't portable - -#include -#include - -struct my_facet - : public std::locale::facet -{ - static int count; - my_facet(unsigned refs = 0) - : std::locale::facet(refs) - {++count;} - - ~my_facet() {--count;} -}; - -int my_facet::count = 0; - -int main() -{ - my_facet* f = new my_facet; - f->__add_shared(); - assert(my_facet::count == 1); - f->__release_shared(); - assert(my_facet::count == 0); - f = new my_facet(1); - f->__add_shared(); - assert(my_facet::count == 1); - f->__release_shared(); - assert(my_facet::count == 1); - f->__release_shared(); - assert(my_facet::count == 0); -} diff --git a/test/localization/locales/locale/locale.types/locale.id/id.pass.cpp b/test/localization/locales/locale/locale.types/locale.id/id.pass.cpp deleted file mode 100644 index 3233624d..00000000 --- a/test/localization/locales/locale/locale.types/locale.id/id.pass.cpp +++ /dev/null @@ -1,50 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// class locale::id -// { -// public: -// id(); -// void operator=(const id&) = delete; -// id(const id&) = delete; -// }; - -// This test isn't portable - -#include -#include - -std::locale::id id0; -std::locale::id id2; -std::locale::id id1; - -int main() -{ - long id = id0.__get(); - assert(id0.__get() == id+0); - assert(id0.__get() == id+0); - assert(id0.__get() == id+0); - assert(id1.__get() == id+1); - assert(id1.__get() == id+1); - assert(id1.__get() == id+1); - assert(id2.__get() == id+2); - assert(id2.__get() == id+2); - assert(id2.__get() == id+2); - assert(id0.__get() == id+0); - assert(id0.__get() == id+0); - assert(id0.__get() == id+0); - assert(id1.__get() == id+1); - assert(id1.__get() == id+1); - assert(id1.__get() == id+1); - assert(id2.__get() == id+2); - assert(id2.__get() == id+2); - assert(id2.__get() == id+2); -} diff --git a/test/localization/locales/locale/locale.types/nothing_to_do.pass.cpp b/test/localization/locales/locale/locale.types/nothing_to_do.pass.cpp deleted file mode 100644 index b58f5c55..00000000 --- a/test/localization/locales/locale/locale.types/nothing_to_do.pass.cpp +++ /dev/null @@ -1,12 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -int main() -{ -} diff --git a/test/localization/locales/locale/nothing_to_do.pass.cpp b/test/localization/locales/locale/nothing_to_do.pass.cpp deleted file mode 100644 index b58f5c55..00000000 --- a/test/localization/locales/locale/nothing_to_do.pass.cpp +++ /dev/null @@ -1,12 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -int main() -{ -} diff --git a/test/localization/locales/nothing_to_do.pass.cpp b/test/localization/locales/nothing_to_do.pass.cpp deleted file mode 100644 index b58f5c55..00000000 --- a/test/localization/locales/nothing_to_do.pass.cpp +++ /dev/null @@ -1,12 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -int main() -{ -} diff --git a/test/localization/localization.general/nothing_to_do.pass.cpp b/test/localization/localization.general/nothing_to_do.pass.cpp deleted file mode 100644 index b58f5c55..00000000 --- a/test/localization/localization.general/nothing_to_do.pass.cpp +++ /dev/null @@ -1,12 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -int main() -{ -} diff --git a/test/localization/version.pass.cpp b/test/localization/version.pass.cpp deleted file mode 100644 index a64534c9..00000000 --- a/test/localization/version.pass.cpp +++ /dev/null @@ -1,20 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -#include - -#ifndef _LIBCPP_VERSION -#error _LIBCPP_VERSION not defined -#endif - -int main() -{ -}