aboutsummaryrefslogtreecommitdiff
path: root/test/std/localization/locale.categories
diff options
context:
space:
mode:
Diffstat (limited to 'test/std/localization/locale.categories')
-rw-r--r--test/std/localization/locale.categories/__scan_keyword.pass.cpp118
-rw-r--r--test/std/localization/locale.categories/category.collate/locale.collate.byname/compare.pass.cpp87
-rw-r--r--test/std/localization/locale.categories/category.collate/locale.collate.byname/hash.pass.cpp41
-rw-r--r--test/std/localization/locale.categories/category.collate/locale.collate.byname/transform.pass.cpp69
-rw-r--r--test/std/localization/locale.categories/category.collate/locale.collate.byname/types.pass.cpp45
-rw-r--r--test/std/localization/locale.categories/category.collate/locale.collate/ctor.pass.cpp67
-rw-r--r--test/std/localization/locale.categories/category.collate/locale.collate/locale.collate.members/compare.pass.cpp49
-rw-r--r--test/std/localization/locale.categories/category.collate/locale.collate/locale.collate.members/hash.pass.cpp39
-rw-r--r--test/std/localization/locale.categories/category.collate/locale.collate/locale.collate.members/transform.pass.cpp33
-rw-r--r--test/std/localization/locale.categories/category.collate/locale.collate/locale.collate.virtuals/tested_elsewhere.pass.cpp12
-rw-r--r--test/std/localization/locale.categories/category.collate/locale.collate/types.pass.cpp49
-rw-r--r--test/std/localization/locale.categories/category.collate/nothing_to_do.pass.cpp12
-rw-r--r--test/std/localization/locale.categories/category.ctype/ctype_base.pass.cpp78
-rw-r--r--test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.dtor/dtor.pass.cpp40
-rw-r--r--test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/ctor.pass.cpp50
-rw-r--r--test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/is_1.pass.cpp59
-rw-r--r--test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/is_many.pass.cpp118
-rw-r--r--test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/narrow_1.pass.cpp33
-rw-r--r--test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/narrow_many.pass.cpp38
-rw-r--r--test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/scan_is.pass.cpp44
-rw-r--r--test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/scan_not.pass.cpp44
-rw-r--r--test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/table.pass.cpp33
-rw-r--r--test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/tolower_1.pass.cpp33
-rw-r--r--test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/tolower_many.pass.cpp36
-rw-r--r--test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/toupper_1.pass.cpp33
-rw-r--r--test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/toupper_many.pass.cpp36
-rw-r--r--test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/widen_1.pass.cpp33
-rw-r--r--test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/widen_many.pass.cpp38
-rw-r--r--test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.statics/classic_table.pass.cpp59
-rw-r--r--test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.virtuals/tested_elsewhere.pass.cpp12
-rw-r--r--test/std/localization/locale.categories/category.ctype/facet.ctype.special/types.pass.cpp38
-rw-r--r--test/std/localization/locale.categories/category.ctype/locale.codecvt.byname/ctor_char.pass.cpp70
-rw-r--r--test/std/localization/locale.categories/category.ctype/locale.codecvt.byname/ctor_char16_t.pass.cpp70
-rw-r--r--test/std/localization/locale.categories/category.ctype/locale.codecvt.byname/ctor_char32_t.pass.cpp70
-rw-r--r--test/std/localization/locale.categories/category.ctype/locale.codecvt.byname/ctor_wchar_t.pass.cpp72
-rw-r--r--test/std/localization/locale.categories/category.ctype/locale.codecvt/codecvt_base.pass.cpp27
-rw-r--r--test/std/localization/locale.categories/category.ctype/locale.codecvt/ctor_char.pass.cpp52
-rw-r--r--test/std/localization/locale.categories/category.ctype/locale.codecvt/ctor_char16_t.pass.cpp58
-rw-r--r--test/std/localization/locale.categories/category.ctype/locale.codecvt/ctor_char32_t.pass.cpp58
-rw-r--r--test/std/localization/locale.categories/category.ctype/locale.codecvt/ctor_wchar_t.pass.cpp52
-rw-r--r--test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char16_t_always_noconv.pass.cpp26
-rw-r--r--test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char16_t_encoding.pass.cpp26
-rw-r--r--test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char16_t_in.pass.cpp40
-rw-r--r--test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char16_t_length.pass.cpp32
-rw-r--r--test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char16_t_max_length.pass.cpp26
-rw-r--r--test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char16_t_out.pass.cpp45
-rw-r--r--test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char16_t_unshift.pass.cpp33
-rw-r--r--test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char32_t_always_noconv.pass.cpp26
-rw-r--r--test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char32_t_encoding.pass.cpp26
-rw-r--r--test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char32_t_in.pass.cpp40
-rw-r--r--test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char32_t_length.pass.cpp32
-rw-r--r--test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char32_t_max_length.pass.cpp26
-rw-r--r--test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char32_t_out.pass.cpp45
-rw-r--r--test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char32_t_unshift.pass.cpp33
-rw-r--r--test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char_always_noconv.pass.cpp26
-rw-r--r--test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char_encoding.pass.cpp26
-rw-r--r--test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char_in.pass.cpp38
-rw-r--r--test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char_length.pass.cpp32
-rw-r--r--test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char_max_length.pass.cpp26
-rw-r--r--test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char_out.pass.cpp38
-rw-r--r--test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char_unshift.pass.cpp33
-rw-r--r--test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/utf_sanity_check.pass.cpp127
-rw-r--r--test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/wchar_t_always_noconv.pass.cpp26
-rw-r--r--test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/wchar_t_encoding.pass.cpp26
-rw-r--r--test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/wchar_t_in.pass.cpp42
-rw-r--r--test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/wchar_t_length.pass.cpp32
-rw-r--r--test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/wchar_t_max_length.pass.cpp26
-rw-r--r--test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/wchar_t_out.pass.cpp69
-rw-r--r--test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/wchar_t_unshift.pass.cpp35
-rw-r--r--test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.virtuals/tested_elsewhere.pass.cpp12
-rw-r--r--test/std/localization/locale.categories/category.ctype/locale.codecvt/types_char.pass.cpp40
-rw-r--r--test/std/localization/locale.categories/category.ctype/locale.codecvt/types_char16_t.pass.cpp42
-rw-r--r--test/std/localization/locale.categories/category.ctype/locale.codecvt/types_char32_t.pass.cpp42
-rw-r--r--test/std/localization/locale.categories/category.ctype/locale.codecvt/types_wchar_t.pass.cpp40
-rw-r--r--test/std/localization/locale.categories/category.ctype/locale.ctype.byname/is_1.pass.cpp112
-rw-r--r--test/std/localization/locale.categories/category.ctype/locale.ctype.byname/is_many.pass.cpp247
-rw-r--r--test/std/localization/locale.categories/category.ctype/locale.ctype.byname/mask.pass.cpp53
-rw-r--r--test/std/localization/locale.categories/category.ctype/locale.ctype.byname/narrow_1.pass.cpp56
-rw-r--r--test/std/localization/locale.categories/category.ctype/locale.ctype.byname/narrow_many.pass.cpp64
-rw-r--r--test/std/localization/locale.categories/category.ctype/locale.ctype.byname/scan_is.pass.cpp71
-rw-r--r--test/std/localization/locale.categories/category.ctype/locale.ctype.byname/scan_not.pass.cpp71
-rw-r--r--test/std/localization/locale.categories/category.ctype/locale.ctype.byname/tolower_1.pass.cpp91
-rw-r--r--test/std/localization/locale.categories/category.ctype/locale.ctype.byname/tolower_many.pass.cpp96
-rw-r--r--test/std/localization/locale.categories/category.ctype/locale.ctype.byname/toupper_1.pass.cpp91
-rw-r--r--test/std/localization/locale.categories/category.ctype/locale.ctype.byname/toupper_many.pass.cpp96
-rw-r--r--test/std/localization/locale.categories/category.ctype/locale.ctype.byname/types.pass.cpp71
-rw-r--r--test/std/localization/locale.categories/category.ctype/locale.ctype.byname/widen_1.pass.cpp58
-rw-r--r--test/std/localization/locale.categories/category.ctype/locale.ctype.byname/widen_many.pass.cpp65
-rw-r--r--test/std/localization/locale.categories/category.ctype/locale.ctype/ctor.pass.cpp51
-rw-r--r--test/std/localization/locale.categories/category.ctype/locale.ctype/locale.ctype.members/is_1.pass.cpp59
-rw-r--r--test/std/localization/locale.categories/category.ctype/locale.ctype/locale.ctype.members/is_many.pass.cpp118
-rw-r--r--test/std/localization/locale.categories/category.ctype/locale.ctype/locale.ctype.members/narrow_1.pass.cpp33
-rw-r--r--test/std/localization/locale.categories/category.ctype/locale.ctype/locale.ctype.members/narrow_many.pass.cpp38
-rw-r--r--test/std/localization/locale.categories/category.ctype/locale.ctype/locale.ctype.members/scan_is.pass.cpp44
-rw-r--r--test/std/localization/locale.categories/category.ctype/locale.ctype/locale.ctype.members/scan_not.pass.cpp44
-rw-r--r--test/std/localization/locale.categories/category.ctype/locale.ctype/locale.ctype.members/tolower_1.pass.cpp33
-rw-r--r--test/std/localization/locale.categories/category.ctype/locale.ctype/locale.ctype.members/tolower_many.pass.cpp36
-rw-r--r--test/std/localization/locale.categories/category.ctype/locale.ctype/locale.ctype.members/toupper_1.pass.cpp33
-rw-r--r--test/std/localization/locale.categories/category.ctype/locale.ctype/locale.ctype.members/toupper_many.pass.cpp36
-rw-r--r--test/std/localization/locale.categories/category.ctype/locale.ctype/locale.ctype.members/widen_1.pass.cpp33
-rw-r--r--test/std/localization/locale.categories/category.ctype/locale.ctype/locale.ctype.members/widen_many.pass.cpp38
-rw-r--r--test/std/localization/locale.categories/category.ctype/locale.ctype/locale.ctype.virtuals/tested_elsewhere.pass.cpp12
-rw-r--r--test/std/localization/locale.categories/category.ctype/locale.ctype/types.pass.cpp38
-rw-r--r--test/std/localization/locale.categories/category.messages/locale.messages.byname/nothing_to_do.pass.cpp12
-rw-r--r--test/std/localization/locale.categories/category.messages/locale.messages/ctor.pass.cpp52
-rw-r--r--test/std/localization/locale.categories/category.messages/locale.messages/locale.messages.members/not_testable.pass.cpp34
-rw-r--r--test/std/localization/locale.categories/category.messages/locale.messages/locale.messages.virtuals/tested_elsewhere.pass.cpp12
-rw-r--r--test/std/localization/locale.categories/category.messages/locale.messages/messages_base.pass.cpp24
-rw-r--r--test/std/localization/locale.categories/category.messages/locale.messages/types.pass.cpp34
-rw-r--r--test/std/localization/locale.categories/category.messages/nothing_to_do.pass.cpp12
-rw-r--r--test/std/localization/locale.categories/category.monetary/locale.money.get/ctor.pass.cpp52
-rw-r--r--test/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_en_US.pass.cpp723
-rw-r--r--test/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_fr_FR.pass.cpp726
-rw-r--r--test/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_ru_RU.pass.cpp735
-rw-r--r--test/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_zh_CN.pass.cpp726
-rw-r--r--test/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_string_en_US.pass.cpp731
-rw-r--r--test/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.virtuals/tested_elsewhere.pass.cpp12
-rw-r--r--test/std/localization/locale.categories/category.monetary/locale.money.get/types.pass.cpp34
-rw-r--r--test/std/localization/locale.categories/category.monetary/locale.money.put/ctor.pass.cpp52
-rw-r--r--test/std/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_en_US.pass.cpp494
-rw-r--r--test/std/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_fr_FR.pass.cpp495
-rw-r--r--test/std/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_ru_RU.pass.cpp501
-rw-r--r--test/std/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_zh_CN.pass.cpp496
-rw-r--r--test/std/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_string_en_US.pass.cpp494
-rw-r--r--test/std/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.virtuals/tested_elsewhere.pass.cpp12
-rw-r--r--test/std/localization/locale.categories/category.monetary/locale.money.put/types.pass.cpp34
-rw-r--r--test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/curr_symbol.pass.cpp147
-rw-r--r--test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/decimal_point.pass.cpp148
-rw-r--r--test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/frac_digits.pass.cpp145
-rw-r--r--test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/grouping.pass.cpp150
-rw-r--r--test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/neg_format.pass.cpp227
-rw-r--r--test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/negative_sign.pass.cpp145
-rw-r--r--test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/pos_format.pass.cpp227
-rw-r--r--test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/positive_sign.pass.cpp145
-rw-r--r--test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/thousands_sep.pass.cpp151
-rw-r--r--test/std/localization/locale.categories/category.monetary/locale.moneypunct/ctor.pass.cpp52
-rw-r--r--test/std/localization/locale.categories/category.monetary/locale.moneypunct/locale.moneypunct.members/curr_symbol.pass.cpp75
-rw-r--r--test/std/localization/locale.categories/category.monetary/locale.moneypunct/locale.moneypunct.members/decimal_point.pass.cpp75
-rw-r--r--test/std/localization/locale.categories/category.monetary/locale.moneypunct/locale.moneypunct.members/frac_digits.pass.cpp75
-rw-r--r--test/std/localization/locale.categories/category.monetary/locale.moneypunct/locale.moneypunct.members/grouping.pass.cpp75
-rw-r--r--test/std/localization/locale.categories/category.monetary/locale.moneypunct/locale.moneypunct.members/neg_format.pass.cpp88
-rw-r--r--test/std/localization/locale.categories/category.monetary/locale.moneypunct/locale.moneypunct.members/negative_sign.pass.cpp76
-rw-r--r--test/std/localization/locale.categories/category.monetary/locale.moneypunct/locale.moneypunct.members/pos_format.pass.cpp88
-rw-r--r--test/std/localization/locale.categories/category.monetary/locale.moneypunct/locale.moneypunct.members/positive_sign.pass.cpp75
-rw-r--r--test/std/localization/locale.categories/category.monetary/locale.moneypunct/locale.moneypunct.members/thousands_sep.pass.cpp75
-rw-r--r--test/std/localization/locale.categories/category.monetary/locale.moneypunct/locale.moneypunct.virtuals/tested_elsewhere.pass.cpp12
-rw-r--r--test/std/localization/locale.categories/category.monetary/locale.moneypunct/money_base.pass.cpp33
-rw-r--r--test/std/localization/locale.categories/category.monetary/locale.moneypunct/types.pass.cpp48
-rw-r--r--test/std/localization/locale.categories/category.monetary/nothing_to_do.pass.cpp12
-rw-r--r--test/std/localization/locale.categories/category.numeric/locale.nm.put/ctor.pass.cpp52
-rw-r--r--test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_bool.pass.cpp100
-rw-r--r--test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_double.pass.cpp17887
-rw-r--r--test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_long.pass.cpp371
-rw-r--r--test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_long_double.pass.cpp26248
-rw-r--r--test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_long_long.pass.cpp344
-rw-r--r--test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_pointer.pass.cpp43
-rw-r--r--test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_unsigned_long.pass.cpp374
-rw-r--r--test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_unsigned_long_long.pass.cpp344
-rw-r--r--test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.virtuals/tested_elsewhere.pass.cpp12
-rw-r--r--test/std/localization/locale.categories/category.numeric/locale.nm.put/types.pass.cpp32
-rw-r--r--test/std/localization/locale.categories/category.numeric/locale.num.get/ctor.pass.cpp52
-rw-r--r--test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_bool.pass.cpp230
-rw-r--r--test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_double.pass.cpp256
-rw-r--r--test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_float.pass.cpp171
-rw-r--r--test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_long.pass.cpp519
-rw-r--r--test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_long_double.pass.cpp231
-rw-r--r--test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_long_long.pass.cpp105
-rw-r--r--test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_pointer.pass.cpp61
-rw-r--r--test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_unsigned_int.pass.cpp83
-rw-r--r--test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_unsigned_long.pass.cpp83
-rw-r--r--test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_unsigned_long_long.pass.cpp83
-rw-r--r--test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_unsigned_short.pass.cpp83
-rw-r--r--test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/test_min_max.pass.cpp62
-rw-r--r--test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.virtuals/tested_elsewhere.pass.cpp12
-rw-r--r--test/std/localization/locale.categories/category.numeric/locale.num.get/types.pass.cpp32
-rw-r--r--test/std/localization/locale.categories/category.numeric/nothing_to_do.pass.cpp12
-rw-r--r--test/std/localization/locale.categories/category.time/locale.time.get.byname/date_order.pass.cpp55
-rw-r--r--test/std/localization/locale.categories/category.time/locale.time.get.byname/date_order_wide.pass.cpp55
-rw-r--r--test/std/localization/locale.categories/category.time/locale.time.get.byname/get_date.pass.cpp99
-rw-r--r--test/std/localization/locale.categories/category.time/locale.time.get.byname/get_date_wide.pass.cpp98
-rw-r--r--test/std/localization/locale.categories/category.time/locale.time.get.byname/get_monthname.pass.cpp92
-rw-r--r--test/std/localization/locale.categories/category.time/locale.time.get.byname/get_monthname_wide.pass.cpp101
-rw-r--r--test/std/localization/locale.categories/category.time/locale.time.get.byname/get_one.pass.cpp168
-rw-r--r--test/std/localization/locale.categories/category.time/locale.time.get.byname/get_one_wide.pass.cpp170
-rw-r--r--test/std/localization/locale.categories/category.time/locale.time.get.byname/get_time.pass.cpp94
-rw-r--r--test/std/localization/locale.categories/category.time/locale.time.get.byname/get_time_wide.pass.cpp94
-rw-r--r--test/std/localization/locale.categories/category.time/locale.time.get.byname/get_weekday.pass.cpp91
-rw-r--r--test/std/localization/locale.categories/category.time/locale.time.get.byname/get_weekday_wide.pass.cpp89
-rw-r--r--test/std/localization/locale.categories/category.time/locale.time.get.byname/get_year.pass.cpp85
-rw-r--r--test/std/localization/locale.categories/category.time/locale.time.get.byname/get_year_wide.pass.cpp85
-rw-r--r--test/std/localization/locale.categories/category.time/locale.time.get/ctor.pass.cpp52
-rw-r--r--test/std/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/date_order.pass.cpp34
-rw-r--r--test/std/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_date.pass.cpp51
-rw-r--r--test/std/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_date_wide.pass.cpp51
-rw-r--r--test/std/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_many.pass.cpp68
-rw-r--r--test/std/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_monthname.pass.cpp265
-rw-r--r--test/std/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_monthname_wide.pass.cpp265
-rw-r--r--test/std/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_one.pass.cpp305
-rw-r--r--test/std/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_time.pass.cpp117
-rw-r--r--test/std/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_time_wide.pass.cpp117
-rw-r--r--test/std/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_weekday.pass.cpp220
-rw-r--r--test/std/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_weekday_wide.pass.cpp220
-rw-r--r--test/std/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_year.pass.cpp138
-rw-r--r--test/std/localization/locale.categories/category.time/locale.time.get/locale.time.get.virtuals/tested_elsewhere.pass.cpp12
-rw-r--r--test/std/localization/locale.categories/category.time/locale.time.get/time_base.pass.cpp29
-rw-r--r--test/std/localization/locale.categories/category.time/locale.time.get/types.pass.cpp41
-rw-r--r--test/std/localization/locale.categories/category.time/locale.time.put.byname/put1.pass.cpp78
-rw-r--r--test/std/localization/locale.categories/category.time/locale.time.put/ctor.pass.cpp52
-rw-r--r--test/std/localization/locale.categories/category.time/locale.time.put/locale.time.put.members/put1.pass.cpp61
-rw-r--r--test/std/localization/locale.categories/category.time/locale.time.put/locale.time.put.members/put2.pass.cpp332
-rw-r--r--test/std/localization/locale.categories/category.time/locale.time.put/locale.time.put.virtuals/tested_elsewhere.pass.cpp12
-rw-r--r--test/std/localization/locale.categories/category.time/locale.time.put/types.pass.cpp32
-rw-r--r--test/std/localization/locale.categories/category.time/nothing_to_do.pass.cpp12
-rw-r--r--test/std/localization/locale.categories/facet.numpunct/locale.numpunct.byname/decimal_point.pass.cpp65
-rw-r--r--test/std/localization/locale.categories/facet.numpunct/locale.numpunct.byname/grouping.pass.cpp68
-rw-r--r--test/std/localization/locale.categories/facet.numpunct/locale.numpunct.byname/thousands_sep.pass.cpp68
-rw-r--r--test/std/localization/locale.categories/facet.numpunct/locale.numpunct/ctor.pass.cpp66
-rw-r--r--test/std/localization/locale.categories/facet.numpunct/locale.numpunct/facet.numpunct.members/decimal_point.pass.cpp32
-rw-r--r--test/std/localization/locale.categories/facet.numpunct/locale.numpunct/facet.numpunct.members/falsename.pass.cpp32
-rw-r--r--test/std/localization/locale.categories/facet.numpunct/locale.numpunct/facet.numpunct.members/grouping.pass.cpp32
-rw-r--r--test/std/localization/locale.categories/facet.numpunct/locale.numpunct/facet.numpunct.members/thousands_sep.pass.cpp32
-rw-r--r--test/std/localization/locale.categories/facet.numpunct/locale.numpunct/facet.numpunct.members/truename.pass.cpp32
-rw-r--r--test/std/localization/locale.categories/facet.numpunct/locale.numpunct/facet.numpunct.virtuals/tested_elsewhere.pass.cpp12
-rw-r--r--test/std/localization/locale.categories/facet.numpunct/locale.numpunct/types.pass.cpp48
-rw-r--r--test/std/localization/locale.categories/facet.numpunct/nothing_to_do.pass.cpp12
-rw-r--r--test/std/localization/locale.categories/facets.examples/nothing_to_do.pass.cpp12
226 files changed, 66301 insertions, 0 deletions
diff --git a/test/std/localization/locale.categories/__scan_keyword.pass.cpp b/test/std/localization/locale.categories/__scan_keyword.pass.cpp
new file mode 100644
index 000000000000..b33aab9a730a
--- /dev/null
+++ b/test/std/localization/locale.categories/__scan_keyword.pass.cpp
@@ -0,0 +1,118 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// 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_sensitive 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 <class _InputIterator, class _ForwardIterator, class _Ctype>
+// _ForwardIterator
+// __scan_keyword(_InputIterator& __b, _InputIterator __e,
+// _ForwardIterator __kb, _ForwardIterator __ke,
+// const _Ctype& __ct, ios_base::iostate& __err,
+// bool __case_sensitive = true);
+
+#include <locale>
+#include <cassert>
+
+int main()
+{
+ const std::ctype<char>& ct = std::use_facet<std::ctype<char> >(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/std/localization/locale.categories/category.collate/locale.collate.byname/compare.pass.cpp b/test/std/localization/locale.categories/category.collate/locale.collate.byname/compare.pass.cpp
new file mode 100644
index 000000000000..69af9ac1b7bf
--- /dev/null
+++ b/test/std/localization/locale.categories/category.collate/locale.collate.byname/compare.pass.cpp
@@ -0,0 +1,87 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// template <class charT> 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.
+
+// TODO investigation needed.
+// Glibc seems to collate files differently from the way Apple's C library does
+// it.
+// XFAIL: linux-gnu
+
+#include <locale>
+#include <string>
+#include <cassert>
+
+#include <stdio.h>
+
+#include "platform_support.h" // locale name macros
+
+int main()
+{
+ {
+ std::locale l(LOCALE_en_US_UTF_8);
+ {
+ const std::collate<char>& f = std::use_facet<std::collate<char> >(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<wchar_t>& f = std::use_facet<std::collate<wchar_t> >(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<char>& f = std::use_facet<std::collate<char> >(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<wchar_t>& f = std::use_facet<std::collate<wchar_t> >(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<char>& f = std::use_facet<std::collate<char> >(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<wchar_t>& f = std::use_facet<std::collate<wchar_t> >(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/std/localization/locale.categories/category.collate/locale.collate.byname/hash.pass.cpp b/test/std/localization/locale.categories/category.collate/locale.collate.byname/hash.pass.cpp
new file mode 100644
index 000000000000..f8641cb1eb6c
--- /dev/null
+++ b/test/std/localization/locale.categories/category.collate/locale.collate.byname/hash.pass.cpp
@@ -0,0 +1,41 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// template <class charT> class collate_byname
+
+// long hash(const charT* low, const charT* high) const;
+
+// This test is not portable
+
+#include <locale>
+#include <string>
+#include <cassert>
+
+#include "platform_support.h" // locale name macros
+
+int main()
+{
+ std::locale l(LOCALE_en_US_UTF_8);
+ {
+ std::string x1("1234");
+ std::string x2("12345");
+ const std::collate<char>& f = std::use_facet<std::collate<char> >(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<wchar_t>& f = std::use_facet<std::collate<wchar_t> >(l);
+ assert(f.hash(x1.data(), x1.data() + x1.size())
+ != f.hash(x2.data(), x2.data() + x2.size()));
+ }
+}
diff --git a/test/std/localization/locale.categories/category.collate/locale.collate.byname/transform.pass.cpp b/test/std/localization/locale.categories/category.collate/locale.collate.byname/transform.pass.cpp
new file mode 100644
index 000000000000..897141235cf2
--- /dev/null
+++ b/test/std/localization/locale.categories/category.collate/locale.collate.byname/transform.pass.cpp
@@ -0,0 +1,69 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// template <class charT> class collate_byname
+
+// string_type transform(const charT* low, const charT* high) const;
+
+// REQUIRES: locale.en_US.UTF-8
+
+#include <locale>
+#include <string>
+#include <cassert>
+
+#include <stdio.h>
+
+#include "platform_support.h" // locale name macros
+
+int main()
+{
+ // Ensure that the default locale is not C. If it is, the second tests will fail.
+ putenv(const_cast<char*>("LANG=" LOCALE_en_US_UTF_8));
+ {
+ std::locale l(LOCALE_en_US_UTF_8);
+ {
+ std::string x("1234");
+ const std::collate<char>& f = std::use_facet<std::collate<char> >(l);
+ assert(f.transform(x.data(), x.data() + x.size()) != x);
+ }
+ {
+ std::wstring x(L"1234");
+ const std::collate<wchar_t>& f = std::use_facet<std::collate<wchar_t> >(l);
+ assert(f.transform(x.data(), x.data() + x.size()) != x);
+ }
+ }
+ {
+ std::locale l("");
+ {
+ std::string x("1234");
+ const std::collate<char>& f = std::use_facet<std::collate<char> >(l);
+ assert(f.transform(x.data(), x.data() + x.size()) != x);
+ }
+ {
+ std::wstring x(L"1234");
+ const std::collate<wchar_t>& f = std::use_facet<std::collate<wchar_t> >(l);
+ assert(f.transform(x.data(), x.data() + x.size()) != x);
+ }
+ }
+ {
+ std::locale l("C");
+ {
+ std::string x("1234");
+ const std::collate<char>& f = std::use_facet<std::collate<char> >(l);
+ assert(f.transform(x.data(), x.data() + x.size()) == x);
+ }
+ {
+ std::wstring x(L"1234");
+ const std::collate<wchar_t>& f = std::use_facet<std::collate<wchar_t> >(l);
+ assert(f.transform(x.data(), x.data() + x.size()) == x);
+ }
+ }
+}
diff --git a/test/std/localization/locale.categories/category.collate/locale.collate.byname/types.pass.cpp b/test/std/localization/locale.categories/category.collate/locale.collate.byname/types.pass.cpp
new file mode 100644
index 000000000000..04974b244e4e
--- /dev/null
+++ b/test/std/localization/locale.categories/category.collate/locale.collate.byname/types.pass.cpp
@@ -0,0 +1,45 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// template <class charT>
+// class collate_byname
+// : public collate<charT>
+// {
+// public:
+// typedef basic_string<charT> string_type;
+// explicit collate_byname(const char*, size_t refs = 0);
+// explicit collate_byname(const string&, size_t refs = 0);
+// protected:
+// ~collate_byname();
+// };
+
+#include <locale>
+#include <string>
+#include <cassert>
+
+#include <stdio.h>
+
+#include "platform_support.h" // locale name macros
+
+int main()
+{
+ std::locale l(LOCALE_en_US_UTF_8);
+ {
+ assert(std::has_facet<std::collate_byname<char> >(l));
+ assert(&std::use_facet<std::collate<char> >(l)
+ == &std::use_facet<std::collate_byname<char> >(l));
+ }
+ {
+ assert(std::has_facet<std::collate_byname<wchar_t> >(l));
+ assert(&std::use_facet<std::collate<wchar_t> >(l)
+ == &std::use_facet<std::collate_byname<wchar_t> >(l));
+ }
+}
diff --git a/test/std/localization/locale.categories/category.collate/locale.collate/ctor.pass.cpp b/test/std/localization/locale.categories/category.collate/locale.collate/ctor.pass.cpp
new file mode 100644
index 000000000000..8f7e2b5f8a82
--- /dev/null
+++ b/test/std/localization/locale.categories/category.collate/locale.collate/ctor.pass.cpp
@@ -0,0 +1,67 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// template <class charT> class collate;
+
+// explicit collate(size_t refs = 0);
+
+#include <locale>
+#include <type_traits>
+#include <cassert>
+
+template <class C>
+class my_facet
+ : public std::collate<C>
+{
+public:
+ static int count;
+
+ explicit my_facet(std::size_t refs = 0)
+ : std::collate<C>(refs) {++count;}
+
+ ~my_facet() {--count;}
+};
+
+template <class C> int my_facet<C>::count = 0;
+
+int main()
+{
+ {
+ std::locale l(std::locale::classic(), new my_facet<char>);
+ assert(my_facet<char>::count == 1);
+ }
+ assert(my_facet<char>::count == 0);
+ {
+ my_facet<char> f(1);
+ assert(my_facet<char>::count == 1);
+ {
+ std::locale l(std::locale::classic(), &f);
+ assert(my_facet<char>::count == 1);
+ }
+ assert(my_facet<char>::count == 1);
+ }
+ assert(my_facet<char>::count == 0);
+ {
+ std::locale l(std::locale::classic(), new my_facet<wchar_t>);
+ assert(my_facet<wchar_t>::count == 1);
+ }
+ assert(my_facet<wchar_t>::count == 0);
+ {
+ my_facet<wchar_t> f(1);
+ assert(my_facet<wchar_t>::count == 1);
+ {
+ std::locale l(std::locale::classic(), &f);
+ assert(my_facet<wchar_t>::count == 1);
+ }
+ assert(my_facet<wchar_t>::count == 1);
+ }
+ assert(my_facet<wchar_t>::count == 0);
+}
diff --git a/test/std/localization/locale.categories/category.collate/locale.collate/locale.collate.members/compare.pass.cpp b/test/std/localization/locale.categories/category.collate/locale.collate/locale.collate.members/compare.pass.cpp
new file mode 100644
index 000000000000..d2cf3a921b3b
--- /dev/null
+++ b/test/std/localization/locale.categories/category.collate/locale.collate/locale.collate.members/compare.pass.cpp
@@ -0,0 +1,49 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// template <class charT> class collate;
+
+// int compare(const charT* low1, const charT* high1,
+// const charT* low2, const charT* high2) const;
+
+#include <locale>
+#include <cassert>
+
+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<char>& f = std::use_facet<std::collate<char> >(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<wchar_t>& f = std::use_facet<std::collate<wchar_t> >(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/std/localization/locale.categories/category.collate/locale.collate/locale.collate.members/hash.pass.cpp b/test/std/localization/locale.categories/category.collate/locale.collate/locale.collate.members/hash.pass.cpp
new file mode 100644
index 000000000000..d8a9650e3be1
--- /dev/null
+++ b/test/std/localization/locale.categories/category.collate/locale.collate/locale.collate.members/hash.pass.cpp
@@ -0,0 +1,39 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// template <class charT> class collate;
+
+// long hash(const charT* low, const charT* high) const;
+
+// This test is not portable
+
+#include <locale>
+#include <string>
+#include <cassert>
+
+int main()
+{
+ std::locale l = std::locale::classic();
+ {
+ std::string x1("1234");
+ std::string x2("12345");
+ const std::collate<char>& f = std::use_facet<std::collate<char> >(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<wchar_t>& f = std::use_facet<std::collate<wchar_t> >(l);
+ assert(f.hash(x1.data(), x1.data() + x1.size())
+ != f.hash(x2.data(), x2.data() + x2.size()));
+ }
+}
diff --git a/test/std/localization/locale.categories/category.collate/locale.collate/locale.collate.members/transform.pass.cpp b/test/std/localization/locale.categories/category.collate/locale.collate/locale.collate.members/transform.pass.cpp
new file mode 100644
index 000000000000..e78a3c74cdcd
--- /dev/null
+++ b/test/std/localization/locale.categories/category.collate/locale.collate/locale.collate.members/transform.pass.cpp
@@ -0,0 +1,33 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// template <class charT> class collate;
+
+// string_type transform(const charT* low, const charT* high) const;
+
+#include <locale>
+#include <string>
+#include <cassert>
+
+int main()
+{
+ std::locale l = std::locale::classic();
+ {
+ std::string x("1234");
+ const std::collate<char>& f = std::use_facet<std::collate<char> >(l);
+ assert(f.transform(x.data(), x.data() + x.size()) == x);
+ }
+ {
+ std::wstring x(L"1234");
+ const std::collate<wchar_t>& f = std::use_facet<std::collate<wchar_t> >(l);
+ assert(f.transform(x.data(), x.data() + x.size()) == x);
+ }
+}
diff --git a/test/std/localization/locale.categories/category.collate/locale.collate/locale.collate.virtuals/tested_elsewhere.pass.cpp b/test/std/localization/locale.categories/category.collate/locale.collate/locale.collate.virtuals/tested_elsewhere.pass.cpp
new file mode 100644
index 000000000000..b58f5c55b643
--- /dev/null
+++ b/test/std/localization/locale.categories/category.collate/locale.collate/locale.collate.virtuals/tested_elsewhere.pass.cpp
@@ -0,0 +1,12 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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/std/localization/locale.categories/category.collate/locale.collate/types.pass.cpp b/test/std/localization/locale.categories/category.collate/locale.collate/types.pass.cpp
new file mode 100644
index 000000000000..13945f8ee7ce
--- /dev/null
+++ b/test/std/localization/locale.categories/category.collate/locale.collate/types.pass.cpp
@@ -0,0 +1,49 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// template <class charT>
+// class collate
+// : public locale::facet {
+// public:
+// typedef charT char_type;
+// typedef basic_string<charT>string_type;
+//
+// static locale::id id;
+// };
+
+#include <locale>
+#include <type_traits>
+#include <cassert>
+
+int main()
+{
+ std::locale l = std::locale::classic();
+ {
+ assert(std::has_facet<std::collate<char> >(l));
+ const std::collate<char>& f = std::use_facet<std::collate<char> >(l);
+ {
+ (void)std::collate<char>::id;
+ }
+ static_assert((std::is_same<std::collate<char>::char_type, char>::value), "");
+ static_assert((std::is_same<std::collate<char>::string_type, std::string>::value), "");
+ static_assert((std::is_base_of<std::locale::facet, std::collate<char> >::value), "");
+ }
+ {
+ assert(std::has_facet<std::collate<wchar_t> >(l));
+ const std::collate<wchar_t>& f = std::use_facet<std::collate<wchar_t> >(l);
+ {
+ (void)std::collate<wchar_t>::id;
+ }
+ static_assert((std::is_same<std::collate<wchar_t>::char_type, wchar_t>::value), "");
+ static_assert((std::is_same<std::collate<wchar_t>::string_type, std::wstring>::value), "");
+ static_assert((std::is_base_of<std::locale::facet, std::collate<wchar_t> >::value), "");
+ }
+}
diff --git a/test/std/localization/locale.categories/category.collate/nothing_to_do.pass.cpp b/test/std/localization/locale.categories/category.collate/nothing_to_do.pass.cpp
new file mode 100644
index 000000000000..b58f5c55b643
--- /dev/null
+++ b/test/std/localization/locale.categories/category.collate/nothing_to_do.pass.cpp
@@ -0,0 +1,12 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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/std/localization/locale.categories/category.ctype/ctype_base.pass.cpp b/test/std/localization/locale.categories/category.ctype/ctype_base.pass.cpp
new file mode 100644
index 000000000000..044ba2b976cb
--- /dev/null
+++ b/test/std/localization/locale.categories/category.ctype/ctype_base.pass.cpp
@@ -0,0 +1,78 @@
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+//
+// This test uses new symbols that were not defined in the libc++ shipped on
+// darwin11 and darwin12:
+// XFAIL: with_system_cxx_lib=x86_64-apple-darwin11
+// XFAIL: with_system_cxx_lib=x86_64-apple-darwin12
+
+// <locale>
+
+// 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 <locale>
+#include <cassert>
+
+template <class _Tp>
+void test(const _Tp &) {}
+
+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));
+
+ test(std::ctype_base::space);
+ test(std::ctype_base::print);
+ test(std::ctype_base::cntrl);
+ test(std::ctype_base::upper);
+ test(std::ctype_base::lower);
+ test(std::ctype_base::alpha);
+ test(std::ctype_base::digit);
+ test(std::ctype_base::punct);
+ test(std::ctype_base::xdigit);
+ test(std::ctype_base::blank);
+ test(std::ctype_base::alnum);
+ test(std::ctype_base::graph);
+}
diff --git a/test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.dtor/dtor.pass.cpp b/test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.dtor/dtor.pass.cpp
new file mode 100644
index 000000000000..9fcedddbd43b
--- /dev/null
+++ b/test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.dtor/dtor.pass.cpp
@@ -0,0 +1,40 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// template <> class ctype<char>
+
+// ~ctype();
+
+#include <locale>
+#include <cassert>
+
+#include "count_new.hpp"
+
+int main()
+{
+ {
+ std::locale l(std::locale::classic(), new std::ctype<char>);
+ assert(globalMemCounter.checkDeleteArrayCalledEq(0));
+ }
+ assert(globalMemCounter.checkDeleteArrayCalledEq(0));
+ {
+ std::ctype<char>::mask table[256];
+ std::locale l(std::locale::classic(), new std::ctype<char>(table));
+ assert(globalMemCounter.checkDeleteArrayCalledEq(0));
+ }
+ assert(globalMemCounter.checkDeleteArrayCalledEq(0));
+ {
+ std::locale l(std::locale::classic(),
+ new std::ctype<char>(new std::ctype<char>::mask[256], true));
+ assert(globalMemCounter.checkDeleteArrayCalledEq(0));
+ }
+ assert(globalMemCounter.checkDeleteArrayCalledEq(1));
+}
diff --git a/test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/ctor.pass.cpp b/test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/ctor.pass.cpp
new file mode 100644
index 000000000000..a1e15ba455f0
--- /dev/null
+++ b/test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/ctor.pass.cpp
@@ -0,0 +1,50 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// template <class charT> class ctype;
+
+// explicit ctype(const mask* tbl = 0, bool del = false, size_t refs = 0);
+
+#include <locale>
+#include <cassert>
+
+class my_facet
+ : public std::ctype<char>
+{
+public:
+ static int count;
+
+ explicit my_facet(const mask* tbl = 0, bool del = false, std::size_t refs = 0)
+ : std::ctype<char>(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/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/is_1.pass.cpp b/test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/is_1.pass.cpp
new file mode 100644
index 000000000000..945de76a7f5e
--- /dev/null
+++ b/test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/is_1.pass.cpp
@@ -0,0 +1,59 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// template <> class ctype<char>;
+
+// bool is(mask m, char c) const;
+
+#include <locale>
+#include <cassert>
+
+int main()
+{
+ std::locale l = std::locale::classic();
+ {
+ typedef std::ctype<char> F;
+ const F& f = std::use_facet<F>(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/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/is_many.pass.cpp b/test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/is_many.pass.cpp
new file mode 100644
index 000000000000..74a4906fdf66
--- /dev/null
+++ b/test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/is_many.pass.cpp
@@ -0,0 +1,118 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// template <> class ctype<char>;
+
+// const char* is(const char* low, const char* high, mask* vec) const;
+
+#include <locale>
+#include <string>
+#include <vector>
+#include <cassert>
+
+#include <stdio.h>
+
+int main()
+{
+ std::locale l = std::locale::classic();
+ {
+ typedef std::ctype<char> F;
+ const F& f = std::use_facet<F>(l);
+ const std::string in(" A\x07.a1");
+ std::vector<F::mask> 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/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/narrow_1.pass.cpp b/test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/narrow_1.pass.cpp
new file mode 100644
index 000000000000..dedf6a7d3221
--- /dev/null
+++ b/test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/narrow_1.pass.cpp
@@ -0,0 +1,33 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// template <> class ctype<char>;
+
+// char narrow(char c, char dfault) const;
+
+#include <locale>
+#include <cassert>
+
+int main()
+{
+ std::locale l = std::locale::classic();
+ {
+ typedef std::ctype<char> F;
+ const F& f = std::use_facet<F>(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/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/narrow_many.pass.cpp b/test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/narrow_many.pass.cpp
new file mode 100644
index 000000000000..4c5478afd605
--- /dev/null
+++ b/test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/narrow_many.pass.cpp
@@ -0,0 +1,38 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// template <> class ctype<char>;
+
+// const char* narrow(const char* low, const char*, char dfault, char* to) const;
+
+#include <locale>
+#include <string>
+#include <vector>
+#include <cassert>
+
+int main()
+{
+ std::locale l = std::locale::classic();
+ {
+ typedef std::ctype<char> F;
+ const F& f = std::use_facet<F>(l);
+ std::string in(" A\x07.a1");
+ std::vector<char> 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/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/scan_is.pass.cpp b/test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/scan_is.pass.cpp
new file mode 100644
index 000000000000..9777c9892096
--- /dev/null
+++ b/test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/scan_is.pass.cpp
@@ -0,0 +1,44 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// template <> class ctype<char>;
+
+// const char* scan_is(mask m, const char* low, const char* high) const;
+
+#include <locale>
+#include <string>
+#include <vector>
+#include <cassert>
+
+#include <stdio.h>
+
+int main()
+{
+ std::locale l = std::locale::classic();
+ {
+ typedef std::ctype<char> F;
+ const F& f = std::use_facet<F>(l);
+ const std::string in(" A\x07.a1");
+ std::vector<F::mask> 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/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/scan_not.pass.cpp b/test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/scan_not.pass.cpp
new file mode 100644
index 000000000000..b17662d0316a
--- /dev/null
+++ b/test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/scan_not.pass.cpp
@@ -0,0 +1,44 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// template <> class ctype<char>;
+
+// const char* scan_not(mask m, const char* low, const char* high) const;
+
+#include <locale>
+#include <string>
+#include <vector>
+#include <cassert>
+
+#include <stdio.h>
+
+int main()
+{
+ std::locale l = std::locale::classic();
+ {
+ typedef std::ctype<char> F;
+ const F& f = std::use_facet<F>(l);
+ const std::string in(" A\x07.a1");
+ std::vector<F::mask> 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/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/table.pass.cpp b/test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/table.pass.cpp
new file mode 100644
index 000000000000..f28f4f99b107
--- /dev/null
+++ b/test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/table.pass.cpp
@@ -0,0 +1,33 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// template <> class ctype<char>
+
+// const mask* table() const throw();
+
+#include <locale>
+#include <cassert>
+
+int main()
+{
+ typedef std::ctype<char> F;
+ {
+ std::locale l(std::locale::classic(), new std::ctype<char>);
+ const F& f = std::use_facet<F>(l);
+ assert(f.table() == f.classic_table());
+ }
+ {
+ std::ctype<char>::mask table[256];
+ std::locale l(std::locale::classic(), new std::ctype<char>(table));
+ const F& f = std::use_facet<F>(l);
+ assert(f.table() == table);
+ }
+}
diff --git a/test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/tolower_1.pass.cpp b/test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/tolower_1.pass.cpp
new file mode 100644
index 000000000000..1dfc95fe6b61
--- /dev/null
+++ b/test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/tolower_1.pass.cpp
@@ -0,0 +1,33 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// template <> class ctype<char>;
+
+// char tolower(char) const;
+
+#include <locale>
+#include <cassert>
+
+int main()
+{
+ std::locale l = std::locale::classic();
+ {
+ typedef std::ctype<char> F;
+ const F& f = std::use_facet<F>(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/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/tolower_many.pass.cpp b/test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/tolower_many.pass.cpp
new file mode 100644
index 000000000000..22b27370e85f
--- /dev/null
+++ b/test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/tolower_many.pass.cpp
@@ -0,0 +1,36 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// template <> class ctype<char>;
+
+// const char* tolower(char* low, const char* high) const;
+
+#include <locale>
+#include <string>
+#include <cassert>
+
+int main()
+{
+ std::locale l = std::locale::classic();
+ {
+ typedef std::ctype<char> F;
+ const F& f = std::use_facet<F>(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/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/toupper_1.pass.cpp b/test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/toupper_1.pass.cpp
new file mode 100644
index 000000000000..2a714b1d5515
--- /dev/null
+++ b/test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/toupper_1.pass.cpp
@@ -0,0 +1,33 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// template <> class ctype<char>;
+
+// char toupper(char) const;
+
+#include <locale>
+#include <cassert>
+
+int main()
+{
+ std::locale l = std::locale::classic();
+ {
+ typedef std::ctype<char> F;
+ const F& f = std::use_facet<F>(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/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/toupper_many.pass.cpp b/test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/toupper_many.pass.cpp
new file mode 100644
index 000000000000..8a842c8dfd62
--- /dev/null
+++ b/test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/toupper_many.pass.cpp
@@ -0,0 +1,36 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// template <> class ctype<char>;
+
+// const char* toupper(char* low, const char* high) const;
+
+#include <locale>
+#include <string>
+#include <cassert>
+
+int main()
+{
+ std::locale l = std::locale::classic();
+ {
+ typedef std::ctype<char> F;
+ const F& f = std::use_facet<F>(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/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/widen_1.pass.cpp b/test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/widen_1.pass.cpp
new file mode 100644
index 000000000000..5a65a561a91d
--- /dev/null
+++ b/test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/widen_1.pass.cpp
@@ -0,0 +1,33 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// template <> class ctype<char>;
+
+// char widen(char c) const;
+
+#include <locale>
+#include <cassert>
+
+int main()
+{
+ std::locale l = std::locale::classic();
+ {
+ typedef std::ctype<char> F;
+ const F& f = std::use_facet<F>(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/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/widen_many.pass.cpp b/test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/widen_many.pass.cpp
new file mode 100644
index 000000000000..c86cc55ce180
--- /dev/null
+++ b/test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.members/widen_many.pass.cpp
@@ -0,0 +1,38 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// template <> class ctype<char>;
+
+// const char* widen(const char* low, const char* high, char* to) const;
+
+#include <locale>
+#include <string>
+#include <vector>
+#include <cassert>
+
+int main()
+{
+ std::locale l = std::locale::classic();
+ {
+ typedef std::ctype<char> F;
+ const F& f = std::use_facet<F>(l);
+ std::string in(" A\x07.a1");
+ std::vector<char> 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/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.statics/classic_table.pass.cpp b/test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.statics/classic_table.pass.cpp
new file mode 100644
index 000000000000..b5690e3c6b26
--- /dev/null
+++ b/test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.statics/classic_table.pass.cpp
@@ -0,0 +1,59 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// template <> class ctype<char>
+
+// static const mask* classic_table() throw();
+
+#include <locale>
+#include <cassert>
+
+int main()
+{
+ typedef std::ctype<char> F;
+ assert(F::classic_table() != 0);
+ assert(F::table_size >= 256);
+
+ typedef F::mask mask;
+ const mask *p = F::classic_table();
+ const mask defined = F::space | F::print | F::cntrl | F::upper | F::lower
+ | F::alpha | F::digit | F::punct | F::xdigit | F::blank;
+
+ for ( size_t i = 0; i < 128; ++i ) // values above 128 are not consistent
+ {
+ mask set = 0;
+
+ if ( i < 32 || i > 126 ) set |= F::cntrl;
+ if ( i >= 32 && i <= 126 ) set |= F::print;
+
+ if (( i >= 9 && i <= 13) || i == 32 ) set |= F::space;
+ if ( i == 9 || i == 32 ) set |= F::blank;
+
+ if ( i >= 'A' && i <= 'Z' ) set |= F::alpha;
+ if ( i >= 'a' && i <= 'z' ) set |= F::alpha;
+ if ( i >= 'A' && i <= 'Z' ) set |= F::upper;
+ if ( i >= 'a' && i <= 'z' ) set |= F::lower;
+
+ if ( i >= '0' && i <= '9' ) set |= F::digit;
+ if ( i >= '0' && i <= '9' ) set |= F::xdigit;
+ if ( i >= 'A' && i <= 'F' ) set |= F::xdigit;
+ if ( i >= 'a' && i <= 'f' ) set |= F::xdigit;
+
+ if ( i >= 33 && i <= 47 ) set |= F::punct; // ' ' .. '/'
+ if ( i >= 58 && i <= 64 ) set |= F::punct; // ':' .. '@'
+ if ( i >= 91 && i <= 96 ) set |= F::punct; // '[' .. '`'
+ if ( i >= 123 && i <= 126 ) set |= F::punct; // '{' .. '~' }
+
+ assert(( p[i] & set) == set); // all the right bits set
+ assert(((p[i] & ~set) & defined) == 0); // no extra ones
+ }
+
+}
diff --git a/test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.virtuals/tested_elsewhere.pass.cpp b/test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.virtuals/tested_elsewhere.pass.cpp
new file mode 100644
index 000000000000..b58f5c55b643
--- /dev/null
+++ b/test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.virtuals/tested_elsewhere.pass.cpp
@@ -0,0 +1,12 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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/std/localization/locale.categories/category.ctype/facet.ctype.special/types.pass.cpp b/test/std/localization/locale.categories/category.ctype/facet.ctype.special/types.pass.cpp
new file mode 100644
index 000000000000..f58ec30ef061
--- /dev/null
+++ b/test/std/localization/locale.categories/category.ctype/facet.ctype.special/types.pass.cpp
@@ -0,0 +1,38 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// template <>
+// class ctype<char>
+// : public locale::facet,
+// public ctype_base
+// {
+// public:
+// typedef char char_type;
+// };
+
+#include <locale>
+#include <type_traits>
+#include <cassert>
+
+int main()
+{
+ std::locale l = std::locale::classic();
+ {
+ assert(std::has_facet<std::ctype<char> >(l));
+ const std::ctype<char>& f = std::use_facet<std::ctype<char> >(l);
+ {
+ (void)std::ctype<char>::id;
+ }
+ static_assert((std::is_same<std::ctype<char>::char_type, char>::value), "");
+ static_assert((std::is_base_of<std::ctype_base, std::ctype<char> >::value), "");
+ static_assert((std::is_base_of<std::locale::facet, std::ctype<char> >::value), "");
+ }
+}
diff --git a/test/std/localization/locale.categories/category.ctype/locale.codecvt.byname/ctor_char.pass.cpp b/test/std/localization/locale.categories/category.ctype/locale.codecvt.byname/ctor_char.pass.cpp
new file mode 100644
index 000000000000..349577835ec6
--- /dev/null
+++ b/test/std/localization/locale.categories/category.ctype/locale.codecvt.byname/ctor_char.pass.cpp
@@ -0,0 +1,70 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// template <> class codecvt_byname<char, char, mbstate_t>
+
+// explicit codecvt_byname(const char* nm, size_t refs = 0);
+// explicit codecvt_byname(const string& nm, size_t refs = 0);
+
+#include <locale>
+#include <cassert>
+
+typedef std::codecvt_byname<char, char, std::mbstate_t> 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/std/localization/locale.categories/category.ctype/locale.codecvt.byname/ctor_char16_t.pass.cpp b/test/std/localization/locale.categories/category.ctype/locale.codecvt.byname/ctor_char16_t.pass.cpp
new file mode 100644
index 000000000000..0559896ba3fc
--- /dev/null
+++ b/test/std/localization/locale.categories/category.ctype/locale.codecvt.byname/ctor_char16_t.pass.cpp
@@ -0,0 +1,70 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// template <> class codecvt_byname<char16_t, char, mbstate_t>
+
+// explicit codecvt_byname(const char* nm, size_t refs = 0);
+// explicit codecvt_byname(const string& nm, size_t refs = 0);
+
+#include <locale>
+#include <cassert>
+
+typedef std::codecvt_byname<char16_t, char, std::mbstate_t> 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/std/localization/locale.categories/category.ctype/locale.codecvt.byname/ctor_char32_t.pass.cpp b/test/std/localization/locale.categories/category.ctype/locale.codecvt.byname/ctor_char32_t.pass.cpp
new file mode 100644
index 000000000000..8eda52defafe
--- /dev/null
+++ b/test/std/localization/locale.categories/category.ctype/locale.codecvt.byname/ctor_char32_t.pass.cpp
@@ -0,0 +1,70 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// template <> class codecvt_byname<char32_t, char, mbstate_t>
+
+// explicit codecvt_byname(const char* nm, size_t refs = 0);
+// explicit codecvt_byname(const string& nm, size_t refs = 0);
+
+#include <locale>
+#include <cassert>
+
+typedef std::codecvt_byname<char32_t, char, std::mbstate_t> 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/std/localization/locale.categories/category.ctype/locale.codecvt.byname/ctor_wchar_t.pass.cpp b/test/std/localization/locale.categories/category.ctype/locale.codecvt.byname/ctor_wchar_t.pass.cpp
new file mode 100644
index 000000000000..bc55f009e0a8
--- /dev/null
+++ b/test/std/localization/locale.categories/category.ctype/locale.codecvt.byname/ctor_wchar_t.pass.cpp
@@ -0,0 +1,72 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// template <> class codecvt_byname<wchar_t, char, mbstate_t>
+
+// explicit codecvt_byname(const char* nm, size_t refs = 0);
+// explicit codecvt_byname(const string& nm, size_t refs = 0);
+
+#include <locale>
+#include <cassert>
+
+#include "platform_support.h" // locale name macros
+
+typedef std::codecvt_byname<wchar_t, char, std::mbstate_t> 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(LOCALE_en_US_UTF_8));
+ assert(my_facet::count == 1);
+ }
+ assert(my_facet::count == 0);
+ {
+ my_facet f(LOCALE_en_US_UTF_8, 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(LOCALE_en_US_UTF_8)));
+ assert(my_facet::count == 1);
+ }
+ assert(my_facet::count == 0);
+ {
+ my_facet f(std::string(LOCALE_en_US_UTF_8), 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/std/localization/locale.categories/category.ctype/locale.codecvt/codecvt_base.pass.cpp b/test/std/localization/locale.categories/category.ctype/locale.codecvt/codecvt_base.pass.cpp
new file mode 100644
index 000000000000..a2973b7f371c
--- /dev/null
+++ b/test/std/localization/locale.categories/category.ctype/locale.codecvt/codecvt_base.pass.cpp
@@ -0,0 +1,27 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// class codecvt_base
+// {
+// public:
+// enum result {ok, partial, error, noconv};
+// };
+
+#include <locale>
+#include <cassert>
+
+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/std/localization/locale.categories/category.ctype/locale.codecvt/ctor_char.pass.cpp b/test/std/localization/locale.categories/category.ctype/locale.codecvt/ctor_char.pass.cpp
new file mode 100644
index 000000000000..121a815bfc09
--- /dev/null
+++ b/test/std/localization/locale.categories/category.ctype/locale.codecvt/ctor_char.pass.cpp
@@ -0,0 +1,52 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// template <> class codecvt<char, char, mbstate_t>
+
+// explicit codecvt(size_t refs = 0);
+
+#include <locale>
+#include <cassert>
+
+typedef std::codecvt<char, char, std::mbstate_t> 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/std/localization/locale.categories/category.ctype/locale.codecvt/ctor_char16_t.pass.cpp b/test/std/localization/locale.categories/category.ctype/locale.codecvt/ctor_char16_t.pass.cpp
new file mode 100644
index 000000000000..5a6cdee9fafd
--- /dev/null
+++ b/test/std/localization/locale.categories/category.ctype/locale.codecvt/ctor_char16_t.pass.cpp
@@ -0,0 +1,58 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// template <> class codecvt<char16_t, char, mbstate_t>
+
+// explicit codecvt(size_t refs = 0);
+
+#include <locale>
+#include <cassert>
+
+//#ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
+
+typedef std::codecvt<char16_t, char, std::mbstate_t> 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/std/localization/locale.categories/category.ctype/locale.codecvt/ctor_char32_t.pass.cpp b/test/std/localization/locale.categories/category.ctype/locale.codecvt/ctor_char32_t.pass.cpp
new file mode 100644
index 000000000000..fae0d7bb2242
--- /dev/null
+++ b/test/std/localization/locale.categories/category.ctype/locale.codecvt/ctor_char32_t.pass.cpp
@@ -0,0 +1,58 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// template <> class codecvt<char32_t, char, mbstate_t>
+
+// explicit codecvt(size_t refs = 0);
+
+#include <locale>
+#include <cassert>
+
+//#ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
+
+typedef std::codecvt<char32_t, char, std::mbstate_t> 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/std/localization/locale.categories/category.ctype/locale.codecvt/ctor_wchar_t.pass.cpp b/test/std/localization/locale.categories/category.ctype/locale.codecvt/ctor_wchar_t.pass.cpp
new file mode 100644
index 000000000000..4cd84f243469
--- /dev/null
+++ b/test/std/localization/locale.categories/category.ctype/locale.codecvt/ctor_wchar_t.pass.cpp
@@ -0,0 +1,52 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// template <> class codecvt<wchar_t, char, mbstate_t>
+
+// explicit codecvt(size_t refs = 0);
+
+#include <locale>
+#include <cassert>
+
+typedef std::codecvt<wchar_t, char, std::mbstate_t> 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/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char16_t_always_noconv.pass.cpp b/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char16_t_always_noconv.pass.cpp
new file mode 100644
index 000000000000..4a0f94f98836
--- /dev/null
+++ b/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char16_t_always_noconv.pass.cpp
@@ -0,0 +1,26 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// template <> class codecvt<char16_t, char, mbstate_t>
+
+// bool always_noconv() const throw();
+
+#include <locale>
+#include <cassert>
+
+typedef std::codecvt<char16_t, char, std::mbstate_t> F;
+
+int main()
+{
+ std::locale l = std::locale::classic();
+ const F& f = std::use_facet<F>(l);
+ assert(!f.always_noconv());
+}
diff --git a/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char16_t_encoding.pass.cpp b/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char16_t_encoding.pass.cpp
new file mode 100644
index 000000000000..d2a6ae3955e0
--- /dev/null
+++ b/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char16_t_encoding.pass.cpp
@@ -0,0 +1,26 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// template <> class codecvt<char16_t, char, mbstate_t>
+
+// int encoding() const throw();
+
+#include <locale>
+#include <cassert>
+
+typedef std::codecvt<char16_t, char, std::mbstate_t> F;
+
+int main()
+{
+ std::locale l = std::locale::classic();
+ const F& f = std::use_facet<F>(l);
+ assert(f.encoding() == 0);
+}
diff --git a/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char16_t_in.pass.cpp b/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char16_t_in.pass.cpp
new file mode 100644
index 000000000000..331f4ba222dd
--- /dev/null
+++ b/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char16_t_in.pass.cpp
@@ -0,0 +1,40 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// template <> class codecvt<char16_t, char, mbstate_t>
+
+// 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 <locale>
+#include <string>
+#include <vector>
+#include <cassert>
+
+typedef std::codecvt<char16_t, char, std::mbstate_t> 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<F>(l);
+ std::mbstate_t mbs = {0};
+ 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/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char16_t_length.pass.cpp b/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char16_t_length.pass.cpp
new file mode 100644
index 000000000000..34ab2178327e
--- /dev/null
+++ b/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char16_t_length.pass.cpp
@@ -0,0 +1,32 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// template <> class codecvt<char16_t, char, mbstate_t>
+
+// int length(stateT& state, const externT* from, const externT* from_end, size_t max) const;
+
+#include <locale>
+#include <cassert>
+
+typedef std::codecvt<char16_t, char, std::mbstate_t> F;
+
+int main()
+{
+ std::locale l = std::locale::classic();
+ const F& f = std::use_facet<F>(l);
+ std::mbstate_t mbs = {0};
+ 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/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char16_t_max_length.pass.cpp b/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char16_t_max_length.pass.cpp
new file mode 100644
index 000000000000..8abe10b82583
--- /dev/null
+++ b/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char16_t_max_length.pass.cpp
@@ -0,0 +1,26 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// template <> class codecvt<char16_t, char, mbstate_t>
+
+// int max_length() const throw();
+
+#include <locale>
+#include <cassert>
+
+typedef std::codecvt<char16_t, char, std::mbstate_t> F;
+
+int main()
+{
+ std::locale l = std::locale::classic();
+ const F& f = std::use_facet<F>(l);
+ assert(f.max_length() == 4);
+}
diff --git a/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char16_t_out.pass.cpp b/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char16_t_out.pass.cpp
new file mode 100644
index 000000000000..0f65f13242c2
--- /dev/null
+++ b/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char16_t_out.pass.cpp
@@ -0,0 +1,45 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// template <> class codecvt<char16_t, char, mbstate_t>
+
+// 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 <locale>
+#include <string>
+#include <vector>
+#include <cassert>
+
+#include <stdio.h>
+
+typedef std::codecvt<char16_t, char, std::mbstate_t> F;
+
+int main()
+{
+ std::locale l = std::locale::classic();
+ const F& f = std::use_facet<F>(l);
+ {
+ F::intern_type from[9] = {'s', 'o', 'm', 'e', ' ', 't', 'e', 'x', 't'};
+ char to[9] = {0};
+ std::mbstate_t mbs = {0};
+ 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/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char16_t_unshift.pass.cpp b/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char16_t_unshift.pass.cpp
new file mode 100644
index 000000000000..c21303070717
--- /dev/null
+++ b/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char16_t_unshift.pass.cpp
@@ -0,0 +1,33 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// template <> class codecvt<char16_t, char, mbstate_t>
+
+// result unshift(stateT& state,
+// externT* to, externT* to_end, externT*& to_next) const;
+
+#include <locale>
+#include <string>
+#include <vector>
+#include <cassert>
+
+typedef std::codecvt<char16_t, char, std::mbstate_t> F;
+
+int main()
+{
+ std::locale l = std::locale::classic();
+ std::vector<char> to(3);
+ const F& f = std::use_facet<F>(l);
+ std::mbstate_t mbs = {0};
+ 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/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char32_t_always_noconv.pass.cpp b/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char32_t_always_noconv.pass.cpp
new file mode 100644
index 000000000000..2270a308f54f
--- /dev/null
+++ b/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char32_t_always_noconv.pass.cpp
@@ -0,0 +1,26 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// template <> class codecvt<char32_t, char, mbstate_t>
+
+// bool always_noconv() const throw();
+
+#include <locale>
+#include <cassert>
+
+typedef std::codecvt<char32_t, char, std::mbstate_t> F;
+
+int main()
+{
+ std::locale l = std::locale::classic();
+ const F& f = std::use_facet<F>(l);
+ assert(!f.always_noconv());
+}
diff --git a/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char32_t_encoding.pass.cpp b/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char32_t_encoding.pass.cpp
new file mode 100644
index 000000000000..175470a67c58
--- /dev/null
+++ b/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char32_t_encoding.pass.cpp
@@ -0,0 +1,26 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// template <> class codecvt<char32_t, char, mbstate_t>
+
+// int encoding() const throw();
+
+#include <locale>
+#include <cassert>
+
+typedef std::codecvt<char32_t, char, std::mbstate_t> F;
+
+int main()
+{
+ std::locale l = std::locale::classic();
+ const F& f = std::use_facet<F>(l);
+ assert(f.encoding() == 0);
+}
diff --git a/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char32_t_in.pass.cpp b/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char32_t_in.pass.cpp
new file mode 100644
index 000000000000..8fb28f0a26ac
--- /dev/null
+++ b/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char32_t_in.pass.cpp
@@ -0,0 +1,40 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// template <> class codecvt<char32_t, char, mbstate_t>
+
+// 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 <locale>
+#include <string>
+#include <vector>
+#include <cassert>
+
+typedef std::codecvt<char32_t, char, std::mbstate_t> 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<F>(l);
+ std::mbstate_t mbs = {0};
+ 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/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char32_t_length.pass.cpp b/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char32_t_length.pass.cpp
new file mode 100644
index 000000000000..d8555d188566
--- /dev/null
+++ b/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char32_t_length.pass.cpp
@@ -0,0 +1,32 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// template <> class codecvt<char32_t, char, mbstate_t>
+
+// int length(stateT& state, const externT* from, const externT* from_end, size_t max) const;
+
+#include <locale>
+#include <cassert>
+
+typedef std::codecvt<char32_t, char, std::mbstate_t> F;
+
+int main()
+{
+ std::locale l = std::locale::classic();
+ const F& f = std::use_facet<F>(l);
+ std::mbstate_t mbs = {0};
+ 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/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char32_t_max_length.pass.cpp b/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char32_t_max_length.pass.cpp
new file mode 100644
index 000000000000..62b4919c5cfc
--- /dev/null
+++ b/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char32_t_max_length.pass.cpp
@@ -0,0 +1,26 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// template <> class codecvt<char32_t, char, mbstate_t>
+
+// int max_length() const throw();
+
+#include <locale>
+#include <cassert>
+
+typedef std::codecvt<char32_t, char, std::mbstate_t> F;
+
+int main()
+{
+ std::locale l = std::locale::classic();
+ const F& f = std::use_facet<F>(l);
+ assert(f.max_length() == 4);
+}
diff --git a/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char32_t_out.pass.cpp b/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char32_t_out.pass.cpp
new file mode 100644
index 000000000000..a1d11f748d9f
--- /dev/null
+++ b/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char32_t_out.pass.cpp
@@ -0,0 +1,45 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// template <> class codecvt<char32_t, char, mbstate_t>
+
+// 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 <locale>
+#include <string>
+#include <vector>
+#include <cassert>
+
+#include <stdio.h>
+
+typedef std::codecvt<char32_t, char, std::mbstate_t> F;
+
+int main()
+{
+ std::locale l = std::locale::classic();
+ const F& f = std::use_facet<F>(l);
+ {
+ F::intern_type from[9] = {'s', 'o', 'm', 'e', ' ', 't', 'e', 'x', 't'};
+ char to[9] = {0};
+ std::mbstate_t mbs = {0};
+ 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/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char32_t_unshift.pass.cpp b/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char32_t_unshift.pass.cpp
new file mode 100644
index 000000000000..1bd45e0370d9
--- /dev/null
+++ b/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char32_t_unshift.pass.cpp
@@ -0,0 +1,33 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// template <> class codecvt<char32_t, char, mbstate_t>
+
+// result unshift(stateT& state,
+// externT* to, externT* to_end, externT*& to_next) const;
+
+#include <locale>
+#include <string>
+#include <vector>
+#include <cassert>
+
+typedef std::codecvt<char32_t, char, std::mbstate_t> F;
+
+int main()
+{
+ std::locale l = std::locale::classic();
+ std::vector<char> to(3);
+ const F& f = std::use_facet<F>(l);
+ std::mbstate_t mbs = {0};
+ 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/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char_always_noconv.pass.cpp b/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char_always_noconv.pass.cpp
new file mode 100644
index 000000000000..71640490eadc
--- /dev/null
+++ b/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char_always_noconv.pass.cpp
@@ -0,0 +1,26 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// template <> class codecvt<char, char, mbstate_t>
+
+// bool always_noconv() const throw();
+
+#include <locale>
+#include <cassert>
+
+typedef std::codecvt<char, char, std::mbstate_t> F;
+
+int main()
+{
+ std::locale l = std::locale::classic();
+ const F& f = std::use_facet<F>(l);
+ assert(f.always_noconv());
+}
diff --git a/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char_encoding.pass.cpp b/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char_encoding.pass.cpp
new file mode 100644
index 000000000000..79bc2bfa5e3b
--- /dev/null
+++ b/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char_encoding.pass.cpp
@@ -0,0 +1,26 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// template <> class codecvt<char, char, mbstate_t>
+
+// int encoding() const throw();
+
+#include <locale>
+#include <cassert>
+
+typedef std::codecvt<char, char, std::mbstate_t> F;
+
+int main()
+{
+ std::locale l = std::locale::classic();
+ const F& f = std::use_facet<F>(l);
+ assert(f.encoding() == 1);
+}
diff --git a/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char_in.pass.cpp b/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char_in.pass.cpp
new file mode 100644
index 000000000000..4d2f6f260dfc
--- /dev/null
+++ b/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char_in.pass.cpp
@@ -0,0 +1,38 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// template <> class codecvt<char, char, mbstate_t>
+
+// 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 <locale>
+#include <string>
+#include <vector>
+#include <cassert>
+
+typedef std::codecvt<char, char, std::mbstate_t> F;
+
+int main()
+{
+ std::locale l = std::locale::classic();
+ const std::basic_string<F::intern_type> from("some text");
+ std::vector<char> to(from.size());
+ const F& f = std::use_facet<F>(l);
+ std::mbstate_t mbs = {0};
+ 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/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char_length.pass.cpp b/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char_length.pass.cpp
new file mode 100644
index 000000000000..df33b182a07a
--- /dev/null
+++ b/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char_length.pass.cpp
@@ -0,0 +1,32 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// template <> class codecvt<char, char, mbstate_t>
+
+// int length(stateT& state, const externT* from, const externT* from_end, size_t max) const;
+
+#include <locale>
+#include <cassert>
+
+typedef std::codecvt<char, char, std::mbstate_t> F;
+
+int main()
+{
+ std::locale l = std::locale::classic();
+ const F& f = std::use_facet<F>(l);
+ std::mbstate_t mbs = {0};
+ 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/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char_max_length.pass.cpp b/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char_max_length.pass.cpp
new file mode 100644
index 000000000000..626c65244570
--- /dev/null
+++ b/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char_max_length.pass.cpp
@@ -0,0 +1,26 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// template <> class codecvt<char, char, mbstate_t>
+
+// int max_length() const throw();
+
+#include <locale>
+#include <cassert>
+
+typedef std::codecvt<char, char, std::mbstate_t> F;
+
+int main()
+{
+ std::locale l = std::locale::classic();
+ const F& f = std::use_facet<F>(l);
+ assert(f.max_length() == 1);
+}
diff --git a/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char_out.pass.cpp b/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char_out.pass.cpp
new file mode 100644
index 000000000000..de7f024fd467
--- /dev/null
+++ b/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char_out.pass.cpp
@@ -0,0 +1,38 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// template <> class codecvt<char, char, mbstate_t>
+
+// 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 <locale>
+#include <string>
+#include <vector>
+#include <cassert>
+
+typedef std::codecvt<char, char, std::mbstate_t> F;
+
+int main()
+{
+ std::locale l = std::locale::classic();
+ const std::basic_string<F::intern_type> from("some text");
+ std::vector<char> to(from.size());
+ const F& f = std::use_facet<F>(l);
+ std::mbstate_t mbs = {0};
+ 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/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char_unshift.pass.cpp b/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char_unshift.pass.cpp
new file mode 100644
index 000000000000..830bc43e9ead
--- /dev/null
+++ b/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char_unshift.pass.cpp
@@ -0,0 +1,33 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// template <> class codecvt<char, char, mbstate_t>
+
+// result unshift(stateT& state,
+// externT* to, externT* to_end, externT*& to_next) const;
+
+#include <locale>
+#include <string>
+#include <vector>
+#include <cassert>
+
+typedef std::codecvt<char, char, std::mbstate_t> F;
+
+int main()
+{
+ std::locale l = std::locale::classic();
+ std::vector<char> to(3);
+ const F& f = std::use_facet<F>(l);
+ std::mbstate_t mbs = {0};
+ 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/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/utf_sanity_check.pass.cpp b/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/utf_sanity_check.pass.cpp
new file mode 100644
index 000000000000..2505582c2613
--- /dev/null
+++ b/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/utf_sanity_check.pass.cpp
@@ -0,0 +1,127 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// template <> class codecvt<char32_t, char, mbstate_t>
+// template <> class codecvt<char16_t, char, mbstate_t>
+// template <> class codecvt<char32_t, char16_t, mbstate_t> // extension
+
+// sanity check
+
+#include <locale>
+#include <codecvt>
+#include <cassert>
+
+#include <stdio.h>
+
+int main()
+{
+ typedef std::codecvt<char32_t, char, std::mbstate_t> F32_8;
+ typedef std::codecvt<char16_t, char, std::mbstate_t> F16_8;
+ typedef std::codecvt_utf16<char32_t> F32_16;
+ std::locale l = std::locale(std::locale::classic(), new F32_16);
+ const F32_8& f32_8 = std::use_facet<F32_8>(std::locale::classic());
+ const F32_16& f32_16 = std::use_facet<F32_16>(l);
+ const F16_8& f16_8 = std::use_facet<F16_8>(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<char>(c16[i] >> 8);
+ c16c[2*i+1] = static_cast<char>(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/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/wchar_t_always_noconv.pass.cpp b/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/wchar_t_always_noconv.pass.cpp
new file mode 100644
index 000000000000..258998ff4eb3
--- /dev/null
+++ b/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/wchar_t_always_noconv.pass.cpp
@@ -0,0 +1,26 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// template <> class codecvt<wchar_t, char, mbstate_t>
+
+// bool always_noconv() const throw();
+
+#include <locale>
+#include <cassert>
+
+typedef std::codecvt<wchar_t, char, std::mbstate_t> F;
+
+int main()
+{
+ std::locale l = std::locale::classic();
+ const F& f = std::use_facet<F>(l);
+ assert(!f.always_noconv());
+}
diff --git a/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/wchar_t_encoding.pass.cpp b/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/wchar_t_encoding.pass.cpp
new file mode 100644
index 000000000000..b7604f33d630
--- /dev/null
+++ b/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/wchar_t_encoding.pass.cpp
@@ -0,0 +1,26 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// template <> class codecvt<wchar_t, char, mbstate_t>
+
+// int encoding() const throw();
+
+#include <locale>
+#include <cassert>
+
+typedef std::codecvt<wchar_t, char, std::mbstate_t> F;
+
+int main()
+{
+ std::locale l = std::locale::classic();
+ const F& f = std::use_facet<F>(l);
+ assert(f.encoding() == 1);
+}
diff --git a/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/wchar_t_in.pass.cpp b/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/wchar_t_in.pass.cpp
new file mode 100644
index 000000000000..e98097ba889c
--- /dev/null
+++ b/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/wchar_t_in.pass.cpp
@@ -0,0 +1,42 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// template <> class codecvt<wchar_t, char, mbstate_t>
+
+// 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 <locale>
+#include <string>
+#include <vector>
+#include <cassert>
+
+typedef std::codecvt<wchar_t, char, std::mbstate_t> F;
+
+int main()
+{
+ std::locale l = std::locale::classic();
+ const std::basic_string<F::extern_type> from("some text");
+ const std::basic_string<F::intern_type> expected(from.begin(), from.end());
+ std::basic_string<F::intern_type> to(from.size(), F::intern_type());
+ const F& f = std::use_facet<F>(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/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/wchar_t_length.pass.cpp b/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/wchar_t_length.pass.cpp
new file mode 100644
index 000000000000..f97f2b4a324d
--- /dev/null
+++ b/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/wchar_t_length.pass.cpp
@@ -0,0 +1,32 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// template <> class codecvt<wchar_t, char, mbstate_t>
+
+// int length(stateT& state, const externT* from, const externT* from_end, size_t max) const;
+
+#include <locale>
+#include <cassert>
+
+typedef std::codecvt<wchar_t, char, std::mbstate_t> F;
+
+int main()
+{
+ std::locale l = std::locale::classic();
+ const F& f = std::use_facet<F>(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/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/wchar_t_max_length.pass.cpp b/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/wchar_t_max_length.pass.cpp
new file mode 100644
index 000000000000..38ce51455688
--- /dev/null
+++ b/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/wchar_t_max_length.pass.cpp
@@ -0,0 +1,26 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// template <> class codecvt<wchar_t, char, mbstate_t>
+
+// int max_length() const throw();
+
+#include <locale>
+#include <cassert>
+
+typedef std::codecvt<wchar_t, char, std::mbstate_t> F;
+
+int main()
+{
+ std::locale l = std::locale::classic();
+ const F& f = std::use_facet<F>(l);
+ assert(f.max_length() == 1);
+}
diff --git a/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/wchar_t_out.pass.cpp b/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/wchar_t_out.pass.cpp
new file mode 100644
index 000000000000..dce2d38c8279
--- /dev/null
+++ b/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/wchar_t_out.pass.cpp
@@ -0,0 +1,69 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// template <> class codecvt<wchar_t, char, mbstate_t>
+
+// 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 <locale>
+#include <string>
+#include <vector>
+#include <cassert>
+
+typedef std::codecvt<wchar_t, char, std::mbstate_t> F;
+
+int main()
+{
+ std::locale l = std::locale::classic();
+ const F& f = std::use_facet<F>(l);
+ {
+ const std::basic_string<F::intern_type> from(L"some text");
+ std::vector<char> to(from.size()+1);
+ std::mbstate_t mbs = {0};
+ 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<F::intern_type> from(L"some text");
+ from[4] = '\0';
+ std::vector<char> to(from.size()+1);
+ std::mbstate_t mbs = {0};
+ 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(memcmp(to.data(), "some\0text", from.size()) == 0);
+ }
+ {
+ std::basic_string<F::intern_type> from(L"some text");
+ std::vector<char> to(from.size()-1);
+ std::mbstate_t mbs = {0};
+ 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/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/wchar_t_unshift.pass.cpp b/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/wchar_t_unshift.pass.cpp
new file mode 100644
index 000000000000..4d8895cf1a7e
--- /dev/null
+++ b/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/wchar_t_unshift.pass.cpp
@@ -0,0 +1,35 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// template <> class codecvt<wchar_t, char, mbstate_t>
+
+// result unshift(stateT& state,
+// externT* to, externT* to_end, externT*& to_next) const;
+
+// This is pretty much just an "are you breathing" test
+
+#include <locale>
+#include <string>
+#include <vector>
+#include <cassert>
+
+typedef std::codecvt<wchar_t, char, std::mbstate_t> F;
+
+int main()
+{
+ std::locale l = std::locale::classic();
+ std::vector<F::extern_type> to(3);
+ const F& f = std::use_facet<F>(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/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.virtuals/tested_elsewhere.pass.cpp b/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.virtuals/tested_elsewhere.pass.cpp
new file mode 100644
index 000000000000..b58f5c55b643
--- /dev/null
+++ b/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.virtuals/tested_elsewhere.pass.cpp
@@ -0,0 +1,12 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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/std/localization/locale.categories/category.ctype/locale.codecvt/types_char.pass.cpp b/test/std/localization/locale.categories/category.ctype/locale.codecvt/types_char.pass.cpp
new file mode 100644
index 000000000000..5e2c44ff971c
--- /dev/null
+++ b/test/std/localization/locale.categories/category.ctype/locale.codecvt/types_char.pass.cpp
@@ -0,0 +1,40 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// template <>
+// class codecvt<char, char, mbstate_t>
+// : public locale::facet,
+// public codecvt_base
+// {
+// public:
+// typedef char intern_type;
+// typedef char extern_type;
+// typedef mbstate_t state_type;
+// ...
+// };
+
+#include <locale>
+#include <type_traits>
+#include <cassert>
+
+int main()
+{
+ typedef std::codecvt<char, char, std::mbstate_t> F;
+ static_assert((std::is_base_of<std::locale::facet, F>::value), "");
+ static_assert((std::is_base_of<std::codecvt_base, F>::value), "");
+ static_assert((std::is_same<F::intern_type, char>::value), "");
+ static_assert((std::is_same<F::extern_type, char>::value), "");
+ static_assert((std::is_same<F::state_type, std::mbstate_t>::value), "");
+ std::locale l = std::locale::classic();
+ assert(std::has_facet<F>(l));
+ const F& f = std::use_facet<F>(l);
+ (void)F::id;
+}
diff --git a/test/std/localization/locale.categories/category.ctype/locale.codecvt/types_char16_t.pass.cpp b/test/std/localization/locale.categories/category.ctype/locale.codecvt/types_char16_t.pass.cpp
new file mode 100644
index 000000000000..9d512bd9d130
--- /dev/null
+++ b/test/std/localization/locale.categories/category.ctype/locale.codecvt/types_char16_t.pass.cpp
@@ -0,0 +1,42 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// template <>
+// class codecvt<char16_t, char, mbstate_t>
+// : public locale::facet,
+// public codecvt_base
+// {
+// public:
+// typedef char16_t intern_type;
+// typedef char extern_type;
+// typedef mbstate_t state_type;
+// ...
+// };
+
+#include <locale>
+#include <type_traits>
+#include <cassert>
+
+int main()
+{
+//#ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
+ typedef std::codecvt<char16_t, char, std::mbstate_t> F;
+ static_assert((std::is_base_of<std::locale::facet, F>::value), "");
+ static_assert((std::is_base_of<std::codecvt_base, F>::value), "");
+ static_assert((std::is_same<F::intern_type, char16_t>::value), "");
+ static_assert((std::is_same<F::extern_type, char>::value), "");
+ static_assert((std::is_same<F::state_type, std::mbstate_t>::value), "");
+ std::locale l = std::locale::classic();
+ assert(std::has_facet<F>(l));
+ const F& f = std::use_facet<F>(l);
+ (void)F::id;
+//#endif
+}
diff --git a/test/std/localization/locale.categories/category.ctype/locale.codecvt/types_char32_t.pass.cpp b/test/std/localization/locale.categories/category.ctype/locale.codecvt/types_char32_t.pass.cpp
new file mode 100644
index 000000000000..25f2b3d8df58
--- /dev/null
+++ b/test/std/localization/locale.categories/category.ctype/locale.codecvt/types_char32_t.pass.cpp
@@ -0,0 +1,42 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// template <>
+// class codecvt<char32_t, char, mbstate_t>
+// : public locale::facet,
+// public codecvt_base
+// {
+// public:
+// typedef char32_t intern_type;
+// typedef char extern_type;
+// typedef mbstate_t state_type;
+// ...
+// };
+
+#include <locale>
+#include <type_traits>
+#include <cassert>
+
+int main()
+{
+//#ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
+ typedef std::codecvt<char32_t, char, std::mbstate_t> F;
+ static_assert((std::is_base_of<std::locale::facet, F>::value), "");
+ static_assert((std::is_base_of<std::codecvt_base, F>::value), "");
+ static_assert((std::is_same<F::intern_type, char32_t>::value), "");
+ static_assert((std::is_same<F::extern_type, char>::value), "");
+ static_assert((std::is_same<F::state_type, std::mbstate_t>::value), "");
+ std::locale l = std::locale::classic();
+ assert(std::has_facet<F>(l));
+ const F& f = std::use_facet<F>(l);
+ (void)F::id;
+//#endif
+}
diff --git a/test/std/localization/locale.categories/category.ctype/locale.codecvt/types_wchar_t.pass.cpp b/test/std/localization/locale.categories/category.ctype/locale.codecvt/types_wchar_t.pass.cpp
new file mode 100644
index 000000000000..8b6868ec60d3
--- /dev/null
+++ b/test/std/localization/locale.categories/category.ctype/locale.codecvt/types_wchar_t.pass.cpp
@@ -0,0 +1,40 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// template <>
+// class codecvt<wchar_t, char, mbstate_t>
+// : public locale::facet,
+// public codecvt_base
+// {
+// public:
+// typedef wchar_t intern_type;
+// typedef char extern_type;
+// typedef mbstate_t state_type;
+// ...
+// };
+
+#include <locale>
+#include <type_traits>
+#include <cassert>
+
+int main()
+{
+ typedef std::codecvt<wchar_t, char, std::mbstate_t> F;
+ static_assert((std::is_base_of<std::locale::facet, F>::value), "");
+ static_assert((std::is_base_of<std::codecvt_base, F>::value), "");
+ static_assert((std::is_same<F::intern_type, wchar_t>::value), "");
+ static_assert((std::is_same<F::extern_type, char>::value), "");
+ static_assert((std::is_same<F::state_type, std::mbstate_t>::value), "");
+ std::locale l = std::locale::classic();
+ assert(std::has_facet<F>(l));
+ const F& f = std::use_facet<F>(l);
+ (void)F::id;
+}
diff --git a/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/is_1.pass.cpp b/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/is_1.pass.cpp
new file mode 100644
index 000000000000..509e52ab0e55
--- /dev/null
+++ b/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/is_1.pass.cpp
@@ -0,0 +1,112 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// template <class charT> class ctype_byname;
+
+// bool is(mask m, charT c) const;
+
+// REQUIRES: locale.en_US.UTF-8
+
+#include <locale>
+#include <type_traits>
+#include <cassert>
+
+#include "platform_support.h" // locale name macros
+
+int main()
+{
+ {
+ std::locale l(LOCALE_en_US_UTF_8);
+ {
+ typedef std::ctype<wchar_t> F;
+ const F& f = std::use_facet<F>(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<wchar_t> F;
+ const F& f = std::use_facet<F>(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/std/localization/locale.categories/category.ctype/locale.ctype.byname/is_many.pass.cpp b/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/is_many.pass.cpp
new file mode 100644
index 000000000000..a993466ab5e7
--- /dev/null
+++ b/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/is_many.pass.cpp
@@ -0,0 +1,247 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// template <class charT> class ctype_byname;
+
+// const charT* do_is(const charT* low, const charT* high, mask* vec) const;
+
+// REQUIRES: locale.en_US.UTF-8
+
+#include <locale>
+#include <string>
+#include <vector>
+#include <cassert>
+
+#include <stdio.h>
+
+#include "platform_support.h" // locale name macros
+
+int main()
+{
+ {
+ std::locale l(LOCALE_en_US_UTF_8);
+ {
+ typedef std::ctype<wchar_t> F;
+ const F& f = std::use_facet<F>(l);
+ const std::wstring in(L"\x00DA A\x07.a1");
+ std::vector<F::mask> 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<wchar_t> F;
+ const F& f = std::use_facet<F>(l);
+ const std::wstring in(L"\x00DA A\x07.a1");
+ std::vector<F::mask> 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/std/localization/locale.categories/category.ctype/locale.ctype.byname/mask.pass.cpp b/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/mask.pass.cpp
new file mode 100644
index 000000000000..a09072a98788
--- /dev/null
+++ b/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/mask.pass.cpp
@@ -0,0 +1,53 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// template <class charT> class ctype_byname;
+
+// bool is(mask m, charT c) const;
+
+#include <locale>
+#include <type_traits>
+#include <cassert>
+
+int main()
+{
+ {
+ std::locale l("C");
+ {
+ typedef std::ctype<wchar_t> WF;
+ const WF& wf = std::use_facet<WF>(l);
+ typedef std::ctype<char> CF;
+ const CF& cf = std::use_facet<CF>(l);
+
+ // The ctype masks in Newlib don't form a proper bitmask because
+ // the mask is only 8 bits wide, and there are more than 8 mask
+ // kinds. This means that the mask for alpha is (_U | _L), which
+ // is tricky to match in the do_is implementation because in
+ // [22.4.1.1.2 2] the standard specifies that the match code behaves
+ // like (m & M) != 0, but following this exactly would give false
+ // positives for characters that are both 'upper' and 'alpha', but
+ // not 'lower', for example.
+ assert( wf.is(WF::upper, L'A'));
+ assert( cf.is(CF::upper, 'A'));
+ assert(!wf.is(WF::lower, L'A'));
+ assert(!cf.is(CF::lower, 'A'));
+ assert( wf.is(WF::alpha, L'A'));
+ assert( cf.is(CF::alpha, 'A'));
+
+ assert(!wf.is(WF::upper, L'a'));
+ assert(!cf.is(CF::upper, 'a'));
+ assert( wf.is(WF::lower, L'a'));
+ assert( cf.is(CF::lower, 'a'));
+ assert( wf.is(WF::alpha, L'a'));
+ assert( cf.is(CF::alpha, 'a'));
+ }
+ }
+}
diff --git a/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/narrow_1.pass.cpp b/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/narrow_1.pass.cpp
new file mode 100644
index 000000000000..904ced32313c
--- /dev/null
+++ b/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/narrow_1.pass.cpp
@@ -0,0 +1,56 @@
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// REQUIRES: locale.en_US.UTF-8
+// REQUIRES: locale.fr_CA.ISO8859-1
+
+// <locale>
+
+// template <class charT> class ctype_byname;
+
+// char narrow(charT c, char dfault) const;
+
+#include <locale>
+#include <cassert>
+
+#include "platform_support.h" // locale name macros
+
+int main()
+{
+ {
+ std::locale l(std::string(LOCALE_fr_CA_ISO8859_1));
+ {
+ typedef std::ctype<wchar_t> F;
+ const F& f = std::use_facet<F>(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(LOCALE_en_US_UTF_8);
+ {
+ typedef std::ctype<wchar_t> F;
+ const F& f = std::use_facet<F>(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/std/localization/locale.categories/category.ctype/locale.ctype.byname/narrow_many.pass.cpp b/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/narrow_many.pass.cpp
new file mode 100644
index 000000000000..6f25b9cad927
--- /dev/null
+++ b/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/narrow_many.pass.cpp
@@ -0,0 +1,64 @@
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// REQUIRES: locale.en_US.UTF-8
+// REQUIRES: locale.fr_CA.ISO8859-1
+
+// <locale>
+
+// template <class charT> class ctype_byname;
+
+// const charT* narrow(const charT* low, const charT*, char dfault, char* to) const;
+
+#include <locale>
+#include <string>
+#include <vector>
+#include <cassert>
+
+#include "platform_support.h" // locale name macros
+
+int main()
+{
+ {
+ std::locale l(LOCALE_fr_CA_ISO8859_1);
+ {
+ typedef std::ctype<wchar_t> F;
+ const F& f = std::use_facet<F>(l);
+ std::wstring in(L" A\x07.a1\xDA");
+ std::vector<char> 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(LOCALE_en_US_UTF_8);
+ {
+ typedef std::ctype<wchar_t> F;
+ const F& f = std::use_facet<F>(l);
+ std::wstring in(L" A\x07.a1\xDA");
+ std::vector<char> 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/std/localization/locale.categories/category.ctype/locale.ctype.byname/scan_is.pass.cpp b/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/scan_is.pass.cpp
new file mode 100644
index 000000000000..25b2c3e4ebd4
--- /dev/null
+++ b/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/scan_is.pass.cpp
@@ -0,0 +1,71 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// template <class charT> class ctype_byname;
+
+// const charT* scan_is(mask m, const charT* low, const charT* high) const;
+
+// REQUIRES: locale.en_US.UTF-8
+
+#include <locale>
+#include <string>
+#include <vector>
+#include <cassert>
+
+#include <stdio.h>
+
+#include "platform_support.h" // locale name macros
+
+int main()
+{
+ {
+ std::locale l(LOCALE_en_US_UTF_8);
+ {
+ typedef std::ctype<wchar_t> F;
+ const F& f = std::use_facet<F>(l);
+ const std::wstring in(L"\x00DA A\x07.a1");
+ std::vector<F::mask> 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<wchar_t> F;
+ const F& f = std::use_facet<F>(l);
+ const std::wstring in(L"\x00DA A\x07.a1");
+ std::vector<F::mask> 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/std/localization/locale.categories/category.ctype/locale.ctype.byname/scan_not.pass.cpp b/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/scan_not.pass.cpp
new file mode 100644
index 000000000000..270ae1f1595c
--- /dev/null
+++ b/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/scan_not.pass.cpp
@@ -0,0 +1,71 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// template <class charT> class ctype_byname;
+
+// const charT* scan_not(mask m, const charT* low, const charT* high) const;
+
+// REQUIRES: locale.en_US.UTF-8
+
+#include <locale>
+#include <string>
+#include <vector>
+#include <cassert>
+
+#include <stdio.h>
+
+#include "platform_support.h" // locale name macros
+
+int main()
+{
+ {
+ std::locale l(LOCALE_en_US_UTF_8);
+ {
+ typedef std::ctype<wchar_t> F;
+ const F& f = std::use_facet<F>(l);
+ const std::wstring in(L"\x00DA A\x07.a1");
+ std::vector<F::mask> 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<wchar_t> F;
+ const F& f = std::use_facet<F>(l);
+ const std::wstring in(L"\x00DA A\x07.a1");
+ std::vector<F::mask> 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/std/localization/locale.categories/category.ctype/locale.ctype.byname/tolower_1.pass.cpp b/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/tolower_1.pass.cpp
new file mode 100644
index 000000000000..c2eeea820ba0
--- /dev/null
+++ b/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/tolower_1.pass.cpp
@@ -0,0 +1,91 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// template <class charT> class ctype_byname;
+
+// charT tolower(charT) const;
+
+// XFAIL: with_system_cxx_lib=x86_64-apple-darwin11
+// XFAIL: with_system_cxx_lib=x86_64-apple-darwin12
+// XFAIL: linux
+
+#include <locale>
+#include <cassert>
+
+#include "platform_support.h" // locale name macros
+
+int main()
+{
+ {
+ std::locale l(LOCALE_en_US_UTF_8);
+ {
+ typedef std::ctype<char> F;
+ const F& f = std::use_facet<F>(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') == '\xFA');
+ assert(f.tolower('\xFA') == '\xFA');
+ }
+ }
+ {
+ std::locale l("C");
+ {
+ typedef std::ctype<char> F;
+ const F& f = std::use_facet<F>(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(LOCALE_en_US_UTF_8);
+ {
+ typedef std::ctype<wchar_t> F;
+ const F& f = std::use_facet<F>(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<wchar_t> F;
+ const F& f = std::use_facet<F>(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/std/localization/locale.categories/category.ctype/locale.ctype.byname/tolower_many.pass.cpp b/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/tolower_many.pass.cpp
new file mode 100644
index 000000000000..b2577e323a2d
--- /dev/null
+++ b/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/tolower_many.pass.cpp
@@ -0,0 +1,96 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// template <class charT> class ctype_byname;
+
+// const charT* tolower(charT* low, const charT* high) const;
+
+// XFAIL: with_system_cxx_lib=x86_64-apple-darwin11
+// XFAIL: with_system_cxx_lib=x86_64-apple-darwin12
+// XFAIL: linux
+
+#include <locale>
+#include <string>
+#include <cassert>
+
+#include "platform_support.h" // locale name macros
+
+int main()
+{
+ {
+ std::locale l(LOCALE_en_US_UTF_8);
+ {
+ typedef std::ctype<char> F;
+ const F& f = std::use_facet<F>(l);
+ std::string in("\xDA A\x07.a1");
+
+ assert(f.tolower(&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<char> F;
+ const F& f = std::use_facet<F>(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(LOCALE_en_US_UTF_8);
+ {
+ typedef std::ctype<wchar_t> F;
+ const F& f = std::use_facet<F>(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<wchar_t> F;
+ const F& f = std::use_facet<F>(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/std/localization/locale.categories/category.ctype/locale.ctype.byname/toupper_1.pass.cpp b/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/toupper_1.pass.cpp
new file mode 100644
index 000000000000..8611293b84aa
--- /dev/null
+++ b/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/toupper_1.pass.cpp
@@ -0,0 +1,91 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// template <class charT> class ctype_byname;
+
+// charT toupper(charT) const;
+
+// XFAIL: with_system_cxx_lib=x86_64-apple-darwin11
+// XFAIL: with_system_cxx_lib=x86_64-apple-darwin12
+// XFAIL: linux
+
+#include <locale>
+#include <cassert>
+
+#include "platform_support.h" // locale name macros
+
+int main()
+{
+ {
+ std::locale l(LOCALE_en_US_UTF_8);
+ {
+ typedef std::ctype<char> F;
+ const F& f = std::use_facet<F>(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') == '\xDA');
+ }
+ }
+ {
+ std::locale l("C");
+ {
+ typedef std::ctype<char> F;
+ const F& f = std::use_facet<F>(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(LOCALE_en_US_UTF_8);
+ {
+ typedef std::ctype<wchar_t> F;
+ const F& f = std::use_facet<F>(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<wchar_t> F;
+ const F& f = std::use_facet<F>(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/std/localization/locale.categories/category.ctype/locale.ctype.byname/toupper_many.pass.cpp b/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/toupper_many.pass.cpp
new file mode 100644
index 000000000000..d23a29273e2b
--- /dev/null
+++ b/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/toupper_many.pass.cpp
@@ -0,0 +1,96 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// template <class charT> class ctype_byname;
+
+// const charT* toupper(charT* low, const charT* high) const;
+
+// XFAIL: with_system_cxx_lib=x86_64-apple-darwin11
+// XFAIL: with_system_cxx_lib=x86_64-apple-darwin12
+// XFAIL: linux
+
+#include <locale>
+#include <string>
+#include <cassert>
+
+#include "platform_support.h" // locale name macros
+
+int main()
+{
+ {
+ std::locale l(LOCALE_en_US_UTF_8);
+ {
+ typedef std::ctype<char> F;
+ const F& f = std::use_facet<F>(l);
+ std::string in("\xFA A\x07.a1");
+
+ assert(f.toupper(&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<char> F;
+ const F& f = std::use_facet<F>(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(LOCALE_en_US_UTF_8);
+ {
+ typedef std::ctype<wchar_t> F;
+ const F& f = std::use_facet<F>(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<wchar_t> F;
+ const F& f = std::use_facet<F>(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/std/localization/locale.categories/category.ctype/locale.ctype.byname/types.pass.cpp b/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/types.pass.cpp
new file mode 100644
index 000000000000..03e8dfcef97f
--- /dev/null
+++ b/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/types.pass.cpp
@@ -0,0 +1,71 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// template <class CharT>
+// class ctype_byname
+// : public ctype<CharT>
+// {
+// public:
+// explicit ctype_byname(const char*, size_t = 0);
+// explicit ctype_byname(const string&, size_t = 0);
+//
+// protected:
+// ~ctype_byname();
+// };
+
+#include <locale>
+#include <type_traits>
+#include <cassert>
+
+#include "platform_support.h" // locale name macros
+
+int main()
+{
+ {
+ std::locale l(LOCALE_en_US_UTF_8);
+ {
+ assert(std::has_facet<std::ctype_byname<char> >(l));
+ assert(&std::use_facet<std::ctype<char> >(l)
+ == &std::use_facet<std::ctype_byname<char> >(l));
+ }
+ {
+ assert(std::has_facet<std::ctype_byname<wchar_t> >(l));
+ assert(&std::use_facet<std::ctype<wchar_t> >(l)
+ == &std::use_facet<std::ctype_byname<wchar_t> >(l));
+ }
+ }
+ {
+ std::locale l("");
+ {
+ assert(std::has_facet<std::ctype_byname<char> >(l));
+ assert(&std::use_facet<std::ctype<char> >(l)
+ == &std::use_facet<std::ctype_byname<char> >(l));
+ }
+ {
+ assert(std::has_facet<std::ctype_byname<wchar_t> >(l));
+ assert(&std::use_facet<std::ctype<wchar_t> >(l)
+ == &std::use_facet<std::ctype_byname<wchar_t> >(l));
+ }
+ }
+ {
+ std::locale l("C");
+ {
+ assert(std::has_facet<std::ctype_byname<char> >(l));
+ assert(&std::use_facet<std::ctype<char> >(l)
+ == &std::use_facet<std::ctype_byname<char> >(l));
+ }
+ {
+ assert(std::has_facet<std::ctype_byname<wchar_t> >(l));
+ assert(&std::use_facet<std::ctype<wchar_t> >(l)
+ == &std::use_facet<std::ctype_byname<wchar_t> >(l));
+ }
+ }
+}
diff --git a/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/widen_1.pass.cpp b/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/widen_1.pass.cpp
new file mode 100644
index 000000000000..320e08db26e0
--- /dev/null
+++ b/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/widen_1.pass.cpp
@@ -0,0 +1,58 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// template <class charT> class ctype_byname;
+
+// charT widen(char c) const;
+
+// I doubt this test is portable
+
+// XFAIL: linux
+
+#include <locale>
+#include <cassert>
+#include <limits.h>
+
+#include "platform_support.h" // locale name macros
+
+int main()
+{
+ {
+ std::locale l(LOCALE_en_US_UTF_8);
+ {
+ typedef std::ctype<wchar_t> F;
+ const F& f = std::use_facet<F>(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<wchar_t> F;
+ const F& f = std::use_facet<F>(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/std/localization/locale.categories/category.ctype/locale.ctype.byname/widen_many.pass.cpp b/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/widen_many.pass.cpp
new file mode 100644
index 000000000000..b46ae32237b7
--- /dev/null
+++ b/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/widen_many.pass.cpp
@@ -0,0 +1,65 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// template <class charT> class ctype_byname;
+
+// const char* widen(const char* low, const char* high, charT* to) const;
+
+// I doubt this test is portable
+
+// XFAIL: linux
+
+#include <locale>
+#include <string>
+#include <vector>
+#include <cassert>
+
+#include "platform_support.h" // locale name macros
+
+int main()
+{
+ {
+ std::locale l(LOCALE_en_US_UTF_8);
+ {
+ typedef std::ctype<wchar_t> F;
+ const F& f = std::use_facet<F>(l);
+ std::string in(" A\x07.a1\x85");
+ std::vector<wchar_t> 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<wchar_t> F;
+ const F& f = std::use_facet<F>(l);
+ std::string in(" A\x07.a1\x85");
+ std::vector<wchar_t> 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/std/localization/locale.categories/category.ctype/locale.ctype/ctor.pass.cpp b/test/std/localization/locale.categories/category.ctype/locale.ctype/ctor.pass.cpp
new file mode 100644
index 000000000000..7eb3cc895b3f
--- /dev/null
+++ b/test/std/localization/locale.categories/category.ctype/locale.ctype/ctor.pass.cpp
@@ -0,0 +1,51 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// template <class charT> class ctype;
+
+// explicit ctype(size_t refs = 0);
+
+#include <locale>
+#include <cassert>
+
+template <class C>
+class my_facet
+ : public std::ctype<C>
+{
+public:
+ static int count;
+
+ explicit my_facet(std::size_t refs = 0)
+ : std::ctype<C>(refs) {++count;}
+
+ ~my_facet() {--count;}
+};
+
+template <class C> int my_facet<C>::count = 0;
+
+int main()
+{
+ {
+ std::locale l(std::locale::classic(), new my_facet<wchar_t>);
+ assert(my_facet<wchar_t>::count == 1);
+ }
+ assert(my_facet<wchar_t>::count == 0);
+ {
+ my_facet<wchar_t> f(1);
+ assert(my_facet<wchar_t>::count == 1);
+ {
+ std::locale l(std::locale::classic(), &f);
+ assert(my_facet<wchar_t>::count == 1);
+ }
+ assert(my_facet<wchar_t>::count == 1);
+ }
+ assert(my_facet<wchar_t>::count == 0);
+}
diff --git a/test/std/localization/locale.categories/category.ctype/locale.ctype/locale.ctype.members/is_1.pass.cpp b/test/std/localization/locale.categories/category.ctype/locale.ctype/locale.ctype.members/is_1.pass.cpp
new file mode 100644
index 000000000000..fa82da96b5a9
--- /dev/null
+++ b/test/std/localization/locale.categories/category.ctype/locale.ctype/locale.ctype.members/is_1.pass.cpp
@@ -0,0 +1,59 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// template <class charT> class ctype;
+
+// bool is(mask m, charT c) const;
+
+#include <locale>
+#include <cassert>
+
+int main()
+{
+ std::locale l = std::locale::classic();
+ {
+ typedef std::ctype<wchar_t> F;
+ const F& f = std::use_facet<F>(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/std/localization/locale.categories/category.ctype/locale.ctype/locale.ctype.members/is_many.pass.cpp b/test/std/localization/locale.categories/category.ctype/locale.ctype/locale.ctype.members/is_many.pass.cpp
new file mode 100644
index 000000000000..7084245d969a
--- /dev/null
+++ b/test/std/localization/locale.categories/category.ctype/locale.ctype/locale.ctype.members/is_many.pass.cpp
@@ -0,0 +1,118 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// template <class charT> class ctype;
+
+// const charT* do_is(const charT* low, const charT* high, mask* vec) const;
+
+#include <locale>
+#include <string>
+#include <vector>
+#include <cassert>
+
+#include <stdio.h>
+
+int main()
+{
+ std::locale l = std::locale::classic();
+ {
+ typedef std::ctype<wchar_t> F;
+ const F& f = std::use_facet<F>(l);
+ const std::wstring in(L" A\x07.a1");
+ std::vector<F::mask> 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/std/localization/locale.categories/category.ctype/locale.ctype/locale.ctype.members/narrow_1.pass.cpp b/test/std/localization/locale.categories/category.ctype/locale.ctype/locale.ctype.members/narrow_1.pass.cpp
new file mode 100644
index 000000000000..ad8fb211705f
--- /dev/null
+++ b/test/std/localization/locale.categories/category.ctype/locale.ctype/locale.ctype.members/narrow_1.pass.cpp
@@ -0,0 +1,33 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// template <class charT> class ctype;
+
+// char narrow(charT c, char dfault) const;
+
+#include <locale>
+#include <cassert>
+
+int main()
+{
+ std::locale l = std::locale::classic();
+ {
+ typedef std::ctype<wchar_t> F;
+ const F& f = std::use_facet<F>(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/std/localization/locale.categories/category.ctype/locale.ctype/locale.ctype.members/narrow_many.pass.cpp b/test/std/localization/locale.categories/category.ctype/locale.ctype/locale.ctype.members/narrow_many.pass.cpp
new file mode 100644
index 000000000000..fcc6cfccd2ec
--- /dev/null
+++ b/test/std/localization/locale.categories/category.ctype/locale.ctype/locale.ctype.members/narrow_many.pass.cpp
@@ -0,0 +1,38 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// template <class charT> class ctype;
+
+// const charT* narrow(const charT* low, const charT*, char dfault, char* to) const;
+
+#include <locale>
+#include <string>
+#include <vector>
+#include <cassert>
+
+int main()
+{
+ std::locale l = std::locale::classic();
+ {
+ typedef std::ctype<wchar_t> F;
+ const F& f = std::use_facet<F>(l);
+ std::wstring in(L" A\x07.a1");
+ std::vector<char> 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/std/localization/locale.categories/category.ctype/locale.ctype/locale.ctype.members/scan_is.pass.cpp b/test/std/localization/locale.categories/category.ctype/locale.ctype/locale.ctype.members/scan_is.pass.cpp
new file mode 100644
index 000000000000..535c830789c6
--- /dev/null
+++ b/test/std/localization/locale.categories/category.ctype/locale.ctype/locale.ctype.members/scan_is.pass.cpp
@@ -0,0 +1,44 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// template <class charT> class ctype;
+
+// const charT* scan_is(mask m, const charT* low, const charT* high) const;
+
+#include <locale>
+#include <string>
+#include <vector>
+#include <cassert>
+
+#include <stdio.h>
+
+int main()
+{
+ std::locale l = std::locale::classic();
+ {
+ typedef std::ctype<wchar_t> F;
+ const F& f = std::use_facet<F>(l);
+ const std::wstring in(L" A\x07.a1");
+ std::vector<F::mask> 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/std/localization/locale.categories/category.ctype/locale.ctype/locale.ctype.members/scan_not.pass.cpp b/test/std/localization/locale.categories/category.ctype/locale.ctype/locale.ctype.members/scan_not.pass.cpp
new file mode 100644
index 000000000000..da21642b98ca
--- /dev/null
+++ b/test/std/localization/locale.categories/category.ctype/locale.ctype/locale.ctype.members/scan_not.pass.cpp
@@ -0,0 +1,44 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// template <class charT> class ctype;
+
+// const charT* scan_not(mask m, const charT* low, const charT* high) const;
+
+#include <locale>
+#include <string>
+#include <vector>
+#include <cassert>
+
+#include <stdio.h>
+
+int main()
+{
+ std::locale l = std::locale::classic();
+ {
+ typedef std::ctype<wchar_t> F;
+ const F& f = std::use_facet<F>(l);
+ const std::wstring in(L" A\x07.a1");
+ std::vector<F::mask> 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/std/localization/locale.categories/category.ctype/locale.ctype/locale.ctype.members/tolower_1.pass.cpp b/test/std/localization/locale.categories/category.ctype/locale.ctype/locale.ctype.members/tolower_1.pass.cpp
new file mode 100644
index 000000000000..6e75ba483237
--- /dev/null
+++ b/test/std/localization/locale.categories/category.ctype/locale.ctype/locale.ctype.members/tolower_1.pass.cpp
@@ -0,0 +1,33 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// template <class charT> class ctype;
+
+// charT tolower(charT) const;
+
+#include <locale>
+#include <cassert>
+
+int main()
+{
+ std::locale l = std::locale::classic();
+ {
+ typedef std::ctype<wchar_t> F;
+ const F& f = std::use_facet<F>(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/std/localization/locale.categories/category.ctype/locale.ctype/locale.ctype.members/tolower_many.pass.cpp b/test/std/localization/locale.categories/category.ctype/locale.ctype/locale.ctype.members/tolower_many.pass.cpp
new file mode 100644
index 000000000000..68daf8d88a46
--- /dev/null
+++ b/test/std/localization/locale.categories/category.ctype/locale.ctype/locale.ctype.members/tolower_many.pass.cpp
@@ -0,0 +1,36 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// template <class charT> class ctype;
+
+// const charT* tolower(charT* low, const charT* high) const;
+
+#include <locale>
+#include <string>
+#include <cassert>
+
+int main()
+{
+ std::locale l = std::locale::classic();
+ {
+ typedef std::ctype<wchar_t> F;
+ const F& f = std::use_facet<F>(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/std/localization/locale.categories/category.ctype/locale.ctype/locale.ctype.members/toupper_1.pass.cpp b/test/std/localization/locale.categories/category.ctype/locale.ctype/locale.ctype.members/toupper_1.pass.cpp
new file mode 100644
index 000000000000..2a5acd17955d
--- /dev/null
+++ b/test/std/localization/locale.categories/category.ctype/locale.ctype/locale.ctype.members/toupper_1.pass.cpp
@@ -0,0 +1,33 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// template <class charT> class ctype;
+
+// charT toupper(charT) const;
+
+#include <locale>
+#include <cassert>
+
+int main()
+{
+ std::locale l = std::locale::classic();
+ {
+ typedef std::ctype<wchar_t> F;
+ const F& f = std::use_facet<F>(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/std/localization/locale.categories/category.ctype/locale.ctype/locale.ctype.members/toupper_many.pass.cpp b/test/std/localization/locale.categories/category.ctype/locale.ctype/locale.ctype.members/toupper_many.pass.cpp
new file mode 100644
index 000000000000..f0a7ee3d21b6
--- /dev/null
+++ b/test/std/localization/locale.categories/category.ctype/locale.ctype/locale.ctype.members/toupper_many.pass.cpp
@@ -0,0 +1,36 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// template <class charT> class ctype;
+
+// const charT* toupper(charT* low, const charT* high) const;
+
+#include <locale>
+#include <string>
+#include <cassert>
+
+int main()
+{
+ std::locale l = std::locale::classic();
+ {
+ typedef std::ctype<wchar_t> F;
+ const F& f = std::use_facet<F>(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/std/localization/locale.categories/category.ctype/locale.ctype/locale.ctype.members/widen_1.pass.cpp b/test/std/localization/locale.categories/category.ctype/locale.ctype/locale.ctype.members/widen_1.pass.cpp
new file mode 100644
index 000000000000..2a8733c207d6
--- /dev/null
+++ b/test/std/localization/locale.categories/category.ctype/locale.ctype/locale.ctype.members/widen_1.pass.cpp
@@ -0,0 +1,33 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// template <class charT> class ctype;
+
+// charT widen(char c) const;
+
+#include <locale>
+#include <cassert>
+
+int main()
+{
+ std::locale l = std::locale::classic();
+ {
+ typedef std::ctype<wchar_t> F;
+ const F& f = std::use_facet<F>(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/std/localization/locale.categories/category.ctype/locale.ctype/locale.ctype.members/widen_many.pass.cpp b/test/std/localization/locale.categories/category.ctype/locale.ctype/locale.ctype.members/widen_many.pass.cpp
new file mode 100644
index 000000000000..1c656011a098
--- /dev/null
+++ b/test/std/localization/locale.categories/category.ctype/locale.ctype/locale.ctype.members/widen_many.pass.cpp
@@ -0,0 +1,38 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// template <class charT> class ctype;
+
+// const char* widen(const char* low, const char* high, charT* to) const;
+
+#include <locale>
+#include <string>
+#include <vector>
+#include <cassert>
+
+int main()
+{
+ std::locale l = std::locale::classic();
+ {
+ typedef std::ctype<wchar_t> F;
+ const F& f = std::use_facet<F>(l);
+ std::string in(" A\x07.a1");
+ std::vector<wchar_t> 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/std/localization/locale.categories/category.ctype/locale.ctype/locale.ctype.virtuals/tested_elsewhere.pass.cpp b/test/std/localization/locale.categories/category.ctype/locale.ctype/locale.ctype.virtuals/tested_elsewhere.pass.cpp
new file mode 100644
index 000000000000..b58f5c55b643
--- /dev/null
+++ b/test/std/localization/locale.categories/category.ctype/locale.ctype/locale.ctype.virtuals/tested_elsewhere.pass.cpp
@@ -0,0 +1,12 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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/std/localization/locale.categories/category.ctype/locale.ctype/types.pass.cpp b/test/std/localization/locale.categories/category.ctype/locale.ctype/types.pass.cpp
new file mode 100644
index 000000000000..7ad36afee669
--- /dev/null
+++ b/test/std/localization/locale.categories/category.ctype/locale.ctype/types.pass.cpp
@@ -0,0 +1,38 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// template <class CharT>
+// class ctype
+// : public locale::facet,
+// public ctype_base
+// {
+// public:
+// typedef CharT char_type;
+// };
+
+#include <locale>
+#include <type_traits>
+#include <cassert>
+
+int main()
+{
+ std::locale l = std::locale::classic();
+ {
+ assert(std::has_facet<std::ctype<wchar_t> >(l));
+ const std::ctype<wchar_t>& f = std::use_facet<std::ctype<wchar_t> >(l);
+ {
+ (void)std::ctype<wchar_t>::id;
+ }
+ static_assert((std::is_same<std::ctype<wchar_t>::char_type, wchar_t>::value), "");
+ static_assert((std::is_base_of<std::ctype_base, std::ctype<wchar_t> >::value), "");
+ static_assert((std::is_base_of<std::locale::facet, std::ctype<wchar_t> >::value), "");
+ }
+}
diff --git a/test/std/localization/locale.categories/category.messages/locale.messages.byname/nothing_to_do.pass.cpp b/test/std/localization/locale.categories/category.messages/locale.messages.byname/nothing_to_do.pass.cpp
new file mode 100644
index 000000000000..b58f5c55b643
--- /dev/null
+++ b/test/std/localization/locale.categories/category.messages/locale.messages.byname/nothing_to_do.pass.cpp
@@ -0,0 +1,12 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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/std/localization/locale.categories/category.messages/locale.messages/ctor.pass.cpp b/test/std/localization/locale.categories/category.messages/locale.messages/ctor.pass.cpp
new file mode 100644
index 000000000000..e82878a310cf
--- /dev/null
+++ b/test/std/localization/locale.categories/category.messages/locale.messages/ctor.pass.cpp
@@ -0,0 +1,52 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// class messages<charT>
+
+// explicit messages(size_t refs = 0);
+
+#include <locale>
+#include <cassert>
+
+typedef std::messages<char> 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/std/localization/locale.categories/category.messages/locale.messages/locale.messages.members/not_testable.pass.cpp b/test/std/localization/locale.categories/category.messages/locale.messages/locale.messages.members/not_testable.pass.cpp
new file mode 100644
index 000000000000..6bed5383c058
--- /dev/null
+++ b/test/std/localization/locale.categories/category.messages/locale.messages/locale.messages.members/not_testable.pass.cpp
@@ -0,0 +1,34 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// class messages<charT>
+
+// catalog open(const basic_string<char>& name, const locale&) const;
+
+#include <locale>
+#include <cassert>
+
+// 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 CharT>
+class F
+ : public std::messages<CharT>
+{
+public:
+ explicit F(std::size_t refs = 0)
+ : std::messages<CharT>(refs) {}
+};
+
+int main()
+{
+}
diff --git a/test/std/localization/locale.categories/category.messages/locale.messages/locale.messages.virtuals/tested_elsewhere.pass.cpp b/test/std/localization/locale.categories/category.messages/locale.messages/locale.messages.virtuals/tested_elsewhere.pass.cpp
new file mode 100644
index 000000000000..b58f5c55b643
--- /dev/null
+++ b/test/std/localization/locale.categories/category.messages/locale.messages/locale.messages.virtuals/tested_elsewhere.pass.cpp
@@ -0,0 +1,12 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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/std/localization/locale.categories/category.messages/locale.messages/messages_base.pass.cpp b/test/std/localization/locale.categories/category.messages/locale.messages/messages_base.pass.cpp
new file mode 100644
index 000000000000..cf9b4c8992c0
--- /dev/null
+++ b/test/std/localization/locale.categories/category.messages/locale.messages/messages_base.pass.cpp
@@ -0,0 +1,24 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// class messages_base
+// {
+// public:
+// typedef unspecified catalog;
+// };
+
+#include <locale>
+#include <type_traits>
+
+int main()
+{
+ std::messages_base mb;
+}
diff --git a/test/std/localization/locale.categories/category.messages/locale.messages/types.pass.cpp b/test/std/localization/locale.categories/category.messages/locale.messages/types.pass.cpp
new file mode 100644
index 000000000000..60e47b53767f
--- /dev/null
+++ b/test/std/localization/locale.categories/category.messages/locale.messages/types.pass.cpp
@@ -0,0 +1,34 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// template <class _CharT>
+// class messages
+// : public locale::facet,
+// public messages_base
+// {
+// public:
+// typedef _CharT char_type;
+// typedef basic_string<_CharT> string_type;
+
+#include <locale>
+#include <type_traits>
+
+int main()
+{
+ static_assert((std::is_base_of<std::locale::facet, std::messages<char> >::value), "");
+ static_assert((std::is_base_of<std::messages_base, std::messages<char> >::value), "");
+ static_assert((std::is_base_of<std::locale::facet, std::messages<wchar_t> >::value), "");
+ static_assert((std::is_base_of<std::messages_base, std::messages<wchar_t> >::value), "");
+ static_assert((std::is_same<std::messages<char>::char_type, char>::value), "");
+ static_assert((std::is_same<std::messages<wchar_t>::char_type, wchar_t>::value), "");
+ static_assert((std::is_same<std::messages<char>::string_type, std::string>::value), "");
+ static_assert((std::is_same<std::messages<wchar_t>::string_type, std::wstring>::value), "");
+}
diff --git a/test/std/localization/locale.categories/category.messages/nothing_to_do.pass.cpp b/test/std/localization/locale.categories/category.messages/nothing_to_do.pass.cpp
new file mode 100644
index 000000000000..b58f5c55b643
--- /dev/null
+++ b/test/std/localization/locale.categories/category.messages/nothing_to_do.pass.cpp
@@ -0,0 +1,12 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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/std/localization/locale.categories/category.monetary/locale.money.get/ctor.pass.cpp b/test/std/localization/locale.categories/category.monetary/locale.money.get/ctor.pass.cpp
new file mode 100644
index 000000000000..9052826a5228
--- /dev/null
+++ b/test/std/localization/locale.categories/category.monetary/locale.money.get/ctor.pass.cpp
@@ -0,0 +1,52 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// class money_get<charT, InputIterator>
+
+// explicit money_get(size_t refs = 0);
+
+#include <locale>
+#include <cassert>
+
+typedef std::money_get<char, const char*> 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/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_en_US.pass.cpp b/test/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_en_US.pass.cpp
new file mode 100644
index 000000000000..0f034fa4fdd3
--- /dev/null
+++ b/test/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_en_US.pass.cpp
@@ -0,0 +1,723 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// class money_get<charT, InputIterator>
+
+// iter_type get(iter_type b, iter_type e, bool intl, ios_base& iob,
+// ios_base::iostate& err, long double& v) const;
+
+// REQUIRES: locale.en_US.UTF-8
+
+#include <locale>
+#include <ios>
+#include <streambuf>
+#include <cassert>
+#include "test_iterators.h"
+
+#include "platform_support.h" // locale name macros
+
+typedef std::money_get<char, input_iterator<const char*> > Fn;
+
+class my_facet
+ : public Fn
+{
+public:
+ explicit my_facet(std::size_t refs = 0)
+ : Fn(refs) {}
+};
+
+typedef std::money_get<wchar_t, input_iterator<const wchar_t*> > 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(LOCALE_en_US_UTF_8);
+ ios.imbue(std::locale(ios.getloc(),
+ new std::moneypunct_byname<char, false>(loc_name)));
+ ios.imbue(std::locale(ios.getloc(),
+ new std::moneypunct_byname<char, true>(loc_name)));
+ ios.imbue(std::locale(ios.getloc(),
+ new std::moneypunct_byname<wchar_t, false>(loc_name)));
+ ios.imbue(std::locale(ios.getloc(),
+ new std::moneypunct_byname<wchar_t, true>(loc_name)));
+ {
+ const my_facet f(1);
+ // char, national
+ { // zero
+ std::string v = "0.00";
+ typedef input_iterator<const char*> 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<const char*> 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<const char*> 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<const char*> 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<const char*> 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<const char*> 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<const char*> 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<const char*> 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<const char*> 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<const char*> 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<const char*> 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<const char*> 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<const char*> 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<const char*> 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<const char*> 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<const char*> 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<const char*> 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<const char*> 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<const char*> 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<const char*> 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<const char*> 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<const char*> 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<const char*> 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<const char*> 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<const char*> 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<const char*> 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<const char*> 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<const char*> 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<const wchar_t*> 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<const wchar_t*> 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<const wchar_t*> 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<const wchar_t*> 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<const wchar_t*> 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<const wchar_t*> 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<const wchar_t*> 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<const wchar_t*> 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<const wchar_t*> 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<const wchar_t*> 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<const wchar_t*> 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<const wchar_t*> 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<const wchar_t*> 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<const wchar_t*> 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<const wchar_t*> 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<const wchar_t*> 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<const wchar_t*> 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<const wchar_t*> 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<const wchar_t*> 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<const wchar_t*> 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<const wchar_t*> 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<const wchar_t*> 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<const wchar_t*> 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<const wchar_t*> 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<const wchar_t*> 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<const wchar_t*> 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<const wchar_t*> 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<const wchar_t*> 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/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_fr_FR.pass.cpp b/test/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_fr_FR.pass.cpp
new file mode 100644
index 000000000000..d7ce1033a8da
--- /dev/null
+++ b/test/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_fr_FR.pass.cpp
@@ -0,0 +1,726 @@
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+//
+// XFAIL: apple-darwin
+
+// REQUIRES: locale.fr_FR.UTF-8
+
+// <locale>
+
+// class money_get<charT, InputIterator>
+
+// iter_type get(iter_type b, iter_type e, bool intl, ios_base& iob,
+// ios_base::iostate& err, long double& v) const;
+
+#include <locale>
+#include <ios>
+#include <streambuf>
+#include <cassert>
+#include "test_iterators.h"
+
+#include "platform_support.h" // locale name macros
+
+typedef std::money_get<char, input_iterator<const char*> > Fn;
+
+class my_facet
+ : public Fn
+{
+public:
+ explicit my_facet(std::size_t refs = 0)
+ : Fn(refs) {}
+};
+
+typedef std::money_get<wchar_t, input_iterator<const wchar_t*> > 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(LOCALE_fr_FR_UTF_8);
+ ios.imbue(std::locale(ios.getloc(),
+ new std::moneypunct_byname<char, false>(loc_name)));
+ ios.imbue(std::locale(ios.getloc(),
+ new std::moneypunct_byname<char, true>(loc_name)));
+ ios.imbue(std::locale(ios.getloc(),
+ new std::moneypunct_byname<wchar_t, false>(loc_name)));
+ ios.imbue(std::locale(ios.getloc(),
+ new std::moneypunct_byname<wchar_t, true>(loc_name)));
+ {
+ const my_facet f(1);
+ // char, national
+ { // zero
+ std::string v = "0,00";
+ typedef input_iterator<const char*> 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<const char*> 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<const char*> 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<const char*> 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<const char*> 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 \u20ac"; // €
+ showbase(ios);
+ typedef input_iterator<const char*> 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 \u20ac"; // €
+ showbase(ios);
+ typedef input_iterator<const char*> 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, showbase
+ std::string v = "-0,01 \u20ac";
+ typedef input_iterator<const char*> 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 \u20ac";
+ showbase(ios);
+ typedef input_iterator<const char*> 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, showbase
+ std::string v = "1 234 567,89 \u20ac";
+ typedef input_iterator<const char*> 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 \u20ac";
+ showbase(ios);
+ typedef input_iterator<const char*> 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 \u20ac";
+ showbase(ios);
+ typedef input_iterator<const char*> 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<const char*> 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::failbit);
+ noshowbase(ios);
+ }
+ { // negative, showbase
+ std::string v = "1 234 567,89 EUR -";
+ typedef input_iterator<const char*> 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);
+ }
+ noshowbase(ios);
+ }
+ {
+ const my_facet f(1);
+ // char, international
+ { // zero
+ std::string v = "0,00";
+ typedef input_iterator<const char*> 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<const char*> 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<const char*> 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<const char*> 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<const char*> 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";
+ showbase(ios);
+ typedef input_iterator<const char*> 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<const char*> 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, showbase
+ std::string v = "-0,01 EUR";
+ typedef input_iterator<const char*> 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<const char*> 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, showbase
+ std::string v = "1 234 567,89 EUR";
+ typedef input_iterator<const char*> 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<const char*> 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<const char*> 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<const char*> 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<const char*> 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);
+ }
+ }
+ {
+ const my_facetw f(1);
+ // wchar_t, national
+ { // zero
+ std::wstring v = L"0,00";
+ typedef input_iterator<const wchar_t*> 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<const wchar_t*> 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<const wchar_t*> 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<const wchar_t*> 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<const wchar_t*> 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 \u20ac";
+ showbase(ios);
+ typedef input_iterator<const wchar_t*> 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 \u20ac";
+ showbase(ios);
+ typedef input_iterator<const wchar_t*> 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, showbase
+ std::wstring v = L"-0,01 \u20ac";
+ typedef input_iterator<const wchar_t*> 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 \u20ac";
+ showbase(ios);
+ typedef input_iterator<const wchar_t*> 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, showbase
+ std::wstring v = L"1 234 567,89 \u20ac";
+ typedef input_iterator<const wchar_t*> 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 \u20ac";
+ showbase(ios);
+ typedef input_iterator<const wchar_t*> 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 \u20ac";
+ showbase(ios);
+ typedef input_iterator<const wchar_t*> 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<const wchar_t*> 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::failbit);
+ noshowbase(ios);
+ }
+ { // negative, showbase
+ std::wstring v = L"1 234 567,89 EUR -";
+ typedef input_iterator<const wchar_t*> 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);
+ }
+ }
+ {
+ const my_facetw f(1);
+ // wchar_t, international
+ { // zero
+ std::wstring v = L"0,00";
+ typedef input_iterator<const wchar_t*> 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<const wchar_t*> 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<const wchar_t*> 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<const wchar_t*> 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<const wchar_t*> 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";
+ showbase(ios);
+ typedef input_iterator<const wchar_t*> 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<const wchar_t*> 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, showbase
+ std::wstring v = L"-0,01 EUR";
+ typedef input_iterator<const wchar_t*> 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<const wchar_t*> 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, showbase
+ std::wstring v = L"1 234 567,89 EUR";
+ typedef input_iterator<const wchar_t*> 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<const wchar_t*> 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<const wchar_t*> 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<const wchar_t*> 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<const wchar_t*> 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);
+ }
+ }
+}
diff --git a/test/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_ru_RU.pass.cpp b/test/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_ru_RU.pass.cpp
new file mode 100644
index 000000000000..ec563fe4c7bc
--- /dev/null
+++ b/test/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_ru_RU.pass.cpp
@@ -0,0 +1,735 @@
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+//
+// XFAIL: apple-darwin
+
+// Failure related to GLIBC's use of U00A0 as mon_thousands_sep
+// and U002E as mon_decimal_point.
+// TODO: U00A0 should be investigated.
+// Possibly related to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=16006
+// XFAIL: linux
+
+// REQUIRES: locale.ru_RU.UTF-8
+
+// <locale>
+
+// class money_get<charT, InputIterator>
+
+// iter_type get(iter_type b, iter_type e, bool intl, ios_base& iob,
+// ios_base::iostate& err, long double& v) const;
+
+#include <locale>
+#include <ios>
+#include <streambuf>
+#include <cassert>
+#include "test_iterators.h"
+
+#include "platform_support.h" // locale name macros
+
+typedef std::money_get<char, input_iterator<const char*> > Fn;
+
+class my_facet
+ : public Fn
+{
+public:
+ explicit my_facet(std::size_t refs = 0)
+ : Fn(refs) {}
+};
+
+typedef std::money_get<wchar_t, input_iterator<const wchar_t*> > 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(LOCALE_ru_RU_UTF_8);
+ ios.imbue(std::locale(ios.getloc(),
+ new std::moneypunct_byname<char, false>(loc_name)));
+ ios.imbue(std::locale(ios.getloc(),
+ new std::moneypunct_byname<char, true>(loc_name)));
+ ios.imbue(std::locale(ios.getloc(),
+ new std::moneypunct_byname<wchar_t, false>(loc_name)));
+ ios.imbue(std::locale(ios.getloc(),
+ new std::moneypunct_byname<wchar_t, true>(loc_name)));
+ {
+ const my_facet f(1);
+ // char, national
+ { // zero
+ std::string v = "0,00 ";
+ typedef input_iterator<const char*> 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<const char*> 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<const char*> 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<const char*> 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<const char*> 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<const char*> 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<const char*> 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<const char*> 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<const char*> 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<const char*> 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<const char*> 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<const char*> 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 RUB ";
+ showbase(ios);
+ typedef input_iterator<const char*> 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 RUB ";
+ typedef input_iterator<const char*> 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<const char*> 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<const char*> 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<const char*> 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<const char*> 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<const char*> 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 RUB ";
+ typedef input_iterator<const char*> 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 RUB ";
+ showbase(ios);
+ typedef input_iterator<const char*> 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 RUB ";
+ typedef input_iterator<const char*> 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 RUB ";
+ showbase(ios);
+ typedef input_iterator<const char*> 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 RUB ";
+ typedef input_iterator<const char*> 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 RUB ";
+ showbase(ios);
+ typedef input_iterator<const char*> 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 RUB ";
+ showbase(ios);
+ typedef input_iterator<const char*> 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<const char*> 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<const char*> 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<const wchar_t*> 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<const wchar_t*> 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<const wchar_t*> 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<const wchar_t*> 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<const wchar_t*> 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<const wchar_t*> 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<const wchar_t*> 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<const wchar_t*> 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<const wchar_t*> 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<const wchar_t*> 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<const wchar_t*> 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<const wchar_t*> 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 RUB ";
+ showbase(ios);
+ typedef input_iterator<const wchar_t*> 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 RUB ";
+ typedef input_iterator<const wchar_t*> 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<const wchar_t*> 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<const wchar_t*> 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<const wchar_t*> 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<const wchar_t*> 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<const wchar_t*> 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 RUB ";
+ typedef input_iterator<const wchar_t*> 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 RUB ";
+ showbase(ios);
+ typedef input_iterator<const wchar_t*> 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 RUB ";
+ typedef input_iterator<const wchar_t*> 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 RUB ";
+ showbase(ios);
+ typedef input_iterator<const wchar_t*> 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 RUB ";
+ typedef input_iterator<const wchar_t*> 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 RUB ";
+ showbase(ios);
+ typedef input_iterator<const wchar_t*> 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 RUB ";
+ showbase(ios);
+ typedef input_iterator<const wchar_t*> 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<const wchar_t*> 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<const wchar_t*> 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/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_zh_CN.pass.cpp b/test/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_zh_CN.pass.cpp
new file mode 100644
index 000000000000..07a33f7663b6
--- /dev/null
+++ b/test/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_zh_CN.pass.cpp
@@ -0,0 +1,726 @@
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// REQUIRES: locale.zh_CN.UTF-8
+
+// <locale>
+
+// class money_get<charT, InputIterator>
+
+// iter_type get(iter_type b, iter_type e, bool intl, ios_base& iob,
+// ios_base::iostate& err, long double& v) const;
+
+// TODO For zh_CN GLIBC puts the negative sign after the currency symbol.
+// XFAIL: linux-gnu
+
+#include <locale>
+#include <ios>
+#include <streambuf>
+#include <cassert>
+#include "test_iterators.h"
+
+#include "platform_support.h" // locale name macros
+
+typedef std::money_get<char, input_iterator<const char*> > Fn;
+
+class my_facet
+ : public Fn
+{
+public:
+ explicit my_facet(std::size_t refs = 0)
+ : Fn(refs) {}
+};
+
+typedef std::money_get<wchar_t, input_iterator<const wchar_t*> > 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(LOCALE_zh_CN_UTF_8);
+ ios.imbue(std::locale(ios.getloc(),
+ new std::moneypunct_byname<char, false>(loc_name)));
+ ios.imbue(std::locale(ios.getloc(),
+ new std::moneypunct_byname<char, true>(loc_name)));
+ ios.imbue(std::locale(ios.getloc(),
+ new std::moneypunct_byname<wchar_t, false>(loc_name)));
+ ios.imbue(std::locale(ios.getloc(),
+ new std::moneypunct_byname<wchar_t, true>(loc_name)));
+ {
+ const my_facet f(1);
+ // char, national
+ { // zero
+ std::string v = "0.00";
+ typedef input_iterator<const char*> 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<const char*> 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<const char*> 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<const char*> 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<const char*> 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<const char*> 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<const char*> 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<const char*> 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<const char*> 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<const char*> 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<const char*> 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<const char*> 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<const char*> 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<const char*> 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<const char*> 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<const char*> 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<const char*> 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<const char*> 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<const char*> 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<const char*> 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<const char*> 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<const char*> 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<const char*> 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<const char*> 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<const char*> 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<const char*> 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<const char*> 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<const char*> 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<const wchar_t*> 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<const wchar_t*> 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<const wchar_t*> 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<const wchar_t*> 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<const wchar_t*> 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<const wchar_t*> 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<const wchar_t*> 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<const wchar_t*> 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<const wchar_t*> 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<const wchar_t*> 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<const wchar_t*> 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<const wchar_t*> 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<const wchar_t*> 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<const wchar_t*> 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<const wchar_t*> 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<const wchar_t*> 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<const wchar_t*> 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<const wchar_t*> 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<const wchar_t*> 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<const wchar_t*> 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<const wchar_t*> 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<const wchar_t*> 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<const wchar_t*> 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<const wchar_t*> 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<const wchar_t*> 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<const wchar_t*> 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<const wchar_t*> 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<const wchar_t*> 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/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_string_en_US.pass.cpp b/test/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_string_en_US.pass.cpp
new file mode 100644
index 000000000000..b9099f4f84e3
--- /dev/null
+++ b/test/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_string_en_US.pass.cpp
@@ -0,0 +1,731 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// class money_get<charT, InputIterator>
+
+// iter_type get(iter_type b, iter_type e, bool intl, ios_base& iob,
+// ios_base::iostate& err, string_type& v) const;
+
+// REQUIRES: locale.en_US.UTF-8
+
+#include <locale>
+#include <ios>
+#include <streambuf>
+#include <cassert>
+#include "test_iterators.h"
+
+#include "platform_support.h" // locale name macros
+
+typedef std::money_get<char, input_iterator<const char*> > Fn;
+
+class my_facet
+ : public Fn
+{
+public:
+ explicit my_facet(std::size_t refs = 0)
+ : Fn(refs) {}
+};
+
+typedef std::money_get<wchar_t, input_iterator<const wchar_t*> > 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(LOCALE_en_US_UTF_8);
+ ios.imbue(std::locale(ios.getloc(),
+ new std::moneypunct_byname<char, false>(loc_name)));
+ ios.imbue(std::locale(ios.getloc(),
+ new std::moneypunct_byname<char, true>(loc_name)));
+ ios.imbue(std::locale(ios.getloc(),
+ new std::moneypunct_byname<wchar_t, false>(loc_name)));
+ ios.imbue(std::locale(ios.getloc(),
+ new std::moneypunct_byname<wchar_t, true>(loc_name)));
+ {
+ const my_facet f(1);
+ // char, national
+ { // zero
+ std::string v = "0.00";
+ typedef input_iterator<const char*> 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<const char*> 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<const char*> 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<const char*> 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<const char*> 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<const char*> 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<const char*> 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<const char*> 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<const char*> 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<const char*> 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<const char*> 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<const char*> 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<const char*> 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<const char*> 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<const char*> 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<const char*> 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<const char*> 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<const char*> 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<const char*> 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<const char*> 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<const char*> 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<const char*> 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<const char*> 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<const char*> 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<const char*> 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<const char*> 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<const char*> 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<const char*> 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<const wchar_t*> 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<const wchar_t*> 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<const wchar_t*> 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<const wchar_t*> 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<const wchar_t*> 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<const wchar_t*> 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<const wchar_t*> 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<const wchar_t*> 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<const wchar_t*> 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<const wchar_t*> 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<const wchar_t*> 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<const wchar_t*> 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<const wchar_t*> 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<const wchar_t*> 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<const wchar_t*> 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<const wchar_t*> 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<const wchar_t*> 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<const wchar_t*> 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<const wchar_t*> 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<const wchar_t*> 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<const wchar_t*> 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<const wchar_t*> 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<const wchar_t*> 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<const wchar_t*> 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<const wchar_t*> 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<const wchar_t*> 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<const wchar_t*> 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<const wchar_t*> 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/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.virtuals/tested_elsewhere.pass.cpp b/test/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.virtuals/tested_elsewhere.pass.cpp
new file mode 100644
index 000000000000..b58f5c55b643
--- /dev/null
+++ b/test/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.virtuals/tested_elsewhere.pass.cpp
@@ -0,0 +1,12 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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/std/localization/locale.categories/category.monetary/locale.money.get/types.pass.cpp b/test/std/localization/locale.categories/category.monetary/locale.money.get/types.pass.cpp
new file mode 100644
index 000000000000..2e4fb3242f8a
--- /dev/null
+++ b/test/std/localization/locale.categories/category.monetary/locale.money.get/types.pass.cpp
@@ -0,0 +1,34 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// template <class CharT, class InputIterator = istreambuf_iterator<CharT> >
+// class money_get
+// : public locale::facet
+// {
+// public:
+// typedef CharT char_type;
+// typedef InputIterator iter_type;
+// typedef basic_string<char_type> string_type;
+
+#include <locale>
+#include <type_traits>
+
+int main()
+{
+ static_assert((std::is_base_of<std::locale::facet, std::money_get<char> >::value), "");
+ static_assert((std::is_base_of<std::locale::facet, std::money_get<wchar_t> >::value), "");
+ static_assert((std::is_same<std::money_get<char>::char_type, char>::value), "");
+ static_assert((std::is_same<std::money_get<wchar_t>::char_type, wchar_t>::value), "");
+ static_assert((std::is_same<std::money_get<char>::iter_type, std::istreambuf_iterator<char> >::value), "");
+ static_assert((std::is_same<std::money_get<wchar_t>::iter_type, std::istreambuf_iterator<wchar_t> >::value), "");
+ static_assert((std::is_same<std::money_get<char>::string_type, std::string>::value), "");
+ static_assert((std::is_same<std::money_get<wchar_t>::string_type, std::wstring>::value), "");
+}
diff --git a/test/std/localization/locale.categories/category.monetary/locale.money.put/ctor.pass.cpp b/test/std/localization/locale.categories/category.monetary/locale.money.put/ctor.pass.cpp
new file mode 100644
index 000000000000..d0a0007baabe
--- /dev/null
+++ b/test/std/localization/locale.categories/category.monetary/locale.money.put/ctor.pass.cpp
@@ -0,0 +1,52 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// class money_put<charT, OutputIterator>
+
+// explicit money_put(size_t refs = 0);
+
+#include <locale>
+#include <cassert>
+
+typedef std::money_put<char, char*> 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/std/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_en_US.pass.cpp b/test/std/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_en_US.pass.cpp
new file mode 100644
index 000000000000..db193eabccd9
--- /dev/null
+++ b/test/std/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_en_US.pass.cpp
@@ -0,0 +1,494 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// class money_put<charT, OutputIterator>
+
+// iter_type put(iter_type s, bool intl, ios_base& f, char_type fill,
+// long double units) const;
+
+// REQUIRES: locale.en_US.UTF-8
+
+#include <locale>
+#include <ios>
+#include <streambuf>
+#include <cassert>
+#include "test_iterators.h"
+
+#include "platform_support.h" // locale name macros
+
+typedef std::money_put<char, output_iterator<char*> > Fn;
+
+class my_facet
+ : public Fn
+{
+public:
+ explicit my_facet(std::size_t refs = 0)
+ : Fn(refs) {}
+};
+
+typedef std::money_put<wchar_t, output_iterator<wchar_t*> > 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(LOCALE_en_US_UTF_8);
+ ios.imbue(std::locale(ios.getloc(),
+ new std::moneypunct_byname<char, false>(loc_name)));
+ ios.imbue(std::locale(ios.getloc(),
+ new std::moneypunct_byname<char, true>(loc_name)));
+ ios.imbue(std::locale(ios.getloc(),
+ new std::moneypunct_byname<wchar_t, false>(loc_name)));
+ ios.imbue(std::locale(ios.getloc(),
+ new std::moneypunct_byname<wchar_t, true>(loc_name)));
+{
+ const my_facet f(1);
+ // char, national
+ { // zero
+ long double v = 0;
+ char str[100];
+ output_iterator<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(str),
+ false, ios, '*', v);
+ std::string ex(str, iter.base());
+ assert(ex == "-0.01");
+ }
+ { // positive
+ long double v = 123456789;
+ char str[100];
+ output_iterator<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(str),
+ true, ios, '*', v);
+ std::string ex(str, iter.base());
+ assert(ex == "-0.01");
+ }
+ { // positive
+ long double v = 123456789;
+ char str[100];
+ output_iterator<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<wchar_t*> iter = f.put(output_iterator<wchar_t*>(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<wchar_t*> iter = f.put(output_iterator<wchar_t*>(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<wchar_t*> iter = f.put(output_iterator<wchar_t*>(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<wchar_t*> iter = f.put(output_iterator<wchar_t*>(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<wchar_t*> iter = f.put(output_iterator<wchar_t*>(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<wchar_t*> iter = f.put(output_iterator<wchar_t*>(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<wchar_t*> iter = f.put(output_iterator<wchar_t*>(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<wchar_t*> iter = f.put(output_iterator<wchar_t*>(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<wchar_t*> iter = f.put(output_iterator<wchar_t*>(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<wchar_t*> iter = f.put(output_iterator<wchar_t*>(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<wchar_t*> iter = f.put(output_iterator<wchar_t*>(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<wchar_t*> iter = f.put(output_iterator<wchar_t*>(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<wchar_t*> iter = f.put(output_iterator<wchar_t*>(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<wchar_t*> iter = f.put(output_iterator<wchar_t*>(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<wchar_t*> iter = f.put(output_iterator<wchar_t*>(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<wchar_t*> iter = f.put(output_iterator<wchar_t*>(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<wchar_t*> iter = f.put(output_iterator<wchar_t*>(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<wchar_t*> iter = f.put(output_iterator<wchar_t*>(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<wchar_t*> iter = f.put(output_iterator<wchar_t*>(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<wchar_t*> iter = f.put(output_iterator<wchar_t*>(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<wchar_t*> iter = f.put(output_iterator<wchar_t*>(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<wchar_t*> iter = f.put(output_iterator<wchar_t*>(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/std/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_fr_FR.pass.cpp b/test/std/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_fr_FR.pass.cpp
new file mode 100644
index 000000000000..8b620bca376d
--- /dev/null
+++ b/test/std/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_fr_FR.pass.cpp
@@ -0,0 +1,495 @@
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+//
+// XFAIL: apple-darwin
+
+// REQUIRES: locale.fr_FR.UTF-8
+
+// <locale>
+
+// class money_put<charT, OutputIterator>
+
+// iter_type put(iter_type s, bool intl, ios_base& f, char_type fill,
+// long double units) const;
+
+#include <locale>
+#include <ios>
+#include <streambuf>
+#include <cassert>
+#include "test_iterators.h"
+
+#include "platform_support.h" // locale name macros
+
+typedef std::money_put<char, output_iterator<char*> > Fn;
+
+class my_facet
+ : public Fn
+{
+public:
+ explicit my_facet(std::size_t refs = 0)
+ : Fn(refs) {}
+};
+
+typedef std::money_put<wchar_t, output_iterator<wchar_t*> > 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(LOCALE_fr_FR_UTF_8);
+ ios.imbue(std::locale(ios.getloc(),
+ new std::moneypunct_byname<char, false>(loc_name)));
+ ios.imbue(std::locale(ios.getloc(),
+ new std::moneypunct_byname<char, true>(loc_name)));
+ ios.imbue(std::locale(ios.getloc(),
+ new std::moneypunct_byname<wchar_t, false>(loc_name)));
+ ios.imbue(std::locale(ios.getloc(),
+ new std::moneypunct_byname<wchar_t, true>(loc_name)));
+{
+ const my_facet f(1);
+ // char, national
+ { // zero
+ long double v = 0;
+ char str[100];
+ output_iterator<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(str),
+ false, ios, '*', v);
+ std::string ex(str, iter.base());
+ assert(ex == "-0,01");
+ }
+ { // positive
+ long double v = 123456789;
+ char str[100];
+ output_iterator<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(str),
+ false, ios, '*', v);
+ std::string ex(str, iter.base());
+ assert(ex == "0,00 \u20ac");
+ }
+ { // negative one, showbase
+ long double v = -1;
+ showbase(ios);
+ char str[100];
+ output_iterator<char*> iter = f.put(output_iterator<char*>(str),
+ false, ios, '*', v);
+ std::string ex(str, iter.base());
+ assert(ex == "-0,01 \u20ac");
+ }
+ { // positive, showbase
+ long double v = 123456789;
+ showbase(ios);
+ char str[100];
+ output_iterator<char*> iter = f.put(output_iterator<char*>(str),
+ false, ios, '*', v);
+ std::string ex(str, iter.base());
+ assert(ex == "1 234 567,89 \u20ac");
+ }
+ { // negative, showbase
+ long double v = -123456789;
+ showbase(ios);
+ char str[100];
+ output_iterator<char*> iter = f.put(output_iterator<char*>(str),
+ false, ios, '*', v);
+ std::string ex(str, iter.base());
+ assert(ex == "-1 234 567,89 \u20ac");
+ }
+ { // negative, showbase, left
+ long double v = -123456789;
+ showbase(ios);
+ ios.width(20);
+ left(ios);
+ char str[100];
+ output_iterator<char*> iter = f.put(output_iterator<char*>(str),
+ false, ios, ' ', v);
+ std::string ex(str, iter.base());
+ assert(ex == "-1 234 567,89 \u20ac ");
+ assert(ios.width() == 0);
+ }
+ { // negative, showbase, internal
+ long double v = -123456789;
+ showbase(ios);
+ ios.width(20);
+ internal(ios);
+ char str[100];
+ output_iterator<char*> iter = f.put(output_iterator<char*>(str),
+ false, ios, ' ', v);
+ std::string ex(str, iter.base());
+ assert(ex == "-1 234 567,89 \u20ac");
+ assert(ios.width() == 0);
+ }
+ { // negative, showbase, right
+ long double v = -123456789;
+ showbase(ios);
+ ios.width(20);
+ right(ios);
+ char str[100];
+ output_iterator<char*> iter = f.put(output_iterator<char*>(str),
+ false, ios, ' ', v);
+ std::string ex(str, iter.base());
+ assert(ex == " -1 234 567,89 \u20ac");
+ assert(ios.width() == 0);
+ }
+
+ // char, international
+ noshowbase(ios);
+ ios.unsetf(std::ios_base::adjustfield);
+ { // zero
+ long double v = 0;
+ char str[100];
+ output_iterator<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(str),
+ true, ios, '*', v);
+ std::string ex(str, iter.base());
+ assert(ex == "-0,01");
+ }
+ { // positive
+ long double v = 123456789;
+ char str[100];
+ output_iterator<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<wchar_t*> iter = f.put(output_iterator<wchar_t*>(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<wchar_t*> iter = f.put(output_iterator<wchar_t*>(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<wchar_t*> iter = f.put(output_iterator<wchar_t*>(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<wchar_t*> iter = f.put(output_iterator<wchar_t*>(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<wchar_t*> iter = f.put(output_iterator<wchar_t*>(str),
+ false, ios, '*', v);
+ std::wstring ex(str, iter.base());
+ assert(ex == L"0,00 \u20ac");
+ }
+ { // negative one, showbase
+ long double v = -1;
+ showbase(ios);
+ wchar_t str[100];
+ output_iterator<wchar_t*> iter = f.put(output_iterator<wchar_t*>(str),
+ false, ios, '*', v);
+ std::wstring ex(str, iter.base());
+ assert(ex == L"-0,01 \u20ac");
+ }
+ { // positive, showbase
+ long double v = 123456789;
+ showbase(ios);
+ wchar_t str[100];
+ output_iterator<wchar_t*> iter = f.put(output_iterator<wchar_t*>(str),
+ false, ios, '*', v);
+ std::wstring ex(str, iter.base());
+ assert(ex == L"1 234 567,89 \u20ac");
+ }
+ { // negative, showbase
+ long double v = -123456789;
+ showbase(ios);
+ wchar_t str[100];
+ output_iterator<wchar_t*> iter = f.put(output_iterator<wchar_t*>(str),
+ false, ios, '*', v);
+ std::wstring ex(str, iter.base());
+ assert(ex == L"-1 234 567,89 \u20ac");
+ }
+ { // negative, showbase, left
+ long double v = -123456789;
+ showbase(ios);
+ ios.width(20);
+ left(ios);
+ wchar_t str[100];
+ output_iterator<wchar_t*> iter = f.put(output_iterator<wchar_t*>(str),
+ false, ios, ' ', v);
+ std::wstring ex(str, iter.base());
+ assert(ex == L"-1 234 567,89 \u20ac ");
+ assert(ios.width() == 0);
+ }
+ { // negative, showbase, internal
+ long double v = -123456789;
+ showbase(ios);
+ ios.width(20);
+ internal(ios);
+ wchar_t str[100];
+ output_iterator<wchar_t*> iter = f.put(output_iterator<wchar_t*>(str),
+ false, ios, ' ', v);
+ std::wstring ex(str, iter.base());
+ assert(ex == L"-1 234 567,89 \u20ac");
+ assert(ios.width() == 0);
+ }
+ { // negative, showbase, right
+ long double v = -123456789;
+ showbase(ios);
+ ios.width(20);
+ right(ios);
+ wchar_t str[100];
+ output_iterator<wchar_t*> iter = f.put(output_iterator<wchar_t*>(str),
+ false, ios, ' ', v);
+ std::wstring ex(str, iter.base());
+ assert(ex == L" -1 234 567,89 \u20ac");
+ 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<wchar_t*> iter = f.put(output_iterator<wchar_t*>(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<wchar_t*> iter = f.put(output_iterator<wchar_t*>(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<wchar_t*> iter = f.put(output_iterator<wchar_t*>(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<wchar_t*> iter = f.put(output_iterator<wchar_t*>(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<wchar_t*> iter = f.put(output_iterator<wchar_t*>(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<wchar_t*> iter = f.put(output_iterator<wchar_t*>(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<wchar_t*> iter = f.put(output_iterator<wchar_t*>(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<wchar_t*> iter = f.put(output_iterator<wchar_t*>(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<wchar_t*> iter = f.put(output_iterator<wchar_t*>(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<wchar_t*> iter = f.put(output_iterator<wchar_t*>(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<wchar_t*> iter = f.put(output_iterator<wchar_t*>(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/std/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_ru_RU.pass.cpp b/test/std/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_ru_RU.pass.cpp
new file mode 100644
index 000000000000..54bfcfb5c88d
--- /dev/null
+++ b/test/std/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_ru_RU.pass.cpp
@@ -0,0 +1,501 @@
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+//
+// XFAIL: apple-darwin
+
+// Failure related to GLIBC's use of U00A0 as mon_thousands_sep
+// and U002E as mon_decimal_point.
+// TODO: U00A0 should be investigated.
+// Possibly related to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=16006
+// XFAIL: linux
+
+// REQUIRES: locale.ru_RU.UTF-8
+
+// <locale>
+
+// class money_put<charT, OutputIterator>
+
+// iter_type put(iter_type s, bool intl, ios_base& f, char_type fill,
+// long double units) const;
+
+#include <locale>
+#include <ios>
+#include <streambuf>
+#include <cassert>
+#include "test_iterators.h"
+
+#include "platform_support.h" // locale name macros
+
+typedef std::money_put<char, output_iterator<char*> > Fn;
+
+class my_facet
+ : public Fn
+{
+public:
+ explicit my_facet(std::size_t refs = 0)
+ : Fn(refs) {}
+};
+
+typedef std::money_put<wchar_t, output_iterator<wchar_t*> > 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(LOCALE_ru_RU_UTF_8);
+ ios.imbue(std::locale(ios.getloc(),
+ new std::moneypunct_byname<char, false>(loc_name)));
+ ios.imbue(std::locale(ios.getloc(),
+ new std::moneypunct_byname<char, true>(loc_name)));
+ ios.imbue(std::locale(ios.getloc(),
+ new std::moneypunct_byname<wchar_t, false>(loc_name)));
+ ios.imbue(std::locale(ios.getloc(),
+ new std::moneypunct_byname<wchar_t, true>(loc_name)));
+{
+ const my_facet f(1);
+ // char, national
+ { // zero
+ long double v = 0;
+ char str[100];
+ output_iterator<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(str),
+ false, ios, '*', v);
+ std::string ex(str, iter.base());
+ assert(ex == "-0,01 ");
+ }
+ { // positive
+ long double v = 123456789;
+ char str[100];
+ output_iterator<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(str),
+ true, ios, '*', v);
+ std::string ex(str, iter.base());
+ assert(ex == "-0,01 ");
+ }
+ { // positive
+ long double v = 123456789;
+ char str[100];
+ output_iterator<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(str),
+ true, ios, '*', v);
+ std::string ex(str, iter.base());
+ assert(ex == "0,00 RUB ");
+ }
+ { // negative one, showbase
+ long double v = -1;
+ showbase(ios);
+ char str[100];
+ output_iterator<char*> iter = f.put(output_iterator<char*>(str),
+ true, ios, '*', v);
+ std::string ex(str, iter.base());
+ assert(ex == "-0,01 RUB ");
+ }
+ { // positive, showbase
+ long double v = 123456789;
+ showbase(ios);
+ char str[100];
+ output_iterator<char*> iter = f.put(output_iterator<char*>(str),
+ true, ios, '*', v);
+ std::string ex(str, iter.base());
+ assert(ex == "1 234 567,89 RUB ");
+ }
+ { // negative, showbase
+ long double v = -123456789;
+ showbase(ios);
+ char str[100];
+ output_iterator<char*> iter = f.put(output_iterator<char*>(str),
+ true, ios, '*', v);
+ std::string ex(str, iter.base());
+ assert(ex == "-1 234 567,89 RUB ");
+ }
+ { // negative, showbase, left
+ long double v = -123456789;
+ showbase(ios);
+ ios.width(20);
+ left(ios);
+ char str[100];
+ output_iterator<char*> iter = f.put(output_iterator<char*>(str),
+ true, ios, ' ', v);
+ std::string ex(str, iter.base());
+ assert(ex == "-1 234 567,89 RUB ");
+ assert(ios.width() == 0);
+ }
+ { // negative, showbase, internal
+ long double v = -123456789;
+ showbase(ios);
+ ios.width(20);
+ internal(ios);
+ char str[100];
+ output_iterator<char*> iter = f.put(output_iterator<char*>(str),
+ true, ios, ' ', v);
+ std::string ex(str, iter.base());
+ assert(ex == "-1 234 567,89 RUB ");
+ assert(ios.width() == 0);
+ }
+ { // negative, showbase, right
+ long double v = -123456789;
+ showbase(ios);
+ ios.width(20);
+ right(ios);
+ char str[100];
+ output_iterator<char*> iter = f.put(output_iterator<char*>(str),
+ true, ios, ' ', v);
+ std::string ex(str, iter.base());
+ assert(ex == " -1 234 567,89 RUB ");
+ 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<wchar_t*> iter = f.put(output_iterator<wchar_t*>(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<wchar_t*> iter = f.put(output_iterator<wchar_t*>(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<wchar_t*> iter = f.put(output_iterator<wchar_t*>(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<wchar_t*> iter = f.put(output_iterator<wchar_t*>(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<wchar_t*> iter = f.put(output_iterator<wchar_t*>(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<wchar_t*> iter = f.put(output_iterator<wchar_t*>(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<wchar_t*> iter = f.put(output_iterator<wchar_t*>(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<wchar_t*> iter = f.put(output_iterator<wchar_t*>(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<wchar_t*> iter = f.put(output_iterator<wchar_t*>(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<wchar_t*> iter = f.put(output_iterator<wchar_t*>(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<wchar_t*> iter = f.put(output_iterator<wchar_t*>(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<wchar_t*> iter = f.put(output_iterator<wchar_t*>(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<wchar_t*> iter = f.put(output_iterator<wchar_t*>(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<wchar_t*> iter = f.put(output_iterator<wchar_t*>(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<wchar_t*> iter = f.put(output_iterator<wchar_t*>(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<wchar_t*> iter = f.put(output_iterator<wchar_t*>(str),
+ true, ios, '*', v);
+ std::wstring ex(str, iter.base());
+ assert(ex == L"0,00 RUB ");
+ }
+ { // negative one, showbase
+ long double v = -1;
+ showbase(ios);
+ wchar_t str[100];
+ output_iterator<wchar_t*> iter = f.put(output_iterator<wchar_t*>(str),
+ true, ios, '*', v);
+ std::wstring ex(str, iter.base());
+ assert(ex == L"-0,01 RUB ");
+ }
+ { // positive, showbase
+ long double v = 123456789;
+ showbase(ios);
+ wchar_t str[100];
+ output_iterator<wchar_t*> iter = f.put(output_iterator<wchar_t*>(str),
+ true, ios, '*', v);
+ std::wstring ex(str, iter.base());
+ assert(ex == L"1 234 567,89 RUB ");
+ }
+ { // negative, showbase
+ long double v = -123456789;
+ showbase(ios);
+ wchar_t str[100];
+ output_iterator<wchar_t*> iter = f.put(output_iterator<wchar_t*>(str),
+ true, ios, '*', v);
+ std::wstring ex(str, iter.base());
+ assert(ex == L"-1 234 567,89 RUB ");
+ }
+ { // negative, showbase, left
+ long double v = -123456789;
+ showbase(ios);
+ ios.width(20);
+ left(ios);
+ wchar_t str[100];
+ output_iterator<wchar_t*> iter = f.put(output_iterator<wchar_t*>(str),
+ true, ios, ' ', v);
+ std::wstring ex(str, iter.base());
+ assert(ex == L"-1 234 567,89 RUB ");
+ assert(ios.width() == 0);
+ }
+ { // negative, showbase, internal
+ long double v = -123456789;
+ showbase(ios);
+ ios.width(20);
+ internal(ios);
+ wchar_t str[100];
+ output_iterator<wchar_t*> iter = f.put(output_iterator<wchar_t*>(str),
+ true, ios, ' ', v);
+ std::wstring ex(str, iter.base());
+ assert(ex == L"-1 234 567,89 RUB ");
+ assert(ios.width() == 0);
+ }
+ { // negative, showbase, right
+ long double v = -123456789;
+ showbase(ios);
+ ios.width(20);
+ right(ios);
+ wchar_t str[100];
+ output_iterator<wchar_t*> iter = f.put(output_iterator<wchar_t*>(str),
+ true, ios, ' ', v);
+ std::wstring ex(str, iter.base());
+ assert(ex == L" -1 234 567,89 RUB ");
+ assert(ios.width() == 0);
+ }
+}
+}
diff --git a/test/std/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_zh_CN.pass.cpp b/test/std/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_zh_CN.pass.cpp
new file mode 100644
index 000000000000..633e1885e711
--- /dev/null
+++ b/test/std/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_zh_CN.pass.cpp
@@ -0,0 +1,496 @@
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// REQUIRES: locale.zh_CN.UTF-8
+
+// <locale>
+
+// class money_put<charT, OutputIterator>
+
+// iter_type put(iter_type s, bool intl, ios_base& f, char_type fill,
+// long double units) const;
+
+// TODO For zh_CN GLIBC puts the negative sign after the currency symbol.
+// XFAIL: linux-gnu
+
+#include <locale>
+#include <ios>
+#include <streambuf>
+#include <cassert>
+#include "test_iterators.h"
+
+#include "platform_support.h" // locale name macros
+
+typedef std::money_put<char, output_iterator<char*> > Fn;
+
+class my_facet
+ : public Fn
+{
+public:
+ explicit my_facet(std::size_t refs = 0)
+ : Fn(refs) {}
+};
+
+typedef std::money_put<wchar_t, output_iterator<wchar_t*> > 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(LOCALE_zh_CN_UTF_8);
+ ios.imbue(std::locale(ios.getloc(),
+ new std::moneypunct_byname<char, false>(loc_name)));
+ ios.imbue(std::locale(ios.getloc(),
+ new std::moneypunct_byname<char, true>(loc_name)));
+ ios.imbue(std::locale(ios.getloc(),
+ new std::moneypunct_byname<wchar_t, false>(loc_name)));
+ ios.imbue(std::locale(ios.getloc(),
+ new std::moneypunct_byname<wchar_t, true>(loc_name)));
+{
+ const my_facet f(1);
+ // char, national
+ { // zero
+ long double v = 0;
+ char str[100];
+ output_iterator<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(str),
+ false, ios, '*', v);
+ std::string ex(str, iter.base());
+ assert(ex == "-0.01");
+ }
+ { // positive
+ long double v = 123456789;
+ char str[100];
+ output_iterator<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(str),
+ true, ios, '*', v);
+ std::string ex(str, iter.base());
+ assert(ex == "-0.01");
+ }
+ { // positive
+ long double v = 123456789;
+ char str[100];
+ output_iterator<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<wchar_t*> iter = f.put(output_iterator<wchar_t*>(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<wchar_t*> iter = f.put(output_iterator<wchar_t*>(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<wchar_t*> iter = f.put(output_iterator<wchar_t*>(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<wchar_t*> iter = f.put(output_iterator<wchar_t*>(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<wchar_t*> iter = f.put(output_iterator<wchar_t*>(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<wchar_t*> iter = f.put(output_iterator<wchar_t*>(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<wchar_t*> iter = f.put(output_iterator<wchar_t*>(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<wchar_t*> iter = f.put(output_iterator<wchar_t*>(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<wchar_t*> iter = f.put(output_iterator<wchar_t*>(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<wchar_t*> iter = f.put(output_iterator<wchar_t*>(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<wchar_t*> iter = f.put(output_iterator<wchar_t*>(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<wchar_t*> iter = f.put(output_iterator<wchar_t*>(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<wchar_t*> iter = f.put(output_iterator<wchar_t*>(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<wchar_t*> iter = f.put(output_iterator<wchar_t*>(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<wchar_t*> iter = f.put(output_iterator<wchar_t*>(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<wchar_t*> iter = f.put(output_iterator<wchar_t*>(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<wchar_t*> iter = f.put(output_iterator<wchar_t*>(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<wchar_t*> iter = f.put(output_iterator<wchar_t*>(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<wchar_t*> iter = f.put(output_iterator<wchar_t*>(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<wchar_t*> iter = f.put(output_iterator<wchar_t*>(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<wchar_t*> iter = f.put(output_iterator<wchar_t*>(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<wchar_t*> iter = f.put(output_iterator<wchar_t*>(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/std/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_string_en_US.pass.cpp b/test/std/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_string_en_US.pass.cpp
new file mode 100644
index 000000000000..659f948d61c8
--- /dev/null
+++ b/test/std/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_string_en_US.pass.cpp
@@ -0,0 +1,494 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// class money_put<charT, OutputIterator>
+
+// iter_type put(iter_type s, bool intl, ios_base& f, char_type fill,
+// const string_type& units) const;
+
+// REQUIRES: locale.en_US.UTF-8
+
+#include <locale>
+#include <ios>
+#include <streambuf>
+#include <cassert>
+#include "test_iterators.h"
+
+#include "platform_support.h" // locale name macros
+
+typedef std::money_put<char, output_iterator<char*> > Fn;
+
+class my_facet
+ : public Fn
+{
+public:
+ explicit my_facet(std::size_t refs = 0)
+ : Fn(refs) {}
+};
+
+typedef std::money_put<wchar_t, output_iterator<wchar_t*> > 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(LOCALE_en_US_UTF_8);
+ ios.imbue(std::locale(ios.getloc(),
+ new std::moneypunct_byname<char, false>(loc_name)));
+ ios.imbue(std::locale(ios.getloc(),
+ new std::moneypunct_byname<char, true>(loc_name)));
+ ios.imbue(std::locale(ios.getloc(),
+ new std::moneypunct_byname<wchar_t, false>(loc_name)));
+ ios.imbue(std::locale(ios.getloc(),
+ new std::moneypunct_byname<wchar_t, true>(loc_name)));
+{
+ const my_facet f(1);
+ // char, national
+ { // zero
+ std::string v = "0";
+ char str[100];
+ output_iterator<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(str),
+ false, ios, '*', v);
+ std::string ex(str, iter.base());
+ assert(ex == "-0.01");
+ }
+ { // positive
+ std::string v = "123456789";
+ char str[100];
+ output_iterator<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(str),
+ true, ios, '*', v);
+ std::string ex(str, iter.base());
+ assert(ex == "-0.01");
+ }
+ { // positive
+ std::string v = "123456789";
+ char str[100];
+ output_iterator<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<wchar_t*> iter = f.put(output_iterator<wchar_t*>(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<wchar_t*> iter = f.put(output_iterator<wchar_t*>(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<wchar_t*> iter = f.put(output_iterator<wchar_t*>(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<wchar_t*> iter = f.put(output_iterator<wchar_t*>(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<wchar_t*> iter = f.put(output_iterator<wchar_t*>(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<wchar_t*> iter = f.put(output_iterator<wchar_t*>(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<wchar_t*> iter = f.put(output_iterator<wchar_t*>(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<wchar_t*> iter = f.put(output_iterator<wchar_t*>(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<wchar_t*> iter = f.put(output_iterator<wchar_t*>(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<wchar_t*> iter = f.put(output_iterator<wchar_t*>(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<wchar_t*> iter = f.put(output_iterator<wchar_t*>(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<wchar_t*> iter = f.put(output_iterator<wchar_t*>(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<wchar_t*> iter = f.put(output_iterator<wchar_t*>(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<wchar_t*> iter = f.put(output_iterator<wchar_t*>(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<wchar_t*> iter = f.put(output_iterator<wchar_t*>(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<wchar_t*> iter = f.put(output_iterator<wchar_t*>(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<wchar_t*> iter = f.put(output_iterator<wchar_t*>(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<wchar_t*> iter = f.put(output_iterator<wchar_t*>(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<wchar_t*> iter = f.put(output_iterator<wchar_t*>(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<wchar_t*> iter = f.put(output_iterator<wchar_t*>(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<wchar_t*> iter = f.put(output_iterator<wchar_t*>(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<wchar_t*> iter = f.put(output_iterator<wchar_t*>(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/std/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.virtuals/tested_elsewhere.pass.cpp b/test/std/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.virtuals/tested_elsewhere.pass.cpp
new file mode 100644
index 000000000000..b58f5c55b643
--- /dev/null
+++ b/test/std/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.virtuals/tested_elsewhere.pass.cpp
@@ -0,0 +1,12 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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/std/localization/locale.categories/category.monetary/locale.money.put/types.pass.cpp b/test/std/localization/locale.categories/category.monetary/locale.money.put/types.pass.cpp
new file mode 100644
index 000000000000..44ff1073d744
--- /dev/null
+++ b/test/std/localization/locale.categories/category.monetary/locale.money.put/types.pass.cpp
@@ -0,0 +1,34 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// template <class CharT, class OutputIterator = ostreambuf_iterator<CharT> >
+// class money_put
+// : public locale::facet
+// {
+// public:
+// typedef CharT char_type;
+// typedef OutputIterator iter_type;
+// typedef basic_string<char_type> string_type;
+
+#include <locale>
+#include <type_traits>
+
+int main()
+{
+ static_assert((std::is_base_of<std::locale::facet, std::money_put<char> >::value), "");
+ static_assert((std::is_base_of<std::locale::facet, std::money_put<wchar_t> >::value), "");
+ static_assert((std::is_same<std::money_put<char>::char_type, char>::value), "");
+ static_assert((std::is_same<std::money_put<wchar_t>::char_type, wchar_t>::value), "");
+ static_assert((std::is_same<std::money_put<char>::iter_type, std::ostreambuf_iterator<char> >::value), "");
+ static_assert((std::is_same<std::money_put<wchar_t>::iter_type, std::ostreambuf_iterator<wchar_t> >::value), "");
+ static_assert((std::is_same<std::money_put<char>::string_type, std::string>::value), "");
+ static_assert((std::is_same<std::money_put<wchar_t>::string_type, std::wstring>::value), "");
+}
diff --git a/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/curr_symbol.pass.cpp b/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/curr_symbol.pass.cpp
new file mode 100644
index 000000000000..6d23d6361f85
--- /dev/null
+++ b/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/curr_symbol.pass.cpp
@@ -0,0 +1,147 @@
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+//
+// XFAIL: apple-darwin
+
+// REQUIRES: locale.en_US.UTF-8
+// REQUIRES: locale.fr_FR.UTF-8
+// REQUIRES: locale.ru_RU.UTF-8
+// REQUIRES: locale.zh_CN.UTF-8
+
+// <locale>
+
+// class moneypunct_byname<charT, International>
+
+// string_type curr_symbol() const;
+
+#include <locale>
+#include <limits>
+#include <cassert>
+
+#include "platform_support.h" // locale name macros
+
+class Fnf
+ : public std::moneypunct_byname<char, false>
+{
+public:
+ explicit Fnf(const std::string& nm, std::size_t refs = 0)
+ : std::moneypunct_byname<char, false>(nm, refs) {}
+};
+
+class Fnt
+ : public std::moneypunct_byname<char, true>
+{
+public:
+ explicit Fnt(const std::string& nm, std::size_t refs = 0)
+ : std::moneypunct_byname<char, true>(nm, refs) {}
+};
+
+class Fwf
+ : public std::moneypunct_byname<wchar_t, false>
+{
+public:
+ explicit Fwf(const std::string& nm, std::size_t refs = 0)
+ : std::moneypunct_byname<wchar_t, false>(nm, refs) {}
+};
+
+class Fwt
+ : public std::moneypunct_byname<wchar_t, true>
+{
+public:
+ explicit Fwt(const std::string& nm, std::size_t refs = 0)
+ : std::moneypunct_byname<wchar_t, true>(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(LOCALE_en_US_UTF_8, 1);
+ assert(f.curr_symbol() == "$");
+ }
+ {
+ Fnt f(LOCALE_en_US_UTF_8, 1);
+ assert(f.curr_symbol() == "USD ");
+ }
+ {
+ Fwf f(LOCALE_en_US_UTF_8, 1);
+ assert(f.curr_symbol() == L"$");
+ }
+ {
+ Fwt f(LOCALE_en_US_UTF_8, 1);
+ assert(f.curr_symbol() == L"USD ");
+ }
+
+ {
+ Fnf f(LOCALE_fr_FR_UTF_8, 1);
+ assert(f.curr_symbol() == " \u20ac");
+ }
+ {
+ Fnt f(LOCALE_fr_FR_UTF_8, 1);
+ assert(f.curr_symbol() == " EUR");
+ }
+ {
+ Fwf f(LOCALE_fr_FR_UTF_8, 1);
+ assert(f.curr_symbol() == L" \u20ac");
+ }
+ {
+ Fwt f(LOCALE_fr_FR_UTF_8, 1);
+ assert(f.curr_symbol() == L" EUR");
+ }
+
+ {
+ Fnf f(LOCALE_ru_RU_UTF_8, 1);
+ assert(f.curr_symbol() == " \xD1\x80\xD1\x83\xD0\xB1");
+ }
+ {
+ Fnt f(LOCALE_ru_RU_UTF_8, 1);
+ assert(f.curr_symbol() == " RUB");
+ }
+ {
+ Fwf f(LOCALE_ru_RU_UTF_8, 1);
+ assert(f.curr_symbol() == L" \x440\x443\x431");
+ }
+ {
+ Fwt f(LOCALE_ru_RU_UTF_8, 1);
+ assert(f.curr_symbol() == L" RUB");
+ }
+
+ {
+ Fnf f(LOCALE_zh_CN_UTF_8, 1);
+ assert(f.curr_symbol() == "\xEF\xBF\xA5");
+ }
+ {
+ Fnt f(LOCALE_zh_CN_UTF_8, 1);
+ assert(f.curr_symbol() == "CNY ");
+ }
+ {
+ Fwf f(LOCALE_zh_CN_UTF_8, 1);
+ assert(f.curr_symbol() == L"\xFFE5");
+ }
+ {
+ Fwt f(LOCALE_zh_CN_UTF_8, 1);
+ assert(f.curr_symbol() == L"CNY ");
+ }
+}
diff --git a/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/decimal_point.pass.cpp b/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/decimal_point.pass.cpp
new file mode 100644
index 000000000000..8270377f3ab9
--- /dev/null
+++ b/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/decimal_point.pass.cpp
@@ -0,0 +1,148 @@
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// REQUIRES: locale.en_US.UTF-8
+// REQUIRES: locale.fr_FR.UTF-8
+// REQUIRES: locale.ru_RU.UTF-8
+// REQUIRES: locale.zh_CN.UTF-8
+
+// Russia uses ',' for the decimal separator. GLIBC returns '.'
+// XFAIL: linux
+
+// <locale>
+
+// class moneypunct_byname<charT, International>
+
+// charT decimal_point() const;
+
+#include <locale>
+#include <limits>
+#include <cassert>
+
+#include "platform_support.h" // locale name macros
+
+class Fnf
+ : public std::moneypunct_byname<char, false>
+{
+public:
+ explicit Fnf(const std::string& nm, std::size_t refs = 0)
+ : std::moneypunct_byname<char, false>(nm, refs) {}
+};
+
+class Fnt
+ : public std::moneypunct_byname<char, true>
+{
+public:
+ explicit Fnt(const std::string& nm, std::size_t refs = 0)
+ : std::moneypunct_byname<char, true>(nm, refs) {}
+};
+
+class Fwf
+ : public std::moneypunct_byname<wchar_t, false>
+{
+public:
+ explicit Fwf(const std::string& nm, std::size_t refs = 0)
+ : std::moneypunct_byname<wchar_t, false>(nm, refs) {}
+};
+
+class Fwt
+ : public std::moneypunct_byname<wchar_t, true>
+{
+public:
+ explicit Fwt(const std::string& nm, std::size_t refs = 0)
+ : std::moneypunct_byname<wchar_t, true>(nm, refs) {}
+};
+
+int main()
+{
+ {
+ Fnf f("C", 1);
+ assert(f.decimal_point() == std::numeric_limits<char>::max());
+ }
+ {
+ Fnt f("C", 1);
+ assert(f.decimal_point() == std::numeric_limits<char>::max());
+ }
+ {
+ Fwf f("C", 1);
+ assert(f.decimal_point() == std::numeric_limits<wchar_t>::max());
+ }
+ {
+ Fwt f("C", 1);
+ assert(f.decimal_point() == std::numeric_limits<wchar_t>::max());
+ }
+
+ {
+ Fnf f(LOCALE_en_US_UTF_8, 1);
+ assert(f.decimal_point() == '.');
+ }
+ {
+ Fnt f(LOCALE_en_US_UTF_8, 1);
+ assert(f.decimal_point() == '.');
+ }
+ {
+ Fwf f(LOCALE_en_US_UTF_8, 1);
+ assert(f.decimal_point() == L'.');
+ }
+ {
+ Fwt f(LOCALE_en_US_UTF_8, 1);
+ assert(f.decimal_point() == L'.');
+ }
+
+ {
+ Fnf f(LOCALE_fr_FR_UTF_8, 1);
+ assert(f.decimal_point() == ',');
+ }
+ {
+ Fnt f(LOCALE_fr_FR_UTF_8, 1);
+ assert(f.decimal_point() == ',');
+ }
+ {
+ Fwf f(LOCALE_fr_FR_UTF_8, 1);
+ assert(f.decimal_point() == L',');
+ }
+ {
+ Fwt f(LOCALE_fr_FR_UTF_8, 1);
+ assert(f.decimal_point() == L',');
+ }
+
+ {
+ Fnf f(LOCALE_ru_RU_UTF_8, 1);
+ assert(f.decimal_point() == ',');
+ }
+ {
+ Fnt f(LOCALE_ru_RU_UTF_8, 1);
+ assert(f.decimal_point() == ',');
+ }
+ {
+ Fwf f(LOCALE_ru_RU_UTF_8, 1);
+ assert(f.decimal_point() == L',');
+ }
+ {
+ Fwt f(LOCALE_ru_RU_UTF_8, 1);
+ assert(f.decimal_point() == L',');
+ }
+
+ {
+ Fnf f(LOCALE_zh_CN_UTF_8, 1);
+ assert(f.decimal_point() == '.');
+ }
+ {
+ Fnt f(LOCALE_zh_CN_UTF_8, 1);
+ assert(f.decimal_point() == '.');
+ }
+ {
+ Fwf f(LOCALE_zh_CN_UTF_8, 1);
+ assert(f.decimal_point() == L'.');
+ }
+ {
+ Fwt f(LOCALE_zh_CN_UTF_8, 1);
+ assert(f.decimal_point() == L'.');
+ }
+}
diff --git a/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/frac_digits.pass.cpp b/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/frac_digits.pass.cpp
new file mode 100644
index 000000000000..724dc1e5c9e7
--- /dev/null
+++ b/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/frac_digits.pass.cpp
@@ -0,0 +1,145 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// REQUIRES: locale.en_US.UTF-8
+// REQUIRES: locale.fr_FR.UTF-8
+// REQUIRES: locale.ru_RU.UTF-8
+// REQUIRES: locale.zh_CN.UTF-8
+
+// class moneypunct_byname<charT, International>
+
+// int frac_digits() const;
+
+#include <locale>
+#include <limits>
+#include <cassert>
+
+#include "platform_support.h" // locale name macros
+
+class Fnf
+ : public std::moneypunct_byname<char, false>
+{
+public:
+ explicit Fnf(const std::string& nm, std::size_t refs = 0)
+ : std::moneypunct_byname<char, false>(nm, refs) {}
+};
+
+class Fnt
+ : public std::moneypunct_byname<char, true>
+{
+public:
+ explicit Fnt(const std::string& nm, std::size_t refs = 0)
+ : std::moneypunct_byname<char, true>(nm, refs) {}
+};
+
+class Fwf
+ : public std::moneypunct_byname<wchar_t, false>
+{
+public:
+ explicit Fwf(const std::string& nm, std::size_t refs = 0)
+ : std::moneypunct_byname<wchar_t, false>(nm, refs) {}
+};
+
+class Fwt
+ : public std::moneypunct_byname<wchar_t, true>
+{
+public:
+ explicit Fwt(const std::string& nm, std::size_t refs = 0)
+ : std::moneypunct_byname<wchar_t, true>(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(LOCALE_en_US_UTF_8, 1);
+ assert(f.frac_digits() == 2);
+ }
+ {
+ Fnt f(LOCALE_en_US_UTF_8, 1);
+ assert(f.frac_digits() == 2);
+ }
+ {
+ Fwf f(LOCALE_en_US_UTF_8, 1);
+ assert(f.frac_digits() == 2);
+ }
+ {
+ Fwt f(LOCALE_en_US_UTF_8, 1);
+ assert(f.frac_digits() == 2);
+ }
+
+ {
+ Fnf f(LOCALE_fr_FR_UTF_8, 1);
+ assert(f.frac_digits() == 2);
+ }
+ {
+ Fnt f(LOCALE_fr_FR_UTF_8, 1);
+ assert(f.frac_digits() == 2);
+ }
+ {
+ Fwf f(LOCALE_fr_FR_UTF_8, 1);
+ assert(f.frac_digits() == 2);
+ }
+ {
+ Fwt f(LOCALE_fr_FR_UTF_8, 1);
+ assert(f.frac_digits() == 2);
+ }
+
+ {
+ Fnf f(LOCALE_ru_RU_UTF_8, 1);
+ assert(f.frac_digits() == 2);
+ }
+ {
+ Fnt f(LOCALE_ru_RU_UTF_8, 1);
+ assert(f.frac_digits() == 2);
+ }
+ {
+ Fwf f(LOCALE_ru_RU_UTF_8, 1);
+ assert(f.frac_digits() == 2);
+ }
+ {
+ Fwt f(LOCALE_ru_RU_UTF_8, 1);
+ assert(f.frac_digits() == 2);
+ }
+
+ {
+ Fnf f(LOCALE_zh_CN_UTF_8, 1);
+ assert(f.frac_digits() == 2);
+ }
+ {
+ Fnt f(LOCALE_zh_CN_UTF_8, 1);
+ assert(f.frac_digits() == 2);
+ }
+ {
+ Fwf f(LOCALE_zh_CN_UTF_8, 1);
+ assert(f.frac_digits() == 2);
+ }
+ {
+ Fwt f(LOCALE_zh_CN_UTF_8, 1);
+ assert(f.frac_digits() == 2);
+ }
+}
diff --git a/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/grouping.pass.cpp b/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/grouping.pass.cpp
new file mode 100644
index 000000000000..b0b9da0b6949
--- /dev/null
+++ b/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/grouping.pass.cpp
@@ -0,0 +1,150 @@
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+//
+// XFAIL: apple-darwin
+
+// REQUIRES: locale.en_US.UTF-8
+// REQUIRES: locale.fr_FR.UTF-8
+// REQUIRES: locale.ru_RU.UTF-8
+// REQUIRES: locale.zh_CN.UTF-8
+
+// <locale>
+
+// class moneypunct_byname<charT, International>
+
+// string grouping() const;
+
+#include <locale>
+#include <limits>
+#include <cassert>
+
+#include "platform_support.h" // locale name macros
+
+class Fnf
+ : public std::moneypunct_byname<char, false>
+{
+public:
+ explicit Fnf(const std::string& nm, std::size_t refs = 0)
+ : std::moneypunct_byname<char, false>(nm, refs) {}
+};
+
+class Fnt
+ : public std::moneypunct_byname<char, true>
+{
+public:
+ explicit Fnt(const std::string& nm, std::size_t refs = 0)
+ : std::moneypunct_byname<char, true>(nm, refs) {}
+};
+
+class Fwf
+ : public std::moneypunct_byname<wchar_t, false>
+{
+public:
+ explicit Fwf(const std::string& nm, std::size_t refs = 0)
+ : std::moneypunct_byname<wchar_t, false>(nm, refs) {}
+};
+
+class Fwt
+ : public std::moneypunct_byname<wchar_t, true>
+{
+public:
+ explicit Fwt(const std::string& nm, std::size_t refs = 0)
+ : std::moneypunct_byname<wchar_t, true>(nm, refs) {}
+};
+
+int main()
+{
+ // Monetary grouping strings may be terminated with 0 or CHAR_MAX, defining
+ // how the grouping is repeated.
+ std::string s = std::string(1, CHAR_MAX);
+ {
+ Fnf f("C", 1);
+ assert(f.grouping() == s || f.grouping() == "");
+ }
+ {
+ Fnt f("C", 1);
+ assert(f.grouping() == s || f.grouping() == "");
+ }
+ {
+ Fwf f("C", 1);
+ assert(f.grouping() == s || f.grouping() == "");
+ }
+ {
+ Fwt f("C", 1);
+ assert(f.grouping() == s || f.grouping() == "");
+ }
+
+ {
+ Fnf f(LOCALE_en_US_UTF_8, 1);
+ assert(f.grouping() == "\3\3");
+ }
+ {
+ Fnt f(LOCALE_en_US_UTF_8, 1);
+ assert(f.grouping() == "\3\3");
+ }
+ {
+ Fwf f(LOCALE_en_US_UTF_8, 1);
+ assert(f.grouping() == "\3\3");
+ }
+ {
+ Fwt f(LOCALE_en_US_UTF_8, 1);
+ assert(f.grouping() == "\3\3");
+ }
+
+ {
+ Fnf f(LOCALE_fr_FR_UTF_8, 1);
+ assert(f.grouping() == "\3");
+ }
+ {
+ Fnt f(LOCALE_fr_FR_UTF_8, 1);
+ assert(f.grouping() == "\3");
+ }
+ {
+ Fwf f(LOCALE_fr_FR_UTF_8, 1);
+ assert(f.grouping() == "\3");
+ }
+ {
+ Fwt f(LOCALE_fr_FR_UTF_8, 1);
+ assert(f.grouping() == "\3");
+ }
+
+ {
+ Fnf f(LOCALE_ru_RU_UTF_8, 1);
+ assert(f.grouping() == "\3\3");
+ }
+ {
+ Fnt f(LOCALE_ru_RU_UTF_8, 1);
+ assert(f.grouping() == "\3\3");
+ }
+ {
+ Fwf f(LOCALE_ru_RU_UTF_8, 1);
+ assert(f.grouping() == "\3\3");
+ }
+ {
+ Fwt f(LOCALE_ru_RU_UTF_8, 1);
+ assert(f.grouping() == "\3\3");
+ }
+
+ {
+ Fnf f(LOCALE_zh_CN_UTF_8, 1);
+ assert(f.grouping() == "\3");
+ }
+ {
+ Fnt f(LOCALE_zh_CN_UTF_8, 1);
+ assert(f.grouping() == "\3");
+ }
+ {
+ Fwf f(LOCALE_zh_CN_UTF_8, 1);
+ assert(f.grouping() == "\3");
+ }
+ {
+ Fwt f(LOCALE_zh_CN_UTF_8, 1);
+ assert(f.grouping() == "\3");
+ }
+}
diff --git a/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/neg_format.pass.cpp b/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/neg_format.pass.cpp
new file mode 100644
index 000000000000..3fe9faf847f4
--- /dev/null
+++ b/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/neg_format.pass.cpp
@@ -0,0 +1,227 @@
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+//
+// XFAIL: apple-darwin
+
+// REQUIRES: locale.en_US.UTF-8
+// REQUIRES: locale.fr_FR.UTF-8
+// REQUIRES: locale.ru_RU.UTF-8
+// REQUIRES: locale.zh_CN.UTF-8
+
+// <locale>
+
+// class moneypunct_byname<charT, International>
+
+// pattern neg_format() const;
+
+#include <locale>
+#include <limits>
+#include <cassert>
+
+#include "platform_support.h" // locale name macros
+
+class Fnf
+ : public std::moneypunct_byname<char, false>
+{
+public:
+ explicit Fnf(const std::string& nm, std::size_t refs = 0)
+ : std::moneypunct_byname<char, false>(nm, refs) {}
+};
+
+class Fnt
+ : public std::moneypunct_byname<char, true>
+{
+public:
+ explicit Fnt(const std::string& nm, std::size_t refs = 0)
+ : std::moneypunct_byname<char, true>(nm, refs) {}
+};
+
+class Fwf
+ : public std::moneypunct_byname<wchar_t, false>
+{
+public:
+ explicit Fwf(const std::string& nm, std::size_t refs = 0)
+ : std::moneypunct_byname<wchar_t, false>(nm, refs) {}
+};
+
+class Fwt
+ : public std::moneypunct_byname<wchar_t, true>
+{
+public:
+ explicit Fwt(const std::string& nm, std::size_t refs = 0)
+ : std::moneypunct_byname<wchar_t, true>(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(LOCALE_en_US_UTF_8, 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(LOCALE_en_US_UTF_8, 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(LOCALE_en_US_UTF_8, 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(LOCALE_en_US_UTF_8, 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(LOCALE_fr_FR_UTF_8, 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::none);
+ assert(p.field[3] == std::money_base::symbol);
+ }
+ {
+ Fnt f(LOCALE_fr_FR_UTF_8, 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::none);
+ assert(p.field[3] == std::money_base::symbol);
+ }
+ {
+ Fwf f(LOCALE_fr_FR_UTF_8, 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::none);
+ assert(p.field[3] == std::money_base::symbol);
+ }
+ {
+ Fwt f(LOCALE_fr_FR_UTF_8, 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::none);
+ assert(p.field[3] == std::money_base::symbol);
+ }
+
+ {
+ Fnf f(LOCALE_ru_RU_UTF_8, 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::none);
+ assert(p.field[3] == std::money_base::symbol);
+ }
+ {
+ Fnt f(LOCALE_ru_RU_UTF_8, 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::none);
+ assert(p.field[3] == std::money_base::symbol);
+ }
+ {
+ Fwf f(LOCALE_ru_RU_UTF_8, 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::none);
+ assert(p.field[3] == std::money_base::symbol);
+ }
+ {
+ Fwt f(LOCALE_ru_RU_UTF_8, 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::none);
+ assert(p.field[3] == std::money_base::symbol);
+ }
+
+ {
+ Fnf f(LOCALE_zh_CN_UTF_8, 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(LOCALE_zh_CN_UTF_8, 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(LOCALE_zh_CN_UTF_8, 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(LOCALE_zh_CN_UTF_8, 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);
+ }
+}
diff --git a/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/negative_sign.pass.cpp b/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/negative_sign.pass.cpp
new file mode 100644
index 000000000000..66c8c64243e1
--- /dev/null
+++ b/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/negative_sign.pass.cpp
@@ -0,0 +1,145 @@
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// REQUIRES: locale.en_US.UTF-8
+// REQUIRES: locale.fr_FR.UTF-8
+// REQUIRES: locale.ru_RU.UTF-8
+// REQUIRES: locale.zh_CN.UTF-8
+
+// <locale>
+
+// class moneypunct_byname<charT, International>
+
+// string_type negative_sign() const;
+
+#include <locale>
+#include <limits>
+#include <cassert>
+
+#include "platform_support.h" // locale name macros
+
+class Fnf
+ : public std::moneypunct_byname<char, false>
+{
+public:
+ explicit Fnf(const std::string& nm, std::size_t refs = 0)
+ : std::moneypunct_byname<char, false>(nm, refs) {}
+};
+
+class Fnt
+ : public std::moneypunct_byname<char, true>
+{
+public:
+ explicit Fnt(const std::string& nm, std::size_t refs = 0)
+ : std::moneypunct_byname<char, true>(nm, refs) {}
+};
+
+class Fwf
+ : public std::moneypunct_byname<wchar_t, false>
+{
+public:
+ explicit Fwf(const std::string& nm, std::size_t refs = 0)
+ : std::moneypunct_byname<wchar_t, false>(nm, refs) {}
+};
+
+class Fwt
+ : public std::moneypunct_byname<wchar_t, true>
+{
+public:
+ explicit Fwt(const std::string& nm, std::size_t refs = 0)
+ : std::moneypunct_byname<wchar_t, true>(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(LOCALE_en_US_UTF_8, 1);
+ assert(f.negative_sign() == "-");
+ }
+ {
+ Fnt f(LOCALE_en_US_UTF_8, 1);
+ assert(f.negative_sign() == "-");
+ }
+ {
+ Fwf f(LOCALE_en_US_UTF_8, 1);
+ assert(f.negative_sign() == L"-");
+ }
+ {
+ Fwt f(LOCALE_en_US_UTF_8, 1);
+ assert(f.negative_sign() == L"-");
+ }
+
+ {
+ Fnf f(LOCALE_fr_FR_UTF_8, 1);
+ assert(f.negative_sign() == "-");
+ }
+ {
+ Fnt f(LOCALE_fr_FR_UTF_8, 1);
+ assert(f.negative_sign() == "-");
+ }
+ {
+ Fwf f(LOCALE_fr_FR_UTF_8, 1);
+ assert(f.negative_sign() == L"-");
+ }
+ {
+ Fwt f(LOCALE_fr_FR_UTF_8, 1);
+ assert(f.negative_sign() == L"-");
+ }
+
+ {
+ Fnf f(LOCALE_ru_RU_UTF_8, 1);
+ assert(f.negative_sign() == "-");
+ }
+ {
+ Fnt f(LOCALE_ru_RU_UTF_8, 1);
+ assert(f.negative_sign() == "-");
+ }
+ {
+ Fwf f(LOCALE_ru_RU_UTF_8, 1);
+ assert(f.negative_sign() == L"-");
+ }
+ {
+ Fwt f(LOCALE_ru_RU_UTF_8, 1);
+ assert(f.negative_sign() == L"-");
+ }
+
+ {
+ Fnf f(LOCALE_zh_CN_UTF_8, 1);
+ assert(f.negative_sign() == "-");
+ }
+ {
+ Fnt f(LOCALE_zh_CN_UTF_8, 1);
+ assert(f.negative_sign() == "-");
+ }
+ {
+ Fwf f(LOCALE_zh_CN_UTF_8, 1);
+ assert(f.negative_sign() == L"-");
+ }
+ {
+ Fwt f(LOCALE_zh_CN_UTF_8, 1);
+ assert(f.negative_sign() == L"-");
+ }
+}
diff --git a/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/pos_format.pass.cpp b/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/pos_format.pass.cpp
new file mode 100644
index 000000000000..7038ab16e100
--- /dev/null
+++ b/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/pos_format.pass.cpp
@@ -0,0 +1,227 @@
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+//
+// XFAIL: apple-darwin
+
+// REQUIRES: locale.en_US.UTF-8
+// REQUIRES: locale.fr_FR.UTF-8
+// REQUIRES: locale.ru_RU.UTF-8
+// REQUIRES: locale.zh_CN.UTF-8
+
+// <locale>
+
+// class moneypunct_byname<charT, International>
+
+// pattern pos_format() const;
+
+#include <locale>
+#include <limits>
+#include <cassert>
+
+#include "platform_support.h" // locale name macros
+
+class Fnf
+ : public std::moneypunct_byname<char, false>
+{
+public:
+ explicit Fnf(const std::string& nm, std::size_t refs = 0)
+ : std::moneypunct_byname<char, false>(nm, refs) {}
+};
+
+class Fnt
+ : public std::moneypunct_byname<char, true>
+{
+public:
+ explicit Fnt(const std::string& nm, std::size_t refs = 0)
+ : std::moneypunct_byname<char, true>(nm, refs) {}
+};
+
+class Fwf
+ : public std::moneypunct_byname<wchar_t, false>
+{
+public:
+ explicit Fwf(const std::string& nm, std::size_t refs = 0)
+ : std::moneypunct_byname<wchar_t, false>(nm, refs) {}
+};
+
+class Fwt
+ : public std::moneypunct_byname<wchar_t, true>
+{
+public:
+ explicit Fwt(const std::string& nm, std::size_t refs = 0)
+ : std::moneypunct_byname<wchar_t, true>(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(LOCALE_en_US_UTF_8, 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(LOCALE_en_US_UTF_8, 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(LOCALE_en_US_UTF_8, 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(LOCALE_en_US_UTF_8, 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(LOCALE_fr_FR_UTF_8, 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::none);
+ assert(p.field[3] == std::money_base::symbol);
+ }
+ {
+ Fnt f(LOCALE_fr_FR_UTF_8, 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::none);
+ assert(p.field[3] == std::money_base::symbol);
+ }
+ {
+ Fwf f(LOCALE_fr_FR_UTF_8, 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::none);
+ assert(p.field[3] == std::money_base::symbol);
+ }
+ {
+ Fwt f(LOCALE_fr_FR_UTF_8, 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::none);
+ assert(p.field[3] == std::money_base::symbol);
+ }
+
+ {
+ Fnf f(LOCALE_ru_RU_UTF_8, 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::none);
+ assert(p.field[3] == std::money_base::symbol);
+ }
+ {
+ Fnt f(LOCALE_ru_RU_UTF_8, 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::none);
+ assert(p.field[3] == std::money_base::symbol);
+ }
+ {
+ Fwf f(LOCALE_ru_RU_UTF_8, 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::none);
+ assert(p.field[3] == std::money_base::symbol);
+ }
+ {
+ Fwt f(LOCALE_ru_RU_UTF_8, 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::none);
+ assert(p.field[3] == std::money_base::symbol);
+ }
+
+ {
+ Fnf f(LOCALE_zh_CN_UTF_8, 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(LOCALE_zh_CN_UTF_8, 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(LOCALE_zh_CN_UTF_8, 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(LOCALE_zh_CN_UTF_8, 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/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/positive_sign.pass.cpp b/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/positive_sign.pass.cpp
new file mode 100644
index 000000000000..04cd173dd1ba
--- /dev/null
+++ b/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/positive_sign.pass.cpp
@@ -0,0 +1,145 @@
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// REQUIRES: locale.en_US.UTF-8
+// REQUIRES: locale.fr_FR.UTF-8
+// REQUIRES: locale.ru_RU.UTF-8
+// REQUIRES: locale.zh_CN.UTF-8
+
+// <locale>
+
+// class moneypunct_byname<charT, International>
+
+// string_type positive_sign() const;
+
+#include <locale>
+#include <limits>
+#include <cassert>
+
+#include "platform_support.h" // locale name macros
+
+class Fnf
+ : public std::moneypunct_byname<char, false>
+{
+public:
+ explicit Fnf(const std::string& nm, std::size_t refs = 0)
+ : std::moneypunct_byname<char, false>(nm, refs) {}
+};
+
+class Fnt
+ : public std::moneypunct_byname<char, true>
+{
+public:
+ explicit Fnt(const std::string& nm, std::size_t refs = 0)
+ : std::moneypunct_byname<char, true>(nm, refs) {}
+};
+
+class Fwf
+ : public std::moneypunct_byname<wchar_t, false>
+{
+public:
+ explicit Fwf(const std::string& nm, std::size_t refs = 0)
+ : std::moneypunct_byname<wchar_t, false>(nm, refs) {}
+};
+
+class Fwt
+ : public std::moneypunct_byname<wchar_t, true>
+{
+public:
+ explicit Fwt(const std::string& nm, std::size_t refs = 0)
+ : std::moneypunct_byname<wchar_t, true>(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(LOCALE_en_US_UTF_8, 1);
+ assert(f.positive_sign() == "");
+ }
+ {
+ Fnt f(LOCALE_en_US_UTF_8, 1);
+ assert(f.positive_sign() == "");
+ }
+ {
+ Fwf f(LOCALE_en_US_UTF_8, 1);
+ assert(f.positive_sign() == L"");
+ }
+ {
+ Fwt f(LOCALE_en_US_UTF_8, 1);
+ assert(f.positive_sign() == L"");
+ }
+
+ {
+ Fnf f(LOCALE_fr_FR_UTF_8, 1);
+ assert(f.positive_sign() == "");
+ }
+ {
+ Fnt f(LOCALE_fr_FR_UTF_8, 1);
+ assert(f.positive_sign() == "");
+ }
+ {
+ Fwf f(LOCALE_fr_FR_UTF_8, 1);
+ assert(f.positive_sign() == L"");
+ }
+ {
+ Fwt f(LOCALE_fr_FR_UTF_8, 1);
+ assert(f.positive_sign() == L"");
+ }
+
+ {
+ Fnf f(LOCALE_ru_RU_UTF_8, 1);
+ assert(f.positive_sign() == "");
+ }
+ {
+ Fnt f(LOCALE_ru_RU_UTF_8, 1);
+ assert(f.positive_sign() == "");
+ }
+ {
+ Fwf f(LOCALE_ru_RU_UTF_8, 1);
+ assert(f.positive_sign() == L"");
+ }
+ {
+ Fwt f(LOCALE_ru_RU_UTF_8, 1);
+ assert(f.positive_sign() == L"");
+ }
+
+ {
+ Fnf f(LOCALE_zh_CN_UTF_8, 1);
+ assert(f.positive_sign() == "");
+ }
+ {
+ Fnt f(LOCALE_zh_CN_UTF_8, 1);
+ assert(f.positive_sign() == "");
+ }
+ {
+ Fwf f(LOCALE_zh_CN_UTF_8, 1);
+ assert(f.positive_sign() == L"");
+ }
+ {
+ Fwt f(LOCALE_zh_CN_UTF_8, 1);
+ assert(f.positive_sign() == L"");
+ }
+}
diff --git a/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/thousands_sep.pass.cpp b/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/thousands_sep.pass.cpp
new file mode 100644
index 000000000000..a8782832de5c
--- /dev/null
+++ b/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/thousands_sep.pass.cpp
@@ -0,0 +1,151 @@
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// REQUIRES: locale.en_US.UTF-8
+// REQUIRES: locale.fr_FR.UTF-8
+// REQUIRES: locale.ru_RU.UTF-8
+// REQUIRES: locale.zh_CN.UTF-8
+
+// <locale>
+
+// class moneypunct_byname<charT, International>
+
+// charT thousands_sep() const;
+
+// Failure related to GLIBC's use of U00A0 as mon_thousands_sep
+// and U002E as mon_decimal_point.
+// TODO: U00A0 should be investigated.
+// Possibly related to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=16006
+// XFAIL: linux-gnu
+
+#include <locale>
+#include <limits>
+#include <cassert>
+
+#include "platform_support.h" // locale name macros
+
+class Fnf
+ : public std::moneypunct_byname<char, false>
+{
+public:
+ explicit Fnf(const std::string& nm, std::size_t refs = 0)
+ : std::moneypunct_byname<char, false>(nm, refs) {}
+};
+
+class Fnt
+ : public std::moneypunct_byname<char, true>
+{
+public:
+ explicit Fnt(const std::string& nm, std::size_t refs = 0)
+ : std::moneypunct_byname<char, true>(nm, refs) {}
+};
+
+class Fwf
+ : public std::moneypunct_byname<wchar_t, false>
+{
+public:
+ explicit Fwf(const std::string& nm, std::size_t refs = 0)
+ : std::moneypunct_byname<wchar_t, false>(nm, refs) {}
+};
+
+class Fwt
+ : public std::moneypunct_byname<wchar_t, true>
+{
+public:
+ explicit Fwt(const std::string& nm, std::size_t refs = 0)
+ : std::moneypunct_byname<wchar_t, true>(nm, refs) {}
+};
+
+int main()
+{
+ {
+ Fnf f("C", 1);
+ assert(f.thousands_sep() == std::numeric_limits<char>::max());
+ }
+ {
+ Fnt f("C", 1);
+ assert(f.thousands_sep() == std::numeric_limits<char>::max());
+ }
+ {
+ Fwf f("C", 1);
+ assert(f.thousands_sep() == std::numeric_limits<wchar_t>::max());
+ }
+ {
+ Fwt f("C", 1);
+ assert(f.thousands_sep() == std::numeric_limits<wchar_t>::max());
+ }
+
+ {
+ Fnf f(LOCALE_en_US_UTF_8, 1);
+ assert(f.thousands_sep() == ',');
+ }
+ {
+ Fnt f(LOCALE_en_US_UTF_8, 1);
+ assert(f.thousands_sep() == ',');
+ }
+ {
+ Fwf f(LOCALE_en_US_UTF_8, 1);
+ assert(f.thousands_sep() == L',');
+ }
+ {
+ Fwt f(LOCALE_en_US_UTF_8, 1);
+ assert(f.thousands_sep() == L',');
+ }
+
+ {
+ Fnf f(LOCALE_fr_FR_UTF_8, 1);
+ assert(f.thousands_sep() == ' ');
+ }
+ {
+ Fnt f(LOCALE_fr_FR_UTF_8, 1);
+ assert(f.thousands_sep() == ' ');
+ }
+ {
+ Fwf f(LOCALE_fr_FR_UTF_8, 1);
+ assert(f.thousands_sep() == L' ');
+ }
+ {
+ Fwt f(LOCALE_fr_FR_UTF_8, 1);
+ assert(f.thousands_sep() == L' ');
+ }
+
+ {
+ Fnf f(LOCALE_ru_RU_UTF_8, 1);
+ assert(f.thousands_sep() == ' ');
+ }
+ {
+ Fnt f(LOCALE_ru_RU_UTF_8, 1);
+ assert(f.thousands_sep() == ' ');
+ }
+ {
+ Fwf f(LOCALE_ru_RU_UTF_8, 1);
+ assert(f.thousands_sep() == L' ');
+ }
+ {
+ Fwt f(LOCALE_ru_RU_UTF_8, 1);
+ assert(f.thousands_sep() == L' ');
+ }
+
+ {
+ Fnf f(LOCALE_zh_CN_UTF_8, 1);
+ assert(f.thousands_sep() == ',');
+ }
+ {
+ Fnt f(LOCALE_zh_CN_UTF_8, 1);
+ assert(f.thousands_sep() == ',');
+ }
+ {
+ Fwf f(LOCALE_zh_CN_UTF_8, 1);
+ assert(f.thousands_sep() == L',');
+ }
+ {
+ Fwt f(LOCALE_zh_CN_UTF_8, 1);
+ assert(f.thousands_sep() == L',');
+ }
+}
diff --git a/test/std/localization/locale.categories/category.monetary/locale.moneypunct/ctor.pass.cpp b/test/std/localization/locale.categories/category.monetary/locale.moneypunct/ctor.pass.cpp
new file mode 100644
index 000000000000..798dbd08b614
--- /dev/null
+++ b/test/std/localization/locale.categories/category.monetary/locale.moneypunct/ctor.pass.cpp
@@ -0,0 +1,52 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// class moneypunct<charT, International>
+
+// explicit moneypunct(size_t refs = 0);
+
+#include <locale>
+#include <cassert>
+
+typedef std::moneypunct<char> 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/std/localization/locale.categories/category.monetary/locale.moneypunct/locale.moneypunct.members/curr_symbol.pass.cpp b/test/std/localization/locale.categories/category.monetary/locale.moneypunct/locale.moneypunct.members/curr_symbol.pass.cpp
new file mode 100644
index 000000000000..8dc4726e2e94
--- /dev/null
+++ b/test/std/localization/locale.categories/category.monetary/locale.moneypunct/locale.moneypunct.members/curr_symbol.pass.cpp
@@ -0,0 +1,75 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// class moneypunct<charT, International>
+
+// string_type curr_symbol() const;
+
+// The C++ and C standards are silent.
+// POSIX standard is being followed (as a guideline).
+
+#include <locale>
+#include <limits>
+#include <cassert>
+
+typedef std::moneypunct<char> F;
+
+class Fnf
+ : public std::moneypunct<char, false>
+{
+public:
+ explicit Fnf(std::size_t refs = 0)
+ : std::moneypunct<char, false>(refs) {}
+};
+
+class Fnt
+ : public std::moneypunct<char, true>
+{
+public:
+ explicit Fnt(std::size_t refs = 0)
+ : std::moneypunct<char, true>(refs) {}
+};
+
+class Fwf
+ : public std::moneypunct<wchar_t, false>
+{
+public:
+ explicit Fwf(std::size_t refs = 0)
+ : std::moneypunct<wchar_t, false>(refs) {}
+};
+
+class Fwt
+ : public std::moneypunct<wchar_t, true>
+{
+public:
+ explicit Fwt(std::size_t refs = 0)
+ : std::moneypunct<wchar_t, true>(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/std/localization/locale.categories/category.monetary/locale.moneypunct/locale.moneypunct.members/decimal_point.pass.cpp b/test/std/localization/locale.categories/category.monetary/locale.moneypunct/locale.moneypunct.members/decimal_point.pass.cpp
new file mode 100644
index 000000000000..66262dc43846
--- /dev/null
+++ b/test/std/localization/locale.categories/category.monetary/locale.moneypunct/locale.moneypunct.members/decimal_point.pass.cpp
@@ -0,0 +1,75 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// class moneypunct<charT, International>
+
+// charT decimal_point() const;
+
+// The C++ and C standards are silent.
+// POSIX standard is being followed (as a guideline).
+
+#include <locale>
+#include <limits>
+#include <cassert>
+
+typedef std::moneypunct<char> F;
+
+class Fnf
+ : public std::moneypunct<char, false>
+{
+public:
+ explicit Fnf(std::size_t refs = 0)
+ : std::moneypunct<char, false>(refs) {}
+};
+
+class Fnt
+ : public std::moneypunct<char, true>
+{
+public:
+ explicit Fnt(std::size_t refs = 0)
+ : std::moneypunct<char, true>(refs) {}
+};
+
+class Fwf
+ : public std::moneypunct<wchar_t, false>
+{
+public:
+ explicit Fwf(std::size_t refs = 0)
+ : std::moneypunct<wchar_t, false>(refs) {}
+};
+
+class Fwt
+ : public std::moneypunct<wchar_t, true>
+{
+public:
+ explicit Fwt(std::size_t refs = 0)
+ : std::moneypunct<wchar_t, true>(refs) {}
+};
+
+int main()
+{
+ {
+ Fnf f(1);
+ assert(f.decimal_point() == std::numeric_limits<char>::max());
+ }
+ {
+ Fnt f(1);
+ assert(f.decimal_point() == std::numeric_limits<char>::max());
+ }
+ {
+ Fwf f(1);
+ assert(f.decimal_point() == std::numeric_limits<wchar_t>::max());
+ }
+ {
+ Fwt f(1);
+ assert(f.decimal_point() == std::numeric_limits<wchar_t>::max());
+ }
+}
diff --git a/test/std/localization/locale.categories/category.monetary/locale.moneypunct/locale.moneypunct.members/frac_digits.pass.cpp b/test/std/localization/locale.categories/category.monetary/locale.moneypunct/locale.moneypunct.members/frac_digits.pass.cpp
new file mode 100644
index 000000000000..0622342ff8f0
--- /dev/null
+++ b/test/std/localization/locale.categories/category.monetary/locale.moneypunct/locale.moneypunct.members/frac_digits.pass.cpp
@@ -0,0 +1,75 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// class moneypunct<charT, International>
+
+// int frac_digits() const;
+
+// The C++ and C standards are silent.
+// POSIX standard is being followed (as a guideline).
+
+#include <locale>
+#include <limits>
+#include <cassert>
+
+typedef std::moneypunct<char> F;
+
+class Fnf
+ : public std::moneypunct<char, false>
+{
+public:
+ explicit Fnf(std::size_t refs = 0)
+ : std::moneypunct<char, false>(refs) {}
+};
+
+class Fnt
+ : public std::moneypunct<char, true>
+{
+public:
+ explicit Fnt(std::size_t refs = 0)
+ : std::moneypunct<char, true>(refs) {}
+};
+
+class Fwf
+ : public std::moneypunct<wchar_t, false>
+{
+public:
+ explicit Fwf(std::size_t refs = 0)
+ : std::moneypunct<wchar_t, false>(refs) {}
+};
+
+class Fwt
+ : public std::moneypunct<wchar_t, true>
+{
+public:
+ explicit Fwt(std::size_t refs = 0)
+ : std::moneypunct<wchar_t, true>(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/std/localization/locale.categories/category.monetary/locale.moneypunct/locale.moneypunct.members/grouping.pass.cpp b/test/std/localization/locale.categories/category.monetary/locale.moneypunct/locale.moneypunct.members/grouping.pass.cpp
new file mode 100644
index 000000000000..fc857d6583a4
--- /dev/null
+++ b/test/std/localization/locale.categories/category.monetary/locale.moneypunct/locale.moneypunct.members/grouping.pass.cpp
@@ -0,0 +1,75 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// class moneypunct<charT, International>
+
+// string grouping() const;
+
+// The C++ and C standards are silent.
+// POSIX standard is being followed (as a guideline).
+
+#include <locale>
+#include <limits>
+#include <cassert>
+
+typedef std::moneypunct<char> F;
+
+class Fnf
+ : public std::moneypunct<char, false>
+{
+public:
+ explicit Fnf(std::size_t refs = 0)
+ : std::moneypunct<char, false>(refs) {}
+};
+
+class Fnt
+ : public std::moneypunct<char, true>
+{
+public:
+ explicit Fnt(std::size_t refs = 0)
+ : std::moneypunct<char, true>(refs) {}
+};
+
+class Fwf
+ : public std::moneypunct<wchar_t, false>
+{
+public:
+ explicit Fwf(std::size_t refs = 0)
+ : std::moneypunct<wchar_t, false>(refs) {}
+};
+
+class Fwt
+ : public std::moneypunct<wchar_t, true>
+{
+public:
+ explicit Fwt(std::size_t refs = 0)
+ : std::moneypunct<wchar_t, true>(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/std/localization/locale.categories/category.monetary/locale.moneypunct/locale.moneypunct.members/neg_format.pass.cpp b/test/std/localization/locale.categories/category.monetary/locale.moneypunct/locale.moneypunct.members/neg_format.pass.cpp
new file mode 100644
index 000000000000..d1df09cdfe3e
--- /dev/null
+++ b/test/std/localization/locale.categories/category.monetary/locale.moneypunct/locale.moneypunct.members/neg_format.pass.cpp
@@ -0,0 +1,88 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// class moneypunct<charT, International>
+
+// pattern neg_format() const;
+
+#include <locale>
+#include <limits>
+#include <cassert>
+
+typedef std::moneypunct<char> F;
+
+class Fnf
+ : public std::moneypunct<char, false>
+{
+public:
+ explicit Fnf(std::size_t refs = 0)
+ : std::moneypunct<char, false>(refs) {}
+};
+
+class Fnt
+ : public std::moneypunct<char, true>
+{
+public:
+ explicit Fnt(std::size_t refs = 0)
+ : std::moneypunct<char, true>(refs) {}
+};
+
+class Fwf
+ : public std::moneypunct<wchar_t, false>
+{
+public:
+ explicit Fwf(std::size_t refs = 0)
+ : std::moneypunct<wchar_t, false>(refs) {}
+};
+
+class Fwt
+ : public std::moneypunct<wchar_t, true>
+{
+public:
+ explicit Fwt(std::size_t refs = 0)
+ : std::moneypunct<wchar_t, true>(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/std/localization/locale.categories/category.monetary/locale.moneypunct/locale.moneypunct.members/negative_sign.pass.cpp b/test/std/localization/locale.categories/category.monetary/locale.moneypunct/locale.moneypunct.members/negative_sign.pass.cpp
new file mode 100644
index 000000000000..df350d3537af
--- /dev/null
+++ b/test/std/localization/locale.categories/category.monetary/locale.moneypunct/locale.moneypunct.members/negative_sign.pass.cpp
@@ -0,0 +1,76 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// class moneypunct<charT, International>
+
+// 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 <locale>
+#include <limits>
+#include <cassert>
+
+typedef std::moneypunct<char> F;
+
+class Fnf
+ : public std::moneypunct<char, false>
+{
+public:
+ explicit Fnf(std::size_t refs = 0)
+ : std::moneypunct<char, false>(refs) {}
+};
+
+class Fnt
+ : public std::moneypunct<char, true>
+{
+public:
+ explicit Fnt(std::size_t refs = 0)
+ : std::moneypunct<char, true>(refs) {}
+};
+
+class Fwf
+ : public std::moneypunct<wchar_t, false>
+{
+public:
+ explicit Fwf(std::size_t refs = 0)
+ : std::moneypunct<wchar_t, false>(refs) {}
+};
+
+class Fwt
+ : public std::moneypunct<wchar_t, true>
+{
+public:
+ explicit Fwt(std::size_t refs = 0)
+ : std::moneypunct<wchar_t, true>(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/std/localization/locale.categories/category.monetary/locale.moneypunct/locale.moneypunct.members/pos_format.pass.cpp b/test/std/localization/locale.categories/category.monetary/locale.moneypunct/locale.moneypunct.members/pos_format.pass.cpp
new file mode 100644
index 000000000000..6e28154c5681
--- /dev/null
+++ b/test/std/localization/locale.categories/category.monetary/locale.moneypunct/locale.moneypunct.members/pos_format.pass.cpp
@@ -0,0 +1,88 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// class moneypunct<charT, International>
+
+// pattern pos_format() const;
+
+#include <locale>
+#include <limits>
+#include <cassert>
+
+typedef std::moneypunct<char> F;
+
+class Fnf
+ : public std::moneypunct<char, false>
+{
+public:
+ explicit Fnf(std::size_t refs = 0)
+ : std::moneypunct<char, false>(refs) {}
+};
+
+class Fnt
+ : public std::moneypunct<char, true>
+{
+public:
+ explicit Fnt(std::size_t refs = 0)
+ : std::moneypunct<char, true>(refs) {}
+};
+
+class Fwf
+ : public std::moneypunct<wchar_t, false>
+{
+public:
+ explicit Fwf(std::size_t refs = 0)
+ : std::moneypunct<wchar_t, false>(refs) {}
+};
+
+class Fwt
+ : public std::moneypunct<wchar_t, true>
+{
+public:
+ explicit Fwt(std::size_t refs = 0)
+ : std::moneypunct<wchar_t, true>(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/std/localization/locale.categories/category.monetary/locale.moneypunct/locale.moneypunct.members/positive_sign.pass.cpp b/test/std/localization/locale.categories/category.monetary/locale.moneypunct/locale.moneypunct.members/positive_sign.pass.cpp
new file mode 100644
index 000000000000..5ec8d9a54452
--- /dev/null
+++ b/test/std/localization/locale.categories/category.monetary/locale.moneypunct/locale.moneypunct.members/positive_sign.pass.cpp
@@ -0,0 +1,75 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// class moneypunct<charT, International>
+
+// string_type positive_sign() const;
+
+// The C++ and C standards are silent.
+// POSIX standard is being followed (as a guideline).
+
+#include <locale>
+#include <limits>
+#include <cassert>
+
+typedef std::moneypunct<char> F;
+
+class Fnf
+ : public std::moneypunct<char, false>
+{
+public:
+ explicit Fnf(std::size_t refs = 0)
+ : std::moneypunct<char, false>(refs) {}
+};
+
+class Fnt
+ : public std::moneypunct<char, true>
+{
+public:
+ explicit Fnt(std::size_t refs = 0)
+ : std::moneypunct<char, true>(refs) {}
+};
+
+class Fwf
+ : public std::moneypunct<wchar_t, false>
+{
+public:
+ explicit Fwf(std::size_t refs = 0)
+ : std::moneypunct<wchar_t, false>(refs) {}
+};
+
+class Fwt
+ : public std::moneypunct<wchar_t, true>
+{
+public:
+ explicit Fwt(std::size_t refs = 0)
+ : std::moneypunct<wchar_t, true>(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/std/localization/locale.categories/category.monetary/locale.moneypunct/locale.moneypunct.members/thousands_sep.pass.cpp b/test/std/localization/locale.categories/category.monetary/locale.moneypunct/locale.moneypunct.members/thousands_sep.pass.cpp
new file mode 100644
index 000000000000..27db562ffdad
--- /dev/null
+++ b/test/std/localization/locale.categories/category.monetary/locale.moneypunct/locale.moneypunct.members/thousands_sep.pass.cpp
@@ -0,0 +1,75 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// class moneypunct<charT, International>
+
+// charT thousands_sep() const;
+
+// The C++ and C standards are silent.
+// POSIX standard is being followed (as a guideline).
+
+#include <locale>
+#include <limits>
+#include <cassert>
+
+typedef std::moneypunct<char> F;
+
+class Fnf
+ : public std::moneypunct<char, false>
+{
+public:
+ explicit Fnf(std::size_t refs = 0)
+ : std::moneypunct<char, false>(refs) {}
+};
+
+class Fnt
+ : public std::moneypunct<char, true>
+{
+public:
+ explicit Fnt(std::size_t refs = 0)
+ : std::moneypunct<char, true>(refs) {}
+};
+
+class Fwf
+ : public std::moneypunct<wchar_t, false>
+{
+public:
+ explicit Fwf(std::size_t refs = 0)
+ : std::moneypunct<wchar_t, false>(refs) {}
+};
+
+class Fwt
+ : public std::moneypunct<wchar_t, true>
+{
+public:
+ explicit Fwt(std::size_t refs = 0)
+ : std::moneypunct<wchar_t, true>(refs) {}
+};
+
+int main()
+{
+ {
+ Fnf f(1);
+ assert(f.thousands_sep() == std::numeric_limits<char>::max());
+ }
+ {
+ Fnt f(1);
+ assert(f.thousands_sep() == std::numeric_limits<char>::max());
+ }
+ {
+ Fwf f(1);
+ assert(f.thousands_sep() == std::numeric_limits<wchar_t>::max());
+ }
+ {
+ Fwt f(1);
+ assert(f.thousands_sep() == std::numeric_limits<wchar_t>::max());
+ }
+}
diff --git a/test/std/localization/locale.categories/category.monetary/locale.moneypunct/locale.moneypunct.virtuals/tested_elsewhere.pass.cpp b/test/std/localization/locale.categories/category.monetary/locale.moneypunct/locale.moneypunct.virtuals/tested_elsewhere.pass.cpp
new file mode 100644
index 000000000000..b58f5c55b643
--- /dev/null
+++ b/test/std/localization/locale.categories/category.monetary/locale.moneypunct/locale.moneypunct.virtuals/tested_elsewhere.pass.cpp
@@ -0,0 +1,12 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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/std/localization/locale.categories/category.monetary/locale.moneypunct/money_base.pass.cpp b/test/std/localization/locale.categories/category.monetary/locale.moneypunct/money_base.pass.cpp
new file mode 100644
index 000000000000..beabe0cae660
--- /dev/null
+++ b/test/std/localization/locale.categories/category.monetary/locale.moneypunct/money_base.pass.cpp
@@ -0,0 +1,33 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// class money_base
+// {
+// public:
+// enum part {none, space, symbol, sign, value};
+// struct pattern {char field[4];};
+// };
+
+#include <locale>
+#include <cassert>
+
+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/std/localization/locale.categories/category.monetary/locale.moneypunct/types.pass.cpp b/test/std/localization/locale.categories/category.monetary/locale.moneypunct/types.pass.cpp
new file mode 100644
index 000000000000..32e7249ab868
--- /dev/null
+++ b/test/std/localization/locale.categories/category.monetary/locale.moneypunct/types.pass.cpp
@@ -0,0 +1,48 @@
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+//
+// This test uses new symbols that were not defined in the libc++ shipped on
+// darwin11 and darwin12:
+// XFAIL: with_system_cxx_lib=x86_64-apple-darwin11
+// XFAIL: with_system_cxx_lib=x86_64-apple-darwin12
+
+// <locale>
+
+// template <class _CharT, bool _International = false>
+// class moneypunct
+// : public locale::facet,
+// public money_base
+// {
+// public:
+// typedef _CharT char_type;
+// typedef basic_string<char_type> string_type;
+// static const bool intl = International;
+
+#include <locale>
+#include <type_traits>
+
+template <class _Tp>
+void test(const _Tp &) {}
+
+int main()
+{
+ static_assert((std::is_base_of<std::locale::facet, std::moneypunct<char> >::value), "");
+ static_assert((std::is_base_of<std::locale::facet, std::moneypunct<wchar_t> >::value), "");
+ static_assert((std::is_base_of<std::money_base, std::moneypunct<char> >::value), "");
+ static_assert((std::is_base_of<std::money_base, std::moneypunct<wchar_t> >::value), "");
+ static_assert((std::is_same<std::moneypunct<char>::char_type, char>::value), "");
+ static_assert((std::is_same<std::moneypunct<wchar_t>::char_type, wchar_t>::value), "");
+ static_assert((std::is_same<std::moneypunct<char>::string_type, std::string>::value), "");
+ static_assert((std::is_same<std::moneypunct<wchar_t>::string_type, std::wstring>::value), "");
+
+ test(std::moneypunct<char, false>::intl);
+ test(std::moneypunct<char, true>::intl);
+ test(std::moneypunct<wchar_t, false>::intl);
+ test(std::moneypunct<wchar_t, true>::intl);
+}
diff --git a/test/std/localization/locale.categories/category.monetary/nothing_to_do.pass.cpp b/test/std/localization/locale.categories/category.monetary/nothing_to_do.pass.cpp
new file mode 100644
index 000000000000..b58f5c55b643
--- /dev/null
+++ b/test/std/localization/locale.categories/category.monetary/nothing_to_do.pass.cpp
@@ -0,0 +1,12 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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/std/localization/locale.categories/category.numeric/locale.nm.put/ctor.pass.cpp b/test/std/localization/locale.categories/category.numeric/locale.nm.put/ctor.pass.cpp
new file mode 100644
index 000000000000..f801e6c5a5ac
--- /dev/null
+++ b/test/std/localization/locale.categories/category.numeric/locale.nm.put/ctor.pass.cpp
@@ -0,0 +1,52 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// class num_put<charT, OutputIterator>
+
+// explicit num_put(size_t refs = 0);
+
+#include <locale>
+#include <cassert>
+
+typedef std::num_put<char, char*> 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/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_bool.pass.cpp b/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_bool.pass.cpp
new file mode 100644
index 000000000000..4f6f0b47e4f3
--- /dev/null
+++ b/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_bool.pass.cpp
@@ -0,0 +1,100 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// class num_put<charT, OutputIterator>
+
+// iter_type put(iter_type s, ios_base& iob, char_type fill, bool v) const;
+
+#include <locale>
+#include <ios>
+#include <cassert>
+#include <streambuf>
+#include "test_iterators.h"
+
+typedef std::num_put<char, output_iterator<char*> > F;
+
+class my_facet
+ : public F
+{
+public:
+ explicit my_facet(std::size_t refs = 0)
+ : F(refs) {}
+};
+
+class my_numpunct
+ : public std::numpunct<char>
+{
+public:
+ my_numpunct() : std::numpunct<char>() {}
+
+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<char*> iter = f.put(output_iterator<char*>(str), ios, '*', v);
+ std::string ex(str, iter.base());
+ assert(ex == "0");
+ }
+ {
+ bool v = true;
+ char str[50];
+ output_iterator<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(str), ios, '*', v);
+ std::string ex(str, iter.base());
+ assert(ex == "false");
+ }
+ {
+ bool v = true;
+ char str[50];
+ output_iterator<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(str), ios, '*', v);
+ std::string ex(str, iter.base());
+ assert(ex == "no");
+ }
+ {
+ bool v = true;
+ char str[50];
+ output_iterator<char*> iter = f.put(output_iterator<char*>(str), ios, '*', v);
+ std::string ex(str, iter.base());
+ assert(ex == "yes");
+ }
+ }
+}
diff --git a/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_double.pass.cpp b/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_double.pass.cpp
new file mode 100644
index 000000000000..a54b37314e87
--- /dev/null
+++ b/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_double.pass.cpp
@@ -0,0 +1,17887 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// class num_put<charT, OutputIterator>
+
+// iter_type put(iter_type s, ios_base& iob, char_type fill, double v) const;
+
+#include <locale>
+#include <ios>
+#include <cassert>
+#include <streambuf>
+#include <cmath>
+#include "test_iterators.h"
+
+typedef std::num_put<char, output_iterator<char*> > F;
+
+class my_facet
+ : public F
+{
+public:
+ explicit my_facet(std::size_t refs = 0)
+ : F(refs) {}
+};
+
+class my_numpunct
+ : public std::numpunct<char>
+{
+public:
+ my_numpunct() : std::numpunct<char>() {}
+
+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<char*> 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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(str), ios, '*', v);
+ std::string ex(str, iter.base());
+ assert(ex == "+0;00000000000000000000000000000000000000000000000000000000000");
+ assert(ios.width() == 0);
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
+
+void test2()
+{
+ char str[200];
+ output_iterator<char*> 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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*> 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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(str), ios, '*', v);
+ std::string ex(str, iter.base());
+ assert(ex == "+0;000000000000000000000000000000000000000000000000000000000000");
+ assert(ios.width() == 0);
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
+
+void test4()
+{
+ char str[200];
+ output_iterator<char*> 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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*> 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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*> 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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*> 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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*> 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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_long.pass.cpp b/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_long.pass.cpp
new file mode 100644
index 000000000000..4085f08c7420
--- /dev/null
+++ b/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_long.pass.cpp
@@ -0,0 +1,371 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// class num_put<charT, OutputIterator>
+
+// iter_type put(iter_type s, ios_base& iob, char_type fill, long v) const;
+
+#include <locale>
+#include <ios>
+#include <cassert>
+#include <streambuf>
+#include "test_iterators.h"
+
+typedef std::num_put<char, output_iterator<char*> > F;
+
+class my_facet
+ : public F
+{
+public:
+ explicit my_facet(std::size_t refs = 0)
+ : F(refs) {}
+};
+
+class my_numpunct
+ : public std::numpunct<char>
+{
+public:
+ my_numpunct() : std::numpunct<char>() {}
+
+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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(str), ios, '*', v);
+ std::string ex(str, iter.base());
+ assert(ex == "-***1_00_0");
+ assert(ios.width() == 0);
+ }
+}
diff --git a/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_long_double.pass.cpp b/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_long_double.pass.cpp
new file mode 100644
index 000000000000..935961257ef2
--- /dev/null
+++ b/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_long_double.pass.cpp
@@ -0,0 +1,26248 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// class num_put<charT, OutputIterator>
+
+// iter_type put(iter_type s, ios_base& iob, char_type fill, long double v) const;
+
+// TODO GLIBC uses a different string for positive and negative NAN numbers.
+// XFAIL: linux-gnu
+
+#include <locale>
+#include <ios>
+#include <cassert>
+#include <streambuf>
+#include <cmath>
+#include "test_iterators.h"
+
+typedef std::num_put<char, output_iterator<char*> > F;
+
+class my_facet
+ : public F
+{
+public:
+ explicit my_facet(std::size_t refs = 0)
+ : F(refs) {}
+};
+
+class my_numpunct
+ : public std::numpunct<char>
+{
+public:
+ my_numpunct() : std::numpunct<char>() {}
+
+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<char*> 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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(str), ios, '*', v);
+ std::string ex(str, iter.base());
+ assert(ex == "+0;00000000000000000000000000000000000000000000000000000000000");
+ assert(ios.width() == 0);
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
+
+void test2()
+{
+ char str[200];
+ output_iterator<char*> 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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(str), ios, '*', v);
+ std::string ex(str, iter.base());
+ assert(ex == "-0;00000000000000000000000000000000000000000000000000000000000");
+ assert(ios.width() == 0);
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
+
+void test3()
+{
+ char str[200];
+ output_iterator<char*> 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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*> 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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*> 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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*> 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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(str), ios, '*', v);
+ std::string ex(str, iter.base());
+ assert(ex == "+0;000000000000000000000000000000000000000000000000000000000000");
+ assert(ios.width() == 0);
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
+
+void test7()
+{
+ char str[200];
+ output_iterator<char*> 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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(str), ios, '*', v);
+ std::string ex(str, iter.base());
+ assert(ex == "-0;000000000000000000000000000000000000000000000000000000000000");
+ assert(ios.width() == 0);
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
+
+void test8()
+{
+ char str[200];
+ output_iterator<char*> 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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*> 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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*> 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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*> 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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*> iter;
+ std::locale lc = std::locale::classic();
+ std::locale lg(lc, new my_numpunct);
+#ifdef __APPLE__
+// This test is failing on FreeBSD, possibly due to different representations
+// of the floating point numbers.
+ 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.width(0);
+ ios.imbue(lc);
+ {
+ {
+ iter = f.put(output_iterator<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(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<char*>(str), ios, '*', v);
+ std::string ex(str, iter.base());
+ assert(ex == "+********0X9;32C05A44P+27");
+ assert(ios.width() == 0);
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+#endif
+}
+
+int main()
+{
+ test1();
+ test2();
+ test3();
+ test4();
+ test5();
+ test6();
+ test7();
+ test8();
+ test9();
+ test10();
+ test11();
+ test12();
+ char str[200];
+ output_iterator<char*> 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/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_long_long.pass.cpp b/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_long_long.pass.cpp
new file mode 100644
index 000000000000..55f7d0f9fb91
--- /dev/null
+++ b/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_long_long.pass.cpp
@@ -0,0 +1,344 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// class num_put<charT, OutputIterator>
+
+// iter_type put(iter_type s, ios_base& iob, char_type fill, long long v) const;
+
+#include <locale>
+#include <ios>
+#include <cassert>
+#include <streambuf>
+#include "test_iterators.h"
+
+typedef std::num_put<char, output_iterator<char*> > F;
+
+class my_facet
+ : public F
+{
+public:
+ explicit my_facet(std::size_t refs = 0)
+ : F(refs) {}
+};
+
+class my_numpunct
+ : public std::numpunct<char>
+{
+public:
+ my_numpunct() : std::numpunct<char>() {}
+
+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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(str), ios, '*', v);
+ std::string ex(str, iter.base());
+ assert(ex == "-***1_00_0");
+ assert(ios.width() == 0);
+ }
+}
diff --git a/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_pointer.pass.cpp b/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_pointer.pass.cpp
new file mode 100644
index 000000000000..8edcfc415821
--- /dev/null
+++ b/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_pointer.pass.cpp
@@ -0,0 +1,43 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// class num_put<charT, OutputIterator>
+
+// iter_type put(iter_type s, ios_base& iob, char_type fill, void* v) const;
+
+#include <locale>
+#include <ios>
+#include <cassert>
+#include <streambuf>
+#include "test_iterators.h"
+
+typedef std::num_put<char, output_iterator<char*> > 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<char*> iter = f.put(output_iterator<char*>(str), ios, '*', v);
+ std::string ex(str, iter.base());
+ assert(ex == "0x0" || ex == "(nil)");
+ }
+}
diff --git a/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_unsigned_long.pass.cpp b/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_unsigned_long.pass.cpp
new file mode 100644
index 000000000000..f7a577fb8a9e
--- /dev/null
+++ b/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_unsigned_long.pass.cpp
@@ -0,0 +1,374 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// class num_put<charT, OutputIterator>
+
+// iter_type put(iter_type s, ios_base& iob, char_type fill, unsigned long v) const;
+
+#include <locale>
+#include <ios>
+#include <cassert>
+#include <streambuf>
+#include "test_iterators.h"
+
+typedef std::num_put<char, output_iterator<char*> > F;
+
+class my_facet
+ : public F
+{
+public:
+ explicit my_facet(std::size_t refs = 0)
+ : F(refs) {}
+};
+
+class my_numpunct
+ : public std::numpunct<char>
+{
+public:
+ my_numpunct() : std::numpunct<char>() {}
+
+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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_unsigned_long_long.pass.cpp b/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_unsigned_long_long.pass.cpp
new file mode 100644
index 000000000000..debbd5e0ee6c
--- /dev/null
+++ b/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_unsigned_long_long.pass.cpp
@@ -0,0 +1,344 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// class num_put<charT, OutputIterator>
+
+// iter_type put(iter_type s, ios_base& iob, char_type fill, unsigned long long v) const;
+
+#include <locale>
+#include <ios>
+#include <cassert>
+#include <streambuf>
+#include "test_iterators.h"
+
+typedef std::num_put<char, output_iterator<char*> > F;
+
+class my_facet
+ : public F
+{
+public:
+ explicit my_facet(std::size_t refs = 0)
+ : F(refs) {}
+};
+
+class my_numpunct
+ : public std::numpunct<char>
+{
+public:
+ my_numpunct() : std::numpunct<char>() {}
+
+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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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<char*> iter = f.put(output_iterator<char*>(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/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.virtuals/tested_elsewhere.pass.cpp b/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.virtuals/tested_elsewhere.pass.cpp
new file mode 100644
index 000000000000..b58f5c55b643
--- /dev/null
+++ b/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.virtuals/tested_elsewhere.pass.cpp
@@ -0,0 +1,12 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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/std/localization/locale.categories/category.numeric/locale.nm.put/types.pass.cpp b/test/std/localization/locale.categories/category.numeric/locale.nm.put/types.pass.cpp
new file mode 100644
index 000000000000..f6f1e5c21a5a
--- /dev/null
+++ b/test/std/localization/locale.categories/category.numeric/locale.nm.put/types.pass.cpp
@@ -0,0 +1,32 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// template <class charT, class OutputIterator = ostreambuf_iterator<charT> >
+// class num_put
+// : public locale::facet
+// {
+// public:
+// typedef charT char_type;
+// typedef OutputIterator iter_type;
+
+#include <locale>
+#include <iterator>
+#include <type_traits>
+
+int main()
+{
+ static_assert((std::is_base_of<std::locale::facet, std::num_put<char> >::value), "");
+ static_assert((std::is_base_of<std::locale::facet, std::num_put<wchar_t> >::value), "");
+ static_assert((std::is_same<std::num_put<char>::char_type, char>::value), "");
+ static_assert((std::is_same<std::num_put<wchar_t>::char_type, wchar_t>::value), "");
+ static_assert((std::is_same<std::num_put<char>::iter_type, std::ostreambuf_iterator<char> >::value), "");
+ static_assert((std::is_same<std::num_put<wchar_t>::iter_type, std::ostreambuf_iterator<wchar_t> >::value), "");
+}
diff --git a/test/std/localization/locale.categories/category.numeric/locale.num.get/ctor.pass.cpp b/test/std/localization/locale.categories/category.numeric/locale.num.get/ctor.pass.cpp
new file mode 100644
index 000000000000..71af9cdc7b62
--- /dev/null
+++ b/test/std/localization/locale.categories/category.numeric/locale.num.get/ctor.pass.cpp
@@ -0,0 +1,52 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// class num_get<charT, InputIterator>
+
+// explicit num_get(size_t refs = 0);
+
+#include <locale>
+#include <cassert>
+
+typedef std::num_get<char, char*> 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/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_bool.pass.cpp b/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_bool.pass.cpp
new file mode 100644
index 000000000000..f2cc2e7960db
--- /dev/null
+++ b/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_bool.pass.cpp
@@ -0,0 +1,230 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// class num_get<charT, InputIterator>
+
+// iter_type get(iter_type in, iter_type end, ios_base&,
+// ios_base::iostate& err, bool& v) const;
+
+#include <locale>
+#include <ios>
+#include <cassert>
+#include <streambuf>
+#include "test_iterators.h"
+
+typedef std::num_get<char, input_iterator<const char*> > F;
+
+class my_facet
+ : public F
+{
+public:
+ explicit my_facet(std::size_t refs = 0)
+ : F(refs) {}
+};
+
+class p1
+ : public std::numpunct<char>
+{
+public:
+ p1() : std::numpunct<char>() {}
+
+protected:
+ virtual string_type do_truename() const {return "a";}
+ virtual string_type do_falsename() const {return "abb";}
+};
+
+class p2
+ : public std::numpunct<char>
+{
+public:
+ p2() : std::numpunct<char>() {}
+
+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<const char*> iter =
+ f.get(input_iterator<const char*>(str),
+ input_iterator<const char*>(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<const char*> iter =
+ f.get(input_iterator<const char*>(str),
+ input_iterator<const char*>(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<const char*> iter =
+ f.get(input_iterator<const char*>(str),
+ input_iterator<const char*>(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<const char*> iter =
+ f.get(input_iterator<const char*>(str),
+ input_iterator<const char*>(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<const char*> iter =
+ f.get(input_iterator<const char*>(str),
+ input_iterator<const char*>(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<const char*> iter =
+ f.get(input_iterator<const char*>(str),
+ input_iterator<const char*>(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<const char*> iter =
+ f.get(input_iterator<const char*>(str),
+ input_iterator<const char*>(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<const char*> iter =
+ f.get(input_iterator<const char*>(str),
+ input_iterator<const char*>(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<const char*> iter =
+ f.get(input_iterator<const char*>(str),
+ input_iterator<const char*>(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<const char*> iter =
+ f.get(input_iterator<const char*>(str),
+ input_iterator<const char*>(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<const char*> iter =
+ f.get(input_iterator<const char*>(str),
+ input_iterator<const char*>(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<const char*> iter =
+ f.get(input_iterator<const char*>(str),
+ input_iterator<const char*>(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<const char*> iter =
+ f.get(input_iterator<const char*>(str),
+ input_iterator<const char*>(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<const char*> iter =
+ f.get(input_iterator<const char*>(str),
+ input_iterator<const char*>(str+2),
+ ios, err, b);
+ assert(iter.base() == str+1);
+ assert(err == ios.goodbit);
+ assert(b == true);
+ }
+}
diff --git a/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_double.pass.cpp b/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_double.pass.cpp
new file mode 100644
index 000000000000..f5c7c1277c31
--- /dev/null
+++ b/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_double.pass.cpp
@@ -0,0 +1,256 @@
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+//
+// XFAIL: with_system_cxx_lib=x86_64-apple-darwin11
+// XFAIL: with_system_cxx_lib=x86_64-apple-darwin12
+
+// <locale>
+
+// class num_get<charT, InputIterator>
+
+// iter_type get(iter_type in, iter_type end, ios_base&,
+// ios_base::iostate& err, double& v) const;
+
+#include <locale>
+#include <ios>
+#include <cassert>
+#include <streambuf>
+#include <cmath>
+#include "test_iterators.h"
+#include "hexfloat.h"
+
+typedef std::num_get<char, input_iterator<const char*> > F;
+
+class my_facet
+ : public F
+{
+public:
+ explicit my_facet(std::size_t refs = 0)
+ : F(refs) {}
+};
+
+class my_numpunct
+ : public std::numpunct<char>
+{
+public:
+ my_numpunct() : std::numpunct<char>() {}
+
+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<const char*> iter =
+ f.get(input_iterator<const char*>(str),
+ input_iterator<const char*>(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<const char*> iter =
+ f.get(input_iterator<const char*>(str),
+ input_iterator<const char*>(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<const char*> iter =
+ f.get(input_iterator<const char*>(str),
+ input_iterator<const char*>(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<const char*> iter =
+ f.get(input_iterator<const char*>(str),
+ input_iterator<const char*>(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<const char*> iter =
+ f.get(input_iterator<const char*>(str),
+ input_iterator<const char*>(str+sizeof(str)),
+ ios, err, v);
+ assert(iter.base() == str+sizeof(str)-1);
+ assert(err == ios.goodbit);
+ assert(v == hexfloat<double>(0x125, 0, -1));
+ }
+ {
+ const char str[] = "inf";
+ hex(ios);
+ std::ios_base::iostate err = ios.goodbit;
+ input_iterator<const char*> iter =
+ f.get(input_iterator<const char*>(str),
+ input_iterator<const char*>(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<const char*> iter =
+ f.get(input_iterator<const char*>(str),
+ input_iterator<const char*>(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<const char*> iter =
+ f.get(input_iterator<const char*>(str),
+ input_iterator<const char*>(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<const char*> iter =
+ f.get(input_iterator<const char*>(str),
+ input_iterator<const char*>(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<const char*> iter =
+ f.get(input_iterator<const char*>(str),
+ input_iterator<const char*>(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<const char*> iter =
+ f.get(input_iterator<const char*>(str),
+ input_iterator<const char*>(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<const char*> iter =
+ f.get(input_iterator<const char*>(str),
+ input_iterator<const char*>(str+sizeof(str)),
+ ios, err, v);
+ assert(iter.base() == str+3);
+ assert(err == ios.goodbit);
+ assert(v == 123);
+ }
+ {
+ v = -1;
+ const char str[] = "2-";
+ std::ios_base::iostate err = ios.goodbit;
+ input_iterator<const char*> iter =
+ f.get(input_iterator<const char*>(str),
+ input_iterator<const char*>(str+sizeof(str)),
+ ios, err, v);
+ assert(iter.base() == str+1);
+ assert(err == ios.goodbit);
+ assert(v == 2);
+ }
+ 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<const char*> iter =
+ f.get(input_iterator<const char*>(str),
+ input_iterator<const char*>(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<const char*> iter =
+ f.get(input_iterator<const char*>(str),
+ input_iterator<const char*>(str+sizeof(str)),
+ ios, err, v);
+ assert(iter.base() == str+sizeof(str)-1);
+ assert(err == ios.failbit);
+ }
+ {
+ v = -1;
+ const char str[] = "3;14159265358979323846264338327950288419716939937510582097494459230781640628620899862803482534211706798214808651e+10";
+ std::ios_base::iostate err = ios.goodbit;
+ input_iterator<const char*> iter =
+ f.get(input_iterator<const char*>(str),
+ input_iterator<const char*>(str+sizeof(str)),
+ ios, err, v);
+ assert(iter.base() == str+sizeof(str)-1);
+ assert(err == ios.goodbit);
+ assert(std::abs(v - 3.14159265358979e+10)/3.14159265358979e+10 < 1.e-8);
+ }
+}
diff --git a/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_float.pass.cpp b/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_float.pass.cpp
new file mode 100644
index 000000000000..9138894784ed
--- /dev/null
+++ b/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_float.pass.cpp
@@ -0,0 +1,171 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// class num_get<charT, InputIterator>
+
+// iter_type get(iter_type in, iter_type end, ios_base&,
+// ios_base::iostate& err, float& v) const;
+
+#include <locale>
+#include <ios>
+#include <cassert>
+#include <streambuf>
+#include <cmath>
+#include "test_iterators.h"
+#include "hexfloat.h"
+
+typedef std::num_get<char, input_iterator<const char*> > 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<const char*> iter =
+ f.get(input_iterator<const char*>(str),
+ input_iterator<const char*>(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<const char*> iter =
+ f.get(input_iterator<const char*>(str),
+ input_iterator<const char*>(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<const char*> iter =
+ f.get(input_iterator<const char*>(str),
+ input_iterator<const char*>(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<const char*> iter =
+ f.get(input_iterator<const char*>(str),
+ input_iterator<const char*>(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<const char*> iter =
+ f.get(input_iterator<const char*>(str),
+ input_iterator<const char*>(str+sizeof(str)),
+ ios, err, v);
+ assert(iter.base() == str+sizeof(str)-1);
+ assert(err == ios.goodbit);
+ assert(v == hexfloat<float>(0x125, 0, -1));
+ }
+ {
+ const char str[] = "inf";
+ hex(ios);
+ std::ios_base::iostate err = ios.goodbit;
+ input_iterator<const char*> iter =
+ f.get(input_iterator<const char*>(str),
+ input_iterator<const char*>(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<const char*> iter =
+ f.get(input_iterator<const char*>(str),
+ input_iterator<const char*>(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<const char*> iter =
+ f.get(input_iterator<const char*>(str),
+ input_iterator<const char*>(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<const char*> iter =
+ f.get(input_iterator<const char*>(str),
+ input_iterator<const char*>(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<const char*> iter =
+ f.get(input_iterator<const char*>(str),
+ input_iterator<const char*>(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<const char*> iter =
+ f.get(input_iterator<const char*>(str),
+ input_iterator<const char*>(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/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_long.pass.cpp b/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_long.pass.cpp
new file mode 100644
index 000000000000..d900c3764a1f
--- /dev/null
+++ b/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_long.pass.cpp
@@ -0,0 +1,519 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// class num_get<charT, InputIterator>
+
+// iter_type get(iter_type in, iter_type end, ios_base&,
+// ios_base::iostate& err, long& v) const;
+
+#include <locale>
+#include <ios>
+#include <cassert>
+#include <streambuf>
+#include "test_iterators.h"
+
+typedef std::num_get<char, input_iterator<const char*> > F;
+
+class my_facet
+ : public F
+{
+public:
+ explicit my_facet(std::size_t refs = 0)
+ : F(refs) {}
+};
+
+class my_numpunct
+ : public std::numpunct<char>
+{
+public:
+ my_numpunct() : std::numpunct<char>() {}
+
+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<const char*> iter =
+ f.get(input_iterator<const char*>(str),
+ input_iterator<const char*>(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<const char*> iter =
+ f.get(input_iterator<const char*>(str),
+ input_iterator<const char*>(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<const char*> iter =
+ f.get(input_iterator<const char*>(str),
+ input_iterator<const char*>(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<const char*> iter =
+ f.get(input_iterator<const char*>(str),
+ input_iterator<const char*>(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<const char*> iter =
+ f.get(input_iterator<const char*>(str),
+ input_iterator<const char*>(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<const char*> iter =
+ f.get(input_iterator<const char*>(str),
+ input_iterator<const char*>(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<const char*> iter =
+ f.get(input_iterator<const char*>(str),
+ input_iterator<const char*>(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<const char*> iter =
+ f.get(input_iterator<const char*>(str),
+ input_iterator<const char*>(str+sizeof(str)),
+ ios, err, v);
+ assert(iter.base() == str+sizeof(str)-1);
+ assert(err == ios.goodbit);
+ assert(v == 83);
+ }
+ {
+ const char str[] = "2-";
+ ios.setf(0, ios.basefield);
+ std::ios_base::iostate err = ios.goodbit;
+ input_iterator<const char*> iter =
+ f.get(input_iterator<const char*>(str),
+ input_iterator<const char*>(str+sizeof(str)),
+ ios, err, v);
+ assert(iter.base() == str+1);
+ assert(err == ios.goodbit);
+ assert(v == 2);
+ }
+ 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<const char*> iter =
+ f.get(input_iterator<const char*>(str),
+ input_iterator<const char*>(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<const char*> iter =
+ f.get(input_iterator<const char*>(str),
+ input_iterator<const char*>(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<const char*> iter =
+ f.get(input_iterator<const char*>(str),
+ input_iterator<const char*>(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<const char*> iter =
+ f.get(input_iterator<const char*>(str),
+ input_iterator<const char*>(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<const char*> iter =
+ f.get(input_iterator<const char*>(str),
+ input_iterator<const char*>(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<const char*> iter =
+ f.get(input_iterator<const char*>(str),
+ input_iterator<const char*>(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<const char*> iter =
+ f.get(input_iterator<const char*>(str),
+ input_iterator<const char*>(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<const char*> iter =
+ f.get(input_iterator<const char*>(str),
+ input_iterator<const char*>(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<const char*> iter =
+ f.get(input_iterator<const char*>(str),
+ input_iterator<const char*>(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<const char*> iter =
+ f.get(input_iterator<const char*>(str),
+ input_iterator<const char*>(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<const char*> iter =
+ f.get(input_iterator<const char*>(str),
+ input_iterator<const char*>(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<const char*> iter =
+ f.get(input_iterator<const char*>(str),
+ input_iterator<const char*>(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<const char*> iter =
+ f.get(input_iterator<const char*>(str),
+ input_iterator<const char*>(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<const char*> iter =
+ f.get(input_iterator<const char*>(str),
+ input_iterator<const char*>(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<const char*> iter =
+ f.get(input_iterator<const char*>(str),
+ input_iterator<const char*>(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<const char*> iter =
+ f.get(input_iterator<const char*>(str),
+ input_iterator<const char*>(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<const char*> iter =
+ f.get(input_iterator<const char*>(str),
+ input_iterator<const char*>(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<const char*> iter =
+ f.get(input_iterator<const char*>(str),
+ input_iterator<const char*>(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<const char*> iter =
+ f.get(input_iterator<const char*>(str),
+ input_iterator<const char*>(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<const char*> iter =
+ f.get(input_iterator<const char*>(str),
+ input_iterator<const char*>(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<const char*> iter =
+ f.get(input_iterator<const char*>(str),
+ input_iterator<const char*>(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<const char*> iter =
+ f.get(input_iterator<const char*>(str),
+ input_iterator<const char*>(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<const char*> iter =
+ f.get(input_iterator<const char*>(str),
+ input_iterator<const char*>(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<const char*> iter =
+ f.get(input_iterator<const char*>(str),
+ input_iterator<const char*>(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<const char*> iter =
+ f.get(input_iterator<const char*>(str),
+ input_iterator<const char*>(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<const char*> iter =
+ f.get(input_iterator<const char*>(str),
+ input_iterator<const char*>(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<const char*> iter =
+ f.get(input_iterator<const char*>(str),
+ input_iterator<const char*>(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<const char*> iter =
+ f.get(input_iterator<const char*>(str),
+ input_iterator<const char*>(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<const char*> iter =
+ f.get(input_iterator<const char*>(str),
+ input_iterator<const char*>(str+sizeof(str)),
+ ios, err, v);
+ assert(iter.base() == str+sizeof(str)-1);
+ assert(err == ios.failbit);
+ assert(v == std::numeric_limits<long>::max());
+ }
+}
diff --git a/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_long_double.pass.cpp b/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_long_double.pass.cpp
new file mode 100644
index 000000000000..8e89ebc470cf
--- /dev/null
+++ b/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_long_double.pass.cpp
@@ -0,0 +1,231 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// class num_get<charT, InputIterator>
+
+// iter_type get(iter_type in, iter_type end, ios_base&,
+// ios_base::iostate& err, long double& v) const;
+
+#include <locale>
+#include <ios>
+#include <cassert>
+#include <streambuf>
+#include <cmath>
+#include "test_iterators.h"
+#include "hexfloat.h"
+
+typedef std::num_get<char, input_iterator<const char*> > 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<const char*> iter =
+ f.get(input_iterator<const char*>(str),
+ input_iterator<const char*>(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<const char*> iter =
+ f.get(input_iterator<const char*>(str),
+ input_iterator<const char*>(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<const char*> iter =
+ f.get(input_iterator<const char*>(str),
+ input_iterator<const char*>(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<const char*> iter =
+ f.get(input_iterator<const char*>(str),
+ input_iterator<const char*>(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<const char*> iter =
+ f.get(input_iterator<const char*>(str),
+ input_iterator<const char*>(str+sizeof(str)),
+ ios, err, v);
+ assert(iter.base() == str+sizeof(str)-1);
+ assert(err == ios.goodbit);
+ assert(v == hexfloat<long double>(0x125, 0, -1));
+ }
+ {
+ const char str[] = "inf";
+ hex(ios);
+ std::ios_base::iostate err = ios.goodbit;
+ input_iterator<const char*> iter =
+ f.get(input_iterator<const char*>(str),
+ input_iterator<const char*>(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<const char*> iter =
+ f.get(input_iterator<const char*>(str),
+ input_iterator<const char*>(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<const char*> iter =
+ f.get(input_iterator<const char*>(str),
+ input_iterator<const char*>(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<const char*> iter =
+ f.get(input_iterator<const char*>(str),
+ input_iterator<const char*>(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<const char*> iter =
+ f.get(input_iterator<const char*>(str),
+ input_iterator<const char*>(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<const char*> iter =
+ f.get(input_iterator<const char*>(str),
+ input_iterator<const char*>(str+sizeof(str)),
+ ios, err, v);
+ assert(iter.base() == str+sizeof(str)-1);
+ assert(err == ios.goodbit);
+ assert(std::isnan(v));
+ }
+ {
+ const char str[] = "1.189731495357231765021264e+49321";
+ std::ios_base::iostate err = ios.goodbit;
+ v = 0;
+ input_iterator<const char*> iter =
+ f.get(input_iterator<const char*>(str),
+ input_iterator<const char*>(str+sizeof(str)),
+ ios, err, v);
+ assert(iter.base() == str+sizeof(str)-1);
+ assert(err == ios.failbit);
+ assert(v == INFINITY);
+ }
+ {
+ const char str[] = "1.189731495357231765021264e+49329";
+ std::ios_base::iostate err = ios.goodbit;
+ v = 0;
+ input_iterator<const char*> iter =
+ f.get(input_iterator<const char*>(str),
+ input_iterator<const char*>(str+sizeof(str)),
+ ios, err, v);
+ assert(iter.base() == str+sizeof(str)-1);
+ assert(err == ios.failbit);
+ assert(v == INFINITY);
+ }
+ {
+ const char str[] = "11.189731495357231765021264e+4932";
+ std::ios_base::iostate err = ios.goodbit;
+ v = 0;
+ input_iterator<const char*> iter =
+ f.get(input_iterator<const char*>(str),
+ input_iterator<const char*>(str+sizeof(str)),
+ ios, err, v);
+ assert(iter.base() == str+sizeof(str)-1);
+ assert(err == ios.failbit);
+ assert(v == INFINITY);
+ }
+ {
+ const char str[] = "91.189731495357231765021264e+4932";
+ std::ios_base::iostate err = ios.goodbit;
+ v = 0;
+ input_iterator<const char*> iter =
+ f.get(input_iterator<const char*>(str),
+ input_iterator<const char*>(str+sizeof(str)),
+ ios, err, v);
+ assert(iter.base() == str+sizeof(str)-1);
+ assert(err == ios.failbit);
+ assert(v == INFINITY);
+ }
+ {
+ const char str[] = "304888344611713860501504000000";
+ std::ios_base::iostate err = ios.goodbit;
+ v = 0;
+ input_iterator<const char*> iter =
+ f.get(input_iterator<const char*>(str),
+ input_iterator<const char*>(str+sizeof(str)),
+ ios, err, v);
+ assert(iter.base() == str+sizeof(str)-1);
+ assert(err != ios.failbit);
+ assert(v == 304888344611713860501504000000.0L);
+ }
+}
diff --git a/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_long_long.pass.cpp b/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_long_long.pass.cpp
new file mode 100644
index 000000000000..fe00876251cb
--- /dev/null
+++ b/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_long_long.pass.cpp
@@ -0,0 +1,105 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// class num_get<charT, InputIterator>
+
+// iter_type get(iter_type in, iter_type end, ios_base&,
+// ios_base::iostate& err, long long& v) const;
+
+#include <locale>
+#include <ios>
+#include <cassert>
+#include <streambuf>
+#include "test_iterators.h"
+
+typedef std::num_get<char, input_iterator<const char*> > F;
+
+class my_facet
+ : public F
+{
+public:
+ explicit my_facet(std::size_t refs = 0)
+ : F(refs) {}
+};
+
+class my_numpunct
+ : public std::numpunct<char>
+{
+public:
+ my_numpunct() : std::numpunct<char>() {}
+
+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<const char*> iter =
+ f.get(input_iterator<const char*>(str),
+ input_iterator<const char*>(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<const char*> iter =
+ f.get(input_iterator<const char*>(str),
+ input_iterator<const char*>(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<const char*> iter =
+ f.get(input_iterator<const char*>(str),
+ input_iterator<const char*>(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<const char*> iter =
+ f.get(input_iterator<const char*>(str),
+ input_iterator<const char*>(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<const char*> iter =
+ f.get(input_iterator<const char*>(str),
+ input_iterator<const char*>(str+sizeof(str)),
+ ios, err, v);
+ assert(iter.base() == str+sizeof(str)-1);
+ assert(err == ios.goodbit);
+ assert(v == 0x8000000000000000LL);
+ }
+}
diff --git a/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_pointer.pass.cpp b/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_pointer.pass.cpp
new file mode 100644
index 000000000000..c290722f32d3
--- /dev/null
+++ b/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_pointer.pass.cpp
@@ -0,0 +1,61 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// class num_get<charT, InputIterator>
+
+// iter_type get(iter_type in, iter_type end, ios_base&,
+// ios_base::iostate& err, void*& v) const;
+
+#include <locale>
+#include <ios>
+#include <cassert>
+#include <streambuf>
+#include "test_iterators.h"
+
+typedef std::num_get<char, input_iterator<const char*> > 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<const char*> iter =
+ f.get(input_iterator<const char*>(str),
+ input_iterator<const char*>(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<const char*> iter =
+ f.get(input_iterator<const char*>(str),
+ input_iterator<const char*>(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/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_unsigned_int.pass.cpp b/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_unsigned_int.pass.cpp
new file mode 100644
index 000000000000..2d10569796c9
--- /dev/null
+++ b/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_unsigned_int.pass.cpp
@@ -0,0 +1,83 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// class num_get<charT, InputIterator>
+
+// iter_type get(iter_type in, iter_type end, ios_base&,
+// ios_base::iostate& err, unsigned int& v) const;
+
+#include <locale>
+#include <ios>
+#include <cassert>
+#include <streambuf>
+#include "test_iterators.h"
+
+typedef std::num_get<char, input_iterator<const char*> > F;
+
+class my_facet
+ : public F
+{
+public:
+ explicit my_facet(std::size_t refs = 0)
+ : F(refs) {}
+};
+
+class my_numpunct
+ : public std::numpunct<char>
+{
+public:
+ my_numpunct() : std::numpunct<char>() {}
+
+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<const char*> iter =
+ f.get(input_iterator<const char*>(str),
+ input_iterator<const char*>(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<const char*> iter =
+ f.get(input_iterator<const char*>(str),
+ input_iterator<const char*>(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<const char*> iter =
+ f.get(input_iterator<const char*>(str),
+ input_iterator<const char*>(str+sizeof(str)),
+ ios, err, v);
+ assert(iter.base() == str+sizeof(str)-1);
+ assert(err == ios.goodbit);
+ assert(v == 0xFFFFFFFF);
+ }
+}
diff --git a/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_unsigned_long.pass.cpp b/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_unsigned_long.pass.cpp
new file mode 100644
index 000000000000..50f0ff5ee5da
--- /dev/null
+++ b/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_unsigned_long.pass.cpp
@@ -0,0 +1,83 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// class num_get<charT, InputIterator>
+
+// iter_type get(iter_type in, iter_type end, ios_base&,
+// ios_base::iostate& err, unsigned long& v) const;
+
+#include <locale>
+#include <ios>
+#include <cassert>
+#include <streambuf>
+#include "test_iterators.h"
+
+typedef std::num_get<char, input_iterator<const char*> > F;
+
+class my_facet
+ : public F
+{
+public:
+ explicit my_facet(std::size_t refs = 0)
+ : F(refs) {}
+};
+
+class my_numpunct
+ : public std::numpunct<char>
+{
+public:
+ my_numpunct() : std::numpunct<char>() {}
+
+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<const char*> iter =
+ f.get(input_iterator<const char*>(str),
+ input_iterator<const char*>(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<const char*> iter =
+ f.get(input_iterator<const char*>(str),
+ input_iterator<const char*>(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<const char*> iter =
+ f.get(input_iterator<const char*>(str),
+ input_iterator<const char*>(str+sizeof(str)),
+ ios, err, v);
+ assert(iter.base() == str+sizeof(str)-1);
+ assert(err == ios.goodbit);
+ assert(v == 0xFFFFFFFF);
+ }
+}
diff --git a/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_unsigned_long_long.pass.cpp b/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_unsigned_long_long.pass.cpp
new file mode 100644
index 000000000000..31fbb2a2c819
--- /dev/null
+++ b/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_unsigned_long_long.pass.cpp
@@ -0,0 +1,83 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// class num_get<charT, InputIterator>
+
+// iter_type get(iter_type in, iter_type end, ios_base&,
+// ios_base::iostate& err, unsigned long long& v) const;
+
+#include <locale>
+#include <ios>
+#include <cassert>
+#include <streambuf>
+#include "test_iterators.h"
+
+typedef std::num_get<char, input_iterator<const char*> > F;
+
+class my_facet
+ : public F
+{
+public:
+ explicit my_facet(std::size_t refs = 0)
+ : F(refs) {}
+};
+
+class my_numpunct
+ : public std::numpunct<char>
+{
+public:
+ my_numpunct() : std::numpunct<char>() {}
+
+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<const char*> iter =
+ f.get(input_iterator<const char*>(str),
+ input_iterator<const char*>(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<const char*> iter =
+ f.get(input_iterator<const char*>(str),
+ input_iterator<const char*>(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<const char*> iter =
+ f.get(input_iterator<const char*>(str),
+ input_iterator<const char*>(str+sizeof(str)),
+ ios, err, v);
+ assert(iter.base() == str+sizeof(str)-1);
+ assert(err == ios.goodbit);
+ assert(v == 0xFFFFFFFFFFFFFFFFULL);
+ }
+}
diff --git a/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_unsigned_short.pass.cpp b/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_unsigned_short.pass.cpp
new file mode 100644
index 000000000000..822b83e0ff93
--- /dev/null
+++ b/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_unsigned_short.pass.cpp
@@ -0,0 +1,83 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// class num_get<charT, InputIterator>
+
+// iter_type get(iter_type in, iter_type end, ios_base&,
+// ios_base::iostate& err, unsigned short& v) const;
+
+#include <locale>
+#include <ios>
+#include <cassert>
+#include <streambuf>
+#include "test_iterators.h"
+
+typedef std::num_get<char, input_iterator<const char*> > F;
+
+class my_facet
+ : public F
+{
+public:
+ explicit my_facet(std::size_t refs = 0)
+ : F(refs) {}
+};
+
+class my_numpunct
+ : public std::numpunct<char>
+{
+public:
+ my_numpunct() : std::numpunct<char>() {}
+
+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<const char*> iter =
+ f.get(input_iterator<const char*>(str),
+ input_iterator<const char*>(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<const char*> iter =
+ f.get(input_iterator<const char*>(str),
+ input_iterator<const char*>(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<const char*> iter =
+ f.get(input_iterator<const char*>(str),
+ input_iterator<const char*>(str+sizeof(str)),
+ ios, err, v);
+ assert(iter.base() == str+sizeof(str)-1);
+ assert(err == ios.goodbit);
+ assert(v == 0xFFFF);
+ }
+}
diff --git a/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/test_min_max.pass.cpp b/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/test_min_max.pass.cpp
new file mode 100644
index 000000000000..e474eca2f5b2
--- /dev/null
+++ b/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/test_min_max.pass.cpp
@@ -0,0 +1,62 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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 <limits>
+#include <sstream>
+#include <iostream>
+#include <cassert>
+#include <iostream>
+
+using namespace std;
+
+template<typename T>
+void check_limits()
+{
+ T minv = numeric_limits<T>::min();
+ T maxv = numeric_limits<T>::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<short>();
+ check_limits<unsigned short>();
+ check_limits<int>();
+ check_limits<unsigned int>();
+ check_limits<long>();
+ check_limits<unsigned long>();
+ check_limits<long long>();
+ check_limits<unsigned long long>();
+}
diff --git a/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.virtuals/tested_elsewhere.pass.cpp b/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.virtuals/tested_elsewhere.pass.cpp
new file mode 100644
index 000000000000..b58f5c55b643
--- /dev/null
+++ b/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.virtuals/tested_elsewhere.pass.cpp
@@ -0,0 +1,12 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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/std/localization/locale.categories/category.numeric/locale.num.get/types.pass.cpp b/test/std/localization/locale.categories/category.numeric/locale.num.get/types.pass.cpp
new file mode 100644
index 000000000000..b87b4b99b2f7
--- /dev/null
+++ b/test/std/localization/locale.categories/category.numeric/locale.num.get/types.pass.cpp
@@ -0,0 +1,32 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// template <class charT, class InputIterator = istreambuf_iterator<charT> >
+// class num_get
+// : public locale::facet
+// {
+// public:
+// typedef charT char_type;
+// typedef InputIterator iter_type;
+
+#include <locale>
+#include <iterator>
+#include <type_traits>
+
+int main()
+{
+ static_assert((std::is_base_of<std::locale::facet, std::num_get<char> >::value), "");
+ static_assert((std::is_base_of<std::locale::facet, std::num_get<wchar_t> >::value), "");
+ static_assert((std::is_same<std::num_get<char>::char_type, char>::value), "");
+ static_assert((std::is_same<std::num_get<wchar_t>::char_type, wchar_t>::value), "");
+ static_assert((std::is_same<std::num_get<char>::iter_type, std::istreambuf_iterator<char> >::value), "");
+ static_assert((std::is_same<std::num_get<wchar_t>::iter_type, std::istreambuf_iterator<wchar_t> >::value), "");
+}
diff --git a/test/std/localization/locale.categories/category.numeric/nothing_to_do.pass.cpp b/test/std/localization/locale.categories/category.numeric/nothing_to_do.pass.cpp
new file mode 100644
index 000000000000..b58f5c55b643
--- /dev/null
+++ b/test/std/localization/locale.categories/category.numeric/nothing_to_do.pass.cpp
@@ -0,0 +1,12 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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/std/localization/locale.categories/category.time/locale.time.get.byname/date_order.pass.cpp b/test/std/localization/locale.categories/category.time/locale.time.get.byname/date_order.pass.cpp
new file mode 100644
index 000000000000..963974d118bb
--- /dev/null
+++ b/test/std/localization/locale.categories/category.time/locale.time.get.byname/date_order.pass.cpp
@@ -0,0 +1,55 @@
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// REQUIRES: locale.en_US.UTF-8
+// REQUIRES: locale.fr_FR.UTF-8
+// REQUIRES: locale.ru_RU.UTF-8
+// REQUIRES: locale.zh_CN.UTF-8
+
+// <locale>
+
+// class time_get_byname<charT, InputIterator>
+
+// dateorder date_order() const;
+
+#include <locale>
+#include <cassert>
+#include "test_iterators.h"
+
+#include "platform_support.h" // locale name macros
+
+typedef std::time_get_byname<char, input_iterator<const char*> > 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(LOCALE_en_US_UTF_8, 1);
+ assert(f.date_order() == std::time_base::mdy);
+ }
+ {
+ const my_facet f(LOCALE_fr_FR_UTF_8, 1);
+ assert(f.date_order() == std::time_base::dmy);
+ }
+ {
+ const my_facet f(LOCALE_ru_RU_UTF_8, 1);
+ assert(f.date_order() == std::time_base::dmy);
+ }
+ {
+ const my_facet f(LOCALE_zh_CN_UTF_8, 1);
+ assert(f.date_order() == std::time_base::ymd);
+ }
+}
diff --git a/test/std/localization/locale.categories/category.time/locale.time.get.byname/date_order_wide.pass.cpp b/test/std/localization/locale.categories/category.time/locale.time.get.byname/date_order_wide.pass.cpp
new file mode 100644
index 000000000000..c44debf35abe
--- /dev/null
+++ b/test/std/localization/locale.categories/category.time/locale.time.get.byname/date_order_wide.pass.cpp
@@ -0,0 +1,55 @@
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// REQUIRES: locale.en_US.UTF-8
+// REQUIRES: locale.fr_FR.UTF-8
+// REQUIRES: locale.ru_RU.UTF-8
+// REQUIRES: locale.zh_CN.UTF-8
+
+// <locale>
+
+// class time_get_byname<charT, InputIterator>
+
+// dateorder date_order() const;
+
+#include <locale>
+#include <cassert>
+#include "test_iterators.h"
+
+#include "platform_support.h" // locale name macros
+
+typedef std::time_get_byname<wchar_t, input_iterator<const wchar_t*> > 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(LOCALE_en_US_UTF_8, 1);
+ assert(f.date_order() == std::time_base::mdy);
+ }
+ {
+ const my_facet f(LOCALE_fr_FR_UTF_8, 1);
+ assert(f.date_order() == std::time_base::dmy);
+ }
+ {
+ const my_facet f(LOCALE_ru_RU_UTF_8, 1);
+ assert(f.date_order() == std::time_base::dmy);
+ }
+ {
+ const my_facet f(LOCALE_zh_CN_UTF_8, 1);
+ assert(f.date_order() == std::time_base::ymd);
+ }
+}
diff --git a/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_date.pass.cpp b/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_date.pass.cpp
new file mode 100644
index 000000000000..9a06157ada59
--- /dev/null
+++ b/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_date.pass.cpp
@@ -0,0 +1,99 @@
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// REQUIRES: locale.en_US.UTF-8
+// REQUIRES: locale.fr_FR.UTF-8
+// REQUIRES: locale.ru_RU.UTF-8
+// REQUIRES: locale.zh_CN.UTF-8
+
+// GLIBC Expects "10/06/2009" for fr_FR as opposed to "10.06.2009"
+// GLIBC also failes on the zh_CN test.
+// XFAIL: linux
+
+// <locale>
+
+// class time_get_byname<charT, InputIterator>
+
+// iter_type
+// get_date(iter_type s, iter_type end, ios_base& str,
+// ios_base::iostate& err, tm* t) const;
+
+#include <locale>
+#include <cassert>
+#include "test_iterators.h"
+
+#include "platform_support.h" // locale name macros
+
+typedef input_iterator<const char*> I;
+
+typedef std::time_get_byname<char, I> 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(LOCALE_en_US_UTF_8, 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(LOCALE_fr_FR_UTF_8, 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(LOCALE_ru_RU_UTF_8, 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(LOCALE_zh_CN_UTF_8, 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/std/localization/locale.categories/category.time/locale.time.get.byname/get_date_wide.pass.cpp b/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_date_wide.pass.cpp
new file mode 100644
index 000000000000..170f33ad9813
--- /dev/null
+++ b/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_date_wide.pass.cpp
@@ -0,0 +1,98 @@
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// REQUIRES: locale.en_US.UTF-8
+// REQUIRES: locale.fr_FR.UTF-8
+// REQUIRES: locale.ru_RU.UTF-8
+// REQUIRES: locale.zh_CN.UTF-8
+
+// GLIBC Expects "10/06/2009" for fr_FR as opposed to "10.06.2009"
+// GLIBC also failes on the zh_CN test.
+// XFAIL: linux
+
+// <locale>
+
+// class time_get_byname<charT, InputIterator>
+
+// iter_type
+// get_date(iter_type s, iter_type end, ios_base& str,
+// ios_base::iostate& err, tm* t) const;
+
+#include <locale>
+#include <cassert>
+#include "test_iterators.h"
+
+#include "platform_support.h" // locale name macros
+
+typedef input_iterator<const wchar_t*> I;
+
+typedef std::time_get_byname<wchar_t, I> 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(LOCALE_en_US_UTF_8, 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(LOCALE_fr_FR_UTF_8, 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(LOCALE_ru_RU_UTF_8, 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(LOCALE_zh_CN_UTF_8, 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/std/localization/locale.categories/category.time/locale.time.get.byname/get_monthname.pass.cpp b/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_monthname.pass.cpp
new file mode 100644
index 000000000000..a442ae577b47
--- /dev/null
+++ b/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_monthname.pass.cpp
@@ -0,0 +1,92 @@
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// REQUIRES: locale.en_US.UTF-8
+// REQUIRES: locale.fr_FR.UTF-8
+// REQUIRES: locale.ru_RU.UTF-8
+// REQUIRES: locale.zh_CN.UTF-8
+
+// NOTE: debian and opensuse use old locale data for ru_RU.UTF-8 abreviated
+// months. This locale data was changed in glibc 2.14.
+// Debian uses glibc 2.13 as of 20/11/2014
+// OpenSuse uses glibc 2.19 with old locale data as of 20/11/2014
+// XFAIL: debian, opensuse
+
+// <locale>
+
+// class time_get_byname<charT, InputIterator>
+
+// iter_type
+// get_monthname(iter_type s, iter_type end, ios_base& str,
+// ios_base::iostate& err, tm* t) const;
+
+#include <locale>
+#include <cassert>
+#include "test_iterators.h"
+
+#include "platform_support.h" // locale name macros
+
+typedef input_iterator<const char*> I;
+
+typedef std::time_get_byname<char, I> 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(LOCALE_en_US_UTF_8, 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(LOCALE_fr_FR_UTF_8, 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(LOCALE_ru_RU_UTF_8, 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(LOCALE_zh_CN_UTF_8, 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/std/localization/locale.categories/category.time/locale.time.get.byname/get_monthname_wide.pass.cpp b/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_monthname_wide.pass.cpp
new file mode 100644
index 000000000000..631a500362da
--- /dev/null
+++ b/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_monthname_wide.pass.cpp
@@ -0,0 +1,101 @@
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// REQUIRES: locale.en_US.UTF-8
+// REQUIRES: locale.fr_FR.UTF-8
+// REQUIRES: locale.ru_RU.UTF-8
+// REQUIRES: locale.zh_CN.UTF-8
+
+// NOTE: debian and opensuse use bad locale data for ru_RU.UTF-8 abreviated
+// months. This locale data was fixed in glibc 2.14.
+// Debian uses glibc 2.13 as of 20/11/2014
+// OpenSuse uses glibc 2.19 with old locale data as of 20/11/2014
+// XFAIL: debian, opensuse
+
+// <locale>
+
+// class time_get_byname<charT, InputIterator>
+
+// iter_type
+// get_monthname(iter_type s, iter_type end, ios_base& str,
+// ios_base::iostate& err, tm* t) const;
+
+#include <locale>
+#include <cassert>
+#include "test_iterators.h"
+
+#include "platform_support.h" // locale name macros
+
+typedef input_iterator<const wchar_t*> I;
+
+typedef std::time_get_byname<wchar_t, I> 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<wchar_t, wchar_t*> 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(LOCALE_en_US_UTF_8, 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(LOCALE_fr_FR_UTF_8, 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(LOCALE_ru_RU_UTF_8, 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(LOCALE_zh_CN_UTF_8, 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/std/localization/locale.categories/category.time/locale.time.get.byname/get_one.pass.cpp b/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_one.pass.cpp
new file mode 100644
index 000000000000..72b63278d71d
--- /dev/null
+++ b/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_one.pass.cpp
@@ -0,0 +1,168 @@
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// REQUIRES: locale.en_US.UTF-8
+// REQUIRES: locale.fr_FR.UTF-8
+// REQUIRES: locale.ru_RU.UTF-8
+// REQUIRES: locale.zh_CN.UTF-8
+
+// <locale>
+
+// class time_get_byname<charT, InputIterator>
+
+// iter_type get(iter_type s, iter_type end, ios_base& f,
+// ios_base::iostate& err, tm *t, char format, char modifier = 0) const;
+
+// TODO: investigation needed
+// XFAIL: linux-gnu
+
+#include <locale>
+#include <cassert>
+#include "test_iterators.h"
+
+#include "platform_support.h" // locale name macros
+
+typedef input_iterator<const char*> I;
+
+typedef std::time_get_byname<char, I> 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(LOCALE_en_US_UTF_8, 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(LOCALE_en_US_UTF_8, 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(LOCALE_fr_FR_UTF_8, 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(LOCALE_fr_FR_UTF_8, 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(LOCALE_ru_RU_UTF_8, 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(LOCALE_ru_RU_UTF_8, 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(LOCALE_zh_CN_UTF_8, 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(LOCALE_zh_CN_UTF_8, 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/std/localization/locale.categories/category.time/locale.time.get.byname/get_one_wide.pass.cpp b/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_one_wide.pass.cpp
new file mode 100644
index 000000000000..ae8bce22445a
--- /dev/null
+++ b/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_one_wide.pass.cpp
@@ -0,0 +1,170 @@
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// REQUIRES: locale.en_US.UTF-8
+// REQUIRES: locale.fr_FR.UTF-8
+// REQUIRES: locale.ru_RU.UTF-8
+// REQUIRES: locale.zh_CN.UTF-8
+
+// <locale>
+
+// class time_get_byname<charT, InputIterator>
+
+// iter_type get(iter_type s, iter_type end, ios_base& f,
+// ios_base::iostate& err, tm *t, char format, char modifier = 0) const;
+
+// TODO: investigation needed
+// XFAIL: linux-gnu
+
+#include <locale>
+#include <cassert>
+#include "test_iterators.h"
+
+#include "platform_support.h" // locale name macros
+
+typedef input_iterator<const wchar_t*> I;
+
+typedef std::time_get_byname<wchar_t, I> 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(LOCALE_en_US_UTF_8, 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(LOCALE_en_US_UTF_8, 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(LOCALE_fr_FR_UTF_8, 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(LOCALE_fr_FR_UTF_8, 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);
+ }
+#ifdef __APPLE__
+ {
+ 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);
+ }
+#endif
+ {
+ const my_facet f(LOCALE_ru_RU_UTF_8, 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);
+ }
+#ifdef __APPLE__
+ {
+ 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);
+ }
+#endif
+ {
+ const my_facet f(LOCALE_zh_CN_UTF_8, 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/std/localization/locale.categories/category.time/locale.time.get.byname/get_time.pass.cpp b/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_time.pass.cpp
new file mode 100644
index 000000000000..8cea95de80ea
--- /dev/null
+++ b/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_time.pass.cpp
@@ -0,0 +1,94 @@
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// REQUIRES: locale.en_US.UTF-8
+// REQUIRES: locale.fr_FR.UTF-8
+// REQUIRES: locale.ru_RU.UTF-8
+// REQUIRES: locale.zh_CN.UTF-8
+
+// <locale>
+
+// class time_get_byname<charT, InputIterator>
+
+// iter_type
+// get_time(iter_type s, iter_type end, ios_base& str,
+// ios_base::iostate& err, tm* t) const;
+
+#include <locale>
+#include <cassert>
+#include "test_iterators.h"
+
+#include "platform_support.h" // locale name macros
+
+typedef input_iterator<const char*> I;
+
+typedef std::time_get_byname<char, I> 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(LOCALE_en_US_UTF_8, 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(LOCALE_fr_FR_UTF_8, 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(LOCALE_ru_RU_UTF_8, 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(LOCALE_zh_CN_UTF_8, 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/std/localization/locale.categories/category.time/locale.time.get.byname/get_time_wide.pass.cpp b/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_time_wide.pass.cpp
new file mode 100644
index 000000000000..452a3544033d
--- /dev/null
+++ b/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_time_wide.pass.cpp
@@ -0,0 +1,94 @@
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// REQUIRES: locale.en_US.UTF-8
+// REQUIRES: locale.fr_FR.UTF-8
+// REQUIRES: locale.ru_RU.UTF-8
+// REQUIRES: locale.zh_CN.UTF-8
+
+// <locale>
+
+// class time_get_byname<charT, InputIterator>
+
+// iter_type
+// get_time(iter_type s, iter_type end, ios_base& str,
+// ios_base::iostate& err, tm* t) const;
+
+#include <locale>
+#include <cassert>
+#include "test_iterators.h"
+
+#include "platform_support.h" // locale name macros
+
+typedef input_iterator<const wchar_t*> I;
+
+typedef std::time_get_byname<wchar_t, I> 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(LOCALE_en_US_UTF_8, 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(LOCALE_fr_FR_UTF_8, 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(LOCALE_ru_RU_UTF_8, 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(LOCALE_zh_CN_UTF_8, 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/std/localization/locale.categories/category.time/locale.time.get.byname/get_weekday.pass.cpp b/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_weekday.pass.cpp
new file mode 100644
index 000000000000..09055add75a9
--- /dev/null
+++ b/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_weekday.pass.cpp
@@ -0,0 +1,91 @@
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// REQUIRES: locale.en_US.UTF-8
+// REQUIRES: locale.fr_FR.UTF-8
+// REQUIRES: locale.ru_RU.UTF-8
+// REQUIRES: locale.zh_CN.UTF-8
+
+// <locale>
+
+// class time_get_byname<charT, InputIterator>
+
+// iter_type
+// get_weekday(iter_type s, iter_type end, ios_base& str,
+// ios_base::iostate& err, tm* t) const;
+
+// TODO: investigation needed
+// XFAIL: linux-gnu
+
+#include <locale>
+#include <cassert>
+#include "test_iterators.h"
+
+#include "platform_support.h" // locale name macros
+
+typedef input_iterator<const char*> I;
+
+typedef std::time_get_byname<char, I> 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(LOCALE_en_US_UTF_8, 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(LOCALE_fr_FR_UTF_8, 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(LOCALE_ru_RU_UTF_8, 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(LOCALE_zh_CN_UTF_8, 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/std/localization/locale.categories/category.time/locale.time.get.byname/get_weekday_wide.pass.cpp b/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_weekday_wide.pass.cpp
new file mode 100644
index 000000000000..31135a349435
--- /dev/null
+++ b/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_weekday_wide.pass.cpp
@@ -0,0 +1,89 @@
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// REQUIRES: locale.en_US.UTF-8
+// REQUIRES: locale.fr_FR.UTF-8
+// REQUIRES: locale.ru_RU.UTF-8
+// REQUIRES: locale.zh_CN.UTF-8
+
+// <locale>
+
+// class time_get_byname<charT, InputIterator>
+
+// iter_type
+// get_weekday(iter_type s, iter_type end, ios_base& str,
+// ios_base::iostate& err, tm* t) const;
+
+// TODO: investigation needed
+// XFAIL: linux-gnu
+
+#include <locale>
+#include <cassert>
+#include "test_iterators.h"
+
+#include "platform_support.h" // locale name macros
+
+typedef input_iterator<const wchar_t*> I;
+
+typedef std::time_get_byname<wchar_t, I> 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(LOCALE_en_US_UTF_8, 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(LOCALE_fr_FR_UTF_8, 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(LOCALE_ru_RU_UTF_8, 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(LOCALE_zh_CN_UTF_8, 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/std/localization/locale.categories/category.time/locale.time.get.byname/get_year.pass.cpp b/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_year.pass.cpp
new file mode 100644
index 000000000000..676e7fff87f4
--- /dev/null
+++ b/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_year.pass.cpp
@@ -0,0 +1,85 @@
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// REQUIRES: locale.en_US.UTF-8
+// REQUIRES: locale.fr_FR.UTF-8
+// REQUIRES: locale.ru_RU.UTF-8
+// REQUIRES: locale.zh_CN.UTF-8
+
+// <locale>
+
+// class time_get_byname<charT, InputIterator>
+
+// iter_type get_year(iter_type s, iter_type end, ios_base& str,
+// ios_base::iostate& err, tm* t) const;
+
+#include <locale>
+#include <cassert>
+#include "test_iterators.h"
+
+#include "platform_support.h" // locale name macros
+
+typedef input_iterator<const char*> I;
+
+typedef std::time_get_byname<char, I> 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(LOCALE_en_US_UTF_8, 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(LOCALE_fr_FR_UTF_8, 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(LOCALE_ru_RU_UTF_8, 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(LOCALE_zh_CN_UTF_8, 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/std/localization/locale.categories/category.time/locale.time.get.byname/get_year_wide.pass.cpp b/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_year_wide.pass.cpp
new file mode 100644
index 000000000000..1bdb8de601d4
--- /dev/null
+++ b/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_year_wide.pass.cpp
@@ -0,0 +1,85 @@
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// REQUIRES: locale.en_US.UTF-8
+// REQUIRES: locale.fr_FR.UTF-8
+// REQUIRES: locale.ru_RU.UTF-8
+// REQUIRES: locale.zh_CN.UTF-8
+
+// <locale>
+
+// class time_get_byname<charT, InputIterator>
+
+// iter_type get_year(iter_type s, iter_type end, ios_base& str,
+// ios_base::iostate& err, tm* t) const;
+
+#include <locale>
+#include <cassert>
+#include "test_iterators.h"
+
+#include "platform_support.h" // locale name macros
+
+typedef input_iterator<const wchar_t*> I;
+
+typedef std::time_get_byname<wchar_t, I> 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(LOCALE_en_US_UTF_8, 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(LOCALE_fr_FR_UTF_8, 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(LOCALE_ru_RU_UTF_8, 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(LOCALE_zh_CN_UTF_8, 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/std/localization/locale.categories/category.time/locale.time.get/ctor.pass.cpp b/test/std/localization/locale.categories/category.time/locale.time.get/ctor.pass.cpp
new file mode 100644
index 000000000000..c6c4359e48c6
--- /dev/null
+++ b/test/std/localization/locale.categories/category.time/locale.time.get/ctor.pass.cpp
@@ -0,0 +1,52 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// class time_get<charT, InputIterator>
+
+// explicit time_get(size_t refs = 0);
+
+#include <locale>
+#include <cassert>
+
+typedef std::time_get<char, const char*> 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/std/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/date_order.pass.cpp b/test/std/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/date_order.pass.cpp
new file mode 100644
index 000000000000..264494ba6183
--- /dev/null
+++ b/test/std/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/date_order.pass.cpp
@@ -0,0 +1,34 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// class time_get<charT, InputIterator>
+
+// dateorder date_order() const;
+
+#include <locale>
+#include <cassert>
+#include "test_iterators.h"
+
+typedef std::time_get<char, input_iterator<const char*> > 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/std/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_date.pass.cpp b/test/std/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_date.pass.cpp
new file mode 100644
index 000000000000..6b8bd73bed5b
--- /dev/null
+++ b/test/std/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_date.pass.cpp
@@ -0,0 +1,51 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// class time_get<charT, InputIterator>
+
+// iter_type
+// get_date(iter_type s, iter_type end, ios_base& str,
+// ios_base::iostate& err, tm* t) const;
+
+#include <locale>
+#include <cassert>
+#include "test_iterators.h"
+
+typedef input_iterator<const char*> I;
+
+typedef std::time_get<char, I> 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/std/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_date_wide.pass.cpp b/test/std/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_date_wide.pass.cpp
new file mode 100644
index 000000000000..4c663a3bc698
--- /dev/null
+++ b/test/std/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_date_wide.pass.cpp
@@ -0,0 +1,51 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// class time_get<charT, InputIterator>
+
+// iter_type
+// get_date(iter_type s, iter_type end, ios_base& str,
+// ios_base::iostate& err, tm* t) const;
+
+#include <locale>
+#include <cassert>
+#include "test_iterators.h"
+
+typedef input_iterator<const wchar_t*> I;
+
+typedef std::time_get<wchar_t, I> 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/std/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_many.pass.cpp b/test/std/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_many.pass.cpp
new file mode 100644
index 000000000000..39a10b48adaa
--- /dev/null
+++ b/test/std/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_many.pass.cpp
@@ -0,0 +1,68 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// class time_get<charT, InputIterator>
+
+// 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 <locale>
+#include <cassert>
+#include "test_iterators.h"
+
+typedef input_iterator<const char*> I;
+
+typedef std::time_get<char, I> 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/std/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_monthname.pass.cpp b/test/std/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_monthname.pass.cpp
new file mode 100644
index 000000000000..19e378ce8f57
--- /dev/null
+++ b/test/std/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_monthname.pass.cpp
@@ -0,0 +1,265 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// class time_get<charT, InputIterator>
+
+// iter_type
+// get_monthname(iter_type s, iter_type end, ios_base& str,
+// ios_base::iostate& err, tm* t) const;
+
+#include <locale>
+#include <cassert>
+#include "test_iterators.h"
+
+typedef input_iterator<const char*> I;
+
+typedef std::time_get<char, I> 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/std/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_monthname_wide.pass.cpp b/test/std/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_monthname_wide.pass.cpp
new file mode 100644
index 000000000000..1761a6d8c03f
--- /dev/null
+++ b/test/std/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_monthname_wide.pass.cpp
@@ -0,0 +1,265 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// class time_get<charT, InputIterator>
+
+// iter_type
+// get_monthname(iter_type s, iter_type end, ios_base& str,
+// ios_base::iostate& err, tm* t) const;
+
+#include <locale>
+#include <cassert>
+#include "test_iterators.h"
+
+typedef input_iterator<const wchar_t*> I;
+
+typedef std::time_get<wchar_t, I> 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/std/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_one.pass.cpp b/test/std/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_one.pass.cpp
new file mode 100644
index 000000000000..05182c288e4c
--- /dev/null
+++ b/test/std/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_one.pass.cpp
@@ -0,0 +1,305 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// class time_get<charT, InputIterator>
+
+// 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 <locale>
+#include <cassert>
+#include "test_iterators.h"
+
+typedef input_iterator<const char*> I;
+
+typedef std::time_get<char, I> 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/std/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_time.pass.cpp b/test/std/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_time.pass.cpp
new file mode 100644
index 000000000000..b8b05f6dc7ff
--- /dev/null
+++ b/test/std/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_time.pass.cpp
@@ -0,0 +1,117 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// class time_get<charT, InputIterator>
+
+// iter_type
+// get_time(iter_type s, iter_type end, ios_base& str,
+// ios_base::iostate& err, tm* t) const;
+
+#include <locale>
+#include <cassert>
+#include "test_iterators.h"
+
+typedef input_iterator<const char*> I;
+
+typedef std::time_get<char, I> 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/std/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_time_wide.pass.cpp b/test/std/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_time_wide.pass.cpp
new file mode 100644
index 000000000000..679d0584076a
--- /dev/null
+++ b/test/std/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_time_wide.pass.cpp
@@ -0,0 +1,117 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// class time_get<charT, InputIterator>
+
+// iter_type
+// get_time(iter_type s, iter_type end, ios_base& str,
+// ios_base::iostate& err, tm* t) const;
+
+#include <locale>
+#include <cassert>
+#include "test_iterators.h"
+
+typedef input_iterator<const wchar_t*> I;
+
+typedef std::time_get<wchar_t, I> 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/std/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_weekday.pass.cpp b/test/std/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_weekday.pass.cpp
new file mode 100644
index 000000000000..918a9026f30e
--- /dev/null
+++ b/test/std/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_weekday.pass.cpp
@@ -0,0 +1,220 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// class time_get<charT, InputIterator>
+
+// iter_type
+// get_weekday(iter_type s, iter_type end, ios_base& str,
+// ios_base::iostate& err, tm* t) const;
+
+#include <locale>
+#include <cassert>
+#include "test_iterators.h"
+
+typedef input_iterator<const char*> I;
+
+typedef std::time_get<char, I> 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/std/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_weekday_wide.pass.cpp b/test/std/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_weekday_wide.pass.cpp
new file mode 100644
index 000000000000..5212eb12b1d7
--- /dev/null
+++ b/test/std/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_weekday_wide.pass.cpp
@@ -0,0 +1,220 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// class time_get<charT, InputIterator>
+
+// iter_type
+// get_weekday(iter_type s, iter_type end, ios_base& str,
+// ios_base::iostate& err, tm* t) const;
+
+#include <locale>
+#include <cassert>
+#include "test_iterators.h"
+
+typedef input_iterator<const wchar_t*> I;
+
+typedef std::time_get<wchar_t, I> 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/std/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_year.pass.cpp b/test/std/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_year.pass.cpp
new file mode 100644
index 000000000000..6e5e04d25a5a
--- /dev/null
+++ b/test/std/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_year.pass.cpp
@@ -0,0 +1,138 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// class time_get<charT, InputIterator>
+
+// iter_type get_year(iter_type s, iter_type end, ios_base& str,
+// ios_base::iostate& err, tm* t) const;
+
+#include <locale>
+#include <cassert>
+#include "test_iterators.h"
+
+typedef input_iterator<const char*> I;
+
+typedef std::time_get<char, I> 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/std/localization/locale.categories/category.time/locale.time.get/locale.time.get.virtuals/tested_elsewhere.pass.cpp b/test/std/localization/locale.categories/category.time/locale.time.get/locale.time.get.virtuals/tested_elsewhere.pass.cpp
new file mode 100644
index 000000000000..b58f5c55b643
--- /dev/null
+++ b/test/std/localization/locale.categories/category.time/locale.time.get/locale.time.get.virtuals/tested_elsewhere.pass.cpp
@@ -0,0 +1,12 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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/std/localization/locale.categories/category.time/locale.time.get/time_base.pass.cpp b/test/std/localization/locale.categories/category.time/locale.time.get/time_base.pass.cpp
new file mode 100644
index 000000000000..28bc3aa89f9c
--- /dev/null
+++ b/test/std/localization/locale.categories/category.time/locale.time.get/time_base.pass.cpp
@@ -0,0 +1,29 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// class time_base
+// {
+// public:
+// enum dateorder {no_order, dmy, mdy, ymd, ydm};
+// };
+
+#include <locale>
+#include <cassert>
+
+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/std/localization/locale.categories/category.time/locale.time.get/types.pass.cpp b/test/std/localization/locale.categories/category.time/locale.time.get/types.pass.cpp
new file mode 100644
index 000000000000..f434ea577955
--- /dev/null
+++ b/test/std/localization/locale.categories/category.time/locale.time.get/types.pass.cpp
@@ -0,0 +1,41 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// class time_base
+// {
+// public:
+// enum dateorder {no_order, dmy, mdy, ymd, ydm};
+// };
+//
+// template <class charT, class InputIterator = istreambuf_iterator<charT> >
+// class time_get
+// : public locale::facet,
+// public time_base
+// {
+// public:
+// typedef charT char_type;
+// typedef InputIterator iter_type;
+
+#include <locale>
+#include <iterator>
+#include <type_traits>
+
+int main()
+{
+ static_assert((std::is_base_of<std::locale::facet, std::time_get<char> >::value), "");
+ static_assert((std::is_base_of<std::locale::facet, std::time_get<wchar_t> >::value), "");
+ static_assert((std::is_base_of<std::time_base, std::time_get<char> >::value), "");
+ static_assert((std::is_base_of<std::time_base, std::time_get<wchar_t> >::value), "");
+ static_assert((std::is_same<std::time_get<char>::char_type, char>::value), "");
+ static_assert((std::is_same<std::time_get<wchar_t>::char_type, wchar_t>::value), "");
+ static_assert((std::is_same<std::time_get<char>::iter_type, std::istreambuf_iterator<char> >::value), "");
+ static_assert((std::is_same<std::time_get<wchar_t>::iter_type, std::istreambuf_iterator<wchar_t> >::value), "");
+}
diff --git a/test/std/localization/locale.categories/category.time/locale.time.put.byname/put1.pass.cpp b/test/std/localization/locale.categories/category.time/locale.time.put.byname/put1.pass.cpp
new file mode 100644
index 000000000000..3e7538d6625b
--- /dev/null
+++ b/test/std/localization/locale.categories/category.time/locale.time.put.byname/put1.pass.cpp
@@ -0,0 +1,78 @@
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// REQUIRES: locale.en_US.UTF-8
+// REQUIRES: locale.fr_FR.UTF-8
+
+// <locale>
+
+// template <class CharT, class OutputIterator = ostreambuf_iterator<CharT> >
+// class time_put_byname
+// : public time_put<CharT, OutputIterator>
+// {
+// 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();
+// };
+
+// TODO: investigation needed
+// XFAIL: linux-gnu
+
+#include <locale>
+#include <cassert>
+#include "test_iterators.h"
+
+#include "platform_support.h" // locale name macros
+
+typedef std::time_put_byname<char, output_iterator<char*> > 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<char*> 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(LOCALE_en_US_UTF_8, 1);
+ std::string pat("Today is %A which is abbreviated %a.");
+ iter = f.put(output_iterator<char*>(str), ios, '*', &t,
+ pat.data(), pat.data() + pat.size());
+ std::string ex(str, iter.base());
+ assert(ex == "Today is Saturday which is abbreviated Sat.");
+ }
+ {
+ const my_facet f(LOCALE_fr_FR_UTF_8, 1);
+ std::string pat("Today is %A which is abbreviated %a.");
+ iter = f.put(output_iterator<char*>(str), ios, '*', &t,
+ pat.data(), pat.data() + pat.size());
+ std::string ex(str, iter.base());
+ assert((ex == "Today is Samedi which is abbreviated Sam.")||
+ (ex == "Today is samedi which is abbreviated sam." ));
+ }
+}
diff --git a/test/std/localization/locale.categories/category.time/locale.time.put/ctor.pass.cpp b/test/std/localization/locale.categories/category.time/locale.time.put/ctor.pass.cpp
new file mode 100644
index 000000000000..c22980a69c5d
--- /dev/null
+++ b/test/std/localization/locale.categories/category.time/locale.time.put/ctor.pass.cpp
@@ -0,0 +1,52 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// class time_put<charT, OutputIterator>
+
+// explicit time_put(size_t refs = 0);
+
+#include <locale>
+#include <cassert>
+
+typedef std::time_put<char, char*> 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/std/localization/locale.categories/category.time/locale.time.put/locale.time.put.members/put1.pass.cpp b/test/std/localization/locale.categories/category.time/locale.time.put/locale.time.put.members/put1.pass.cpp
new file mode 100644
index 000000000000..93d59520677c
--- /dev/null
+++ b/test/std/localization/locale.categories/category.time/locale.time.put/locale.time.put.members/put1.pass.cpp
@@ -0,0 +1,61 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// class time_put<charT, OutputIterator>
+
+// iter_type put(iter_type s, ios_base& str, char_type fill, const tm* t,
+// const charT* pattern, const charT* pat_end) const;
+
+#include <locale>
+#include <cassert>
+#include "test_iterators.h"
+
+typedef std::time_put<char, output_iterator<char*> > 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<char*> 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 abbreviated %a.");
+ iter = f.put(output_iterator<char*>(str), ios, '*', &t,
+ pat.data(), pat.data() + pat.size());
+ std::string ex(str, iter.base());
+ assert(ex == "Today is Saturday which is abbreviated Sat.");
+ }
+ {
+ std::string pat("The number of the month is %Om.");
+ iter = f.put(output_iterator<char*>(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/std/localization/locale.categories/category.time/locale.time.put/locale.time.put.members/put2.pass.cpp b/test/std/localization/locale.categories/category.time/locale.time.put/locale.time.put.members/put2.pass.cpp
new file mode 100644
index 000000000000..d9e7f3cd5149
--- /dev/null
+++ b/test/std/localization/locale.categories/category.time/locale.time.put/locale.time.put.members/put2.pass.cpp
@@ -0,0 +1,332 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// class time_put<charT, OutputIterator>
+
+// iter_type put(iter_type s, ios_base& str, char_type fill, const tm* t,
+// char format, char modifier = 0) const;
+
+#include <locale>
+#include <cassert>
+#include "test_iterators.h"
+
+typedef std::time_put<char, output_iterator<char*> > 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<char*> 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 = 121;
+ t.tm_isdst = 1;
+ std::ios ios(0);
+ {
+ iter = f.put(output_iterator<char*>(str), ios, '*', &t, 'A');
+ std::string ex(str, iter.base());
+ assert(ex == "Saturday");
+ }
+ {
+ iter = f.put(output_iterator<char*>(str), ios, '*', &t, 'a');
+ std::string ex(str, iter.base());
+ assert(ex == "Sat");
+ }
+ {
+ iter = f.put(output_iterator<char*>(str), ios, '*', &t, 'B');
+ std::string ex(str, iter.base());
+ assert(ex == "May");
+ }
+ {
+ iter = f.put(output_iterator<char*>(str), ios, '*', &t, 'b');
+ std::string ex(str, iter.base());
+ assert(ex == "May");
+ }
+ {
+ iter = f.put(output_iterator<char*>(str), ios, '*', &t, 'C');
+ std::string ex(str, iter.base());
+ assert(ex == "20");
+ }
+ {
+ iter = f.put(output_iterator<char*>(str), ios, '*', &t, 'c');
+ std::string ex(str, iter.base());
+ assert(ex == "Sat May 2 13:03:06 2009");
+ }
+ {
+ iter = f.put(output_iterator<char*>(str), ios, '*', &t, 'D');
+ std::string ex(str, iter.base());
+ assert(ex == "05/02/09");
+ }
+ {
+ iter = f.put(output_iterator<char*>(str), ios, '*', &t, 'd');
+ std::string ex(str, iter.base());
+ assert(ex == "02");
+ }
+ {
+ iter = f.put(output_iterator<char*>(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<char*>(str), ios, '*', &t, 'C', 'E');
+ std::string ex(str, iter.base());
+ assert(ex == "20");
+ }
+ {
+ iter = f.put(output_iterator<char*>(str), ios, '*', &t, 'x', 'E');
+ std::string ex(str, iter.base());
+ assert(ex == "05/02/09");
+ }
+ {
+ iter = f.put(output_iterator<char*>(str), ios, '*', &t, 'X', 'E');
+ std::string ex(str, iter.base());
+ assert(ex == "13:03:06");
+ }
+ {
+ iter = f.put(output_iterator<char*>(str), ios, '*', &t, 'y', 'E');
+ std::string ex(str, iter.base());
+ assert(ex == "09");
+ }
+ {
+ iter = f.put(output_iterator<char*>(str), ios, '*', &t, 'Y', 'E');
+ std::string ex(str, iter.base());
+ assert(ex == "2009");
+ }
+ {
+ iter = f.put(output_iterator<char*>(str), ios, '*', &t, 'd', 'O');
+ std::string ex(str, iter.base());
+ assert(ex == "02");
+ }
+ {
+ iter = f.put(output_iterator<char*>(str), ios, '*', &t, 'e', 'O');
+ std::string ex(str, iter.base());
+ assert(ex == " 2");
+ }
+ {
+ iter = f.put(output_iterator<char*>(str), ios, '*', &t, 'H', 'O');
+ std::string ex(str, iter.base());
+ assert(ex == "13");
+ }
+ {
+ iter = f.put(output_iterator<char*>(str), ios, '*', &t, 'I', 'O');
+ std::string ex(str, iter.base());
+ assert(ex == "01");
+ }
+ {
+ iter = f.put(output_iterator<char*>(str), ios, '*', &t, 'm', 'O');
+ std::string ex(str, iter.base());
+ assert(ex == "05");
+ }
+ {
+ iter = f.put(output_iterator<char*>(str), ios, '*', &t, 'M', 'O');
+ std::string ex(str, iter.base());
+ assert(ex == "03");
+ }
+ {
+ iter = f.put(output_iterator<char*>(str), ios, '*', &t, 'S', 'O');
+ std::string ex(str, iter.base());
+ assert(ex == "06");
+ }
+ {
+ iter = f.put(output_iterator<char*>(str), ios, '*', &t, 'u', 'O');
+ std::string ex(str, iter.base());
+ assert(ex == "6");
+ }
+ {
+ iter = f.put(output_iterator<char*>(str), ios, '*', &t, 'U', 'O');
+ std::string ex(str, iter.base());
+ assert(ex == "17");
+ }
+ {
+ iter = f.put(output_iterator<char*>(str), ios, '*', &t, 'V', 'O');
+ std::string ex(str, iter.base());
+ assert(ex == "18");
+ }
+ {
+ iter = f.put(output_iterator<char*>(str), ios, '*', &t, 'w', 'O');
+ std::string ex(str, iter.base());
+ assert(ex == "6");
+ }
+ {
+ iter = f.put(output_iterator<char*>(str), ios, '*', &t, 'W', 'O');
+ std::string ex(str, iter.base());
+ assert(ex == "17");
+ }
+ {
+ iter = f.put(output_iterator<char*>(str), ios, '*', &t, 'y', 'O');
+ std::string ex(str, iter.base());
+ assert(ex == "09");
+ }
+ {
+ iter = f.put(output_iterator<char*>(str), ios, '*', &t, 'e');
+ std::string ex(str, iter.base());
+ assert(ex == " 2");
+ }
+ {
+ iter = f.put(output_iterator<char*>(str), ios, '*', &t, 'F');
+ std::string ex(str, iter.base());
+ assert(ex == "2009-05-02");
+ }
+ {
+ iter = f.put(output_iterator<char*>(str), ios, '*', &t, 'G');
+ std::string ex(str, iter.base());
+ assert(ex == "2009");
+ }
+ {
+ iter = f.put(output_iterator<char*>(str), ios, '*', &t, 'g');
+ std::string ex(str, iter.base());
+ assert(ex == "09");
+ }
+ {
+ iter = f.put(output_iterator<char*>(str), ios, '*', &t, 'H');
+ std::string ex(str, iter.base());
+ assert(ex == "13");
+ }
+ {
+ iter = f.put(output_iterator<char*>(str), ios, '*', &t, 'h');
+ std::string ex(str, iter.base());
+ assert(ex == "May");
+ }
+ {
+ iter = f.put(output_iterator<char*>(str), ios, '*', &t, 'I');
+ std::string ex(str, iter.base());
+ assert(ex == "01");
+ }
+ {
+ iter = f.put(output_iterator<char*>(str), ios, '*', &t, 'j');
+ std::string ex(str, iter.base());
+ assert(ex == "122");
+ }
+ {
+ iter = f.put(output_iterator<char*>(str), ios, '*', &t, 'M');
+ std::string ex(str, iter.base());
+ assert(ex == "03");
+ }
+ {
+ iter = f.put(output_iterator<char*>(str), ios, '*', &t, 'm');
+ std::string ex(str, iter.base());
+ assert(ex == "05");
+ }
+ {
+ iter = f.put(output_iterator<char*>(str), ios, '*', &t, 'n');
+ std::string ex(str, iter.base());
+ assert(ex == "\n");
+ }
+ {
+ iter = f.put(output_iterator<char*>(str), ios, '*', &t, 'p');
+ std::string ex(str, iter.base());
+ assert(ex == "PM");
+ }
+ {
+ iter = f.put(output_iterator<char*>(str), ios, '*', &t, 'R');
+ std::string ex(str, iter.base());
+ assert(ex == "13:03");
+ }
+ {
+ iter = f.put(output_iterator<char*>(str), ios, '*', &t, 'r');
+ std::string ex(str, iter.base());
+ assert(ex == "01:03:06 PM");
+ }
+ {
+ iter = f.put(output_iterator<char*>(str), ios, '*', &t, 'S');
+ std::string ex(str, iter.base());
+ assert(ex == "06");
+ }
+ {
+ iter = f.put(output_iterator<char*>(str), ios, '*', &t, 'T');
+ std::string ex(str, iter.base());
+ assert(ex == "13:03:06");
+ }
+ {
+ iter = f.put(output_iterator<char*>(str), ios, '*', &t, 't');
+ std::string ex(str, iter.base());
+ assert(ex == "\t");
+ }
+ {
+ iter = f.put(output_iterator<char*>(str), ios, '*', &t, 'U');
+ std::string ex(str, iter.base());
+ assert(ex == "17");
+ }
+ {
+ iter = f.put(output_iterator<char*>(str), ios, '*', &t, 'u');
+ std::string ex(str, iter.base());
+ assert(ex == "6");
+ }
+ {
+ iter = f.put(output_iterator<char*>(str), ios, '*', &t, 'V');
+ std::string ex(str, iter.base());
+ assert(ex == "18");
+ }
+ {
+ iter = f.put(output_iterator<char*>(str), ios, '*', &t, 'W');
+ std::string ex(str, iter.base());
+ assert(ex == "17");
+ }
+ {
+ iter = f.put(output_iterator<char*>(str), ios, '*', &t, 'w');
+ std::string ex(str, iter.base());
+ assert(ex == "6");
+ }
+ {
+ iter = f.put(output_iterator<char*>(str), ios, '*', &t, 'X');
+ std::string ex(str, iter.base());
+ assert(ex == "13:03:06");
+ }
+ {
+ iter = f.put(output_iterator<char*>(str), ios, '*', &t, 'x');
+ std::string ex(str, iter.base());
+ assert(ex == "05/02/09");
+ }
+ {
+ iter = f.put(output_iterator<char*>(str), ios, '*', &t, 'Y');
+ std::string ex(str, iter.base());
+ assert(ex == "2009");
+ }
+ {
+ iter = f.put(output_iterator<char*>(str), ios, '*', &t, 'y');
+ std::string ex(str, iter.base());
+ assert(ex == "09");
+ }
+ {
+ iter = f.put(output_iterator<char*>(str), ios, '*', &t, 'Z');
+ std::string ex(str, iter.base());
+// assert(ex == "EDT"); depends on time zone
+ }
+ {
+ iter = f.put(output_iterator<char*>(str), ios, '*', &t, 'z');
+ std::string ex(str, iter.base());
+// assert(ex == "-0400"); depends on time zone
+ }
+ {
+ iter = f.put(output_iterator<char*>(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<char*>(str), ios, '*', &t, '%');
+ std::string ex(str, iter.base());
+ assert(ex == "%");
+ }
+}
diff --git a/test/std/localization/locale.categories/category.time/locale.time.put/locale.time.put.virtuals/tested_elsewhere.pass.cpp b/test/std/localization/locale.categories/category.time/locale.time.put/locale.time.put.virtuals/tested_elsewhere.pass.cpp
new file mode 100644
index 000000000000..b58f5c55b643
--- /dev/null
+++ b/test/std/localization/locale.categories/category.time/locale.time.put/locale.time.put.virtuals/tested_elsewhere.pass.cpp
@@ -0,0 +1,12 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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/std/localization/locale.categories/category.time/locale.time.put/types.pass.cpp b/test/std/localization/locale.categories/category.time/locale.time.put/types.pass.cpp
new file mode 100644
index 000000000000..db9d3fbf4046
--- /dev/null
+++ b/test/std/localization/locale.categories/category.time/locale.time.put/types.pass.cpp
@@ -0,0 +1,32 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// template <class charT, class OutputIterator = ostreambuf_iterator<charT> >
+// class time_put
+// : public locale::facet
+// {
+// public:
+// typedef charT char_type;
+// typedef OutputIterator iter_type;
+
+#include <locale>
+#include <iterator>
+#include <type_traits>
+
+int main()
+{
+ static_assert((std::is_base_of<std::locale::facet, std::time_put<char> >::value), "");
+ static_assert((std::is_base_of<std::locale::facet, std::time_put<wchar_t> >::value), "");
+ static_assert((std::is_same<std::time_put<char>::char_type, char>::value), "");
+ static_assert((std::is_same<std::time_put<wchar_t>::char_type, wchar_t>::value), "");
+ static_assert((std::is_same<std::time_put<char>::iter_type, std::ostreambuf_iterator<char> >::value), "");
+ static_assert((std::is_same<std::time_put<wchar_t>::iter_type, std::ostreambuf_iterator<wchar_t> >::value), "");
+}
diff --git a/test/std/localization/locale.categories/category.time/nothing_to_do.pass.cpp b/test/std/localization/locale.categories/category.time/nothing_to_do.pass.cpp
new file mode 100644
index 000000000000..b58f5c55b643
--- /dev/null
+++ b/test/std/localization/locale.categories/category.time/nothing_to_do.pass.cpp
@@ -0,0 +1,12 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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/std/localization/locale.categories/facet.numpunct/locale.numpunct.byname/decimal_point.pass.cpp b/test/std/localization/locale.categories/facet.numpunct/locale.numpunct.byname/decimal_point.pass.cpp
new file mode 100644
index 000000000000..0617cdc52ca3
--- /dev/null
+++ b/test/std/localization/locale.categories/facet.numpunct/locale.numpunct.byname/decimal_point.pass.cpp
@@ -0,0 +1,65 @@
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// REQUIRES: locale.en_US.UTF-8
+// REQUIRES: locale.fr_FR.UTF-8
+
+// <locale>
+
+// template <class charT> class numpunct_byname;
+
+// char_type decimal_point() const;
+
+#include <locale>
+#include <cassert>
+
+#include "platform_support.h" // locale name macros
+
+int main()
+{
+ {
+ std::locale l("C");
+ {
+ typedef char C;
+ const std::numpunct<C>& np = std::use_facet<std::numpunct<C> >(l);
+ assert(np.decimal_point() == '.');
+ }
+ {
+ typedef wchar_t C;
+ const std::numpunct<C>& np = std::use_facet<std::numpunct<C> >(l);
+ assert(np.decimal_point() == L'.');
+ }
+ }
+ {
+ std::locale l(LOCALE_en_US_UTF_8);
+ {
+ typedef char C;
+ const std::numpunct<C>& np = std::use_facet<std::numpunct<C> >(l);
+ assert(np.decimal_point() == '.');
+ }
+ {
+ typedef wchar_t C;
+ const std::numpunct<C>& np = std::use_facet<std::numpunct<C> >(l);
+ assert(np.decimal_point() == L'.');
+ }
+ }
+ {
+ std::locale l(LOCALE_fr_FR_UTF_8);
+ {
+ typedef char C;
+ const std::numpunct<C>& np = std::use_facet<std::numpunct<C> >(l);
+ assert(np.decimal_point() == ',');
+ }
+ {
+ typedef wchar_t C;
+ const std::numpunct<C>& np = std::use_facet<std::numpunct<C> >(l);
+ assert(np.decimal_point() == L',');
+ }
+ }
+}
diff --git a/test/std/localization/locale.categories/facet.numpunct/locale.numpunct.byname/grouping.pass.cpp b/test/std/localization/locale.categories/facet.numpunct/locale.numpunct.byname/grouping.pass.cpp
new file mode 100644
index 000000000000..d5112a9508b7
--- /dev/null
+++ b/test/std/localization/locale.categories/facet.numpunct/locale.numpunct.byname/grouping.pass.cpp
@@ -0,0 +1,68 @@
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// REQUIRES: locale.en_US.UTF-8
+// REQUIRES: locale.fr_FR.UTF-8
+
+// <locale>
+
+// template <class charT> class numpunct_byname;
+
+// string grouping() const;
+
+// TODO: investigation needed
+// XFAIL: linux-gnu
+
+#include <locale>
+#include <cassert>
+
+#include "platform_support.h" // locale name macros
+
+int main()
+{
+ {
+ std::locale l("C");
+ {
+ typedef char C;
+ const std::numpunct<C>& np = std::use_facet<std::numpunct<C> >(l);
+ assert(np.grouping() == "");
+ }
+ {
+ typedef wchar_t C;
+ const std::numpunct<C>& np = std::use_facet<std::numpunct<C> >(l);
+ assert(np.grouping() == "");
+ }
+ }
+ {
+ std::locale l(LOCALE_en_US_UTF_8);
+ {
+ typedef char C;
+ const std::numpunct<C>& np = std::use_facet<std::numpunct<C> >(l);
+ assert(np.grouping() == "\3\3");
+ }
+ {
+ typedef wchar_t C;
+ const std::numpunct<C>& np = std::use_facet<std::numpunct<C> >(l);
+ assert(np.grouping() == "\3\3");
+ }
+ }
+ {
+ std::locale l(LOCALE_fr_FR_UTF_8);
+ {
+ typedef char C;
+ const std::numpunct<C>& np = std::use_facet<std::numpunct<C> >(l);
+ assert(np.grouping() == "\x7F");
+ }
+ {
+ typedef wchar_t C;
+ const std::numpunct<C>& np = std::use_facet<std::numpunct<C> >(l);
+ assert(np.grouping() == "\x7F");
+ }
+ }
+}
diff --git a/test/std/localization/locale.categories/facet.numpunct/locale.numpunct.byname/thousands_sep.pass.cpp b/test/std/localization/locale.categories/facet.numpunct/locale.numpunct.byname/thousands_sep.pass.cpp
new file mode 100644
index 000000000000..b1bd03ff7364
--- /dev/null
+++ b/test/std/localization/locale.categories/facet.numpunct/locale.numpunct.byname/thousands_sep.pass.cpp
@@ -0,0 +1,68 @@
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// REQUIRES: locale.en_US.UTF-8
+// REQUIRES: locale.fr_FR.UTF-8
+
+// <locale>
+
+// template <class charT> class numpunct_byname;
+
+// char_type thousands_sep() const;
+
+// TODO: investigation needed
+// XFAIL: linux-gnu
+
+#include <locale>
+#include <cassert>
+
+#include "platform_support.h" // locale name macros
+
+int main()
+{
+ {
+ std::locale l("C");
+ {
+ typedef char C;
+ const std::numpunct<C>& np = std::use_facet<std::numpunct<C> >(l);
+ assert(np.thousands_sep() == ',');
+ }
+ {
+ typedef wchar_t C;
+ const std::numpunct<C>& np = std::use_facet<std::numpunct<C> >(l);
+ assert(np.thousands_sep() == L',');
+ }
+ }
+ {
+ std::locale l(LOCALE_en_US_UTF_8);
+ {
+ typedef char C;
+ const std::numpunct<C>& np = std::use_facet<std::numpunct<C> >(l);
+ assert(np.thousands_sep() == ',');
+ }
+ {
+ typedef wchar_t C;
+ const std::numpunct<C>& np = std::use_facet<std::numpunct<C> >(l);
+ assert(np.thousands_sep() == L',');
+ }
+ }
+ {
+ std::locale l(LOCALE_fr_FR_UTF_8);
+ {
+ typedef char C;
+ const std::numpunct<C>& np = std::use_facet<std::numpunct<C> >(l);
+ assert(np.thousands_sep() == ',');
+ }
+ {
+ typedef wchar_t C;
+ const std::numpunct<C>& np = std::use_facet<std::numpunct<C> >(l);
+ assert(np.thousands_sep() == L',');
+ }
+ }
+}
diff --git a/test/std/localization/locale.categories/facet.numpunct/locale.numpunct/ctor.pass.cpp b/test/std/localization/locale.categories/facet.numpunct/locale.numpunct/ctor.pass.cpp
new file mode 100644
index 000000000000..6ac459698a74
--- /dev/null
+++ b/test/std/localization/locale.categories/facet.numpunct/locale.numpunct/ctor.pass.cpp
@@ -0,0 +1,66 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// template <class charT> class numpunct;
+
+// explicit numpunct(size_t refs = 0);
+
+#include <locale>
+#include <cassert>
+
+template <class C>
+class my_facet
+ : public std::numpunct<C>
+{
+public:
+ static int count;
+
+ explicit my_facet(std::size_t refs = 0)
+ : std::numpunct<C>(refs) {++count;}
+
+ ~my_facet() {--count;}
+};
+
+template <class C> int my_facet<C>::count = 0;
+
+int main()
+{
+ {
+ std::locale l(std::locale::classic(), new my_facet<char>);
+ assert(my_facet<char>::count == 1);
+ }
+ assert(my_facet<char>::count == 0);
+ {
+ my_facet<char> f(1);
+ assert(my_facet<char>::count == 1);
+ {
+ std::locale l(std::locale::classic(), &f);
+ assert(my_facet<char>::count == 1);
+ }
+ assert(my_facet<char>::count == 1);
+ }
+ assert(my_facet<char>::count == 0);
+ {
+ std::locale l(std::locale::classic(), new my_facet<wchar_t>);
+ assert(my_facet<wchar_t>::count == 1);
+ }
+ assert(my_facet<wchar_t>::count == 0);
+ {
+ my_facet<wchar_t> f(1);
+ assert(my_facet<wchar_t>::count == 1);
+ {
+ std::locale l(std::locale::classic(), &f);
+ assert(my_facet<wchar_t>::count == 1);
+ }
+ assert(my_facet<wchar_t>::count == 1);
+ }
+ assert(my_facet<wchar_t>::count == 0);
+}
diff --git a/test/std/localization/locale.categories/facet.numpunct/locale.numpunct/facet.numpunct.members/decimal_point.pass.cpp b/test/std/localization/locale.categories/facet.numpunct/locale.numpunct/facet.numpunct.members/decimal_point.pass.cpp
new file mode 100644
index 000000000000..c89e3f4ccb1b
--- /dev/null
+++ b/test/std/localization/locale.categories/facet.numpunct/locale.numpunct/facet.numpunct.members/decimal_point.pass.cpp
@@ -0,0 +1,32 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// template <class charT> class numpunct;
+
+// char_type decimal_point() const;
+
+#include <locale>
+#include <cassert>
+
+int main()
+{
+ std::locale l = std::locale::classic();
+ {
+ typedef char C;
+ const std::numpunct<C>& np = std::use_facet<std::numpunct<C> >(l);
+ assert(np.decimal_point() == '.');
+ }
+ {
+ typedef wchar_t C;
+ const std::numpunct<C>& np = std::use_facet<std::numpunct<C> >(l);
+ assert(np.decimal_point() == L'.');
+ }
+}
diff --git a/test/std/localization/locale.categories/facet.numpunct/locale.numpunct/facet.numpunct.members/falsename.pass.cpp b/test/std/localization/locale.categories/facet.numpunct/locale.numpunct/facet.numpunct.members/falsename.pass.cpp
new file mode 100644
index 000000000000..b48005586a69
--- /dev/null
+++ b/test/std/localization/locale.categories/facet.numpunct/locale.numpunct/facet.numpunct.members/falsename.pass.cpp
@@ -0,0 +1,32 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// template <class charT> class numpunct;
+
+// string_type falsename() const;
+
+#include <locale>
+#include <cassert>
+
+int main()
+{
+ std::locale l = std::locale::classic();
+ {
+ typedef char C;
+ const std::numpunct<C>& np = std::use_facet<std::numpunct<C> >(l);
+ assert(np.falsename() == std::string("false"));
+ }
+ {
+ typedef wchar_t C;
+ const std::numpunct<C>& np = std::use_facet<std::numpunct<C> >(l);
+ assert(np.falsename() == std::wstring(L"false"));
+ }
+}
diff --git a/test/std/localization/locale.categories/facet.numpunct/locale.numpunct/facet.numpunct.members/grouping.pass.cpp b/test/std/localization/locale.categories/facet.numpunct/locale.numpunct/facet.numpunct.members/grouping.pass.cpp
new file mode 100644
index 000000000000..f2935ba924f2
--- /dev/null
+++ b/test/std/localization/locale.categories/facet.numpunct/locale.numpunct/facet.numpunct.members/grouping.pass.cpp
@@ -0,0 +1,32 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// template <class charT> class numpunct;
+
+// string grouping() const;
+
+#include <locale>
+#include <cassert>
+
+int main()
+{
+ std::locale l = std::locale::classic();
+ {
+ typedef char C;
+ const std::numpunct<C>& np = std::use_facet<std::numpunct<C> >(l);
+ assert(np.grouping() == std::string());
+ }
+ {
+ typedef wchar_t C;
+ const std::numpunct<C>& np = std::use_facet<std::numpunct<C> >(l);
+ assert(np.grouping() == std::string());
+ }
+}
diff --git a/test/std/localization/locale.categories/facet.numpunct/locale.numpunct/facet.numpunct.members/thousands_sep.pass.cpp b/test/std/localization/locale.categories/facet.numpunct/locale.numpunct/facet.numpunct.members/thousands_sep.pass.cpp
new file mode 100644
index 000000000000..19932d654dee
--- /dev/null
+++ b/test/std/localization/locale.categories/facet.numpunct/locale.numpunct/facet.numpunct.members/thousands_sep.pass.cpp
@@ -0,0 +1,32 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// template <class charT> class numpunct;
+
+// char_type thousands_sep() const;
+
+#include <locale>
+#include <cassert>
+
+int main()
+{
+ std::locale l = std::locale::classic();
+ {
+ typedef char C;
+ const std::numpunct<C>& np = std::use_facet<std::numpunct<C> >(l);
+ assert(np.thousands_sep() == ',');
+ }
+ {
+ typedef wchar_t C;
+ const std::numpunct<C>& np = std::use_facet<std::numpunct<C> >(l);
+ assert(np.thousands_sep() == L',');
+ }
+}
diff --git a/test/std/localization/locale.categories/facet.numpunct/locale.numpunct/facet.numpunct.members/truename.pass.cpp b/test/std/localization/locale.categories/facet.numpunct/locale.numpunct/facet.numpunct.members/truename.pass.cpp
new file mode 100644
index 000000000000..aa426d0fb6e2
--- /dev/null
+++ b/test/std/localization/locale.categories/facet.numpunct/locale.numpunct/facet.numpunct.members/truename.pass.cpp
@@ -0,0 +1,32 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// template <class charT> class numpunct;
+
+// string_type truename() const;
+
+#include <locale>
+#include <cassert>
+
+int main()
+{
+ std::locale l = std::locale::classic();
+ {
+ typedef char C;
+ const std::numpunct<C>& np = std::use_facet<std::numpunct<C> >(l);
+ assert(np.truename() == std::string("true"));
+ }
+ {
+ typedef wchar_t C;
+ const std::numpunct<C>& np = std::use_facet<std::numpunct<C> >(l);
+ assert(np.truename() == std::wstring(L"true"));
+ }
+}
diff --git a/test/std/localization/locale.categories/facet.numpunct/locale.numpunct/facet.numpunct.virtuals/tested_elsewhere.pass.cpp b/test/std/localization/locale.categories/facet.numpunct/locale.numpunct/facet.numpunct.virtuals/tested_elsewhere.pass.cpp
new file mode 100644
index 000000000000..b58f5c55b643
--- /dev/null
+++ b/test/std/localization/locale.categories/facet.numpunct/locale.numpunct/facet.numpunct.virtuals/tested_elsewhere.pass.cpp
@@ -0,0 +1,12 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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/std/localization/locale.categories/facet.numpunct/locale.numpunct/types.pass.cpp b/test/std/localization/locale.categories/facet.numpunct/locale.numpunct/types.pass.cpp
new file mode 100644
index 000000000000..bbdf3254de21
--- /dev/null
+++ b/test/std/localization/locale.categories/facet.numpunct/locale.numpunct/types.pass.cpp
@@ -0,0 +1,48 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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>
+
+// template <class charT>
+// class numpunct
+// : public locale::facet
+// {
+// public:
+// typedef charT char_type;
+// typedef basic_string<charT> string_type;
+// static locale::id id;
+
+#include <locale>
+#include <type_traits>
+#include <cassert>
+
+int main()
+{
+ std::locale l = std::locale::classic();
+ {
+ assert(std::has_facet<std::numpunct<char> >(l));
+ const std::numpunct<char>& f = std::use_facet<std::numpunct<char> >(l);
+ {
+ (void)std::numpunct<char>::id;
+ }
+ static_assert((std::is_same<std::numpunct<char>::char_type, char>::value), "");
+ static_assert((std::is_same<std::numpunct<char>::string_type, std::string>::value), "");
+ static_assert((std::is_base_of<std::locale::facet, std::numpunct<char> >::value), "");
+ }
+ {
+ assert(std::has_facet<std::numpunct<wchar_t> >(l));
+ const std::numpunct<wchar_t>& f = std::use_facet<std::numpunct<wchar_t> >(l);
+ {
+ (void)std::numpunct<wchar_t>::id;
+ }
+ static_assert((std::is_same<std::numpunct<wchar_t>::char_type, wchar_t>::value), "");
+ static_assert((std::is_same<std::numpunct<wchar_t>::string_type, std::wstring>::value), "");
+ static_assert((std::is_base_of<std::locale::facet, std::numpunct<wchar_t> >::value), "");
+ }
+}
diff --git a/test/std/localization/locale.categories/facet.numpunct/nothing_to_do.pass.cpp b/test/std/localization/locale.categories/facet.numpunct/nothing_to_do.pass.cpp
new file mode 100644
index 000000000000..b58f5c55b643
--- /dev/null
+++ b/test/std/localization/locale.categories/facet.numpunct/nothing_to_do.pass.cpp
@@ -0,0 +1,12 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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/std/localization/locale.categories/facets.examples/nothing_to_do.pass.cpp b/test/std/localization/locale.categories/facets.examples/nothing_to_do.pass.cpp
new file mode 100644
index 000000000000..b58f5c55b643
--- /dev/null
+++ b/test/std/localization/locale.categories/facets.examples/nothing_to_do.pass.cpp
@@ -0,0 +1,12 @@
+//===----------------------------------------------------------------------===//
+//
+// The 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()
+{
+}