Index: libcxx/include/__locale =================================================================== --- libcxx/include/__locale +++ libcxx/include/__locale @@ -454,6 +454,7 @@ static const mask blank = _BLANK; static const mask __regex_word = 0x4000; // 0x8000 and 0x0100 and 0x00ff are used # define _LIBCPP_CTYPE_MASK_IS_COMPOSITE_PRINT +# define _LIBCPP_CTYPE_MASK_IS_COMPOSITE_ALPHA #elif defined(__APPLE__) || defined(__FreeBSD__) || defined(__EMSCRIPTEN__) || defined(__NetBSD__) # ifdef __APPLE__ typedef __uint32_t mask; Index: libcxx/src/locale.cpp =================================================================== --- libcxx/src/locale.cpp +++ libcxx/src/locale.cpp @@ -1524,7 +1524,7 @@ ctype_byname::do_narrow(char_type c, char dfault) const { int r = __libcpp_wctob_l(c, __l); - return r != static_cast(WEOF) ? static_cast(r) : dfault; + return r != EOF ? static_cast(r) : dfault; } const wchar_t* @@ -1533,7 +1533,7 @@ for (; low != high; ++low, ++dest) { int r = __libcpp_wctob_l(*low, __l); - *dest = r != static_cast(WEOF) ? static_cast(r) : dfault; + *dest = r != EOF ? static_cast(r) : dfault; } return low; } @@ -5235,7 +5235,10 @@ ptrdiff_t i = __scan_keyword(w, be, this->__weeks_, this->__weeks_+14, ct, err, false) - this->__weeks_; - if (i < 14) + // Only match the specific right tm_wday. In e.g. the zh_CN locale + // in glibc, __weeks_[0] is the same char as follows the day number + // in the %x pattern. + if (i == 6 || i == 13) { result.push_back('%'); if (i < 7) @@ -5256,8 +5259,16 @@ result.push_back('B'); else result.push_back('b'); - if (fmt == 'x' && ct.is(ctype_base::digit, this->__months_[i][0])) + if (fmt == 'x' && ct.is(ctype_base::digit, this->__months_[i][0])) { result.back() = 'm'; + // The __months_ string can be e.g. "12" in zh_CN. + // For the %x pattern, we need to include the trailing unicode + // chars too. + for (; bb != w && ct.is(ctype_base::digit, *bb); ++bb) + ; + for (; bb != w; ++bb) + result.push_back(*bb); + } bb = w; continue; } @@ -5388,7 +5399,10 @@ ptrdiff_t i = __scan_keyword(w, wbe, this->__weeks_, this->__weeks_+14, ct, err, false) - this->__weeks_; - if (i < 14) + // Only match the specific right tm_wday. In e.g. the zh_CN locale + // in glibc, __weeks_[0] is the same char as follows the day number + // in the %x pattern. + if (i == 6 || i == 13) { result.push_back(L'%'); if (i < 7) @@ -5409,8 +5423,16 @@ result.push_back(L'B'); else result.push_back(L'b'); - if (fmt == 'x' && ct.is(ctype_base::digit, this->__months_[i][0])) + if (fmt == 'x' && ct.is(ctype_base::digit, this->__months_[i][0])) { result.back() = L'm'; + // The __months_ string can be e.g. "12" in zh_CN. + // For the %x pattern, we need to include the trailing unicode + // chars too. + for (; wbb != w && ct.is(ctype_base::digit, *wbb); ++wbb) + ; + for (; wbb != w; ++wbb) + result.push_back(*wbb); + } wbb = w; continue; } Index: libcxx/test/configs/cmake-bridge.cfg.in =================================================================== --- libcxx/test/configs/cmake-bridge.cfg.in +++ libcxx/test/configs/cmake-bridge.cfg.in @@ -22,7 +22,7 @@ config.test_source_root = os.path.join('@LIBCXX_SOURCE_DIR@', 'test') config.test_format = libcxx.test.format.CxxStandardLibraryTest() config.recursiveExpansionLimit = 10 -config.test_exec_root = '@CMAKE_BINARY_DIR@' +config.test_exec_root = os.path.join('@CMAKE_BINARY_DIR@', 'test') # Add substitutions for bootstrapping the test suite configuration config.substitutions.append(('%{cxx}', shlex.quote('@CMAKE_CXX_COMPILER@'))) Index: libcxx/test/configs/llvm-libc++-mingw.cfg.in =================================================================== --- libcxx/test/configs/llvm-libc++-mingw.cfg.in +++ libcxx/test/configs/llvm-libc++-mingw.cfg.in @@ -14,13 +14,6 @@ '%{executor} --execdir %T --env PATH=%{lib} -- ' )) -# LIBCXX-WINDOWS-FIXME is the feature name used to XFAIL the -# initial Windows failures until they can be properly diagnosed -# and fixed. This allows easier detection of new test failures -# and regressions. Note: New failures should not be suppressed -# using this feature. (Also see llvm.org/PR32730) -config.available_features.add('LIBCXX-WINDOWS-FIXME') - import os, site site.addsitedir(os.path.join('@LIBCXX_SOURCE_DIR@', 'utils')) import libcxx.test.params, libcxx.test.newconfig Index: libcxx/test/configs/llvm-libc++-shared-clangcl.cfg.in =================================================================== --- libcxx/test/configs/llvm-libc++-shared-clangcl.cfg.in +++ libcxx/test/configs/llvm-libc++-shared-clangcl.cfg.in @@ -14,13 +14,6 @@ '%{executor} --execdir %T --env PATH=%{lib} -- ' )) -# LIBCXX-WINDOWS-FIXME is the feature name used to XFAIL the -# initial Windows failures until they can be properly diagnosed -# and fixed. This allows easier detection of new test failures -# and regressions. Note: New failures should not be suppressed -# using this feature. (Also see llvm.org/PR32730) -config.available_features.add('LIBCXX-WINDOWS-FIXME') - import os, site site.addsitedir(os.path.join('@LIBCXX_SOURCE_DIR@', 'utils')) import libcxx.test.params, libcxx.test.newconfig Index: libcxx/test/configs/llvm-libc++-static-clangcl.cfg.in =================================================================== --- libcxx/test/configs/llvm-libc++-static-clangcl.cfg.in +++ libcxx/test/configs/llvm-libc++-static-clangcl.cfg.in @@ -14,13 +14,6 @@ '%{executor} --execdir %T --env PATH=%{lib} -- ' )) -# LIBCXX-WINDOWS-FIXME is the feature name used to XFAIL the -# initial Windows failures until they can be properly diagnosed -# and fixed. This allows easier detection of new test failures -# and regressions. Note: New failures should not be suppressed -# using this feature. (Also see llvm.org/PR32730) -config.available_features.add('LIBCXX-WINDOWS-FIXME') - import os, site site.addsitedir(os.path.join('@LIBCXX_SOURCE_DIR@', 'utils')) import libcxx.test.params, libcxx.test.newconfig Index: libcxx/test/libcxx/selftest/dsl/dsl.sh.py =================================================================== --- libcxx/test/libcxx/selftest/dsl/dsl.sh.py +++ libcxx/test/libcxx/selftest/dsl/dsl.sh.py @@ -6,8 +6,6 @@ # #===----------------------------------------------------------------------===## -# XFAIL: LIBCXX-WINDOWS-FIXME - # Note: We prepend arguments with 'x' to avoid thinking there are too few # arguments in case an argument is an empty string. # RUN: %{python} %s x%S x%T x%{substitutions} @@ -251,7 +249,11 @@ self.fail("checking for hasLocale should not explode") def test_nonexistent_locale(self): - self.assertFalse(dsl.hasAnyLocale(self.config, ['for_sure_this_is_not_an_existing_locale'])) + # The original spelling here, "for_sure_this_is_not_an_existing_locale", + # is accidentally detected as existing by the Windows UCRT. + # https://developercommunity.visualstudio.com/t/setlocale-succeeds-for-bogus-locale-names-in-older/1652241 + # This is fixed in UCRT/Windows 10.0.18362.0. + self.assertFalse(dsl.hasAnyLocale(self.config, ['forsurethisisnotanexistinglocale'])) def test_localization_program_doesnt_compile(self): compilerIndex = findIndex(self.config.substitutions, lambda x: x[0] == '%{cxx}') Index: libcxx/test/std/input.output/iostream.format/ext.manip/get_money.pass.cpp =================================================================== --- libcxx/test/std/input.output/iostream.format/ext.manip/get_money.pass.cpp +++ libcxx/test/std/input.output/iostream.format/ext.manip/get_money.pass.cpp @@ -12,7 +12,9 @@ // REQUIRES: locale.en_US.UTF-8 -// XFAIL: LIBCXX-WINDOWS-FIXME +// FIXME: On Wndows, negative_sign() returns "()" for the en_US locale, and +// that kind of sign isn't handled by the get_money classes. +// XFAIL: windows #include #include Index: libcxx/test/std/input.output/iostream.format/ext.manip/put_money.pass.cpp =================================================================== --- libcxx/test/std/input.output/iostream.format/ext.manip/put_money.pass.cpp +++ libcxx/test/std/input.output/iostream.format/ext.manip/put_money.pass.cpp @@ -12,7 +12,8 @@ // REQUIRES: locale.en_US.UTF-8 -// XFAIL: LIBCXX-WINDOWS-FIXME +// On Windows, this produces ($1,234,567.89) instead of the expected -$1,234,567.89. +// XFAIL: windows #include #include Index: libcxx/test/std/localization/locale.categories/category.collate/locale.collate.byname/compare.pass.cpp =================================================================== --- libcxx/test/std/localization/locale.categories/category.collate/locale.collate.byname/compare.pass.cpp +++ libcxx/test/std/localization/locale.categories/category.collate/locale.collate.byname/compare.pass.cpp @@ -23,7 +23,12 @@ // Glibc seems to collate files differently from the way Apple's C library does it. // XFAIL: target={{.*}}-linux-gnu{{.*}} -// XFAIL: LIBCXX-WINDOWS-FIXME +// https://llvm.org/PR41018 +// XFAIL: windows-dll && msvc + +// Windows also collates differently than the Apple C library way, that this test is +// written for. +// XFAIL: windows // XFAIL: LIBCXX-AIX-FIXME Index: libcxx/test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.statics/classic_table.pass.cpp =================================================================== --- libcxx/test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.statics/classic_table.pass.cpp +++ libcxx/test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.statics/classic_table.pass.cpp @@ -12,8 +12,6 @@ // static const mask* classic_table() throw(); -// XFAIL: LIBCXX-WINDOWS-FIXME - #include #include @@ -29,19 +27,29 @@ 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; +#ifdef _WIN32 + // On Windows, the alpha and print masks aren't individual bits that + // are set, but are only usable as masks, as they are combinations of + // the bits for upper/lower/digit/blank/punct. + const mask bit_alpha = 0; + const mask bit_print = 0; +#else + const mask bit_alpha = F::alpha; + const mask bit_print = F::print; +#endif 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 >= 32 && i <= 126 ) set |= bit_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 |= bit_alpha; + if ( i >= 'a' && i <= 'z' ) set |= bit_alpha; if ( i >= 'A' && i <= 'Z' ) set |= F::upper; if ( i >= 'a' && i <= 'z' ) set |= F::lower; @@ -55,6 +63,13 @@ if ( i >= 91 && i <= 96 ) set |= F::punct; // '[' .. '`' if ( i >= 123 && i <= 126 ) set |= F::punct; // '{' .. '~' } +#ifdef _WIN32 + // The Windows __pctype_func() table doesn't have the blank bit set + // for horizontal tab (9). The Windows implementation of isblank() + // instead has a special case check for the horizontal tab character. + if (i == 9) set &= ~F::blank; +#endif + assert(( p[i] & set) == set); // all the right bits set assert(((p[i] & ~set) & defined) == 0); // no extra ones } Index: libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/is_1.pass.cpp =================================================================== --- libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/is_1.pass.cpp +++ libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/is_1.pass.cpp @@ -13,7 +13,6 @@ // bool is(mask m, charT c) const; // REQUIRES: locale.en_US.UTF-8 -// XFAIL: LIBCXX-WINDOWS-FIXME // XFAIL: libcpp-has-no-wide-characters #include @@ -107,8 +106,13 @@ assert(f.is(F::graph, L'.')); assert(!f.is(F::graph, L'\x07')); +#ifdef _WIN32 + assert(f.is(F::alpha, L'\x00DA')); + assert(f.is(F::upper, L'\x00DA')); +#else assert(!f.is(F::alpha, L'\x00DA')); assert(!f.is(F::upper, L'\x00DA')); +#endif } } Index: libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/is_many.pass.cpp =================================================================== --- libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/is_many.pass.cpp +++ libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/is_many.pass.cpp @@ -13,7 +13,6 @@ // const charT* do_is(const charT* low, const charT* high, mask* vec) const; // REQUIRES: locale.en_US.UTF-8 -// XFAIL: LIBCXX-WINDOWS-FIXME // XFAIL: libcpp-has-no-wide-characters #include @@ -149,17 +148,25 @@ // 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)); +#ifdef _WIN32 + assert( (m[0] & F::alpha)); + assert( (m[0] & F::upper)); + assert( (m[0] & F::print)); + assert( (m[0] & F::alnum)); + assert( (m[0] & F::graph)); +#else + assert(!(m[0] & F::alpha)); + assert(!(m[0] & F::upper)); + assert(!(m[0] & F::print)); assert(!(m[0] & F::alnum)); assert(!(m[0] & F::graph)); +#endif // L' ' assert( (m[1] & F::space)); Index: libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/narrow_1.pass.cpp =================================================================== --- libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/narrow_1.pass.cpp +++ libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/narrow_1.pass.cpp @@ -8,7 +8,6 @@ // REQUIRES: locale.en_US.UTF-8 // REQUIRES: locale.fr_CA.ISO8859-1 -// XFAIL: LIBCXX-WINDOWS-FIXME // XFAIL: libcpp-has-no-wide-characters // Index: libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/narrow_many.pass.cpp =================================================================== --- libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/narrow_many.pass.cpp +++ libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/narrow_many.pass.cpp @@ -8,7 +8,6 @@ // REQUIRES: locale.en_US.UTF-8 // REQUIRES: locale.fr_CA.ISO8859-1 -// XFAIL: LIBCXX-WINDOWS-FIXME // XFAIL: libcpp-has-no-wide-characters // Index: libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/scan_is.pass.cpp =================================================================== --- libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/scan_is.pass.cpp +++ libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/scan_is.pass.cpp @@ -13,7 +13,6 @@ // const charT* scan_is(mask m, const charT* low, const charT* high) const; // REQUIRES: locale.en_US.UTF-8 -// XFAIL: LIBCXX-WINDOWS-FIXME // XFAIL: libcpp-has-no-wide-characters #include @@ -57,17 +56,34 @@ const std::wstring in(L"\x00DA A\x07.a1"); std::vector m(in.size()); assert(f.scan_is(F::space, in.data(), in.data() + in.size()) - in.data() == 1); +#ifdef _WIN32 + assert(f.scan_is(F::print, in.data(), in.data() + in.size()) - in.data() == 0); +#else assert(f.scan_is(F::print, in.data(), in.data() + in.size()) - in.data() == 1); +#endif assert(f.scan_is(F::cntrl, in.data(), in.data() + in.size()) - in.data() == 3); +#ifdef _WIN32 + assert(f.scan_is(F::upper, in.data(), in.data() + in.size()) - in.data() == 0); +#else assert(f.scan_is(F::upper, in.data(), in.data() + in.size()) - in.data() == 2); +#endif assert(f.scan_is(F::lower, in.data(), in.data() + in.size()) - in.data() == 5); +#ifdef _WIN32 + assert(f.scan_is(F::alpha, in.data(), in.data() + in.size()) - in.data() == 0); +#else assert(f.scan_is(F::alpha, in.data(), in.data() + in.size()) - in.data() == 2); +#endif 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); +#ifdef _WIN32 + 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); +#else 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); +#endif } } Index: libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/scan_not.pass.cpp =================================================================== --- libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/scan_not.pass.cpp +++ libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/scan_not.pass.cpp @@ -13,7 +13,6 @@ // const charT* scan_not(mask m, const charT* low, const charT* high) const; // REQUIRES: locale.en_US.UTF-8 -// XFAIL: LIBCXX-WINDOWS-FIXME // XFAIL: libcpp-has-no-wide-characters #include @@ -57,17 +56,34 @@ const std::wstring in(L"\x00DA A\x07.a1"); std::vector m(in.size()); assert(f.scan_not(F::space, in.data(), in.data() + in.size()) - in.data() == 0); +#ifdef _WIN32 + assert(f.scan_not(F::print, in.data(), in.data() + in.size()) - in.data() == 3); +#else assert(f.scan_not(F::print, in.data(), in.data() + in.size()) - in.data() == 0); +#endif assert(f.scan_not(F::cntrl, in.data(), in.data() + in.size()) - in.data() == 0); +#ifdef _WIN32 + assert(f.scan_not(F::upper, in.data(), in.data() + in.size()) - in.data() == 1); +#else assert(f.scan_not(F::upper, in.data(), in.data() + in.size()) - in.data() == 0); +#endif assert(f.scan_not(F::lower, in.data(), in.data() + in.size()) - in.data() == 0); +#ifdef _WIN32 + assert(f.scan_not(F::alpha, in.data(), in.data() + in.size()) - in.data() == 1); +#else assert(f.scan_not(F::alpha, in.data(), in.data() + in.size()) - in.data() == 0); +#endif 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); +#ifdef _WIN32 + 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); +#else 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); +#endif } } Index: libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/tolower_1.pass.cpp =================================================================== --- libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/tolower_1.pass.cpp +++ libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/tolower_1.pass.cpp @@ -7,7 +7,7 @@ //===----------------------------------------------------------------------===// // REQUIRES: locale.en_US.UTF-8 -// XFAIL: broken-utf8-wchar-ctype +// XFAIL: win32-broken-utf8-wchar-ctype // Index: libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/tolower_many.pass.cpp =================================================================== --- libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/tolower_many.pass.cpp +++ libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/tolower_many.pass.cpp @@ -7,7 +7,7 @@ //===----------------------------------------------------------------------===// // REQUIRES: locale.en_US.UTF-8 -// XFAIL: broken-utf8-wchar-ctype +// XFAIL: win32-broken-utf8-wchar-ctype // Index: libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/toupper_1.pass.cpp =================================================================== --- libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/toupper_1.pass.cpp +++ libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/toupper_1.pass.cpp @@ -7,7 +7,7 @@ //===----------------------------------------------------------------------===// // REQUIRES: locale.en_US.UTF-8 -// XFAIL: broken-utf8-wchar-ctype +// XFAIL: win32-broken-utf8-wchar-ctype // Index: libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/toupper_many.pass.cpp =================================================================== --- libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/toupper_many.pass.cpp +++ libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/toupper_many.pass.cpp @@ -7,7 +7,7 @@ //===----------------------------------------------------------------------===// // REQUIRES: locale.en_US.UTF-8 -// XFAIL: broken-utf8-wchar-ctype +// XFAIL: win32-broken-utf8-wchar-ctype // Index: libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/widen_1.pass.cpp =================================================================== --- libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/widen_1.pass.cpp +++ libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/widen_1.pass.cpp @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// // REQUIRES: locale.en_US.UTF-8 -// XFAIL: LIBCXX-WINDOWS-FIXME // XFAIL: LIBCXX-AIX-FIXME // XFAIL: libcpp-has-no-wide-characters @@ -58,7 +57,7 @@ assert(f.widen('.') == L'.'); assert(f.widen('a') == L'a'); assert(f.widen('1') == L'1'); -#if defined(__APPLE__) || defined(__FreeBSD__) +#if defined(__APPLE__) || defined(__FreeBSD__) || defined(_WIN32) assert(f.widen(char(-5)) == L'\u00fb'); #else assert(f.widen(char(-5)) == wchar_t(-1)); Index: libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/widen_many.pass.cpp =================================================================== --- libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/widen_many.pass.cpp +++ libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/widen_many.pass.cpp @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// // REQUIRES: locale.en_US.UTF-8 -// XFAIL: LIBCXX-WINDOWS-FIXME // XFAIL: LIBCXX-AIX-FIXME // XFAIL: libcpp-has-no-wide-characters @@ -64,7 +63,7 @@ assert(v[3] == L'.'); assert(v[4] == L'a'); assert(v[5] == L'1'); -#if defined(__APPLE__) || defined(__FreeBSD__) +#if defined(__APPLE__) || defined(__FreeBSD__) || defined(_WIN32) assert(v[6] == L'\x85'); #else assert(v[6] == wchar_t(-1)); Index: libcxx/test/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_en_US.pass.cpp =================================================================== --- libcxx/test/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_en_US.pass.cpp +++ libcxx/test/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_en_US.pass.cpp @@ -14,7 +14,6 @@ // ios_base::iostate& err, long double& v) const; // REQUIRES: locale.en_US.UTF-8 -// XFAIL: LIBCXX-WINDOWS-FIXME #include #include @@ -75,6 +74,7 @@ assert(err == std::ios_base::eofbit); assert(ex == 0); } +#ifndef _WIN32 { // negative one std::string v = "-0.01"; typedef cpp17_input_iterator I; @@ -86,6 +86,7 @@ assert(err == std::ios_base::eofbit); assert(ex == -1); } +#endif { // positive std::string v = "1,234,567.89"; typedef cpp17_input_iterator I; @@ -97,6 +98,7 @@ assert(err == std::ios_base::eofbit); assert(ex == 123456789); } +#ifndef _WIN32 { // negative std::string v = "-1,234,567.89"; typedef cpp17_input_iterator I; @@ -119,6 +121,7 @@ assert(err == std::ios_base::eofbit); assert(ex == -123456789); } +#endif { // zero, showbase std::string v = "$0.00"; typedef cpp17_input_iterator I; @@ -143,6 +146,7 @@ assert(ex == 0); std::noshowbase(ios); } +#ifndef _WIN32 { // negative one, showbase std::string v = "-$0.01"; typedef cpp17_input_iterator I; @@ -167,6 +171,7 @@ assert(ex == -1); std::noshowbase(ios); } +#endif { // positive, showbase std::string v = "$1,234,567.89"; typedef cpp17_input_iterator I; @@ -191,6 +196,7 @@ assert(ex == 123456789); std::noshowbase(ios); } +#ifndef _WIN32 { // negative, showbase std::string v = "-$1,234,567.89"; std::showbase(ios); @@ -226,6 +232,7 @@ assert(iter.base() == v.data() + 1); assert(err == std::ios_base::failbit); } +#endif } { const my_facet f(1); @@ -241,6 +248,7 @@ assert(err == std::ios_base::eofbit); assert(ex == 0); } +#ifndef _WIN32 { // negative one std::string v = "-0.01"; typedef cpp17_input_iterator I; @@ -252,6 +260,7 @@ assert(err == std::ios_base::eofbit); assert(ex == -1); } +#endif { // positive std::string v = "1,234,567.89"; typedef cpp17_input_iterator I; @@ -263,6 +272,7 @@ assert(err == std::ios_base::eofbit); assert(ex == 123456789); } +#ifndef _WIN32 { // negative std::string v = "-1,234,567.89"; typedef cpp17_input_iterator I; @@ -285,6 +295,7 @@ assert(err == std::ios_base::eofbit); assert(ex == -123456789); } +#endif { // zero, showbase std::string v = "USD 0.00"; typedef cpp17_input_iterator I; @@ -309,6 +320,7 @@ assert(ex == 0); std::noshowbase(ios); } +#ifndef _WIN32 { // negative one, showbase std::string v = "-USD 0.01"; typedef cpp17_input_iterator I; @@ -333,6 +345,7 @@ assert(ex == -1); std::noshowbase(ios); } +#endif { // positive, showbase std::string v = "USD 1,234,567.89"; typedef cpp17_input_iterator I; @@ -357,6 +370,7 @@ assert(ex == 123456789); std::noshowbase(ios); } +#ifndef _WIN32 { // negative, showbase std::string v = "-USD 1,234,567.89"; std::showbase(ios); @@ -392,6 +406,7 @@ assert(iter.base() == v.data() + 1); assert(err == std::ios_base::failbit); } +#endif } #ifndef TEST_HAS_NO_WIDE_CHARACTERS { @@ -408,6 +423,7 @@ assert(err == std::ios_base::eofbit); assert(ex == 0); } +#ifndef _WIN32 { // negative one std::wstring v = L"-0.01"; typedef cpp17_input_iterator I; @@ -419,6 +435,7 @@ assert(err == std::ios_base::eofbit); assert(ex == -1); } +#endif { // positive std::wstring v = L"1,234,567.89"; typedef cpp17_input_iterator I; @@ -430,6 +447,7 @@ assert(err == std::ios_base::eofbit); assert(ex == 123456789); } +#ifndef _WIN32 { // negative std::wstring v = L"-1,234,567.89"; typedef cpp17_input_iterator I; @@ -452,6 +470,7 @@ assert(err == std::ios_base::eofbit); assert(ex == -123456789); } +#endif { // zero, showbase std::wstring v = L"$0.00"; typedef cpp17_input_iterator I; @@ -476,6 +495,7 @@ assert(ex == 0); std::noshowbase(ios); } +#ifndef _WIN32 { // negative one, showbase std::wstring v = L"-$0.01"; typedef cpp17_input_iterator I; @@ -500,6 +520,7 @@ assert(ex == -1); std::noshowbase(ios); } +#endif { // positive, showbase std::wstring v = L"$1,234,567.89"; typedef cpp17_input_iterator I; @@ -524,6 +545,7 @@ assert(ex == 123456789); std::noshowbase(ios); } +#ifndef _WIN32 { // negative, showbase std::wstring v = L"-$1,234,567.89"; std::showbase(ios); @@ -559,6 +581,7 @@ assert(iter.base() == v.data() + 1); assert(err == std::ios_base::failbit); } +#endif } { const my_facetw f(1); @@ -574,6 +597,7 @@ assert(err == std::ios_base::eofbit); assert(ex == 0); } +#ifndef _WIN32 { // negative one std::wstring v = L"-0.01"; typedef cpp17_input_iterator I; @@ -585,6 +609,7 @@ assert(err == std::ios_base::eofbit); assert(ex == -1); } +#endif { // positive std::wstring v = L"1,234,567.89"; typedef cpp17_input_iterator I; @@ -596,6 +621,7 @@ assert(err == std::ios_base::eofbit); assert(ex == 123456789); } +#ifndef _WIN32 { // negative std::wstring v = L"-1,234,567.89"; typedef cpp17_input_iterator I; @@ -618,6 +644,7 @@ assert(err == std::ios_base::eofbit); assert(ex == -123456789); } +#endif { // zero, showbase std::wstring v = L"USD 0.00"; typedef cpp17_input_iterator I; @@ -642,6 +669,7 @@ assert(ex == 0); std::noshowbase(ios); } +#ifndef _WIN32 { // negative one, showbase std::wstring v = L"-USD 0.01"; typedef cpp17_input_iterator I; @@ -666,6 +694,7 @@ assert(ex == -1); std::noshowbase(ios); } +#endif { // positive, showbase std::wstring v = L"USD 1,234,567.89"; typedef cpp17_input_iterator I; @@ -690,6 +719,7 @@ assert(ex == 123456789); std::noshowbase(ios); } +#ifndef _WIN32 { // negative, showbase std::wstring v = L"-USD 1,234,567.89"; std::showbase(ios); @@ -725,6 +755,7 @@ assert(iter.base() == v.data() + 1); assert(err == std::ios_base::failbit); } +#endif } #endif // TEST_HAS_NO_WIDE_CHARACTERS { Index: libcxx/test/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_fr_FR.pass.cpp =================================================================== --- libcxx/test/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_fr_FR.pass.cpp +++ libcxx/test/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_fr_FR.pass.cpp @@ -28,6 +28,7 @@ #include #include "test_iterators.h" +#include "locale_helpers.h" #include "platform_support.h" // locale name macros #include "test_macros.h" @@ -52,36 +53,8 @@ : Fw(refs) {} }; -// GLIBC 2.27 and newer use U+202F NARROW NO-BREAK SPACE as a thousands separator. -// This function converts the spaces in string inputs to U+202F if need -// be. FreeBSD's locale data also uses U+202F, since 2018. -// Windows uses U+00A0 NO-BREAK SPACE. static std::wstring convert_thousands_sep(std::wstring const& in) { -#if defined(_CS_GNU_LIBC_VERSION) || defined(__FreeBSD__) || defined(_WIN32) -#if defined(_CS_GNU_LIBC_VERSION) - if (glibc_version_less_than("2.27")) - return in; -#endif - std::wstring out; - unsigned I = 0; - bool seen_decimal = false; - for (; I < in.size(); ++I) { - if (seen_decimal || in[I] != L' ') { - seen_decimal |= in[I] == L','; - out.push_back(in[I]); - continue; - } - assert(in[I] == L' '); -#if defined(_WIN32) - out.push_back(L'\u00A0'); -#else - out.push_back(L'\u202F'); -#endif - } - return out; -#else - return in; -#endif + return LocaleHelpers::convert_thousands_sep_fr_FR(in); } #endif // TEST_HAS_NO_WIDE_CHARACTERS Index: libcxx/test/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_ru_RU.pass.cpp =================================================================== --- libcxx/test/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_ru_RU.pass.cpp +++ libcxx/test/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_ru_RU.pass.cpp @@ -9,14 +9,6 @@ // NetBSD does not support LC_MONETARY at the moment // XFAIL: netbsd -// 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 - -// XFAIL: LIBCXX-WINDOWS-FIXME - // REQUIRES: locale.ru_RU.UTF-8 // @@ -33,6 +25,7 @@ #include "test_macros.h" #include "test_iterators.h" +#include "locale_helpers.h" #include "platform_support.h" // locale name macros typedef std::money_get > Fn; @@ -55,7 +48,11 @@ explicit my_facetw(std::size_t refs = 0) : Fw(refs) {} }; -#endif + +static std::wstring convert_thousands_sep(std::wstring const& in) { + return LocaleHelpers::convert_thousands_sep_ru_RU(in); +} +#endif // TEST_HAS_NO_WIDE_CHARACTERS int main(int, char**) { @@ -70,6 +67,11 @@ new std::moneypunct_byname(loc_name))); ios.imbue(std::locale(ios.getloc(), new std::moneypunct_byname(loc_name))); +#endif +#if defined(TEST_HAS_GLIBC) || defined(__FreeBSD__) || defined(_WIN32) + std::string symbol = "\xE2\x82\xBD"; +#else + std::string symbol = "\xD1\x80\xD1\x83\xD0\xB1""."; #endif { const my_facet f(1); @@ -130,7 +132,7 @@ assert(ex == -123456789); } { // zero, showbase - std::string v = "0,00 \xD1\x80\xD1\x83\xD0\xB1""."; + std::string v = "0,00 " + symbol; typedef cpp17_input_iterator I; long double ex; std::ios_base::iostate err = std::ios_base::goodbit; @@ -141,7 +143,7 @@ assert(ex == 0); } { // zero, showbase - std::string v = "0,00 \xD1\x80\xD1\x83\xD0\xB1""."; + std::string v = "0,00 " + symbol; std::showbase(ios); typedef cpp17_input_iterator I; long double ex; @@ -154,7 +156,7 @@ std::noshowbase(ios); } { // negative one, showbase - std::string v = "-0,01 \xD1\x80\xD1\x83\xD0\xB1""."; + std::string v = "-0,01 " + symbol; typedef cpp17_input_iterator I; long double ex; std::ios_base::iostate err = std::ios_base::goodbit; @@ -165,7 +167,7 @@ assert(ex == -1); } { // negative one, showbase - std::string v = "-0,01 \xD1\x80\xD1\x83\xD0\xB1""."; + std::string v = "-0,01 " + symbol; std::showbase(ios); typedef cpp17_input_iterator I; long double ex; @@ -178,7 +180,7 @@ std::noshowbase(ios); } { // positive, showbase - std::string v = "1 234 567,89 \xD1\x80\xD1\x83\xD0\xB1""."; + std::string v = "1 234 567,89 " + symbol; typedef cpp17_input_iterator I; long double ex; std::ios_base::iostate err = std::ios_base::goodbit; @@ -189,7 +191,7 @@ assert(ex == 123456789); } { // positive, showbase - std::string v = "1 234 567,89 \xD1\x80\xD1\x83\xD0\xB1""."; + std::string v = "1 234 567,89 " + symbol; std::showbase(ios); typedef cpp17_input_iterator I; long double ex; @@ -202,7 +204,7 @@ std::noshowbase(ios); } { // negative, showbase - std::string v = "-1 234 567,89 \xD1\x80\xD1\x83\xD0\xB1""."; + std::string v = "-1 234 567,89 " + symbol; std::showbase(ios); typedef cpp17_input_iterator I; long double ex; @@ -382,7 +384,7 @@ std::noshowbase(ios); } { // negative, showbase - std::string v = "-1 234 567,89 \xD1\x80\xD1\x83\xD0\xB1""."; + std::string v = "-1 234 567,89 " + symbol; std::showbase(ios); typedef cpp17_input_iterator I; long double ex; @@ -394,7 +396,7 @@ std::noshowbase(ios); } { // negative, showbase - std::string v = "-1 234 567,89 \xD1\x80\xD1\x83\xD0\xB1""."; + std::string v = "-1 234 567,89 " + symbol; typedef cpp17_input_iterator I; long double ex; std::ios_base::iostate err = std::ios_base::goodbit; @@ -406,6 +408,11 @@ } } #ifndef TEST_HAS_NO_WIDE_CHARACTERS +#if defined(TEST_HAS_GLIBC) || defined(__FreeBSD__) || defined(_WIN32) + std::wstring wsymbol = L"\x20BD"; +#else + std::wstring wsymbol = L"\x440\x443\x431""."; +#endif { const my_facetw f(1); // wchar_t, national @@ -432,7 +439,7 @@ assert(ex == -1); } { // positive - std::wstring v = L"1 234 567,89 "; + std::wstring v = convert_thousands_sep(L"1 234 567,89 "); typedef cpp17_input_iterator I; long double ex; std::ios_base::iostate err = std::ios_base::goodbit; @@ -443,7 +450,7 @@ assert(ex == 123456789); } { // negative - std::wstring v = L"-1 234 567,89 "; + std::wstring v = convert_thousands_sep(L"-1 234 567,89 "); typedef cpp17_input_iterator I; long double ex; std::ios_base::iostate err = std::ios_base::goodbit; @@ -465,7 +472,7 @@ assert(ex == -123456789); } { // zero, showbase - std::wstring v = L"0,00 \x440\x443\x431""."; + std::wstring v = L"0,00 " + wsymbol; typedef cpp17_input_iterator I; long double ex; std::ios_base::iostate err = std::ios_base::goodbit; @@ -476,7 +483,7 @@ assert(ex == 0); } { // zero, showbase - std::wstring v = L"0,00 \x440\x443\x431""."; + std::wstring v = L"0,00 " + wsymbol; std::showbase(ios); typedef cpp17_input_iterator I; long double ex; @@ -489,7 +496,7 @@ std::noshowbase(ios); } { // negative one, showbase - std::wstring v = L"-0,01 \x440\x443\x431""."; + std::wstring v = L"-0,01 " + wsymbol; typedef cpp17_input_iterator I; long double ex; std::ios_base::iostate err = std::ios_base::goodbit; @@ -500,7 +507,7 @@ assert(ex == -1); } { // negative one, showbase - std::wstring v = L"-0,01 \x440\x443\x431""."; + std::wstring v = L"-0,01 " + wsymbol; std::showbase(ios); typedef cpp17_input_iterator I; long double ex; @@ -513,7 +520,7 @@ std::noshowbase(ios); } { // positive, showbase - std::wstring v = L"1 234 567,89 \x440\x443\x431""."; + std::wstring v = convert_thousands_sep(L"1 234 567,89 ") + wsymbol; typedef cpp17_input_iterator I; long double ex; std::ios_base::iostate err = std::ios_base::goodbit; @@ -524,7 +531,7 @@ assert(ex == 123456789); } { // positive, showbase - std::wstring v = L"1 234 567,89 \x440\x443\x431""."; + std::wstring v = convert_thousands_sep(L"1 234 567,89 ") + wsymbol; std::showbase(ios); typedef cpp17_input_iterator I; long double ex; @@ -537,7 +544,7 @@ std::noshowbase(ios); } { // negative, showbase - std::wstring v = L"-1 234 567,89 \x440\x443\x431""."; + std::wstring v = convert_thousands_sep(L"-1 234 567,89 ") + wsymbol; std::showbase(ios); typedef cpp17_input_iterator I; long double ex; @@ -550,7 +557,7 @@ std::noshowbase(ios); } { // negative, showbase - std::wstring v = L"-1 234 567,89 RUB"; + std::wstring v = convert_thousands_sep(L"-1 234 567,89 RUB"); std::showbase(ios); typedef cpp17_input_iterator I; long double ex; @@ -562,7 +569,7 @@ std::noshowbase(ios); } { // negative, showbase - std::wstring v = L"-1 234 567,89 RUB"; + std::wstring v = convert_thousands_sep(L"-1 234 567,89 RUB"); typedef cpp17_input_iterator I; long double ex; std::ios_base::iostate err = std::ios_base::goodbit; @@ -599,7 +606,7 @@ assert(ex == -1); } { // positive - std::wstring v = L"1 234 567,89 "; + std::wstring v = convert_thousands_sep(L"1 234 567,89 "); typedef cpp17_input_iterator I; long double ex; std::ios_base::iostate err = std::ios_base::goodbit; @@ -610,7 +617,7 @@ assert(ex == 123456789); } { // negative - std::wstring v = L"-1 234 567,89 "; + std::wstring v = convert_thousands_sep(L"-1 234 567,89 "); typedef cpp17_input_iterator I; long double ex; std::ios_base::iostate err = std::ios_base::goodbit; @@ -680,7 +687,7 @@ std::noshowbase(ios); } { // positive, showbase - std::wstring v = L"1 234 567,89 RUB"; + std::wstring v = convert_thousands_sep(L"1 234 567,89 RUB"); typedef cpp17_input_iterator I; long double ex; std::ios_base::iostate err = std::ios_base::goodbit; @@ -691,7 +698,7 @@ assert(ex == 123456789); } { // positive, showbase - std::wstring v = L"1 234 567,89 RUB"; + std::wstring v = convert_thousands_sep(L"1 234 567,89 RUB"); std::showbase(ios); typedef cpp17_input_iterator I; long double ex; @@ -704,7 +711,7 @@ std::noshowbase(ios); } { // negative, showbase - std::wstring v = L"-1 234 567,89 RUB"; + std::wstring v = convert_thousands_sep(L"-1 234 567,89 RUB"); std::showbase(ios); typedef cpp17_input_iterator I; long double ex; @@ -717,7 +724,7 @@ std::noshowbase(ios); } { // negative, showbase - std::wstring v = L"-1 234 567,89 \x440\x443\x431""."; + std::wstring v = convert_thousands_sep(L"-1 234 567,89 ") + wsymbol; std::showbase(ios); typedef cpp17_input_iterator I; long double ex; @@ -729,7 +736,7 @@ std::noshowbase(ios); } { // negative, showbase - std::wstring v = L"-1 234 567,89 \x440\x443\x431""."; + std::wstring v = convert_thousands_sep(L"-1 234 567,89 ") + wsymbol; typedef cpp17_input_iterator I; long double ex; std::ios_base::iostate err = std::ios_base::goodbit; Index: libcxx/test/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_zh_CN.pass.cpp =================================================================== --- libcxx/test/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_zh_CN.pass.cpp +++ libcxx/test/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_zh_CN.pass.cpp @@ -9,7 +9,6 @@ // NetBSD does not support LC_MONETARY at the moment // XFAIL: netbsd -// XFAIL: LIBCXX-WINDOWS-FIXME // XFAIL: LIBCXX-AIX-FIXME // REQUIRES: locale.zh_CN.UTF-8 @@ -68,6 +67,13 @@ new std::moneypunct_byname(loc_name))); ios.imbue(std::locale(ios.getloc(), new std::moneypunct_byname(loc_name))); +#endif +#ifdef _WIN32 + std::string curr_symbol = "\xC2\xA5"; + std::string curr_text = "CNY"; +#else + std::string curr_symbol = "\xEF\xBF\xA5"; + std::string curr_text = "CNY "; #endif { const my_facet f(1); @@ -128,7 +134,7 @@ assert(ex == -123456789); } { // zero, showbase - std::string v = "\xEF\xBF\xA5""0.00"; + std::string v = curr_symbol + "0.00"; typedef cpp17_input_iterator I; long double ex; std::ios_base::iostate err = std::ios_base::goodbit; @@ -139,7 +145,7 @@ assert(ex == 0); } { // zero, showbase - std::string v = "\xEF\xBF\xA5""0.00"; + std::string v = curr_symbol + "0.00"; std::showbase(ios); typedef cpp17_input_iterator I; long double ex; @@ -152,7 +158,7 @@ std::noshowbase(ios); } { // negative one, showbase - std::string v = "\xEF\xBF\xA5""-0.01"; + std::string v = curr_symbol + "-0.01"; typedef cpp17_input_iterator I; long double ex; std::ios_base::iostate err = std::ios_base::goodbit; @@ -163,7 +169,7 @@ assert(ex == -1); } { // negative one, showbase - std::string v = "\xEF\xBF\xA5""-0.01"; + std::string v = curr_symbol + "-0.01"; std::showbase(ios); typedef cpp17_input_iterator I; long double ex; @@ -176,7 +182,7 @@ std::noshowbase(ios); } { // positive, showbase - std::string v = "\xEF\xBF\xA5""1,234,567.89"; + std::string v = curr_symbol + "1,234,567.89"; typedef cpp17_input_iterator I; long double ex; std::ios_base::iostate err = std::ios_base::goodbit; @@ -187,7 +193,7 @@ assert(ex == 123456789); } { // positive, showbase - std::string v = "\xEF\xBF\xA5""1,234,567.89"; + std::string v = curr_symbol + "1,234,567.89"; std::showbase(ios); typedef cpp17_input_iterator I; long double ex; @@ -200,7 +206,7 @@ std::noshowbase(ios); } { // negative, showbase - std::string v = "\xEF\xBF\xA5""-1,234,567.89"; + std::string v = curr_symbol + "-1,234,567.89"; std::showbase(ios); typedef cpp17_input_iterator I; long double ex; @@ -305,7 +311,7 @@ assert(ex == 0); } { // zero, showbase - std::string v = "CNY 0.00"; + std::string v = curr_text + "0.00"; std::showbase(ios); typedef cpp17_input_iterator I; long double ex; @@ -318,7 +324,7 @@ std::noshowbase(ios); } { // negative one, showbase - std::string v = "CNY -0.01"; + std::string v = curr_text + "-0.01"; typedef cpp17_input_iterator I; long double ex; std::ios_base::iostate err = std::ios_base::goodbit; @@ -329,7 +335,7 @@ assert(ex == -1); } { // negative one, showbase - std::string v = "CNY -0.01"; + std::string v = curr_text + "-0.01"; std::showbase(ios); typedef cpp17_input_iterator I; long double ex; @@ -342,7 +348,7 @@ std::noshowbase(ios); } { // positive, showbase - std::string v = "CNY 1,234,567.89"; + std::string v = curr_text + "1,234,567.89"; typedef cpp17_input_iterator I; long double ex; std::ios_base::iostate err = std::ios_base::goodbit; @@ -353,7 +359,7 @@ assert(ex == 123456789); } { // positive, showbase - std::string v = "CNY 1,234,567.89"; + std::string v = curr_text + "1,234,567.89"; std::showbase(ios); typedef cpp17_input_iterator I; long double ex; @@ -366,7 +372,7 @@ std::noshowbase(ios); } { // negative, showbase - std::string v = "CNY -1,234,567.89"; + std::string v = curr_text + "-1,234,567.89"; std::showbase(ios); typedef cpp17_input_iterator I; long double ex; @@ -379,7 +385,7 @@ std::noshowbase(ios); } { // negative, showbase - std::string v = "\xEF\xBF\xA5""-1,234,567.89"; + std::string v = curr_symbol + "-1,234,567.89"; std::showbase(ios); typedef cpp17_input_iterator I; long double ex; @@ -391,7 +397,7 @@ std::noshowbase(ios); } { // negative, showbase - std::string v = "\xEF\xBF\xA5""-1,234,567.89"; + std::string v = curr_symbol + "-1,234,567.89"; typedef cpp17_input_iterator I; long double ex; std::ios_base::iostate err = std::ios_base::goodbit; @@ -402,6 +408,13 @@ } } #ifndef TEST_HAS_NO_WIDE_CHARACTERS +#ifdef _WIN32 + std::wstring w_curr_symbol = L"\xA5"; + std::wstring w_curr_text = L"CNY"; +#else + std::wstring w_curr_symbol = L"\xFFE5"; + std::wstring w_curr_text = L"CNY "; +#endif { const my_facetw f(1); // wchar_t, national @@ -461,7 +474,7 @@ assert(ex == -123456789); } { // zero, showbase - std::wstring v = L"\xFFE5""0.00"; + std::wstring v = w_curr_symbol + L"0.00"; typedef cpp17_input_iterator I; long double ex; std::ios_base::iostate err = std::ios_base::goodbit; @@ -472,7 +485,7 @@ assert(ex == 0); } { // zero, showbase - std::wstring v = L"\xFFE5""0.00"; + std::wstring v = w_curr_symbol + L"0.00"; std::showbase(ios); typedef cpp17_input_iterator I; long double ex; @@ -485,7 +498,7 @@ std::noshowbase(ios); } { // negative one, showbase - std::wstring v = L"\xFFE5""-0.01"; + std::wstring v = w_curr_symbol + L"-0.01"; typedef cpp17_input_iterator I; long double ex; std::ios_base::iostate err = std::ios_base::goodbit; @@ -496,7 +509,7 @@ assert(ex == -1); } { // negative one, showbase - std::wstring v = L"\xFFE5""-0.01"; + std::wstring v = w_curr_symbol + L"-0.01"; std::showbase(ios); typedef cpp17_input_iterator I; long double ex; @@ -509,7 +522,7 @@ std::noshowbase(ios); } { // positive, showbase - std::wstring v = L"\xFFE5""1,234,567.89"; + std::wstring v = w_curr_symbol + L"1,234,567.89"; typedef cpp17_input_iterator I; long double ex; std::ios_base::iostate err = std::ios_base::goodbit; @@ -520,7 +533,7 @@ assert(ex == 123456789); } { // positive, showbase - std::wstring v = L"\xFFE5""1,234,567.89"; + std::wstring v = w_curr_symbol + L"1,234,567.89"; std::showbase(ios); typedef cpp17_input_iterator I; long double ex; @@ -533,7 +546,7 @@ std::noshowbase(ios); } { // negative, showbase - std::wstring v = L"\xFFE5""-1,234,567.89"; + std::wstring v = w_curr_symbol + L"-1,234,567.89"; std::showbase(ios); typedef cpp17_input_iterator I; long double ex; @@ -638,7 +651,7 @@ assert(ex == 0); } { // zero, showbase - std::wstring v = L"CNY 0.00"; + std::wstring v = w_curr_text + L"0.00"; std::showbase(ios); typedef cpp17_input_iterator I; long double ex; @@ -651,7 +664,7 @@ std::noshowbase(ios); } { // negative one, showbase - std::wstring v = L"CNY -0.01"; + std::wstring v = w_curr_text + L"-0.01"; typedef cpp17_input_iterator I; long double ex; std::ios_base::iostate err = std::ios_base::goodbit; @@ -662,7 +675,7 @@ assert(ex == -1); } { // negative one, showbase - std::wstring v = L"CNY -0.01"; + std::wstring v = w_curr_text + L"-0.01"; std::showbase(ios); typedef cpp17_input_iterator I; long double ex; @@ -675,7 +688,7 @@ std::noshowbase(ios); } { // positive, showbase - std::wstring v = L"CNY 1,234,567.89"; + std::wstring v = w_curr_text + L"1,234,567.89"; typedef cpp17_input_iterator I; long double ex; std::ios_base::iostate err = std::ios_base::goodbit; @@ -686,7 +699,7 @@ assert(ex == 123456789); } { // positive, showbase - std::wstring v = L"CNY 1,234,567.89"; + std::wstring v = w_curr_text + L"1,234,567.89"; std::showbase(ios); typedef cpp17_input_iterator I; long double ex; @@ -699,7 +712,7 @@ std::noshowbase(ios); } { // negative, showbase - std::wstring v = L"CNY -1,234,567.89"; + std::wstring v = w_curr_text + L"-1,234,567.89"; std::showbase(ios); typedef cpp17_input_iterator I; long double ex; @@ -712,7 +725,7 @@ std::noshowbase(ios); } { // negative, showbase - std::wstring v = L"\xFFE5""-1,234,567.89"; + std::wstring v = w_curr_symbol + L"-1,234,567.89"; std::showbase(ios); typedef cpp17_input_iterator I; long double ex; @@ -724,7 +737,7 @@ std::noshowbase(ios); } { // negative, showbase - std::wstring v = L"\xFFE5""-1,234,567.89"; + std::wstring v = w_curr_symbol + L"-1,234,567.89"; typedef cpp17_input_iterator I; long double ex; std::ios_base::iostate err = std::ios_base::goodbit; Index: libcxx/test/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_string_en_US.pass.cpp =================================================================== --- libcxx/test/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_string_en_US.pass.cpp +++ libcxx/test/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_string_en_US.pass.cpp @@ -14,7 +14,6 @@ // ios_base::iostate& err, string_type& v) const; // REQUIRES: locale.en_US.UTF-8 -// XFAIL: LIBCXX-WINDOWS-FIXME #include #include @@ -75,6 +74,7 @@ assert(err == std::ios_base::eofbit); assert(ex == "0"); } +#ifndef _WIN32 { // negative one std::string v = "-0.01"; typedef cpp17_input_iterator I; @@ -86,6 +86,7 @@ assert(err == std::ios_base::eofbit); assert(ex == "-1"); } +#endif { // positive std::string v = "1,234,567.89"; typedef cpp17_input_iterator I; @@ -97,6 +98,7 @@ assert(err == std::ios_base::eofbit); assert(ex == "123456789"); } +#ifndef _WIN32 { // negative std::string v = "-1,234,567.89"; typedef cpp17_input_iterator I; @@ -119,6 +121,7 @@ assert(err == std::ios_base::eofbit); assert(ex == "-123456789"); } +#endif { // zero, showbase std::string v = "$0.00"; typedef cpp17_input_iterator I; @@ -143,6 +146,7 @@ assert(ex == "0"); std::noshowbase(ios); } +#ifndef _WIN32 { // negative one, showbase std::string v = "-$0.01"; typedef cpp17_input_iterator I; @@ -167,6 +171,7 @@ assert(ex == "-1"); std::noshowbase(ios); } +#endif { // positive, showbase std::string v = "$1,234,567.89"; typedef cpp17_input_iterator I; @@ -191,6 +196,7 @@ assert(ex == "123456789"); std::noshowbase(ios); } +#ifndef _WIN32 { // negative, showbase std::string v = "-$1,234,567.89"; std::showbase(ios); @@ -228,6 +234,7 @@ assert(err == std::ios_base::failbit); assert(ex == ""); } +#endif } { const my_facet f(1); @@ -243,6 +250,7 @@ assert(err == std::ios_base::eofbit); assert(ex == "0"); } +#ifndef _WIN32 { // negative one std::string v = "-0.01"; typedef cpp17_input_iterator I; @@ -254,6 +262,7 @@ assert(err == std::ios_base::eofbit); assert(ex == "-1"); } +#endif { // positive std::string v = "1,234,567.89"; typedef cpp17_input_iterator I; @@ -265,6 +274,7 @@ assert(err == std::ios_base::eofbit); assert(ex == "123456789"); } +#ifndef _WIN32 { // negative std::string v = "-1,234,567.89"; typedef cpp17_input_iterator I; @@ -287,6 +297,7 @@ assert(err == std::ios_base::eofbit); assert(ex == "-123456789"); } +#endif { // zero, showbase std::string v = "USD 0.00"; typedef cpp17_input_iterator I; @@ -311,6 +322,7 @@ assert(ex == "0"); std::noshowbase(ios); } +#ifndef _WIN32 { // negative one, showbase std::string v = "-USD 0.01"; typedef cpp17_input_iterator I; @@ -335,6 +347,7 @@ assert(ex == "-1"); std::noshowbase(ios); } +#endif { // positive, showbase std::string v = "USD 1,234,567.89"; typedef cpp17_input_iterator I; @@ -359,6 +372,7 @@ assert(ex == "123456789"); std::noshowbase(ios); } +#ifndef _WIN32 { // negative, showbase std::string v = "-USD 1,234,567.89"; std::showbase(ios); @@ -396,6 +410,7 @@ assert(err == std::ios_base::failbit); assert(ex == ""); } +#endif } #ifndef TEST_HAS_NO_WIDE_CHARACTERS { @@ -412,6 +427,7 @@ assert(err == std::ios_base::eofbit); assert(ex == L"0"); } +#ifndef _WIN32 { // negative one std::wstring v = L"-0.01"; typedef cpp17_input_iterator I; @@ -423,6 +439,7 @@ assert(err == std::ios_base::eofbit); assert(ex == L"-1"); } +#endif { // positive std::wstring v = L"1,234,567.89"; typedef cpp17_input_iterator I; @@ -434,6 +451,7 @@ assert(err == std::ios_base::eofbit); assert(ex == L"123456789"); } +#ifndef _WIN32 { // negative std::wstring v = L"-1,234,567.89"; typedef cpp17_input_iterator I; @@ -456,6 +474,7 @@ assert(err == std::ios_base::eofbit); assert(ex == L"-123456789"); } +#endif { // zero, showbase std::wstring v = L"$0.00"; typedef cpp17_input_iterator I; @@ -480,6 +499,7 @@ assert(ex == L"0"); std::noshowbase(ios); } +#ifndef _WIN32 { // negative one, showbase std::wstring v = L"-$0.01"; typedef cpp17_input_iterator I; @@ -504,6 +524,7 @@ assert(ex == L"-1"); std::noshowbase(ios); } +#endif { // positive, showbase std::wstring v = L"$1,234,567.89"; typedef cpp17_input_iterator I; @@ -528,6 +549,7 @@ assert(ex == L"123456789"); std::noshowbase(ios); } +#ifndef _WIN32 { // negative, showbase std::wstring v = L"-$1,234,567.89"; std::showbase(ios); @@ -565,6 +587,7 @@ assert(err == std::ios_base::failbit); assert(ex == L""); } +#endif } { const my_facetw f(1); @@ -580,6 +603,7 @@ assert(err == std::ios_base::eofbit); assert(ex == L"0"); } +#ifndef _WIN32 { // negative one std::wstring v = L"-0.01"; typedef cpp17_input_iterator I; @@ -591,6 +615,7 @@ assert(err == std::ios_base::eofbit); assert(ex == L"-1"); } +#endif { // positive std::wstring v = L"1,234,567.89"; typedef cpp17_input_iterator I; @@ -602,6 +627,7 @@ assert(err == std::ios_base::eofbit); assert(ex == L"123456789"); } +#ifndef _WIN32 { // negative std::wstring v = L"-1,234,567.89"; typedef cpp17_input_iterator I; @@ -624,6 +650,7 @@ assert(err == std::ios_base::eofbit); assert(ex == L"-123456789"); } +#endif { // zero, showbase std::wstring v = L"USD 0.00"; typedef cpp17_input_iterator I; @@ -648,6 +675,7 @@ assert(ex == L"0"); std::noshowbase(ios); } +#ifndef _WIN32 { // negative one, showbase std::wstring v = L"-USD 0.01"; typedef cpp17_input_iterator I; @@ -672,6 +700,7 @@ assert(ex == L"-1"); std::noshowbase(ios); } +#endif { // positive, showbase std::wstring v = L"USD 1,234,567.89"; typedef cpp17_input_iterator I; @@ -696,6 +725,7 @@ assert(ex == L"123456789"); std::noshowbase(ios); } +#ifndef _WIN32 { // negative, showbase std::wstring v = L"-USD 1,234,567.89"; std::showbase(ios); @@ -733,6 +763,7 @@ assert(err == std::ios_base::failbit); assert(ex == L""); } +#endif } #endif // TEST_HAS_NO_WIDE_CHARACTERS { Index: libcxx/test/std/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_en_US.pass.cpp =================================================================== --- libcxx/test/std/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_en_US.pass.cpp +++ libcxx/test/std/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_en_US.pass.cpp @@ -14,7 +14,6 @@ // long double units) const; // REQUIRES: locale.en_US.UTF-8 -// XFAIL: LIBCXX-WINDOWS-FIXME #include #include @@ -76,7 +75,11 @@ char str[100]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), false, ios, '*', v); std::string ex(str, iter.base()); +#ifdef _WIN32 + assert(ex == "(0.01)"); +#else assert(ex == "-0.01"); +#endif } { // positive long double v = 123456789; @@ -90,7 +93,11 @@ char str[100]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), false, ios, '*', v); std::string ex(str, iter.base()); +#ifdef _WIN32 + assert(ex == "(1,234,567.89)"); +#else assert(ex == "-1,234,567.89"); +#endif } { // zero, showbase long double v = 0; @@ -106,7 +113,11 @@ char str[100]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), false, ios, '*', v); std::string ex(str, iter.base()); +#ifdef _WIN32 + assert(ex == "($0.01)"); +#else assert(ex == "-$0.01"); +#endif } { // positive, showbase long double v = 123456789; @@ -122,7 +133,11 @@ char str[100]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), false, ios, '*', v); std::string ex(str, iter.base()); +#ifdef _WIN32 + assert(ex == "($1,234,567.89)"); +#else assert(ex == "-$1,234,567.89"); +#endif } { // negative, showbase, left long double v = -123456789; @@ -132,7 +147,11 @@ char str[100]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), false, ios, ' ', v); std::string ex(str, iter.base()); +#ifdef _WIN32 + assert(ex == "($1,234,567.89) "); +#else assert(ex == "-$1,234,567.89 "); +#endif assert(ios.width() == 0); } { // negative, showbase, internal @@ -143,7 +162,11 @@ char str[100]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), false, ios, ' ', v); std::string ex(str, iter.base()); +#ifdef _WIN32 + assert(ex == "($ 1,234,567.89)"); +#else assert(ex == "-$ 1,234,567.89"); +#endif assert(ios.width() == 0); } { // negative, showbase, right @@ -154,7 +177,11 @@ char str[100]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), false, ios, ' ', v); std::string ex(str, iter.base()); +#ifdef _WIN32 + assert(ex == " ($1,234,567.89)"); +#else assert(ex == " -$1,234,567.89"); +#endif assert(ios.width() == 0); } @@ -173,7 +200,11 @@ char str[100]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), true, ios, '*', v); std::string ex(str, iter.base()); +#ifdef _WIN32 + assert(ex == "(0.01)"); +#else assert(ex == "-0.01"); +#endif } { // positive long double v = 123456789; @@ -187,7 +218,11 @@ char str[100]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), true, ios, '*', v); std::string ex(str, iter.base()); +#ifdef _WIN32 + assert(ex == "(1,234,567.89)"); +#else assert(ex == "-1,234,567.89"); +#endif } { // zero, showbase long double v = 0; @@ -195,7 +230,11 @@ char str[100]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), true, ios, '*', v); std::string ex(str, iter.base()); +#ifdef _WIN32 + assert(ex == "USD0.00"); +#else assert(ex == "USD 0.00"); +#endif } { // negative one, showbase long double v = -1; @@ -203,7 +242,11 @@ char str[100]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), true, ios, '*', v); std::string ex(str, iter.base()); +#ifdef _WIN32 + assert(ex == "(USD0.01)"); +#else assert(ex == "-USD 0.01"); +#endif } { // positive, showbase long double v = 123456789; @@ -211,7 +254,11 @@ char str[100]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), true, ios, '*', v); std::string ex(str, iter.base()); +#ifdef _WIN32 + assert(ex == "USD1,234,567.89"); +#else assert(ex == "USD 1,234,567.89"); +#endif } { // negative, showbase long double v = -123456789; @@ -219,7 +266,11 @@ char str[100]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), true, ios, '*', v); std::string ex(str, iter.base()); +#ifdef _WIN32 + assert(ex == "(USD1,234,567.89)"); +#else assert(ex == "-USD 1,234,567.89"); +#endif } { // negative, showbase, left long double v = -123456789; @@ -229,7 +280,11 @@ char str[100]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), true, ios, ' ', v); std::string ex(str, iter.base()); +#ifdef _WIN32 + assert(ex == "(USD1,234,567.89) "); +#else assert(ex == "-USD 1,234,567.89 "); +#endif assert(ios.width() == 0); } { // negative, showbase, internal @@ -240,7 +295,11 @@ char str[100]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), true, ios, ' ', v); std::string ex(str, iter.base()); +#ifdef _WIN32 + assert(ex == "(USD 1,234,567.89)"); +#else assert(ex == "-USD 1,234,567.89"); +#endif assert(ios.width() == 0); } { // negative, showbase, right @@ -251,7 +310,11 @@ char str[100]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), true, ios, ' ', v); std::string ex(str, iter.base()); +#ifdef _WIN32 + assert(ex == " (USD1,234,567.89)"); +#else assert(ex == " -USD 1,234,567.89"); +#endif assert(ios.width() == 0); } } @@ -273,7 +336,11 @@ wchar_t str[100]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), false, ios, '*', v); std::wstring ex(str, iter.base()); +#ifdef _WIN32 + assert(ex == L"(0.01)"); +#else assert(ex == L"-0.01"); +#endif } { // positive long double v = 123456789; @@ -287,7 +354,11 @@ wchar_t str[100]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), false, ios, '*', v); std::wstring ex(str, iter.base()); +#ifdef _WIN32 + assert(ex == L"(1,234,567.89)"); +#else assert(ex == L"-1,234,567.89"); +#endif } { // zero, showbase long double v = 0; @@ -303,7 +374,11 @@ wchar_t str[100]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), false, ios, '*', v); std::wstring ex(str, iter.base()); +#ifdef _WIN32 + assert(ex == L"($0.01)"); +#else assert(ex == L"-$0.01"); +#endif } { // positive, showbase long double v = 123456789; @@ -319,7 +394,11 @@ wchar_t str[100]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), false, ios, '*', v); std::wstring ex(str, iter.base()); +#ifdef _WIN32 + assert(ex == L"($1,234,567.89)"); +#else assert(ex == L"-$1,234,567.89"); +#endif } { // negative, showbase, left long double v = -123456789; @@ -329,7 +408,11 @@ wchar_t str[100]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), false, ios, ' ', v); std::wstring ex(str, iter.base()); +#ifdef _WIN32 + assert(ex == L"($1,234,567.89) "); +#else assert(ex == L"-$1,234,567.89 "); +#endif assert(ios.width() == 0); } { // negative, showbase, internal @@ -340,7 +423,11 @@ wchar_t str[100]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), false, ios, ' ', v); std::wstring ex(str, iter.base()); +#ifdef _WIN32 + assert(ex == L"($ 1,234,567.89)"); +#else assert(ex == L"-$ 1,234,567.89"); +#endif assert(ios.width() == 0); } { // negative, showbase, right @@ -351,7 +438,11 @@ wchar_t str[100]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), false, ios, ' ', v); std::wstring ex(str, iter.base()); +#ifdef _WIN32 + assert(ex == L" ($1,234,567.89)"); +#else assert(ex == L" -$1,234,567.89"); +#endif assert(ios.width() == 0); } @@ -370,7 +461,11 @@ wchar_t str[100]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), true, ios, '*', v); std::wstring ex(str, iter.base()); +#ifdef _WIN32 + assert(ex == L"(0.01)"); +#else assert(ex == L"-0.01"); +#endif } { // positive long double v = 123456789; @@ -384,7 +479,11 @@ wchar_t str[100]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), true, ios, '*', v); std::wstring ex(str, iter.base()); +#ifdef _WIN32 + assert(ex == L"(1,234,567.89)"); +#else assert(ex == L"-1,234,567.89"); +#endif } { // zero, showbase long double v = 0; @@ -392,7 +491,11 @@ wchar_t str[100]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), true, ios, '*', v); std::wstring ex(str, iter.base()); +#ifdef _WIN32 + assert(ex == L"USD0.00"); +#else assert(ex == L"USD 0.00"); +#endif } { // negative one, showbase long double v = -1; @@ -400,7 +503,11 @@ wchar_t str[100]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), true, ios, '*', v); std::wstring ex(str, iter.base()); +#ifdef _WIN32 + assert(ex == L"(USD0.01)"); +#else assert(ex == L"-USD 0.01"); +#endif } { // positive, showbase long double v = 123456789; @@ -408,7 +515,11 @@ wchar_t str[100]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), true, ios, '*', v); std::wstring ex(str, iter.base()); +#ifdef _WIN32 + assert(ex == L"USD1,234,567.89"); +#else assert(ex == L"USD 1,234,567.89"); +#endif } { // negative, showbase long double v = -123456789; @@ -416,7 +527,11 @@ wchar_t str[100]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), true, ios, '*', v); std::wstring ex(str, iter.base()); +#ifdef _WIN32 + assert(ex == L"(USD1,234,567.89)"); +#else assert(ex == L"-USD 1,234,567.89"); +#endif } { // negative, showbase, left long double v = -123456789; @@ -426,7 +541,11 @@ wchar_t str[100]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), true, ios, ' ', v); std::wstring ex(str, iter.base()); +#ifdef _WIN32 + assert(ex == L"(USD1,234,567.89) "); +#else assert(ex == L"-USD 1,234,567.89 "); +#endif assert(ios.width() == 0); } { // negative, showbase, internal @@ -437,7 +556,11 @@ wchar_t str[100]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), true, ios, ' ', v); std::wstring ex(str, iter.base()); +#ifdef _WIN32 + assert(ex == L"(USD 1,234,567.89)"); +#else assert(ex == L"-USD 1,234,567.89"); +#endif assert(ios.width() == 0); } { // negative, showbase, right @@ -448,7 +571,11 @@ wchar_t str[100]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), true, ios, ' ', v); std::wstring ex(str, iter.base()); +#ifdef _WIN32 + assert(ex == L" (USD1,234,567.89)"); +#else assert(ex == L" -USD 1,234,567.89"); +#endif assert(ios.width() == 0); } } Index: libcxx/test/std/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_fr_FR.pass.cpp =================================================================== --- libcxx/test/std/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_fr_FR.pass.cpp +++ libcxx/test/std/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_fr_FR.pass.cpp @@ -28,6 +28,7 @@ #include #include "test_iterators.h" +#include "locale_helpers.h" #include "platform_support.h" // locale name macros #include "test_macros.h" @@ -52,38 +53,8 @@ : Fw(refs) {} }; -// GLIBC 2.27 and newer use U+202F NARROW NO-BREAK SPACE as a thousands separator. -// This function converts the spaces in string inputs to U+202F if need -// be. FreeBSD's locale data also uses U+202F, since 2018. -// Windows uses U+00A0 NO-BREAK SPACE. static std::wstring convert_thousands_sep(std::wstring const& in) { -#if defined(_CS_GNU_LIBC_VERSION) || defined(__FreeBSD__) || defined(_WIN32) -#if defined(_CS_GNU_LIBC_VERSION) - if (glibc_version_less_than("2.27")) - return in; -#endif - std::wstring out; - unsigned I = 0; - bool seen_num_start = false; - bool seen_decimal = false; - for (; I < in.size(); ++I) { - seen_decimal |= in[I] == L','; - seen_num_start |= in[I] == '-' || std::iswdigit(in[I]); - if (seen_decimal || !seen_num_start || in[I] != L' ') { - out.push_back(in[I]); - continue; - } - assert(in[I] == L' '); -#if defined(_WIN32) - out.push_back(L'\u00A0'); -#else - out.push_back(L'\u202F'); -#endif - } - return out; -#else - return in; -#endif + return LocaleHelpers::convert_thousands_sep_fr_FR(in); } #endif // TEST_HAS_NO_WIDE_CHARACTERS Index: libcxx/test/std/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_ru_RU.pass.cpp =================================================================== --- libcxx/test/std/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_ru_RU.pass.cpp +++ libcxx/test/std/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_ru_RU.pass.cpp @@ -9,14 +9,6 @@ // NetBSD does not support LC_MONETARY at the moment // XFAIL: netbsd -// 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 - -// XFAIL: LIBCXX-WINDOWS-FIXME - // REQUIRES: locale.ru_RU.UTF-8 // @@ -33,6 +25,7 @@ #include "test_macros.h" #include "test_iterators.h" +#include "locale_helpers.h" #include "platform_support.h" // locale name macros typedef std::money_put > Fn; @@ -55,7 +48,11 @@ explicit my_facetw(std::size_t refs = 0) : Fw(refs) {} }; -#endif + +static std::wstring convert_thousands_sep(std::wstring const& in) { + return LocaleHelpers::convert_thousands_sep_ru_RU(in); +} +#endif // TEST_HAS_NO_WIDE_CHARACTERS int main(int, char**) { @@ -72,6 +69,11 @@ new std::moneypunct_byname(loc_name))); #endif { +#if defined(TEST_HAS_GLIBC) || defined(__FreeBSD__) || defined(_WIN32) + std::string symbol = "\xE2\x82\xBD"; +#else + std::string symbol = "\xD1\x80\xD1\x83\xD0\xB1""."; +#endif const my_facet f(1); // char, national { // zero @@ -108,7 +110,7 @@ char str[100]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), false, ios, '*', v); std::string ex(str, iter.base()); - assert(ex == "0,00 \xD1\x80\xD1\x83\xD0\xB1""."); + assert(ex == "0,00 " + symbol); } { // negative one, showbase long double v = -1; @@ -116,7 +118,7 @@ char str[100]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), false, ios, '*', v); std::string ex(str, iter.base()); - assert(ex == "-0,01 \xD1\x80\xD1\x83\xD0\xB1""."); + assert(ex == "-0,01 " + symbol); } { // positive, showbase long double v = 123456789; @@ -124,7 +126,7 @@ char str[100]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), false, ios, '*', v); std::string ex(str, iter.base()); - assert(ex == "1 234 567,89 \xD1\x80\xD1\x83\xD0\xB1""."); + assert(ex == "1 234 567,89 " + symbol); } { // negative, showbase long double v = -123456789; @@ -132,39 +134,39 @@ char str[100]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), false, ios, '*', v); std::string ex(str, iter.base()); - assert(ex == "-1 234 567,89 \xD1\x80\xD1\x83\xD0\xB1""."); + assert(ex == "-1 234 567,89 " + symbol); } { // negative, showbase, left long double v = -123456789; std::showbase(ios); - ios.width(20); + ios.width(15); std::left(ios); char str[100]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), false, ios, ' ', v); std::string ex(str, iter.base()); - assert(ex == "-1 234 567,89 \xD1\x80\xD1\x83\xD0\xB1""."); + assert(ex == "-1 234 567,89 " + symbol); assert(ios.width() == 0); } { // negative, showbase, internal long double v = -123456789; std::showbase(ios); - ios.width(20); + ios.width(15); std::internal(ios); char str[100]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), false, ios, ' ', v); std::string ex(str, iter.base()); - assert(ex == "-1 234 567,89 \xD1\x80\xD1\x83\xD0\xB1""."); + assert(ex == "-1 234 567,89 " + symbol); assert(ios.width() == 0); } { // negative, showbase, right long double v = -123456789; std::showbase(ios); - ios.width(20); + ios.width(15); std::right(ios); char str[100]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), false, ios, ' ', v); std::string ex(str, iter.base()); - assert(ex == "-1 234 567,89 \xD1\x80\xD1\x83\xD0\xB1""."); + assert(ex == "-1 234 567,89 " + symbol); assert(ios.width() == 0); } @@ -267,6 +269,11 @@ } #ifndef TEST_HAS_NO_WIDE_CHARACTERS { +#if defined(TEST_HAS_GLIBC) || defined(__FreeBSD__) || defined(_WIN32) + std::wstring symbol = L"\x20BD"; +#else + std::wstring symbol = L"\x440\x443\x431""."; +#endif const my_facetw f(1); // wchar_t, national std::noshowbase(ios); @@ -290,14 +297,14 @@ wchar_t str[100]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), false, ios, '*', v); std::wstring ex(str, iter.base()); - assert(ex == L"1 234 567,89"); + assert(ex == convert_thousands_sep(L"1 234 567,89")); } { // negative long double v = -123456789; wchar_t str[100]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), false, ios, '*', v); std::wstring ex(str, iter.base()); - assert(ex == L"-1 234 567,89"); + assert(ex == convert_thousands_sep(L"-1 234 567,89")); } { // zero, showbase long double v = 0; @@ -305,7 +312,7 @@ wchar_t str[100]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), false, ios, '*', v); std::wstring ex(str, iter.base()); - assert(ex == L"0,00 \x440\x443\x431""."); + assert(ex == L"0,00 " + symbol); } { // negative one, showbase long double v = -1; @@ -313,7 +320,7 @@ wchar_t str[100]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), false, ios, '*', v); std::wstring ex(str, iter.base()); - assert(ex == L"-0,01 \x440\x443\x431""."); + assert(ex == L"-0,01 " + symbol); } { // positive, showbase long double v = 123456789; @@ -321,7 +328,7 @@ wchar_t str[100]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), false, ios, '*', v); std::wstring ex(str, iter.base()); - assert(ex == L"1 234 567,89 \x440\x443\x431""."); + assert(ex == convert_thousands_sep(L"1 234 567,89 ") + symbol); } { // negative, showbase long double v = -123456789; @@ -329,39 +336,39 @@ wchar_t str[100]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), false, ios, '*', v); std::wstring ex(str, iter.base()); - assert(ex == L"-1 234 567,89 \x440\x443\x431""."); + assert(ex == convert_thousands_sep(L"-1 234 567,89 ") + symbol); } { // negative, showbase, left long double v = -123456789; std::showbase(ios); - ios.width(20); + ios.width(15); std::left(ios); wchar_t str[100]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), false, ios, ' ', v); std::wstring ex(str, iter.base()); - assert(ex == L"-1 234 567,89 \x440\x443\x431"". "); + assert(ex == convert_thousands_sep(L"-1 234 567,89 ") + symbol); assert(ios.width() == 0); } { // negative, showbase, internal long double v = -123456789; std::showbase(ios); - ios.width(20); + ios.width(15); std::internal(ios); wchar_t str[100]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), false, ios, ' ', v); std::wstring ex(str, iter.base()); - assert(ex == L"-1 234 567,89 \x440\x443\x431""."); + assert(ex == convert_thousands_sep(L"-1 234 567,89 ") + symbol); assert(ios.width() == 0); } { // negative, showbase, right long double v = -123456789; std::showbase(ios); - ios.width(20); + ios.width(15); std::right(ios); wchar_t str[100]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), false, ios, ' ', v); std::wstring ex(str, iter.base()); - assert(ex == L" -1 234 567,89 \x440\x443\x431""."); + assert(ex == convert_thousands_sep(L"-1 234 567,89 ") + symbol); assert(ios.width() == 0); } @@ -387,14 +394,14 @@ wchar_t str[100]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), true, ios, '*', v); std::wstring ex(str, iter.base()); - assert(ex == L"1 234 567,89"); + assert(ex == convert_thousands_sep(L"1 234 567,89")); } { // negative long double v = -123456789; wchar_t str[100]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), true, ios, '*', v); std::wstring ex(str, iter.base()); - assert(ex == L"-1 234 567,89"); + assert(ex == convert_thousands_sep(L"-1 234 567,89")); } { // zero, showbase long double v = 0; @@ -418,7 +425,7 @@ wchar_t str[100]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), true, ios, '*', v); std::wstring ex(str, iter.base()); - assert(ex == L"1 234 567,89 RUB"); + assert(ex == convert_thousands_sep(L"1 234 567,89 RUB")); } { // negative, showbase long double v = -123456789; @@ -426,7 +433,7 @@ wchar_t str[100]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), true, ios, '*', v); std::wstring ex(str, iter.base()); - assert(ex == L"-1 234 567,89 RUB"); + assert(ex == convert_thousands_sep(L"-1 234 567,89 RUB")); } { // negative, showbase, left long double v = -123456789; @@ -436,7 +443,7 @@ wchar_t str[100]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), true, ios, ' ', v); std::wstring ex(str, iter.base()); - assert(ex == L"-1 234 567,89 RUB "); + assert(ex == convert_thousands_sep(L"-1 234 567,89 RUB ")); assert(ios.width() == 0); } { // negative, showbase, internal @@ -447,7 +454,7 @@ wchar_t str[100]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), true, ios, ' ', v); std::wstring ex(str, iter.base()); - assert(ex == L"-1 234 567,89 RUB"); + assert(ex == convert_thousands_sep(L"-1 234 567,89 RUB")); assert(ios.width() == 0); } { // negative, showbase, right @@ -458,7 +465,7 @@ wchar_t str[100]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), true, ios, ' ', v); std::wstring ex(str, iter.base()); - assert(ex == L" -1 234 567,89 RUB"); + assert(ex == convert_thousands_sep(L" -1 234 567,89 RUB")); assert(ios.width() == 0); } } Index: libcxx/test/std/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_zh_CN.pass.cpp =================================================================== --- libcxx/test/std/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_zh_CN.pass.cpp +++ libcxx/test/std/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_zh_CN.pass.cpp @@ -9,7 +9,6 @@ // NetBSD does not support LC_MONETARY at the moment // XFAIL: netbsd -// XFAIL: LIBCXX-WINDOWS-FIXME // XFAIL: LIBCXX-AIX-FIXME // REQUIRES: locale.zh_CN.UTF-8 @@ -71,6 +70,17 @@ #endif { const my_facet f(1); +#ifdef _WIN32 + std::string curr_symbol = "\xC2\xA5"; + std::string curr_pad20 = " "; + std::string curr_text = "CNY"; + std::string curr_pad20_text = " "; +#else + std::string curr_symbol = "\xEF\xBF\xA5"; + std::string curr_pad20 = " "; + std::string curr_text = "CNY "; + std::string curr_pad20_text = " "; +#endif // char, national { // zero long double v = 0; @@ -106,7 +116,7 @@ char str[100]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), false, ios, '*', v); std::string ex(str, iter.base()); - assert(ex == "\xEF\xBF\xA5""0.00"); + assert(ex == curr_symbol + "0.00"); } { // negative one, showbase long double v = -1; @@ -114,7 +124,7 @@ char str[100]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), false, ios, '*', v); std::string ex(str, iter.base()); - assert(ex == "\xEF\xBF\xA5""-0.01"); + assert(ex == curr_symbol + "-0.01"); } { // positive, showbase long double v = 123456789; @@ -122,7 +132,7 @@ char str[100]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), false, ios, '*', v); std::string ex(str, iter.base()); - assert(ex == "\xEF\xBF\xA5""1,234,567.89"); + assert(ex == curr_symbol + "1,234,567.89"); } { // negative, showbase long double v = -123456789; @@ -130,7 +140,7 @@ char str[100]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), false, ios, '*', v); std::string ex(str, iter.base()); - assert(ex == "\xEF\xBF\xA5""-1,234,567.89"); + assert(ex == curr_symbol + "-1,234,567.89"); } { // negative, showbase, left long double v = -123456789; @@ -140,7 +150,7 @@ char str[100]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), false, ios, ' ', v); std::string ex(str, iter.base()); - assert(ex == "\xEF\xBF\xA5""-1,234,567.89 "); + assert(ex == curr_symbol + "-1,234,567.89" + curr_pad20); assert(ios.width() == 0); } { // negative, showbase, internal @@ -151,7 +161,7 @@ char str[100]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), false, ios, ' ', v); std::string ex(str, iter.base()); - assert(ex == "\xEF\xBF\xA5""- 1,234,567.89"); + assert(ex == curr_symbol + "-" + curr_pad20 + "1,234,567.89"); assert(ios.width() == 0); } { // negative, showbase, right @@ -162,7 +172,7 @@ char str[100]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), false, ios, ' ', v); std::string ex(str, iter.base()); - assert(ex == " \xEF\xBF\xA5""-1,234,567.89"); + assert(ex == curr_pad20 + curr_symbol + "-1,234,567.89"); assert(ios.width() == 0); } @@ -203,7 +213,7 @@ char str[100]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), true, ios, '*', v); std::string ex(str, iter.base()); - assert(ex == "CNY 0.00"); + assert(ex == curr_text + "0.00"); } { // negative one, showbase long double v = -1; @@ -211,7 +221,7 @@ char str[100]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), true, ios, '*', v); std::string ex(str, iter.base()); - assert(ex == "CNY -0.01"); + assert(ex == curr_text + "-0.01"); } { // positive, showbase long double v = 123456789; @@ -219,7 +229,7 @@ char str[100]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), true, ios, '*', v); std::string ex(str, iter.base()); - assert(ex == "CNY 1,234,567.89"); + assert(ex == curr_text + "1,234,567.89"); } { // negative, showbase long double v = -123456789; @@ -227,7 +237,7 @@ char str[100]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), true, ios, '*', v); std::string ex(str, iter.base()); - assert(ex == "CNY -1,234,567.89"); + assert(ex == curr_text + "-1,234,567.89"); } { // negative, showbase, left long double v = -123456789; @@ -237,7 +247,7 @@ char str[100]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), true, ios, ' ', v); std::string ex(str, iter.base()); - assert(ex == "CNY -1,234,567.89 "); + assert(ex == curr_text + "-1,234,567.89" + curr_pad20_text); assert(ios.width() == 0); } { // negative, showbase, internal @@ -248,7 +258,7 @@ char str[100]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), true, ios, ' ', v); std::string ex(str, iter.base()); - assert(ex == "CNY - 1,234,567.89"); + assert(ex == curr_text + "-" + curr_pad20_text + "1,234,567.89"); assert(ios.width() == 0); } { // negative, showbase, right @@ -259,12 +269,21 @@ char str[100]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), true, ios, ' ', v); std::string ex(str, iter.base()); - assert(ex == " CNY -1,234,567.89"); + assert(ex == curr_pad20_text + curr_text + "-1,234,567.89"); assert(ios.width() == 0); } } #ifndef TEST_HAS_NO_WIDE_CHARACTERS { +#ifdef _WIN32 + std::wstring w_curr_symbol = L"\xA5"; + std::wstring w_curr_text = L"CNY"; + std::wstring w_curr_pad20_text = L" "; +#else + std::wstring w_curr_symbol = L"\xFFE5"; + std::wstring w_curr_text = L"CNY "; + std::wstring w_curr_pad20_text = L" "; +#endif const my_facetw f(1); // wchar_t, national std::noshowbase(ios); @@ -303,7 +322,7 @@ wchar_t str[100]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), false, ios, '*', v); std::wstring ex(str, iter.base()); - assert(ex == L"\xFFE5""0.00"); + assert(ex == w_curr_symbol + L"0.00"); } { // negative one, showbase long double v = -1; @@ -311,7 +330,7 @@ wchar_t str[100]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), false, ios, '*', v); std::wstring ex(str, iter.base()); - assert(ex == L"\xFFE5""-0.01"); + assert(ex == w_curr_symbol + L"-0.01"); } { // positive, showbase long double v = 123456789; @@ -319,7 +338,7 @@ wchar_t str[100]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), false, ios, '*', v); std::wstring ex(str, iter.base()); - assert(ex == L"\xFFE5""1,234,567.89"); + assert(ex == w_curr_symbol + L"1,234,567.89"); } { // negative, showbase long double v = -123456789; @@ -327,7 +346,7 @@ wchar_t str[100]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), false, ios, '*', v); std::wstring ex(str, iter.base()); - assert(ex == L"\xFFE5""-1,234,567.89"); + assert(ex == w_curr_symbol + L"-1,234,567.89"); } { // negative, showbase, left long double v = -123456789; @@ -337,7 +356,7 @@ wchar_t str[100]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), false, ios, ' ', v); std::wstring ex(str, iter.base()); - assert(ex == L"\xFFE5""-1,234,567.89 "); + assert(ex == w_curr_symbol + L"-1,234,567.89 "); assert(ios.width() == 0); } { // negative, showbase, internal @@ -348,7 +367,7 @@ wchar_t str[100]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), false, ios, ' ', v); std::wstring ex(str, iter.base()); - assert(ex == L"\xFFE5""- 1,234,567.89"); + assert(ex == w_curr_symbol + L"- 1,234,567.89"); assert(ios.width() == 0); } { // negative, showbase, right @@ -359,7 +378,7 @@ wchar_t str[100]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), false, ios, ' ', v); std::wstring ex(str, iter.base()); - assert(ex == L" \xFFE5""-1,234,567.89"); + assert(ex == L" " + w_curr_symbol + L"-1,234,567.89"); assert(ios.width() == 0); } @@ -400,7 +419,7 @@ wchar_t str[100]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), true, ios, '*', v); std::wstring ex(str, iter.base()); - assert(ex == L"CNY 0.00"); + assert(ex == w_curr_text + L"0.00"); } { // negative one, showbase long double v = -1; @@ -408,7 +427,7 @@ wchar_t str[100]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), true, ios, '*', v); std::wstring ex(str, iter.base()); - assert(ex == L"CNY -0.01"); + assert(ex == w_curr_text + L"-0.01"); } { // positive, showbase long double v = 123456789; @@ -416,7 +435,7 @@ wchar_t str[100]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), true, ios, '*', v); std::wstring ex(str, iter.base()); - assert(ex == L"CNY 1,234,567.89"); + assert(ex == w_curr_text + L"1,234,567.89"); } { // negative, showbase long double v = -123456789; @@ -424,7 +443,7 @@ wchar_t str[100]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), true, ios, '*', v); std::wstring ex(str, iter.base()); - assert(ex == L"CNY -1,234,567.89"); + assert(ex == w_curr_text + L"-1,234,567.89"); } { // negative, showbase, left long double v = -123456789; @@ -434,7 +453,7 @@ wchar_t str[100]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), true, ios, ' ', v); std::wstring ex(str, iter.base()); - assert(ex == L"CNY -1,234,567.89 "); + assert(ex == w_curr_text + L"-1,234,567.89" + w_curr_pad20_text); assert(ios.width() == 0); } { // negative, showbase, internal @@ -445,7 +464,7 @@ wchar_t str[100]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), true, ios, ' ', v); std::wstring ex(str, iter.base()); - assert(ex == L"CNY - 1,234,567.89"); + assert(ex == w_curr_text + L"-" + w_curr_pad20_text + L"1,234,567.89"); assert(ios.width() == 0); } { // negative, showbase, right @@ -456,7 +475,7 @@ wchar_t str[100]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), true, ios, ' ', v); std::wstring ex(str, iter.base()); - assert(ex == L" CNY -1,234,567.89"); + assert(ex == w_curr_pad20_text + w_curr_text + L"-1,234,567.89"); assert(ios.width() == 0); } } Index: libcxx/test/std/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_string_en_US.pass.cpp =================================================================== --- libcxx/test/std/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_string_en_US.pass.cpp +++ libcxx/test/std/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_string_en_US.pass.cpp @@ -15,8 +15,6 @@ // REQUIRES: locale.en_US.UTF-8 -// XFAIL: LIBCXX-WINDOWS-FIXME - #include #include #include @@ -77,7 +75,11 @@ char str[100]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), false, ios, '*', v); std::string ex(str, iter.base()); +#ifdef _WIN32 + assert(ex == "(0.01)"); +#else assert(ex == "-0.01"); +#endif } { // positive std::string v = "123456789"; @@ -91,7 +93,11 @@ char str[100]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), false, ios, '*', v); std::string ex(str, iter.base()); +#ifdef _WIN32 + assert(ex == "(1,234,567.89)"); +#else assert(ex == "-1,234,567.89"); +#endif } { // zero, showbase std::string v = "0"; @@ -107,7 +113,11 @@ char str[100]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), false, ios, '*', v); std::string ex(str, iter.base()); +#ifdef _WIN32 + assert(ex == "($0.01)"); +#else assert(ex == "-$0.01"); +#endif } { // positive, showbase std::string v = "123456789"; @@ -123,7 +133,11 @@ char str[100]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), false, ios, '*', v); std::string ex(str, iter.base()); +#ifdef _WIN32 + assert(ex == "($1,234,567.89)"); +#else assert(ex == "-$1,234,567.89"); +#endif } { // negative, showbase, left std::string v = "-123456789"; @@ -133,7 +147,11 @@ char str[100]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), false, ios, ' ', v); std::string ex(str, iter.base()); +#ifdef _WIN32 + assert(ex == "($1,234,567.89) "); +#else assert(ex == "-$1,234,567.89 "); +#endif assert(ios.width() == 0); } { // negative, showbase, internal @@ -144,7 +162,11 @@ char str[100]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), false, ios, ' ', v); std::string ex(str, iter.base()); +#ifdef _WIN32 + assert(ex == "($ 1,234,567.89)"); +#else assert(ex == "-$ 1,234,567.89"); +#endif assert(ios.width() == 0); } { // negative, showbase, right @@ -155,7 +177,11 @@ char str[100]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), false, ios, ' ', v); std::string ex(str, iter.base()); +#ifdef _WIN32 + assert(ex == " ($1,234,567.89)"); +#else assert(ex == " -$1,234,567.89"); +#endif assert(ios.width() == 0); } @@ -174,7 +200,11 @@ char str[100]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), true, ios, '*', v); std::string ex(str, iter.base()); +#ifdef _WIN32 + assert(ex == "(0.01)"); +#else assert(ex == "-0.01"); +#endif } { // positive std::string v = "123456789"; @@ -188,7 +218,11 @@ char str[100]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), true, ios, '*', v); std::string ex(str, iter.base()); +#ifdef _WIN32 + assert(ex == "(1,234,567.89)"); +#else assert(ex == "-1,234,567.89"); +#endif } { // zero, showbase std::string v = "0"; @@ -196,7 +230,11 @@ char str[100]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), true, ios, '*', v); std::string ex(str, iter.base()); +#ifdef _WIN32 + assert(ex == "USD0.00"); +#else assert(ex == "USD 0.00"); +#endif } { // negative one, showbase std::string v = "-1"; @@ -204,7 +242,11 @@ char str[100]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), true, ios, '*', v); std::string ex(str, iter.base()); +#ifdef _WIN32 + assert(ex == "(USD0.01)"); +#else assert(ex == "-USD 0.01"); +#endif } { // positive, showbase std::string v = "123456789"; @@ -212,7 +254,11 @@ char str[100]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), true, ios, '*', v); std::string ex(str, iter.base()); +#ifdef _WIN32 + assert(ex == "USD1,234,567.89"); +#else assert(ex == "USD 1,234,567.89"); +#endif } { // negative, showbase std::string v = "-123456789"; @@ -220,7 +266,11 @@ char str[100]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), true, ios, '*', v); std::string ex(str, iter.base()); +#ifdef _WIN32 + assert(ex == "(USD1,234,567.89)"); +#else assert(ex == "-USD 1,234,567.89"); +#endif } { // negative, showbase, left std::string v = "-123456789"; @@ -230,7 +280,11 @@ char str[100]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), true, ios, ' ', v); std::string ex(str, iter.base()); +#ifdef _WIN32 + assert(ex == "(USD1,234,567.89) "); +#else assert(ex == "-USD 1,234,567.89 "); +#endif assert(ios.width() == 0); } { // negative, showbase, internal @@ -241,7 +295,11 @@ char str[100]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), true, ios, ' ', v); std::string ex(str, iter.base()); +#ifdef _WIN32 + assert(ex == "(USD 1,234,567.89)"); +#else assert(ex == "-USD 1,234,567.89"); +#endif assert(ios.width() == 0); } { // negative, showbase, right @@ -252,7 +310,11 @@ char str[100]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), true, ios, ' ', v); std::string ex(str, iter.base()); +#ifdef _WIN32 + assert(ex == " (USD1,234,567.89)"); +#else assert(ex == " -USD 1,234,567.89"); +#endif assert(ios.width() == 0); } } @@ -274,7 +336,11 @@ wchar_t str[100]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), false, ios, '*', v); std::wstring ex(str, iter.base()); +#ifdef _WIN32 + assert(ex == L"(0.01)"); +#else assert(ex == L"-0.01"); +#endif } { // positive std::wstring v = L"123456789"; @@ -288,7 +354,11 @@ wchar_t str[100]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), false, ios, '*', v); std::wstring ex(str, iter.base()); +#ifdef _WIN32 + assert(ex == L"(1,234,567.89)"); +#else assert(ex == L"-1,234,567.89"); +#endif } { // zero, showbase std::wstring v = L"0"; @@ -304,7 +374,11 @@ wchar_t str[100]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), false, ios, '*', v); std::wstring ex(str, iter.base()); +#ifdef _WIN32 + assert(ex == L"($0.01)"); +#else assert(ex == L"-$0.01"); +#endif } { // positive, showbase std::wstring v = L"123456789"; @@ -320,7 +394,11 @@ wchar_t str[100]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), false, ios, '*', v); std::wstring ex(str, iter.base()); +#ifdef _WIN32 + assert(ex == L"($1,234,567.89)"); +#else assert(ex == L"-$1,234,567.89"); +#endif } { // negative, showbase, left std::wstring v = L"-123456789"; @@ -330,7 +408,11 @@ wchar_t str[100]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), false, ios, ' ', v); std::wstring ex(str, iter.base()); +#ifdef _WIN32 + assert(ex == L"($1,234,567.89) "); +#else assert(ex == L"-$1,234,567.89 "); +#endif assert(ios.width() == 0); } { // negative, showbase, internal @@ -341,7 +423,11 @@ wchar_t str[100]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), false, ios, ' ', v); std::wstring ex(str, iter.base()); +#ifdef _WIN32 + assert(ex == L"($ 1,234,567.89)"); +#else assert(ex == L"-$ 1,234,567.89"); +#endif assert(ios.width() == 0); } { // negative, showbase, right @@ -352,7 +438,11 @@ wchar_t str[100]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), false, ios, ' ', v); std::wstring ex(str, iter.base()); +#ifdef _WIN32 + assert(ex == L" ($1,234,567.89)"); +#else assert(ex == L" -$1,234,567.89"); +#endif assert(ios.width() == 0); } @@ -371,7 +461,11 @@ wchar_t str[100]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), true, ios, '*', v); std::wstring ex(str, iter.base()); +#ifdef _WIN32 + assert(ex == L"(0.01)"); +#else assert(ex == L"-0.01"); +#endif } { // positive std::wstring v = L"123456789"; @@ -385,7 +479,11 @@ wchar_t str[100]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), true, ios, '*', v); std::wstring ex(str, iter.base()); +#ifdef _WIN32 + assert(ex == L"(1,234,567.89)"); +#else assert(ex == L"-1,234,567.89"); +#endif } { // zero, showbase std::wstring v = L"0"; @@ -393,7 +491,11 @@ wchar_t str[100]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), true, ios, '*', v); std::wstring ex(str, iter.base()); +#ifdef _WIN32 + assert(ex == L"USD0.00"); +#else assert(ex == L"USD 0.00"); +#endif } { // negative one, showbase std::wstring v = L"-1"; @@ -401,7 +503,11 @@ wchar_t str[100]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), true, ios, '*', v); std::wstring ex(str, iter.base()); +#ifdef _WIN32 + assert(ex == L"(USD0.01)"); +#else assert(ex == L"-USD 0.01"); +#endif } { // positive, showbase std::wstring v = L"123456789"; @@ -409,7 +515,11 @@ wchar_t str[100]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), true, ios, '*', v); std::wstring ex(str, iter.base()); +#ifdef _WIN32 + assert(ex == L"USD1,234,567.89"); +#else assert(ex == L"USD 1,234,567.89"); +#endif } { // negative, showbase std::wstring v = L"-123456789"; @@ -417,7 +527,11 @@ wchar_t str[100]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), true, ios, '*', v); std::wstring ex(str, iter.base()); +#ifdef _WIN32 + assert(ex == L"(USD1,234,567.89)"); +#else assert(ex == L"-USD 1,234,567.89"); +#endif } { // negative, showbase, left std::wstring v = L"-123456789"; @@ -427,7 +541,11 @@ wchar_t str[100]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), true, ios, ' ', v); std::wstring ex(str, iter.base()); +#ifdef _WIN32 + assert(ex == L"(USD1,234,567.89) "); +#else assert(ex == L"-USD 1,234,567.89 "); +#endif assert(ios.width() == 0); } { // negative, showbase, internal @@ -438,7 +556,11 @@ wchar_t str[100]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), true, ios, ' ', v); std::wstring ex(str, iter.base()); +#ifdef _WIN32 + assert(ex == L"(USD 1,234,567.89)"); +#else assert(ex == L"-USD 1,234,567.89"); +#endif assert(ios.width() == 0); } { // negative, showbase, right @@ -449,7 +571,11 @@ wchar_t str[100]; cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), true, ios, ' ', v); std::wstring ex(str, iter.base()); +#ifdef _WIN32 + assert(ex == L" (USD1,234,567.89)"); +#else assert(ex == L" -USD 1,234,567.89"); +#endif assert(ios.width() == 0); } } Index: libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/curr_symbol.pass.cpp =================================================================== --- libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/curr_symbol.pass.cpp +++ libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/curr_symbol.pass.cpp @@ -11,8 +11,6 @@ // NetBSD does not support LC_MONETARY at the moment // XFAIL: netbsd -// XFAIL: LIBCXX-WINDOWS-FIXME - // REQUIRES: locale.en_US.UTF-8 // REQUIRES: locale.fr_FR.UTF-8 // REQUIRES: locale.ru_RU.UTF-8 @@ -86,22 +84,32 @@ } #endif +#ifdef _WIN32 + std::string curr_space = ""; +#else + std::string curr_space = " "; +#endif { 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 "); + assert(f.curr_symbol() == "USD" + curr_space); } #ifndef TEST_HAS_NO_WIDE_CHARACTERS +#ifdef _WIN32 + std::wstring w_curr_space = L""; +#else + std::wstring w_curr_space = L" "; +#endif { 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 "); + assert(f.curr_symbol() == L"USD" + w_curr_space); } #endif @@ -134,6 +142,8 @@ assert(f.curr_symbol() == " \u20BD"); else assert(f.curr_symbol() == " \xD1\x80\xD1\x83\xD0\xB1"); +#elif defined(_WIN32) + assert(f.curr_symbol() == " \u20BD"); #else assert(f.curr_symbol() == " \xD1\x80\xD1\x83\xD0\xB1"); #endif @@ -150,6 +160,8 @@ assert(f.curr_symbol() == L" \u20BD"); else assert(f.curr_symbol() == L" \x440\x443\x431"); +#elif defined(_WIN32) + assert(f.curr_symbol() == L" \u20BD"); #else assert(f.curr_symbol() == L" \x440\x443\x431"); #endif @@ -163,20 +175,28 @@ { Fnf f(LOCALE_zh_CN_UTF_8, 1); +#ifdef _WIN32 + assert(f.curr_symbol() == "\xC2\xA5"); +#else assert(f.curr_symbol() == "\xEF\xBF\xA5"); +#endif } { Fnt f(LOCALE_zh_CN_UTF_8, 1); - assert(f.curr_symbol() == "CNY "); + assert(f.curr_symbol() == "CNY" + curr_space); } #ifndef TEST_HAS_NO_WIDE_CHARACTERS { Fwf f(LOCALE_zh_CN_UTF_8, 1); +#ifdef _WIN32 + assert(f.curr_symbol() == L"\x00A5"); +#else assert(f.curr_symbol() == L"\xFFE5"); +#endif } { Fwt f(LOCALE_zh_CN_UTF_8, 1); - assert(f.curr_symbol() == L"CNY "); + assert(f.curr_symbol() == L"CNY" + w_curr_space); } #endif // TEST_HAS_NO_WIDE_CHARACTERS Index: libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/neg_format.pass.cpp =================================================================== --- libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/neg_format.pass.cpp +++ libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/neg_format.pass.cpp @@ -6,13 +6,9 @@ // //===----------------------------------------------------------------------===// // -// XFAIL: darwin -// // NetBSD does not support LC_MONETARY at the moment // XFAIL: netbsd -// XFAIL: LIBCXX-WINDOWS-FIXME - // REQUIRES: locale.en_US.UTF-8 // REQUIRES: locale.fr_FR.UTF-8 // REQUIRES: locale.ru_RU.UTF-8 @@ -140,35 +136,63 @@ { Fnf f(LOCALE_fr_FR_UTF_8, 1); std::money_base::pattern p = f.neg_format(); +#ifdef __APPLE__ + assert(p.field[0] == std::money_base::value); + assert(p.field[1] == std::money_base::none); + assert(p.field[2] == std::money_base::symbol); + assert(p.field[3] == std::money_base::sign); +#else 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); +#endif } { Fnt f(LOCALE_fr_FR_UTF_8, 1); std::money_base::pattern p = f.neg_format(); +#ifdef __APPLE__ + assert(p.field[0] == std::money_base::value); + assert(p.field[1] == std::money_base::none); + assert(p.field[2] == std::money_base::symbol); + assert(p.field[3] == std::money_base::sign); +#else 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); +#endif } #ifndef TEST_HAS_NO_WIDE_CHARACTERS { Fwf f(LOCALE_fr_FR_UTF_8, 1); std::money_base::pattern p = f.neg_format(); +#ifdef __APPLE__ + assert(p.field[0] == std::money_base::value); + assert(p.field[1] == std::money_base::none); + assert(p.field[2] == std::money_base::symbol); + assert(p.field[3] == std::money_base::sign); +#else 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); +#endif } { Fwt f(LOCALE_fr_FR_UTF_8, 1); std::money_base::pattern p = f.neg_format(); +#ifdef __APPLE__ + assert(p.field[0] == std::money_base::value); + assert(p.field[1] == std::money_base::none); + assert(p.field[2] == std::money_base::symbol); + assert(p.field[3] == std::money_base::sign); +#else 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); +#endif } #endif // TEST_HAS_NO_WIDE_CHARACTERS @@ -218,10 +242,17 @@ { Fnt f(LOCALE_zh_CN_UTF_8, 1); std::money_base::pattern p = f.neg_format(); +#if defined(_WIN32) || defined(__APPLE__) + 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); +#else 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); +#endif } #ifndef TEST_HAS_NO_WIDE_CHARACTERS { @@ -235,10 +266,17 @@ { Fwt f(LOCALE_zh_CN_UTF_8, 1); std::money_base::pattern p = f.neg_format(); +#if defined(_WIN32) || defined(__APPLE__) + 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); +#else 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); +#endif } #endif // TEST_HAS_NO_WIDE_CHARACTERS Index: libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/negative_sign.pass.cpp =================================================================== --- libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/negative_sign.pass.cpp +++ libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/negative_sign.pass.cpp @@ -11,8 +11,6 @@ // REQUIRES: locale.ru_RU.UTF-8 // REQUIRES: locale.zh_CN.UTF-8 -// XFAIL: LIBCXX-WINDOWS-FIXME - // // class moneypunct_byname @@ -81,79 +79,90 @@ } #endif +#if defined(_WIN32) + std::string sign = "()"; + std::wstring wsign = L"()"; +#else + std::string sign = "-"; + std::wstring wsign = L"-"; +#endif { Fnf f(LOCALE_en_US_UTF_8, 1); - assert(f.negative_sign() == "-"); + assert(f.negative_sign() == sign); } { Fnt f(LOCALE_en_US_UTF_8, 1); - assert(f.negative_sign() == "-"); + assert(f.negative_sign() == sign); } #ifndef TEST_HAS_NO_WIDE_CHARACTERS { Fwf f(LOCALE_en_US_UTF_8, 1); - assert(f.negative_sign() == L"-"); + assert(f.negative_sign() == wsign); } { Fwt f(LOCALE_en_US_UTF_8, 1); - assert(f.negative_sign() == L"-"); + assert(f.negative_sign() == wsign); } #endif +#if defined(_WIN32) + sign = "-"; + wsign = L"-"; +#endif { Fnf f(LOCALE_fr_FR_UTF_8, 1); - assert(f.negative_sign() == "-"); + assert(f.negative_sign() == sign); } { Fnt f(LOCALE_fr_FR_UTF_8, 1); - assert(f.negative_sign() == "-"); + assert(f.negative_sign() == sign); } #ifndef TEST_HAS_NO_WIDE_CHARACTERS { Fwf f(LOCALE_fr_FR_UTF_8, 1); - assert(f.negative_sign() == L"-"); + assert(f.negative_sign() == wsign); } { Fwt f(LOCALE_fr_FR_UTF_8, 1); - assert(f.negative_sign() == L"-"); + assert(f.negative_sign() == wsign); } #endif { Fnf f(LOCALE_ru_RU_UTF_8, 1); - assert(f.negative_sign() == "-"); + assert(f.negative_sign() == sign); } { Fnt f(LOCALE_ru_RU_UTF_8, 1); - assert(f.negative_sign() == "-"); + assert(f.negative_sign() == sign); } #ifndef TEST_HAS_NO_WIDE_CHARACTERS { Fwf f(LOCALE_ru_RU_UTF_8, 1); - assert(f.negative_sign() == L"-"); + assert(f.negative_sign() == wsign); } { Fwt f(LOCALE_ru_RU_UTF_8, 1); - assert(f.negative_sign() == L"-"); + assert(f.negative_sign() == wsign); } #endif { Fnf f(LOCALE_zh_CN_UTF_8, 1); - assert(f.negative_sign() == "-"); + assert(f.negative_sign() == sign); } { Fnt f(LOCALE_zh_CN_UTF_8, 1); - assert(f.negative_sign() == "-"); + assert(f.negative_sign() == sign); } #ifndef TEST_HAS_NO_WIDE_CHARACTERS { Fwf f(LOCALE_zh_CN_UTF_8, 1); - assert(f.negative_sign() == L"-"); + assert(f.negative_sign() == wsign); } { Fwt f(LOCALE_zh_CN_UTF_8, 1); - assert(f.negative_sign() == L"-"); + assert(f.negative_sign() == wsign); } #endif Index: libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/pos_format.pass.cpp =================================================================== --- libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/pos_format.pass.cpp +++ libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/pos_format.pass.cpp @@ -6,13 +6,9 @@ // //===----------------------------------------------------------------------===// // -// XFAIL: darwin -// // NetBSD does not support LC_MONETARY at the moment // XFAIL: netbsd -// XFAIL: LIBCXX-WINDOWS-FIXME - // REQUIRES: locale.en_US.UTF-8 // REQUIRES: locale.fr_FR.UTF-8 // REQUIRES: locale.ru_RU.UTF-8 @@ -210,35 +206,63 @@ { Fnf f(LOCALE_zh_CN_UTF_8, 1); std::money_base::pattern p = f.pos_format(); +#ifdef __APPLE__ + 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); +#else 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); +#endif } { Fnt f(LOCALE_zh_CN_UTF_8, 1); std::money_base::pattern p = f.pos_format(); +#ifdef _WIN32 + 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); +#else 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); +#endif } #ifndef TEST_HAS_NO_WIDE_CHARACTERS { Fwf f(LOCALE_zh_CN_UTF_8, 1); std::money_base::pattern p = f.pos_format(); +#ifdef __APPLE__ + 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); +#else 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); +#endif } { Fwt f(LOCALE_zh_CN_UTF_8, 1); std::money_base::pattern p = f.pos_format(); +#ifdef _WIN32 + 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); +#else 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); +#endif } #endif // TEST_HAS_NO_WIDE_CHARACTERS Index: libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_double.hex.pass.cpp =================================================================== --- /dev/null +++ libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_double.hex.pass.cpp @@ -0,0 +1,3636 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// + +// class num_put + +// iter_type put(iter_type s, ios_base& iob, char_type fill, double v) const; + +// With the Microsoft UCRT, printf("%a", 0.0) produces "0x0.0000000000000p+0" +// while other C runtimes produce just "0x0p+0". +// https://developercommunity.visualstudio.com/t/Printf-formatting-of-float-as-hex-prints/1660844 +// XFAIL: msvc + +// XFAIL: LIBCXX-AIX-FIXME + +#include +#include +#include +#include +#include +#include "test_macros.h" +#include "test_iterators.h" + +typedef std::num_put > F; + +class my_facet + : public F +{ +public: + explicit my_facet(std::size_t refs = 0) + : F(refs) {} +}; + +class my_numpunct + : public std::numpunct +{ +public: + my_numpunct() : std::numpunct() {} + +protected: + virtual char_type do_decimal_point() const {return ';';} + virtual char_type do_thousands_sep() const {return '_';} + virtual std::string do_grouping() const {return std::string("\1\2\3");} +}; + +void test1() +{ + char str[200]; + 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); + std::hexfloat(ios); + // %a + { + ios.precision(0); + { + std::nouppercase(ios); + { + std::noshowpos(ios); + { + std::noshowpoint(ios); + { + ios.imbue(lc); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0x0p+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0x0p+0******************"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "******************-0x0p+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-******************0x0p+0"); + assert(ios.width() == 0); + } + } + ios.imbue(lg); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0x0p+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0x0p+0******************"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "******************-0x0p+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-******************0x0p+0"); + assert(ios.width() == 0); + } + } + } + std::showpoint(ios); + { + ios.imbue(lc); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0x0.p+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0x0.p+0*****************"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "*****************-0x0.p+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-*****************0x0.p+0"); + assert(ios.width() == 0); + } + } + ios.imbue(lg); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0x0;p+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0x0;p+0*****************"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "*****************-0x0;p+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-*****************0x0;p+0"); + assert(ios.width() == 0); + } + } + } + } + std::showpos(ios); + { + std::noshowpoint(ios); + { + ios.imbue(lc); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0x0p+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0x0p+0******************"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "******************-0x0p+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-******************0x0p+0"); + assert(ios.width() == 0); + } + } + ios.imbue(lg); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0x0p+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0x0p+0******************"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "******************-0x0p+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-******************0x0p+0"); + assert(ios.width() == 0); + } + } + } + std::showpoint(ios); + { + ios.imbue(lc); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0x0.p+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0x0.p+0*****************"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "*****************-0x0.p+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-*****************0x0.p+0"); + assert(ios.width() == 0); + } + } + ios.imbue(lg); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0x0;p+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0x0;p+0*****************"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "*****************-0x0;p+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-*****************0x0;p+0"); + assert(ios.width() == 0); + } + } + } + } + } + std::uppercase(ios); + { + std::noshowpos(ios); + { + std::noshowpoint(ios); + { + ios.imbue(lc); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0X0P+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0X0P+0******************"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "******************-0X0P+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-******************0X0P+0"); + assert(ios.width() == 0); + } + } + ios.imbue(lg); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0X0P+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0X0P+0******************"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "******************-0X0P+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-******************0X0P+0"); + assert(ios.width() == 0); + } + } + } + std::showpoint(ios); + { + ios.imbue(lc); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0X0.P+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0X0.P+0*****************"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "*****************-0X0.P+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-*****************0X0.P+0"); + assert(ios.width() == 0); + } + } + ios.imbue(lg); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0X0;P+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0X0;P+0*****************"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "*****************-0X0;P+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-*****************0X0;P+0"); + assert(ios.width() == 0); + } + } + } + } + std::showpos(ios); + { + std::noshowpoint(ios); + { + ios.imbue(lc); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0X0P+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0X0P+0******************"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "******************-0X0P+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-******************0X0P+0"); + assert(ios.width() == 0); + } + } + ios.imbue(lg); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0X0P+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0X0P+0******************"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "******************-0X0P+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-******************0X0P+0"); + assert(ios.width() == 0); + } + } + } + std::showpoint(ios); + { + ios.imbue(lc); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0X0.P+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0X0.P+0*****************"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "*****************-0X0.P+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-*****************0X0.P+0"); + assert(ios.width() == 0); + } + } + ios.imbue(lg); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0X0;P+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0X0;P+0*****************"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "*****************-0X0;P+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-*****************0X0;P+0"); + assert(ios.width() == 0); + } + } + } + } + } + } + ios.precision(1); + { + std::nouppercase(ios); + { + std::noshowpos(ios); + { + std::noshowpoint(ios); + { + ios.imbue(lc); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0x0p+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0x0p+0******************"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "******************-0x0p+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-******************0x0p+0"); + assert(ios.width() == 0); + } + } + ios.imbue(lg); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0x0p+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0x0p+0******************"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "******************-0x0p+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-******************0x0p+0"); + assert(ios.width() == 0); + } + } + } + std::showpoint(ios); + { + ios.imbue(lc); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0x0.p+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0x0.p+0*****************"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "*****************-0x0.p+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-*****************0x0.p+0"); + assert(ios.width() == 0); + } + } + ios.imbue(lg); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0x0;p+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0x0;p+0*****************"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "*****************-0x0;p+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-*****************0x0;p+0"); + assert(ios.width() == 0); + } + } + } + } + std::showpos(ios); + { + std::noshowpoint(ios); + { + ios.imbue(lc); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0x0p+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0x0p+0******************"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "******************-0x0p+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-******************0x0p+0"); + assert(ios.width() == 0); + } + } + ios.imbue(lg); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0x0p+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0x0p+0******************"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "******************-0x0p+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-******************0x0p+0"); + assert(ios.width() == 0); + } + } + } + std::showpoint(ios); + { + ios.imbue(lc); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0x0.p+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0x0.p+0*****************"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "*****************-0x0.p+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-*****************0x0.p+0"); + assert(ios.width() == 0); + } + } + ios.imbue(lg); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0x0;p+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0x0;p+0*****************"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "*****************-0x0;p+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-*****************0x0;p+0"); + assert(ios.width() == 0); + } + } + } + } + } + std::uppercase(ios); + { + std::noshowpos(ios); + { + std::noshowpoint(ios); + { + ios.imbue(lc); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0X0P+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0X0P+0******************"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "******************-0X0P+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-******************0X0P+0"); + assert(ios.width() == 0); + } + } + ios.imbue(lg); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0X0P+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0X0P+0******************"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "******************-0X0P+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-******************0X0P+0"); + assert(ios.width() == 0); + } + } + } + std::showpoint(ios); + { + ios.imbue(lc); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0X0.P+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0X0.P+0*****************"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "*****************-0X0.P+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-*****************0X0.P+0"); + assert(ios.width() == 0); + } + } + ios.imbue(lg); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0X0;P+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0X0;P+0*****************"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "*****************-0X0;P+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-*****************0X0;P+0"); + assert(ios.width() == 0); + } + } + } + } + std::showpos(ios); + { + std::noshowpoint(ios); + { + ios.imbue(lc); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0X0P+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0X0P+0******************"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "******************-0X0P+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-******************0X0P+0"); + assert(ios.width() == 0); + } + } + ios.imbue(lg); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0X0P+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0X0P+0******************"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "******************-0X0P+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-******************0X0P+0"); + assert(ios.width() == 0); + } + } + } + std::showpoint(ios); + { + ios.imbue(lc); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0X0.P+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0X0.P+0*****************"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "*****************-0X0.P+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-*****************0X0.P+0"); + assert(ios.width() == 0); + } + } + ios.imbue(lg); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0X0;P+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0X0;P+0*****************"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "*****************-0X0;P+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-*****************0X0;P+0"); + assert(ios.width() == 0); + } + } + } + } + } + } + ios.precision(6); + { + std::nouppercase(ios); + { + std::noshowpos(ios); + { + std::noshowpoint(ios); + { + ios.imbue(lc); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0x0p+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0x0p+0******************"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "******************-0x0p+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-******************0x0p+0"); + assert(ios.width() == 0); + } + } + ios.imbue(lg); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0x0p+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0x0p+0******************"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "******************-0x0p+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-******************0x0p+0"); + assert(ios.width() == 0); + } + } + } + std::showpoint(ios); + { + ios.imbue(lc); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0x0.p+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0x0.p+0*****************"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "*****************-0x0.p+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-*****************0x0.p+0"); + assert(ios.width() == 0); + } + } + ios.imbue(lg); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0x0;p+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0x0;p+0*****************"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "*****************-0x0;p+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-*****************0x0;p+0"); + assert(ios.width() == 0); + } + } + } + } + std::showpos(ios); + { + std::noshowpoint(ios); + { + ios.imbue(lc); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0x0p+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0x0p+0******************"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "******************-0x0p+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-******************0x0p+0"); + assert(ios.width() == 0); + } + } + ios.imbue(lg); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0x0p+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0x0p+0******************"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "******************-0x0p+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-******************0x0p+0"); + assert(ios.width() == 0); + } + } + } + std::showpoint(ios); + { + ios.imbue(lc); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0x0.p+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0x0.p+0*****************"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "*****************-0x0.p+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-*****************0x0.p+0"); + assert(ios.width() == 0); + } + } + ios.imbue(lg); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0x0;p+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0x0;p+0*****************"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "*****************-0x0;p+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-*****************0x0;p+0"); + assert(ios.width() == 0); + } + } + } + } + } + std::uppercase(ios); + { + std::noshowpos(ios); + { + std::noshowpoint(ios); + { + ios.imbue(lc); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0X0P+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0X0P+0******************"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "******************-0X0P+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-******************0X0P+0"); + assert(ios.width() == 0); + } + } + ios.imbue(lg); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0X0P+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0X0P+0******************"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "******************-0X0P+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-******************0X0P+0"); + assert(ios.width() == 0); + } + } + } + std::showpoint(ios); + { + ios.imbue(lc); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0X0.P+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0X0.P+0*****************"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "*****************-0X0.P+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-*****************0X0.P+0"); + assert(ios.width() == 0); + } + } + ios.imbue(lg); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0X0;P+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0X0;P+0*****************"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "*****************-0X0;P+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-*****************0X0;P+0"); + assert(ios.width() == 0); + } + } + } + } + std::showpos(ios); + { + std::noshowpoint(ios); + { + ios.imbue(lc); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0X0P+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0X0P+0******************"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "******************-0X0P+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-******************0X0P+0"); + assert(ios.width() == 0); + } + } + ios.imbue(lg); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0X0P+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0X0P+0******************"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "******************-0X0P+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-******************0X0P+0"); + assert(ios.width() == 0); + } + } + } + std::showpoint(ios); + { + ios.imbue(lc); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0X0.P+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0X0.P+0*****************"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "*****************-0X0.P+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-*****************0X0.P+0"); + assert(ios.width() == 0); + } + } + ios.imbue(lg); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0X0;P+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0X0;P+0*****************"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "*****************-0X0;P+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-*****************0X0;P+0"); + assert(ios.width() == 0); + } + } + } + } + } + } + ios.precision(16); + { + } + ios.precision(60); + { + } + } + } +} + +void test2() +{ + char str[200]; + 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); + std::hexfloat(ios); + // %a + { + ios.precision(0); + { + std::nouppercase(ios); + { + std::noshowpos(ios); + { + std::noshowpoint(ios); + { + ios.imbue(lc); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "0x1.26580b488p+30"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "0x1.26580b488p+30********"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "********0x1.26580b488p+30"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "0x********1.26580b488p+30"); + assert(ios.width() == 0); + } + } + ios.imbue(lg); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "0x1;26580b488p+30"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "0x1;26580b488p+30********"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "********0x1;26580b488p+30"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "0x********1;26580b488p+30"); + assert(ios.width() == 0); + } + } + } + std::showpoint(ios); + { + ios.imbue(lc); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "0x1.26580b488p+30"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "0x1.26580b488p+30********"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "********0x1.26580b488p+30"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "0x********1.26580b488p+30"); + assert(ios.width() == 0); + } + } + ios.imbue(lg); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "0x1;26580b488p+30"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "0x1;26580b488p+30********"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "********0x1;26580b488p+30"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "0x********1;26580b488p+30"); + assert(ios.width() == 0); + } + } + } + } + std::showpos(ios); + { + std::noshowpoint(ios); + { + ios.imbue(lc); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "+0x1.26580b488p+30"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "+0x1.26580b488p+30*******"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "*******+0x1.26580b488p+30"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "+*******0x1.26580b488p+30"); + assert(ios.width() == 0); + } + } + ios.imbue(lg); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "+0x1;26580b488p+30"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "+0x1;26580b488p+30*******"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "*******+0x1;26580b488p+30"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "+*******0x1;26580b488p+30"); + assert(ios.width() == 0); + } + } + } + std::showpoint(ios); + { + ios.imbue(lc); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "+0x1.26580b488p+30"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "+0x1.26580b488p+30*******"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "*******+0x1.26580b488p+30"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "+*******0x1.26580b488p+30"); + assert(ios.width() == 0); + } + } + ios.imbue(lg); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "+0x1;26580b488p+30"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "+0x1;26580b488p+30*******"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "*******+0x1;26580b488p+30"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "+*******0x1;26580b488p+30"); + assert(ios.width() == 0); + } + } + } + } + } + std::uppercase(ios); + { + std::noshowpos(ios); + { + std::noshowpoint(ios); + { + ios.imbue(lc); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "0X1.26580B488P+30"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "0X1.26580B488P+30********"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "********0X1.26580B488P+30"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "0X********1.26580B488P+30"); + assert(ios.width() == 0); + } + } + ios.imbue(lg); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "0X1;26580B488P+30"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "0X1;26580B488P+30********"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "********0X1;26580B488P+30"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "0X********1;26580B488P+30"); + assert(ios.width() == 0); + } + } + } + std::showpoint(ios); + { + ios.imbue(lc); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "0X1.26580B488P+30"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "0X1.26580B488P+30********"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "********0X1.26580B488P+30"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "0X********1.26580B488P+30"); + assert(ios.width() == 0); + } + } + ios.imbue(lg); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "0X1;26580B488P+30"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "0X1;26580B488P+30********"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "********0X1;26580B488P+30"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "0X********1;26580B488P+30"); + assert(ios.width() == 0); + } + } + } + } + std::showpos(ios); + { + std::noshowpoint(ios); + { + ios.imbue(lc); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "+0X1.26580B488P+30"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "+0X1.26580B488P+30*******"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "*******+0X1.26580B488P+30"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "+*******0X1.26580B488P+30"); + assert(ios.width() == 0); + } + } + ios.imbue(lg); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "+0X1;26580B488P+30"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "+0X1;26580B488P+30*******"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "*******+0X1;26580B488P+30"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "+*******0X1;26580B488P+30"); + assert(ios.width() == 0); + } + } + } + std::showpoint(ios); + { + ios.imbue(lc); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "+0X1.26580B488P+30"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "+0X1.26580B488P+30*******"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "*******+0X1.26580B488P+30"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "+*******0X1.26580B488P+30"); + assert(ios.width() == 0); + } + } + ios.imbue(lg); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "+0X1;26580B488P+30"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "+0X1;26580B488P+30*******"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "*******+0X1;26580B488P+30"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "+*******0X1;26580B488P+30"); + assert(ios.width() == 0); + } + } + } + } + } + } + ios.precision(1); + { + std::nouppercase(ios); + { + std::noshowpos(ios); + { + std::noshowpoint(ios); + { + ios.imbue(lc); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "0x1.26580b488p+30"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "0x1.26580b488p+30********"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "********0x1.26580b488p+30"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "0x********1.26580b488p+30"); + assert(ios.width() == 0); + } + } + ios.imbue(lg); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "0x1;26580b488p+30"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "0x1;26580b488p+30********"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "********0x1;26580b488p+30"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "0x********1;26580b488p+30"); + assert(ios.width() == 0); + } + } + } + std::showpoint(ios); + { + ios.imbue(lc); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "0x1.26580b488p+30"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "0x1.26580b488p+30********"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "********0x1.26580b488p+30"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "0x********1.26580b488p+30"); + assert(ios.width() == 0); + } + } + ios.imbue(lg); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "0x1;26580b488p+30"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "0x1;26580b488p+30********"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "********0x1;26580b488p+30"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "0x********1;26580b488p+30"); + assert(ios.width() == 0); + } + } + } + } + std::showpos(ios); + { + std::noshowpoint(ios); + { + ios.imbue(lc); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "+0x1.26580b488p+30"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "+0x1.26580b488p+30*******"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "*******+0x1.26580b488p+30"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "+*******0x1.26580b488p+30"); + assert(ios.width() == 0); + } + } + ios.imbue(lg); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "+0x1;26580b488p+30"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "+0x1;26580b488p+30*******"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "*******+0x1;26580b488p+30"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "+*******0x1;26580b488p+30"); + assert(ios.width() == 0); + } + } + } + std::showpoint(ios); + { + ios.imbue(lc); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "+0x1.26580b488p+30"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "+0x1.26580b488p+30*******"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "*******+0x1.26580b488p+30"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "+*******0x1.26580b488p+30"); + assert(ios.width() == 0); + } + } + ios.imbue(lg); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "+0x1;26580b488p+30"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "+0x1;26580b488p+30*******"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "*******+0x1;26580b488p+30"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "+*******0x1;26580b488p+30"); + assert(ios.width() == 0); + } + } + } + } + } + std::uppercase(ios); + { + std::noshowpos(ios); + { + std::noshowpoint(ios); + { + ios.imbue(lc); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "0X1.26580B488P+30"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "0X1.26580B488P+30********"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "********0X1.26580B488P+30"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "0X********1.26580B488P+30"); + assert(ios.width() == 0); + } + } + ios.imbue(lg); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "0X1;26580B488P+30"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "0X1;26580B488P+30********"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "********0X1;26580B488P+30"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "0X********1;26580B488P+30"); + assert(ios.width() == 0); + } + } + } + std::showpoint(ios); + { + ios.imbue(lc); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "0X1.26580B488P+30"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "0X1.26580B488P+30********"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "********0X1.26580B488P+30"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "0X********1.26580B488P+30"); + assert(ios.width() == 0); + } + } + ios.imbue(lg); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "0X1;26580B488P+30"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "0X1;26580B488P+30********"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "********0X1;26580B488P+30"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "0X********1;26580B488P+30"); + assert(ios.width() == 0); + } + } + } + } + std::showpos(ios); + { + std::noshowpoint(ios); + { + ios.imbue(lc); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "+0X1.26580B488P+30"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "+0X1.26580B488P+30*******"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "*******+0X1.26580B488P+30"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "+*******0X1.26580B488P+30"); + assert(ios.width() == 0); + } + } + ios.imbue(lg); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "+0X1;26580B488P+30"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "+0X1;26580B488P+30*******"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "*******+0X1;26580B488P+30"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "+*******0X1;26580B488P+30"); + assert(ios.width() == 0); + } + } + } + std::showpoint(ios); + { + ios.imbue(lc); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "+0X1.26580B488P+30"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "+0X1.26580B488P+30*******"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "*******+0X1.26580B488P+30"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "+*******0X1.26580B488P+30"); + assert(ios.width() == 0); + } + } + ios.imbue(lg); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "+0X1;26580B488P+30"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "+0X1;26580B488P+30*******"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "*******+0X1;26580B488P+30"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "+*******0X1;26580B488P+30"); + assert(ios.width() == 0); + } + } + } + } + } + } + ios.precision(6); + { + } + ios.precision(16); + { + } + ios.precision(60); + { + std::nouppercase(ios); + { + std::noshowpos(ios); + { + std::noshowpoint(ios); + { + ios.imbue(lc); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "0x1.26580b488p+30"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "0x1.26580b488p+30********"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "********0x1.26580b488p+30"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "0x********1.26580b488p+30"); + assert(ios.width() == 0); + } + } + ios.imbue(lg); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "0x1;26580b488p+30"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "0x1;26580b488p+30********"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "********0x1;26580b488p+30"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "0x********1;26580b488p+30"); + assert(ios.width() == 0); + } + } + } + std::showpoint(ios); + { + ios.imbue(lc); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "0x1.26580b488p+30"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "0x1.26580b488p+30********"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "********0x1.26580b488p+30"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "0x********1.26580b488p+30"); + assert(ios.width() == 0); + } + } + ios.imbue(lg); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "0x1;26580b488p+30"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "0x1;26580b488p+30********"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "********0x1;26580b488p+30"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "0x********1;26580b488p+30"); + assert(ios.width() == 0); + } + } + } + } + std::showpos(ios); + { + std::noshowpoint(ios); + { + ios.imbue(lc); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "+0x1.26580b488p+30"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "+0x1.26580b488p+30*******"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "*******+0x1.26580b488p+30"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "+*******0x1.26580b488p+30"); + assert(ios.width() == 0); + } + } + ios.imbue(lg); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "+0x1;26580b488p+30"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "+0x1;26580b488p+30*******"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "*******+0x1;26580b488p+30"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "+*******0x1;26580b488p+30"); + assert(ios.width() == 0); + } + } + } + std::showpoint(ios); + { + ios.imbue(lc); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "+0x1.26580b488p+30"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "+0x1.26580b488p+30*******"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "*******+0x1.26580b488p+30"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "+*******0x1.26580b488p+30"); + assert(ios.width() == 0); + } + } + ios.imbue(lg); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "+0x1;26580b488p+30"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "+0x1;26580b488p+30*******"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "*******+0x1;26580b488p+30"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "+*******0x1;26580b488p+30"); + assert(ios.width() == 0); + } + } + } + } + } + std::uppercase(ios); + { + std::noshowpos(ios); + { + std::noshowpoint(ios); + { + ios.imbue(lc); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "0X1.26580B488P+30"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "0X1.26580B488P+30********"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "********0X1.26580B488P+30"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "0X********1.26580B488P+30"); + assert(ios.width() == 0); + } + } + ios.imbue(lg); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "0X1;26580B488P+30"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "0X1;26580B488P+30********"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "********0X1;26580B488P+30"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "0X********1;26580B488P+30"); + assert(ios.width() == 0); + } + } + } + std::showpoint(ios); + { + ios.imbue(lc); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "0X1.26580B488P+30"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "0X1.26580B488P+30********"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "********0X1.26580B488P+30"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "0X********1.26580B488P+30"); + assert(ios.width() == 0); + } + } + ios.imbue(lg); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "0X1;26580B488P+30"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "0X1;26580B488P+30********"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "********0X1;26580B488P+30"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "0X********1;26580B488P+30"); + assert(ios.width() == 0); + } + } + } + } + std::showpos(ios); + { + std::noshowpoint(ios); + { + ios.imbue(lc); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "+0X1.26580B488P+30"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "+0X1.26580B488P+30*******"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "*******+0X1.26580B488P+30"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "+*******0X1.26580B488P+30"); + assert(ios.width() == 0); + } + } + ios.imbue(lg); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "+0X1;26580B488P+30"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "+0X1;26580B488P+30*******"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "*******+0X1;26580B488P+30"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "+*******0X1;26580B488P+30"); + assert(ios.width() == 0); + } + } + } + std::showpoint(ios); + { + ios.imbue(lc); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "+0X1.26580B488P+30"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "+0X1.26580B488P+30*******"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "*******+0X1.26580B488P+30"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "+*******0X1.26580B488P+30"); + assert(ios.width() == 0); + } + } + ios.imbue(lg); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "+0X1;26580B488P+30"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "+0X1;26580B488P+30*******"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "*******+0X1;26580B488P+30"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "+*******0X1;26580B488P+30"); + assert(ios.width() == 0); + } + } + } + } + } + } + } + } +} + +int main(int, char**) +{ + test1(); + test2(); + + return 0; +} Index: libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_double.pass.cpp =================================================================== --- libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_double.pass.cpp +++ libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_double.pass.cpp @@ -12,23 +12,7 @@ // iter_type put(iter_type s, ios_base& iob, char_type fill, double v) const; -// FIXME: The printf functions in Microsoft's CRT have a couple quirks in -// corner cases, failing this test: -// - With the Microsoft UCRT, printf("%#.*g", 0, 0.0) produces "0.0" while -// other C runtimes produce "0.". For other precisions than 0, Microsoft's -// consistently produce one digit more than others. In the MinGW test setups, -// the code is built with __USE_MINGW_ANSI_STDIO=1, which uses MinGW's own -// reimplementation of stdio functions, which doesn't have this issue. -// This bug requires excluding everything that runs with showpoint() enabled. -// https://developercommunity.visualstudio.com/t/printf-formatting-with-g-outputs-too/1660837 -// This issue is fixed in newer UCRT versions, since 10.0.19041.0. -// - With the Microsoft UCRT, printf("%a", 0.0) produces "0x0.0000000000000p+0" -// while other C runtimes produce just "0x0p+0". This requires omitting all -// tests of hex float formatting. -// https://developercommunity.visualstudio.com/t/Printf-formatting-of-float-as-hex-prints/1660844 -// XFAIL: msvc - -// XFAIL: LIBCXX-AIX-FIXME +// XFAIL: win32-broken-printf-g-precision #include #include @@ -14306,3584 +14290,6 @@ } } -void test7() -{ - char str[200]; - 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); - std::hexfloat(ios); - // %a - { - ios.precision(0); - { - std::nouppercase(ios); - { - std::noshowpos(ios); - { - std::noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0p+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0p+0******************"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************-0x0p+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-******************0x0p+0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0p+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0p+0******************"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************-0x0p+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-******************0x0p+0"); - assert(ios.width() == 0); - } - } - } - std::showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0.p+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0.p+0*****************"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************-0x0.p+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*****************0x0.p+0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0;p+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0;p+0*****************"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************-0x0;p+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*****************0x0;p+0"); - assert(ios.width() == 0); - } - } - } - } - std::showpos(ios); - { - std::noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0p+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0p+0******************"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************-0x0p+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-******************0x0p+0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0p+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0p+0******************"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************-0x0p+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-******************0x0p+0"); - assert(ios.width() == 0); - } - } - } - std::showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0.p+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0.p+0*****************"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************-0x0.p+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*****************0x0.p+0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0;p+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0;p+0*****************"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************-0x0;p+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*****************0x0;p+0"); - assert(ios.width() == 0); - } - } - } - } - } - std::uppercase(ios); - { - std::noshowpos(ios); - { - std::noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0P+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0P+0******************"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************-0X0P+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-******************0X0P+0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0P+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0P+0******************"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************-0X0P+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-******************0X0P+0"); - assert(ios.width() == 0); - } - } - } - std::showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0.P+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0.P+0*****************"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************-0X0.P+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*****************0X0.P+0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0;P+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0;P+0*****************"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************-0X0;P+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*****************0X0;P+0"); - assert(ios.width() == 0); - } - } - } - } - std::showpos(ios); - { - std::noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0P+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0P+0******************"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************-0X0P+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-******************0X0P+0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0P+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0P+0******************"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************-0X0P+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-******************0X0P+0"); - assert(ios.width() == 0); - } - } - } - std::showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0.P+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0.P+0*****************"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************-0X0.P+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*****************0X0.P+0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0;P+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0;P+0*****************"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************-0X0;P+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*****************0X0;P+0"); - assert(ios.width() == 0); - } - } - } - } - } - } - ios.precision(1); - { - std::nouppercase(ios); - { - std::noshowpos(ios); - { - std::noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0p+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0p+0******************"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************-0x0p+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-******************0x0p+0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0p+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0p+0******************"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************-0x0p+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-******************0x0p+0"); - assert(ios.width() == 0); - } - } - } - std::showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0.p+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0.p+0*****************"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************-0x0.p+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*****************0x0.p+0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0;p+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0;p+0*****************"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************-0x0;p+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*****************0x0;p+0"); - assert(ios.width() == 0); - } - } - } - } - std::showpos(ios); - { - std::noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0p+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0p+0******************"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************-0x0p+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-******************0x0p+0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0p+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0p+0******************"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************-0x0p+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-******************0x0p+0"); - assert(ios.width() == 0); - } - } - } - std::showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0.p+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0.p+0*****************"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************-0x0.p+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*****************0x0.p+0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0;p+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0;p+0*****************"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************-0x0;p+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*****************0x0;p+0"); - assert(ios.width() == 0); - } - } - } - } - } - std::uppercase(ios); - { - std::noshowpos(ios); - { - std::noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0P+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0P+0******************"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************-0X0P+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-******************0X0P+0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0P+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0P+0******************"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************-0X0P+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-******************0X0P+0"); - assert(ios.width() == 0); - } - } - } - std::showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0.P+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0.P+0*****************"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************-0X0.P+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*****************0X0.P+0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0;P+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0;P+0*****************"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************-0X0;P+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*****************0X0;P+0"); - assert(ios.width() == 0); - } - } - } - } - std::showpos(ios); - { - std::noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0P+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0P+0******************"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************-0X0P+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-******************0X0P+0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0P+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0P+0******************"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************-0X0P+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-******************0X0P+0"); - assert(ios.width() == 0); - } - } - } - std::showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0.P+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0.P+0*****************"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************-0X0.P+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*****************0X0.P+0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0;P+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0;P+0*****************"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************-0X0;P+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*****************0X0;P+0"); - assert(ios.width() == 0); - } - } - } - } - } - } - ios.precision(6); - { - std::nouppercase(ios); - { - std::noshowpos(ios); - { - std::noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0p+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0p+0******************"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************-0x0p+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-******************0x0p+0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0p+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0p+0******************"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************-0x0p+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-******************0x0p+0"); - assert(ios.width() == 0); - } - } - } - std::showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0.p+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0.p+0*****************"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************-0x0.p+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*****************0x0.p+0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0;p+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0;p+0*****************"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************-0x0;p+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*****************0x0;p+0"); - assert(ios.width() == 0); - } - } - } - } - std::showpos(ios); - { - std::noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0p+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0p+0******************"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************-0x0p+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-******************0x0p+0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0p+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0p+0******************"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************-0x0p+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-******************0x0p+0"); - assert(ios.width() == 0); - } - } - } - std::showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0.p+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0.p+0*****************"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************-0x0.p+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*****************0x0.p+0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0;p+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0;p+0*****************"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************-0x0;p+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*****************0x0;p+0"); - assert(ios.width() == 0); - } - } - } - } - } - std::uppercase(ios); - { - std::noshowpos(ios); - { - std::noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0P+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0P+0******************"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************-0X0P+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-******************0X0P+0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0P+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0P+0******************"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************-0X0P+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-******************0X0P+0"); - assert(ios.width() == 0); - } - } - } - std::showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0.P+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0.P+0*****************"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************-0X0.P+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*****************0X0.P+0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0;P+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0;P+0*****************"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************-0X0;P+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*****************0X0;P+0"); - assert(ios.width() == 0); - } - } - } - } - std::showpos(ios); - { - std::noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0P+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0P+0******************"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************-0X0P+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-******************0X0P+0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0P+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0P+0******************"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************-0X0P+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-******************0X0P+0"); - assert(ios.width() == 0); - } - } - } - std::showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0.P+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0.P+0*****************"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************-0X0.P+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*****************0X0.P+0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0;P+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0;P+0*****************"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************-0X0;P+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*****************0X0;P+0"); - assert(ios.width() == 0); - } - } - } - } - } - } - ios.precision(16); - { - } - ios.precision(60); - { - } - } - } -} - -void test8() -{ - char str[200]; - 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); - std::hexfloat(ios); - // %a - { - ios.precision(0); - { - std::nouppercase(ios); - { - std::noshowpos(ios); - { - std::noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x1.26580b488p+30"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x1.26580b488p+30********"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********0x1.26580b488p+30"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x********1.26580b488p+30"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x1;26580b488p+30"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x1;26580b488p+30********"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********0x1;26580b488p+30"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x********1;26580b488p+30"); - assert(ios.width() == 0); - } - } - } - std::showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x1.26580b488p+30"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x1.26580b488p+30********"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********0x1.26580b488p+30"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x********1.26580b488p+30"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x1;26580b488p+30"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x1;26580b488p+30********"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********0x1;26580b488p+30"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x********1;26580b488p+30"); - assert(ios.width() == 0); - } - } - } - } - std::showpos(ios); - { - std::noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0x1.26580b488p+30"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0x1.26580b488p+30*******"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******+0x1.26580b488p+30"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+*******0x1.26580b488p+30"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0x1;26580b488p+30"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0x1;26580b488p+30*******"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******+0x1;26580b488p+30"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+*******0x1;26580b488p+30"); - assert(ios.width() == 0); - } - } - } - std::showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0x1.26580b488p+30"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0x1.26580b488p+30*******"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******+0x1.26580b488p+30"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+*******0x1.26580b488p+30"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0x1;26580b488p+30"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0x1;26580b488p+30*******"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******+0x1;26580b488p+30"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+*******0x1;26580b488p+30"); - assert(ios.width() == 0); - } - } - } - } - } - std::uppercase(ios); - { - std::noshowpos(ios); - { - std::noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0X1.26580B488P+30"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0X1.26580B488P+30********"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********0X1.26580B488P+30"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0X********1.26580B488P+30"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0X1;26580B488P+30"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0X1;26580B488P+30********"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********0X1;26580B488P+30"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0X********1;26580B488P+30"); - assert(ios.width() == 0); - } - } - } - std::showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0X1.26580B488P+30"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0X1.26580B488P+30********"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********0X1.26580B488P+30"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0X********1.26580B488P+30"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0X1;26580B488P+30"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0X1;26580B488P+30********"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********0X1;26580B488P+30"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0X********1;26580B488P+30"); - assert(ios.width() == 0); - } - } - } - } - std::showpos(ios); - { - std::noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0X1.26580B488P+30"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0X1.26580B488P+30*******"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******+0X1.26580B488P+30"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+*******0X1.26580B488P+30"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0X1;26580B488P+30"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0X1;26580B488P+30*******"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******+0X1;26580B488P+30"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+*******0X1;26580B488P+30"); - assert(ios.width() == 0); - } - } - } - std::showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0X1.26580B488P+30"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0X1.26580B488P+30*******"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******+0X1.26580B488P+30"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+*******0X1.26580B488P+30"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0X1;26580B488P+30"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0X1;26580B488P+30*******"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******+0X1;26580B488P+30"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+*******0X1;26580B488P+30"); - assert(ios.width() == 0); - } - } - } - } - } - } - ios.precision(1); - { - std::nouppercase(ios); - { - std::noshowpos(ios); - { - std::noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x1.26580b488p+30"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x1.26580b488p+30********"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********0x1.26580b488p+30"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x********1.26580b488p+30"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x1;26580b488p+30"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x1;26580b488p+30********"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********0x1;26580b488p+30"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x********1;26580b488p+30"); - assert(ios.width() == 0); - } - } - } - std::showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x1.26580b488p+30"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x1.26580b488p+30********"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********0x1.26580b488p+30"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x********1.26580b488p+30"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x1;26580b488p+30"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x1;26580b488p+30********"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********0x1;26580b488p+30"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x********1;26580b488p+30"); - assert(ios.width() == 0); - } - } - } - } - std::showpos(ios); - { - std::noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0x1.26580b488p+30"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0x1.26580b488p+30*******"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******+0x1.26580b488p+30"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+*******0x1.26580b488p+30"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0x1;26580b488p+30"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0x1;26580b488p+30*******"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******+0x1;26580b488p+30"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+*******0x1;26580b488p+30"); - assert(ios.width() == 0); - } - } - } - std::showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0x1.26580b488p+30"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0x1.26580b488p+30*******"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******+0x1.26580b488p+30"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+*******0x1.26580b488p+30"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0x1;26580b488p+30"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0x1;26580b488p+30*******"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******+0x1;26580b488p+30"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+*******0x1;26580b488p+30"); - assert(ios.width() == 0); - } - } - } - } - } - std::uppercase(ios); - { - std::noshowpos(ios); - { - std::noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0X1.26580B488P+30"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0X1.26580B488P+30********"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********0X1.26580B488P+30"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0X********1.26580B488P+30"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0X1;26580B488P+30"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0X1;26580B488P+30********"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********0X1;26580B488P+30"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0X********1;26580B488P+30"); - assert(ios.width() == 0); - } - } - } - std::showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0X1.26580B488P+30"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0X1.26580B488P+30********"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********0X1.26580B488P+30"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0X********1.26580B488P+30"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0X1;26580B488P+30"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0X1;26580B488P+30********"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********0X1;26580B488P+30"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0X********1;26580B488P+30"); - assert(ios.width() == 0); - } - } - } - } - std::showpos(ios); - { - std::noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0X1.26580B488P+30"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0X1.26580B488P+30*******"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******+0X1.26580B488P+30"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+*******0X1.26580B488P+30"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0X1;26580B488P+30"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0X1;26580B488P+30*******"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******+0X1;26580B488P+30"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+*******0X1;26580B488P+30"); - assert(ios.width() == 0); - } - } - } - std::showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0X1.26580B488P+30"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0X1.26580B488P+30*******"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******+0X1.26580B488P+30"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+*******0X1.26580B488P+30"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0X1;26580B488P+30"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0X1;26580B488P+30*******"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******+0X1;26580B488P+30"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+*******0X1;26580B488P+30"); - assert(ios.width() == 0); - } - } - } - } - } - } - ios.precision(6); - { - } - ios.precision(16); - { - } - ios.precision(60); - { - std::nouppercase(ios); - { - std::noshowpos(ios); - { - std::noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x1.26580b488p+30"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x1.26580b488p+30********"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********0x1.26580b488p+30"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x********1.26580b488p+30"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x1;26580b488p+30"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x1;26580b488p+30********"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********0x1;26580b488p+30"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x********1;26580b488p+30"); - assert(ios.width() == 0); - } - } - } - std::showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x1.26580b488p+30"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x1.26580b488p+30********"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********0x1.26580b488p+30"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x********1.26580b488p+30"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x1;26580b488p+30"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x1;26580b488p+30********"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********0x1;26580b488p+30"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x********1;26580b488p+30"); - assert(ios.width() == 0); - } - } - } - } - std::showpos(ios); - { - std::noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0x1.26580b488p+30"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0x1.26580b488p+30*******"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******+0x1.26580b488p+30"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+*******0x1.26580b488p+30"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0x1;26580b488p+30"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0x1;26580b488p+30*******"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******+0x1;26580b488p+30"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+*******0x1;26580b488p+30"); - assert(ios.width() == 0); - } - } - } - std::showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0x1.26580b488p+30"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0x1.26580b488p+30*******"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******+0x1.26580b488p+30"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+*******0x1.26580b488p+30"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0x1;26580b488p+30"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0x1;26580b488p+30*******"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******+0x1;26580b488p+30"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+*******0x1;26580b488p+30"); - assert(ios.width() == 0); - } - } - } - } - } - std::uppercase(ios); - { - std::noshowpos(ios); - { - std::noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0X1.26580B488P+30"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0X1.26580B488P+30********"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********0X1.26580B488P+30"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0X********1.26580B488P+30"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0X1;26580B488P+30"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0X1;26580B488P+30********"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********0X1;26580B488P+30"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0X********1;26580B488P+30"); - assert(ios.width() == 0); - } - } - } - std::showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0X1.26580B488P+30"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0X1.26580B488P+30********"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********0X1.26580B488P+30"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0X********1.26580B488P+30"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0X1;26580B488P+30"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0X1;26580B488P+30********"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********0X1;26580B488P+30"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0X********1;26580B488P+30"); - assert(ios.width() == 0); - } - } - } - } - std::showpos(ios); - { - std::noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0X1.26580B488P+30"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0X1.26580B488P+30*******"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******+0X1.26580B488P+30"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+*******0X1.26580B488P+30"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0X1;26580B488P+30"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0X1;26580B488P+30*******"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******+0X1;26580B488P+30"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+*******0X1;26580B488P+30"); - assert(ios.width() == 0); - } - } - } - std::showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0X1.26580B488P+30"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0X1.26580B488P+30*******"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******+0X1.26580B488P+30"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+*******0X1.26580B488P+30"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0X1;26580B488P+30"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0X1;26580B488P+30*******"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*******+0X1;26580B488P+30"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+*******0X1;26580B488P+30"); - assert(ios.width() == 0); - } - } - } - } - } - } - } - } -} - int main(int, char**) { test1(); @@ -17892,8 +14298,6 @@ test4(); test5(); test6(); - test7(); - test8(); return 0; } Index: libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_long_double.hex.pass.cpp =================================================================== --- /dev/null +++ libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_long_double.hex.pass.cpp @@ -0,0 +1,3642 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// + +// class num_put + +// iter_type put(iter_type s, ios_base& iob, char_type fill, long double v) const; + +// With the Microsoft UCRT, printf("%a", 0.0) produces "0x0.0000000000000p+0" +// while other C runtimes produce just "0x0p+0". +// https://developercommunity.visualstudio.com/t/Printf-formatting-of-float-as-hex-prints/1660844 +// XFAIL: msvc + +// XFAIL: LIBCXX-AIX-FIXME + +#include +#include +#include +#include +#include +#include "test_macros.h" +#include "test_iterators.h" + +typedef std::num_put > F; + +class my_facet + : public F +{ +public: + explicit my_facet(std::size_t refs = 0) + : F(refs) {} +}; + +class my_numpunct + : public std::numpunct +{ +public: + my_numpunct() : std::numpunct() {} + +protected: + virtual char_type do_decimal_point() const {return ';';} + virtual char_type do_thousands_sep() const {return '_';} + virtual std::string do_grouping() const {return std::string("\1\2\3");} +}; + +void test1() +{ + char str[200]; + 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); + std::hexfloat(ios); + // %a + { + ios.precision(0); + { + std::nouppercase(ios); + { + std::noshowpos(ios); + { + std::noshowpoint(ios); + { + ios.imbue(lc); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0x0p+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0x0p+0******************"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "******************-0x0p+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-******************0x0p+0"); + assert(ios.width() == 0); + } + } + ios.imbue(lg); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0x0p+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0x0p+0******************"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "******************-0x0p+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-******************0x0p+0"); + assert(ios.width() == 0); + } + } + } + std::showpoint(ios); + { + ios.imbue(lc); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0x0.p+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0x0.p+0*****************"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "*****************-0x0.p+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-*****************0x0.p+0"); + assert(ios.width() == 0); + } + } + ios.imbue(lg); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0x0;p+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0x0;p+0*****************"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "*****************-0x0;p+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-*****************0x0;p+0"); + assert(ios.width() == 0); + } + } + } + } + std::showpos(ios); + { + std::noshowpoint(ios); + { + ios.imbue(lc); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0x0p+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0x0p+0******************"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "******************-0x0p+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-******************0x0p+0"); + assert(ios.width() == 0); + } + } + ios.imbue(lg); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0x0p+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0x0p+0******************"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "******************-0x0p+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-******************0x0p+0"); + assert(ios.width() == 0); + } + } + } + std::showpoint(ios); + { + ios.imbue(lc); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0x0.p+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0x0.p+0*****************"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "*****************-0x0.p+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-*****************0x0.p+0"); + assert(ios.width() == 0); + } + } + ios.imbue(lg); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0x0;p+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0x0;p+0*****************"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "*****************-0x0;p+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-*****************0x0;p+0"); + assert(ios.width() == 0); + } + } + } + } + } + std::uppercase(ios); + { + std::noshowpos(ios); + { + std::noshowpoint(ios); + { + ios.imbue(lc); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0X0P+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0X0P+0******************"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "******************-0X0P+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-******************0X0P+0"); + assert(ios.width() == 0); + } + } + ios.imbue(lg); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0X0P+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0X0P+0******************"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "******************-0X0P+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-******************0X0P+0"); + assert(ios.width() == 0); + } + } + } + std::showpoint(ios); + { + ios.imbue(lc); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0X0.P+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0X0.P+0*****************"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "*****************-0X0.P+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-*****************0X0.P+0"); + assert(ios.width() == 0); + } + } + ios.imbue(lg); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0X0;P+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0X0;P+0*****************"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "*****************-0X0;P+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-*****************0X0;P+0"); + assert(ios.width() == 0); + } + } + } + } + std::showpos(ios); + { + std::noshowpoint(ios); + { + ios.imbue(lc); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0X0P+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0X0P+0******************"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "******************-0X0P+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-******************0X0P+0"); + assert(ios.width() == 0); + } + } + ios.imbue(lg); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0X0P+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0X0P+0******************"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "******************-0X0P+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-******************0X0P+0"); + assert(ios.width() == 0); + } + } + } + std::showpoint(ios); + { + ios.imbue(lc); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0X0.P+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0X0.P+0*****************"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "*****************-0X0.P+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-*****************0X0.P+0"); + assert(ios.width() == 0); + } + } + ios.imbue(lg); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0X0;P+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0X0;P+0*****************"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "*****************-0X0;P+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-*****************0X0;P+0"); + assert(ios.width() == 0); + } + } + } + } + } + } + ios.precision(1); + { + std::nouppercase(ios); + { + std::noshowpos(ios); + { + std::noshowpoint(ios); + { + ios.imbue(lc); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0x0p+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0x0p+0******************"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "******************-0x0p+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-******************0x0p+0"); + assert(ios.width() == 0); + } + } + ios.imbue(lg); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0x0p+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0x0p+0******************"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "******************-0x0p+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-******************0x0p+0"); + assert(ios.width() == 0); + } + } + } + std::showpoint(ios); + { + ios.imbue(lc); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0x0.p+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0x0.p+0*****************"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "*****************-0x0.p+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-*****************0x0.p+0"); + assert(ios.width() == 0); + } + } + ios.imbue(lg); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0x0;p+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0x0;p+0*****************"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "*****************-0x0;p+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-*****************0x0;p+0"); + assert(ios.width() == 0); + } + } + } + } + std::showpos(ios); + { + std::noshowpoint(ios); + { + ios.imbue(lc); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0x0p+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0x0p+0******************"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "******************-0x0p+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-******************0x0p+0"); + assert(ios.width() == 0); + } + } + ios.imbue(lg); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0x0p+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0x0p+0******************"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "******************-0x0p+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-******************0x0p+0"); + assert(ios.width() == 0); + } + } + } + std::showpoint(ios); + { + ios.imbue(lc); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0x0.p+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0x0.p+0*****************"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "*****************-0x0.p+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-*****************0x0.p+0"); + assert(ios.width() == 0); + } + } + ios.imbue(lg); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0x0;p+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0x0;p+0*****************"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "*****************-0x0;p+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-*****************0x0;p+0"); + assert(ios.width() == 0); + } + } + } + } + } + std::uppercase(ios); + { + std::noshowpos(ios); + { + std::noshowpoint(ios); + { + ios.imbue(lc); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0X0P+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0X0P+0******************"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "******************-0X0P+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-******************0X0P+0"); + assert(ios.width() == 0); + } + } + ios.imbue(lg); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0X0P+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0X0P+0******************"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "******************-0X0P+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-******************0X0P+0"); + assert(ios.width() == 0); + } + } + } + std::showpoint(ios); + { + ios.imbue(lc); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0X0.P+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0X0.P+0*****************"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "*****************-0X0.P+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-*****************0X0.P+0"); + assert(ios.width() == 0); + } + } + ios.imbue(lg); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0X0;P+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0X0;P+0*****************"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "*****************-0X0;P+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-*****************0X0;P+0"); + assert(ios.width() == 0); + } + } + } + } + std::showpos(ios); + { + std::noshowpoint(ios); + { + ios.imbue(lc); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0X0P+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0X0P+0******************"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "******************-0X0P+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-******************0X0P+0"); + assert(ios.width() == 0); + } + } + ios.imbue(lg); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0X0P+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0X0P+0******************"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "******************-0X0P+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-******************0X0P+0"); + assert(ios.width() == 0); + } + } + } + std::showpoint(ios); + { + ios.imbue(lc); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0X0.P+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0X0.P+0*****************"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "*****************-0X0.P+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-*****************0X0.P+0"); + assert(ios.width() == 0); + } + } + ios.imbue(lg); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0X0;P+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0X0;P+0*****************"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "*****************-0X0;P+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-*****************0X0;P+0"); + assert(ios.width() == 0); + } + } + } + } + } + } + ios.precision(6); + { + std::nouppercase(ios); + { + std::noshowpos(ios); + { + std::noshowpoint(ios); + { + ios.imbue(lc); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0x0p+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0x0p+0******************"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "******************-0x0p+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-******************0x0p+0"); + assert(ios.width() == 0); + } + } + ios.imbue(lg); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0x0p+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0x0p+0******************"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "******************-0x0p+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-******************0x0p+0"); + assert(ios.width() == 0); + } + } + } + std::showpoint(ios); + { + ios.imbue(lc); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0x0.p+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0x0.p+0*****************"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "*****************-0x0.p+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-*****************0x0.p+0"); + assert(ios.width() == 0); + } + } + ios.imbue(lg); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0x0;p+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0x0;p+0*****************"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "*****************-0x0;p+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-*****************0x0;p+0"); + assert(ios.width() == 0); + } + } + } + } + std::showpos(ios); + { + std::noshowpoint(ios); + { + ios.imbue(lc); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0x0p+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0x0p+0******************"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "******************-0x0p+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-******************0x0p+0"); + assert(ios.width() == 0); + } + } + ios.imbue(lg); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0x0p+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0x0p+0******************"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "******************-0x0p+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-******************0x0p+0"); + assert(ios.width() == 0); + } + } + } + std::showpoint(ios); + { + ios.imbue(lc); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0x0.p+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0x0.p+0*****************"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "*****************-0x0.p+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-*****************0x0.p+0"); + assert(ios.width() == 0); + } + } + ios.imbue(lg); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0x0;p+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0x0;p+0*****************"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "*****************-0x0;p+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-*****************0x0;p+0"); + assert(ios.width() == 0); + } + } + } + } + } + std::uppercase(ios); + { + std::noshowpos(ios); + { + std::noshowpoint(ios); + { + ios.imbue(lc); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0X0P+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0X0P+0******************"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "******************-0X0P+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-******************0X0P+0"); + assert(ios.width() == 0); + } + } + ios.imbue(lg); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0X0P+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0X0P+0******************"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "******************-0X0P+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-******************0X0P+0"); + assert(ios.width() == 0); + } + } + } + std::showpoint(ios); + { + ios.imbue(lc); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0X0.P+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0X0.P+0*****************"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "*****************-0X0.P+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-*****************0X0.P+0"); + assert(ios.width() == 0); + } + } + ios.imbue(lg); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0X0;P+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0X0;P+0*****************"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "*****************-0X0;P+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-*****************0X0;P+0"); + assert(ios.width() == 0); + } + } + } + } + std::showpos(ios); + { + std::noshowpoint(ios); + { + ios.imbue(lc); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0X0P+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0X0P+0******************"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "******************-0X0P+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-******************0X0P+0"); + assert(ios.width() == 0); + } + } + ios.imbue(lg); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0X0P+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0X0P+0******************"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "******************-0X0P+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-******************0X0P+0"); + assert(ios.width() == 0); + } + } + } + std::showpoint(ios); + { + ios.imbue(lc); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0X0.P+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0X0.P+0*****************"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "*****************-0X0.P+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-*****************0X0.P+0"); + assert(ios.width() == 0); + } + } + ios.imbue(lg); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0X0;P+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-0X0;P+0*****************"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "*****************-0X0;P+0"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "-*****************0X0;P+0"); + assert(ios.width() == 0); + } + } + } + } + } + } + ios.precision(16); + { + } + ios.precision(60); + { + } + } + } +} + +void test2() +{ + std::locale lc = std::locale::classic(); + std::locale lg(lc, new my_numpunct); +#if (defined(__APPLE__) || defined(TEST_HAS_GLIBC) || defined(__MINGW32__)) && defined(__x86_64__) +// This test is failing on FreeBSD, possibly due to different representations +// of the floating point numbers. +// This test is failing in MSVC environments, where long double is equal to regular +// double, and instead of "0x9.32c05a44p+27", this prints "0x1.26580b4880000p+30". + const my_facet f(1); + char str[200]; + { + long double v = 1234567890.125; + std::ios ios(0); + std::hexfloat(ios); + // %a + { + ios.precision(0); + { + std::nouppercase(ios); + { + std::noshowpos(ios); + { + std::noshowpoint(ios); + { + ios.width(0); + ios.imbue(lc); + { + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "0x9.32c05a44p+27"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "0x9.32c05a44p+27*********"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "*********0x9.32c05a44p+27"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "0x*********9.32c05a44p+27"); + assert(ios.width() == 0); + } + } + ios.imbue(lg); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "0x9;32c05a44p+27"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "0x9;32c05a44p+27*********"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "*********0x9;32c05a44p+27"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "0x*********9;32c05a44p+27"); + assert(ios.width() == 0); + } + } + } + std::showpoint(ios); + { + ios.imbue(lc); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "0x9.32c05a44p+27"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "0x9.32c05a44p+27*********"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "*********0x9.32c05a44p+27"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "0x*********9.32c05a44p+27"); + assert(ios.width() == 0); + } + } + ios.imbue(lg); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "0x9;32c05a44p+27"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "0x9;32c05a44p+27*********"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "*********0x9;32c05a44p+27"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "0x*********9;32c05a44p+27"); + assert(ios.width() == 0); + } + } + } + } + std::showpos(ios); + { + std::noshowpoint(ios); + { + ios.imbue(lc); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "+0x9.32c05a44p+27"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "+0x9.32c05a44p+27********"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "********+0x9.32c05a44p+27"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "+********0x9.32c05a44p+27"); + assert(ios.width() == 0); + } + } + ios.imbue(lg); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "+0x9;32c05a44p+27"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "+0x9;32c05a44p+27********"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "********+0x9;32c05a44p+27"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "+********0x9;32c05a44p+27"); + assert(ios.width() == 0); + } + } + } + std::showpoint(ios); + { + ios.imbue(lc); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "+0x9.32c05a44p+27"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "+0x9.32c05a44p+27********"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "********+0x9.32c05a44p+27"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "+********0x9.32c05a44p+27"); + assert(ios.width() == 0); + } + } + ios.imbue(lg); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "+0x9;32c05a44p+27"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "+0x9;32c05a44p+27********"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "********+0x9;32c05a44p+27"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "+********0x9;32c05a44p+27"); + assert(ios.width() == 0); + } + } + } + } + } + std::uppercase(ios); + { + std::noshowpos(ios); + { + std::noshowpoint(ios); + { + ios.imbue(lc); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "0X9.32C05A44P+27"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "0X9.32C05A44P+27*********"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "*********0X9.32C05A44P+27"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "0X*********9.32C05A44P+27"); + assert(ios.width() == 0); + } + } + ios.imbue(lg); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "0X9;32C05A44P+27"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "0X9;32C05A44P+27*********"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "*********0X9;32C05A44P+27"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "0X*********9;32C05A44P+27"); + assert(ios.width() == 0); + } + } + } + std::showpoint(ios); + { + ios.imbue(lc); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "0X9.32C05A44P+27"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "0X9.32C05A44P+27*********"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "*********0X9.32C05A44P+27"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "0X*********9.32C05A44P+27"); + assert(ios.width() == 0); + } + } + ios.imbue(lg); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "0X9;32C05A44P+27"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "0X9;32C05A44P+27*********"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "*********0X9;32C05A44P+27"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "0X*********9;32C05A44P+27"); + assert(ios.width() == 0); + } + } + } + } + std::showpos(ios); + { + std::noshowpoint(ios); + { + ios.imbue(lc); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "+0X9.32C05A44P+27"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "+0X9.32C05A44P+27********"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "********+0X9.32C05A44P+27"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "+********0X9.32C05A44P+27"); + assert(ios.width() == 0); + } + } + ios.imbue(lg); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "+0X9;32C05A44P+27"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "+0X9;32C05A44P+27********"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "********+0X9;32C05A44P+27"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "+********0X9;32C05A44P+27"); + assert(ios.width() == 0); + } + } + } + std::showpoint(ios); + { + ios.imbue(lc); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "+0X9.32C05A44P+27"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "+0X9.32C05A44P+27********"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "********+0X9.32C05A44P+27"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "+********0X9.32C05A44P+27"); + assert(ios.width() == 0); + } + } + ios.imbue(lg); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "+0X9;32C05A44P+27"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "+0X9;32C05A44P+27********"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "********+0X9;32C05A44P+27"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "+********0X9;32C05A44P+27"); + assert(ios.width() == 0); + } + } + } + } + } + } + ios.precision(1); + { + std::nouppercase(ios); + { + std::noshowpos(ios); + { + std::noshowpoint(ios); + { + ios.imbue(lc); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "0x9.32c05a44p+27"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "0x9.32c05a44p+27*********"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "*********0x9.32c05a44p+27"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "0x*********9.32c05a44p+27"); + assert(ios.width() == 0); + } + } + ios.imbue(lg); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "0x9;32c05a44p+27"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "0x9;32c05a44p+27*********"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "*********0x9;32c05a44p+27"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "0x*********9;32c05a44p+27"); + assert(ios.width() == 0); + } + } + } + std::showpoint(ios); + { + ios.imbue(lc); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "0x9.32c05a44p+27"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "0x9.32c05a44p+27*********"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "*********0x9.32c05a44p+27"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "0x*********9.32c05a44p+27"); + assert(ios.width() == 0); + } + } + ios.imbue(lg); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "0x9;32c05a44p+27"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "0x9;32c05a44p+27*********"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "*********0x9;32c05a44p+27"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "0x*********9;32c05a44p+27"); + assert(ios.width() == 0); + } + } + } + } + std::showpos(ios); + { + std::noshowpoint(ios); + { + ios.imbue(lc); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "+0x9.32c05a44p+27"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "+0x9.32c05a44p+27********"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "********+0x9.32c05a44p+27"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "+********0x9.32c05a44p+27"); + assert(ios.width() == 0); + } + } + ios.imbue(lg); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "+0x9;32c05a44p+27"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "+0x9;32c05a44p+27********"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "********+0x9;32c05a44p+27"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "+********0x9;32c05a44p+27"); + assert(ios.width() == 0); + } + } + } + std::showpoint(ios); + { + ios.imbue(lc); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "+0x9.32c05a44p+27"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "+0x9.32c05a44p+27********"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "********+0x9.32c05a44p+27"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "+********0x9.32c05a44p+27"); + assert(ios.width() == 0); + } + } + ios.imbue(lg); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "+0x9;32c05a44p+27"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "+0x9;32c05a44p+27********"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "********+0x9;32c05a44p+27"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "+********0x9;32c05a44p+27"); + assert(ios.width() == 0); + } + } + } + } + } + std::uppercase(ios); + { + std::noshowpos(ios); + { + std::noshowpoint(ios); + { + ios.imbue(lc); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "0X9.32C05A44P+27"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "0X9.32C05A44P+27*********"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "*********0X9.32C05A44P+27"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "0X*********9.32C05A44P+27"); + assert(ios.width() == 0); + } + } + ios.imbue(lg); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "0X9;32C05A44P+27"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "0X9;32C05A44P+27*********"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "*********0X9;32C05A44P+27"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "0X*********9;32C05A44P+27"); + assert(ios.width() == 0); + } + } + } + std::showpoint(ios); + { + ios.imbue(lc); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "0X9.32C05A44P+27"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "0X9.32C05A44P+27*********"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "*********0X9.32C05A44P+27"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "0X*********9.32C05A44P+27"); + assert(ios.width() == 0); + } + } + ios.imbue(lg); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "0X9;32C05A44P+27"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "0X9;32C05A44P+27*********"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "*********0X9;32C05A44P+27"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "0X*********9;32C05A44P+27"); + assert(ios.width() == 0); + } + } + } + } + std::showpos(ios); + { + std::noshowpoint(ios); + { + ios.imbue(lc); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "+0X9.32C05A44P+27"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "+0X9.32C05A44P+27********"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "********+0X9.32C05A44P+27"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "+********0X9.32C05A44P+27"); + assert(ios.width() == 0); + } + } + ios.imbue(lg); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "+0X9;32C05A44P+27"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "+0X9;32C05A44P+27********"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "********+0X9;32C05A44P+27"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "+********0X9;32C05A44P+27"); + assert(ios.width() == 0); + } + } + } + std::showpoint(ios); + { + ios.imbue(lc); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "+0X9.32C05A44P+27"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "+0X9.32C05A44P+27********"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "********+0X9.32C05A44P+27"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "+********0X9.32C05A44P+27"); + assert(ios.width() == 0); + } + } + ios.imbue(lg); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "+0X9;32C05A44P+27"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "+0X9;32C05A44P+27********"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "********+0X9;32C05A44P+27"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "+********0X9;32C05A44P+27"); + assert(ios.width() == 0); + } + } + } + } + } + } + ios.precision(6); + { + } + ios.precision(16); + { + } + ios.precision(60); + { + std::nouppercase(ios); + { + std::noshowpos(ios); + { + std::noshowpoint(ios); + { + ios.imbue(lc); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "0x9.32c05a44p+27"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "0x9.32c05a44p+27*********"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "*********0x9.32c05a44p+27"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "0x*********9.32c05a44p+27"); + assert(ios.width() == 0); + } + } + ios.imbue(lg); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "0x9;32c05a44p+27"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "0x9;32c05a44p+27*********"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "*********0x9;32c05a44p+27"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "0x*********9;32c05a44p+27"); + assert(ios.width() == 0); + } + } + } + std::showpoint(ios); + { + ios.imbue(lc); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "0x9.32c05a44p+27"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "0x9.32c05a44p+27*********"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "*********0x9.32c05a44p+27"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "0x*********9.32c05a44p+27"); + assert(ios.width() == 0); + } + } + ios.imbue(lg); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "0x9;32c05a44p+27"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "0x9;32c05a44p+27*********"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "*********0x9;32c05a44p+27"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "0x*********9;32c05a44p+27"); + assert(ios.width() == 0); + } + } + } + } + std::showpos(ios); + { + std::noshowpoint(ios); + { + ios.imbue(lc); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "+0x9.32c05a44p+27"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "+0x9.32c05a44p+27********"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "********+0x9.32c05a44p+27"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "+********0x9.32c05a44p+27"); + assert(ios.width() == 0); + } + } + ios.imbue(lg); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "+0x9;32c05a44p+27"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "+0x9;32c05a44p+27********"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "********+0x9;32c05a44p+27"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "+********0x9;32c05a44p+27"); + assert(ios.width() == 0); + } + } + } + std::showpoint(ios); + { + ios.imbue(lc); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "+0x9.32c05a44p+27"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "+0x9.32c05a44p+27********"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "********+0x9.32c05a44p+27"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "+********0x9.32c05a44p+27"); + assert(ios.width() == 0); + } + } + ios.imbue(lg); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "+0x9;32c05a44p+27"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "+0x9;32c05a44p+27********"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "********+0x9;32c05a44p+27"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "+********0x9;32c05a44p+27"); + assert(ios.width() == 0); + } + } + } + } + } + std::uppercase(ios); + { + std::noshowpos(ios); + { + std::noshowpoint(ios); + { + ios.imbue(lc); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "0X9.32C05A44P+27"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "0X9.32C05A44P+27*********"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "*********0X9.32C05A44P+27"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "0X*********9.32C05A44P+27"); + assert(ios.width() == 0); + } + } + ios.imbue(lg); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "0X9;32C05A44P+27"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "0X9;32C05A44P+27*********"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "*********0X9;32C05A44P+27"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "0X*********9;32C05A44P+27"); + assert(ios.width() == 0); + } + } + } + std::showpoint(ios); + { + ios.imbue(lc); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "0X9.32C05A44P+27"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "0X9.32C05A44P+27*********"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "*********0X9.32C05A44P+27"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "0X*********9.32C05A44P+27"); + assert(ios.width() == 0); + } + } + ios.imbue(lg); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "0X9;32C05A44P+27"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "0X9;32C05A44P+27*********"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "*********0X9;32C05A44P+27"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "0X*********9;32C05A44P+27"); + assert(ios.width() == 0); + } + } + } + } + std::showpos(ios); + { + std::noshowpoint(ios); + { + ios.imbue(lc); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "+0X9.32C05A44P+27"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "+0X9.32C05A44P+27********"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "********+0X9.32C05A44P+27"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "+********0X9.32C05A44P+27"); + assert(ios.width() == 0); + } + } + ios.imbue(lg); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "+0X9;32C05A44P+27"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "+0X9;32C05A44P+27********"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "********+0X9;32C05A44P+27"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "+********0X9;32C05A44P+27"); + assert(ios.width() == 0); + } + } + } + std::showpoint(ios); + { + ios.imbue(lc); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "+0X9.32C05A44P+27"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "+0X9.32C05A44P+27********"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "********+0X9.32C05A44P+27"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "+********0X9.32C05A44P+27"); + assert(ios.width() == 0); + } + } + ios.imbue(lg); + { + ios.width(0); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "+0X9;32C05A44P+27"); + assert(ios.width() == 0); + } + ios.width(25); + std::left(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "+0X9;32C05A44P+27********"); + assert(ios.width() == 0); + } + ios.width(25); + std::right(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "********+0X9;32C05A44P+27"); + assert(ios.width() == 0); + } + ios.width(25); + std::internal(ios); + { + cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); + std::string ex(str, iter.base()); + assert(ex == "+********0X9;32C05A44P+27"); + assert(ios.width() == 0); + } + } + } + } + } + } + } + } +#endif +} + +int main(int, char**) +{ + test1(); + test2(); + + return 0; +} Index: libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_long_double.pass.cpp =================================================================== --- libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_long_double.pass.cpp +++ libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_long_double.pass.cpp @@ -12,22 +12,7 @@ // iter_type put(iter_type s, ios_base& iob, char_type fill, long double v) const; -// FIXME: The printf functions in Microsoft's CRT have a couple quirks in -// corner cases, failing this test: -// - With the Microsoft UCRT, printf("%#.*g", 0, 0.0) produces "0.0" while -// other C runtimes produce "0.". For other precisions than 0, Microsoft's -// consistently produce one digit more than others. In the MinGW test setups, -// the code is built with __USE_MINGW_ANSI_STDIO=1, which uses MinGW's own -// reimplementation of stdio functions, which doesn't have this issue. -// This bug requires excluding everything that runs with showpoint() enabled. -// https://developercommunity.visualstudio.com/t/printf-formatting-with-g-outputs-too/1660837 -// This issue is fixed in newer UCRT versions, since 10.0.19041.0. -// - With the Microsoft UCRT, printf("%a", 0.0) produces "0x0.0000000000000p+0" -// while other C runtimes produce just "0x0p+0". This requires omitting all -// tests of hex float formatting. -// https://developercommunity.visualstudio.com/t/Printf-formatting-of-float-as-hex-prints/1660844 -// XFAIL: msvc - +// XFAIL: win32-broken-printf-g-precision // XFAIL: LIBCXX-AIX-FIXME #include @@ -22632,3588 +22617,6 @@ } } -void test11() -{ - char str[200]; - 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); - std::hexfloat(ios); - // %a - { - ios.precision(0); - { - std::nouppercase(ios); - { - std::noshowpos(ios); - { - std::noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0p+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0p+0******************"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************-0x0p+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-******************0x0p+0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0p+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0p+0******************"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************-0x0p+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-******************0x0p+0"); - assert(ios.width() == 0); - } - } - } - std::showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0.p+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0.p+0*****************"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************-0x0.p+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*****************0x0.p+0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0;p+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0;p+0*****************"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************-0x0;p+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*****************0x0;p+0"); - assert(ios.width() == 0); - } - } - } - } - std::showpos(ios); - { - std::noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0p+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0p+0******************"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************-0x0p+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-******************0x0p+0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0p+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0p+0******************"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************-0x0p+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-******************0x0p+0"); - assert(ios.width() == 0); - } - } - } - std::showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0.p+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0.p+0*****************"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************-0x0.p+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*****************0x0.p+0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0;p+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0;p+0*****************"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************-0x0;p+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*****************0x0;p+0"); - assert(ios.width() == 0); - } - } - } - } - } - std::uppercase(ios); - { - std::noshowpos(ios); - { - std::noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0P+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0P+0******************"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************-0X0P+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-******************0X0P+0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0P+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0P+0******************"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************-0X0P+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-******************0X0P+0"); - assert(ios.width() == 0); - } - } - } - std::showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0.P+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0.P+0*****************"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************-0X0.P+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*****************0X0.P+0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0;P+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0;P+0*****************"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************-0X0;P+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*****************0X0;P+0"); - assert(ios.width() == 0); - } - } - } - } - std::showpos(ios); - { - std::noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0P+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0P+0******************"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************-0X0P+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-******************0X0P+0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0P+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0P+0******************"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************-0X0P+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-******************0X0P+0"); - assert(ios.width() == 0); - } - } - } - std::showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0.P+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0.P+0*****************"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************-0X0.P+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*****************0X0.P+0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0;P+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0;P+0*****************"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************-0X0;P+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*****************0X0;P+0"); - assert(ios.width() == 0); - } - } - } - } - } - } - ios.precision(1); - { - std::nouppercase(ios); - { - std::noshowpos(ios); - { - std::noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0p+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0p+0******************"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************-0x0p+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-******************0x0p+0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0p+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0p+0******************"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************-0x0p+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-******************0x0p+0"); - assert(ios.width() == 0); - } - } - } - std::showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0.p+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0.p+0*****************"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************-0x0.p+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*****************0x0.p+0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0;p+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0;p+0*****************"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************-0x0;p+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*****************0x0;p+0"); - assert(ios.width() == 0); - } - } - } - } - std::showpos(ios); - { - std::noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0p+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0p+0******************"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************-0x0p+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-******************0x0p+0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0p+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0p+0******************"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************-0x0p+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-******************0x0p+0"); - assert(ios.width() == 0); - } - } - } - std::showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0.p+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0.p+0*****************"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************-0x0.p+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*****************0x0.p+0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0;p+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0;p+0*****************"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************-0x0;p+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*****************0x0;p+0"); - assert(ios.width() == 0); - } - } - } - } - } - std::uppercase(ios); - { - std::noshowpos(ios); - { - std::noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0P+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0P+0******************"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************-0X0P+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-******************0X0P+0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0P+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0P+0******************"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************-0X0P+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-******************0X0P+0"); - assert(ios.width() == 0); - } - } - } - std::showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0.P+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0.P+0*****************"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************-0X0.P+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*****************0X0.P+0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0;P+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0;P+0*****************"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************-0X0;P+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*****************0X0;P+0"); - assert(ios.width() == 0); - } - } - } - } - std::showpos(ios); - { - std::noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0P+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0P+0******************"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************-0X0P+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-******************0X0P+0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0P+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0P+0******************"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************-0X0P+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-******************0X0P+0"); - assert(ios.width() == 0); - } - } - } - std::showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0.P+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0.P+0*****************"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************-0X0.P+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*****************0X0.P+0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0;P+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0;P+0*****************"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************-0X0;P+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*****************0X0;P+0"); - assert(ios.width() == 0); - } - } - } - } - } - } - ios.precision(6); - { - std::nouppercase(ios); - { - std::noshowpos(ios); - { - std::noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0p+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0p+0******************"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************-0x0p+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-******************0x0p+0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0p+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0p+0******************"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************-0x0p+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-******************0x0p+0"); - assert(ios.width() == 0); - } - } - } - std::showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0.p+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0.p+0*****************"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************-0x0.p+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*****************0x0.p+0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0;p+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0;p+0*****************"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************-0x0;p+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*****************0x0;p+0"); - assert(ios.width() == 0); - } - } - } - } - std::showpos(ios); - { - std::noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0p+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0p+0******************"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************-0x0p+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-******************0x0p+0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0p+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0p+0******************"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************-0x0p+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-******************0x0p+0"); - assert(ios.width() == 0); - } - } - } - std::showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0.p+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0.p+0*****************"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************-0x0.p+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*****************0x0.p+0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0;p+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0x0;p+0*****************"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************-0x0;p+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*****************0x0;p+0"); - assert(ios.width() == 0); - } - } - } - } - } - std::uppercase(ios); - { - std::noshowpos(ios); - { - std::noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0P+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0P+0******************"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************-0X0P+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-******************0X0P+0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0P+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0P+0******************"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************-0X0P+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-******************0X0P+0"); - assert(ios.width() == 0); - } - } - } - std::showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0.P+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0.P+0*****************"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************-0X0.P+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*****************0X0.P+0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0;P+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0;P+0*****************"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************-0X0;P+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*****************0X0;P+0"); - assert(ios.width() == 0); - } - } - } - } - std::showpos(ios); - { - std::noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0P+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0P+0******************"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************-0X0P+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-******************0X0P+0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0P+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0P+0******************"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "******************-0X0P+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-******************0X0P+0"); - assert(ios.width() == 0); - } - } - } - std::showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0.P+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0.P+0*****************"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************-0X0.P+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*****************0X0.P+0"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0;P+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-0X0;P+0*****************"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*****************-0X0;P+0"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "-*****************0X0;P+0"); - assert(ios.width() == 0); - } - } - } - } - } - } - ios.precision(16); - { - } - ios.precision(60); - { - } - } - } -} - -void test12() -{ - std::locale lc = std::locale::classic(); - std::locale lg(lc, new my_numpunct); -#if (defined(__APPLE__) || defined(TEST_HAS_GLIBC) || defined(__MINGW32__)) && defined(__x86_64__) -// This test is failing on FreeBSD, possibly due to different representations -// of the floating point numbers. - const my_facet f(1); - char str[200]; - { - long double v = 1234567890.125; - std::ios ios(0); - std::hexfloat(ios); - // %a - { - ios.precision(0); - { - std::nouppercase(ios); - { - std::noshowpos(ios); - { - std::noshowpoint(ios); - { - ios.width(0); - ios.imbue(lc); - { - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x9.32c05a44p+27"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x9.32c05a44p+27*********"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*********0x9.32c05a44p+27"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x*********9.32c05a44p+27"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x9;32c05a44p+27"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x9;32c05a44p+27*********"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*********0x9;32c05a44p+27"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x*********9;32c05a44p+27"); - assert(ios.width() == 0); - } - } - } - std::showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x9.32c05a44p+27"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x9.32c05a44p+27*********"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*********0x9.32c05a44p+27"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x*********9.32c05a44p+27"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x9;32c05a44p+27"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x9;32c05a44p+27*********"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*********0x9;32c05a44p+27"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x*********9;32c05a44p+27"); - assert(ios.width() == 0); - } - } - } - } - std::showpos(ios); - { - std::noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0x9.32c05a44p+27"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0x9.32c05a44p+27********"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********+0x9.32c05a44p+27"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+********0x9.32c05a44p+27"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0x9;32c05a44p+27"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0x9;32c05a44p+27********"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********+0x9;32c05a44p+27"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+********0x9;32c05a44p+27"); - assert(ios.width() == 0); - } - } - } - std::showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0x9.32c05a44p+27"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0x9.32c05a44p+27********"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********+0x9.32c05a44p+27"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+********0x9.32c05a44p+27"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0x9;32c05a44p+27"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0x9;32c05a44p+27********"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********+0x9;32c05a44p+27"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+********0x9;32c05a44p+27"); - assert(ios.width() == 0); - } - } - } - } - } - std::uppercase(ios); - { - std::noshowpos(ios); - { - std::noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0X9.32C05A44P+27"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0X9.32C05A44P+27*********"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*********0X9.32C05A44P+27"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0X*********9.32C05A44P+27"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0X9;32C05A44P+27"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0X9;32C05A44P+27*********"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*********0X9;32C05A44P+27"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0X*********9;32C05A44P+27"); - assert(ios.width() == 0); - } - } - } - std::showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0X9.32C05A44P+27"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0X9.32C05A44P+27*********"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*********0X9.32C05A44P+27"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0X*********9.32C05A44P+27"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0X9;32C05A44P+27"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0X9;32C05A44P+27*********"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*********0X9;32C05A44P+27"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0X*********9;32C05A44P+27"); - assert(ios.width() == 0); - } - } - } - } - std::showpos(ios); - { - std::noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0X9.32C05A44P+27"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0X9.32C05A44P+27********"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********+0X9.32C05A44P+27"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+********0X9.32C05A44P+27"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0X9;32C05A44P+27"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0X9;32C05A44P+27********"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********+0X9;32C05A44P+27"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+********0X9;32C05A44P+27"); - assert(ios.width() == 0); - } - } - } - std::showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0X9.32C05A44P+27"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0X9.32C05A44P+27********"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********+0X9.32C05A44P+27"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+********0X9.32C05A44P+27"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0X9;32C05A44P+27"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0X9;32C05A44P+27********"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********+0X9;32C05A44P+27"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+********0X9;32C05A44P+27"); - assert(ios.width() == 0); - } - } - } - } - } - } - ios.precision(1); - { - std::nouppercase(ios); - { - std::noshowpos(ios); - { - std::noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x9.32c05a44p+27"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x9.32c05a44p+27*********"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*********0x9.32c05a44p+27"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x*********9.32c05a44p+27"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x9;32c05a44p+27"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x9;32c05a44p+27*********"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*********0x9;32c05a44p+27"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x*********9;32c05a44p+27"); - assert(ios.width() == 0); - } - } - } - std::showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x9.32c05a44p+27"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x9.32c05a44p+27*********"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*********0x9.32c05a44p+27"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x*********9.32c05a44p+27"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x9;32c05a44p+27"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x9;32c05a44p+27*********"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*********0x9;32c05a44p+27"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x*********9;32c05a44p+27"); - assert(ios.width() == 0); - } - } - } - } - std::showpos(ios); - { - std::noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0x9.32c05a44p+27"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0x9.32c05a44p+27********"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********+0x9.32c05a44p+27"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+********0x9.32c05a44p+27"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0x9;32c05a44p+27"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0x9;32c05a44p+27********"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********+0x9;32c05a44p+27"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+********0x9;32c05a44p+27"); - assert(ios.width() == 0); - } - } - } - std::showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0x9.32c05a44p+27"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0x9.32c05a44p+27********"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********+0x9.32c05a44p+27"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+********0x9.32c05a44p+27"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0x9;32c05a44p+27"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0x9;32c05a44p+27********"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********+0x9;32c05a44p+27"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+********0x9;32c05a44p+27"); - assert(ios.width() == 0); - } - } - } - } - } - std::uppercase(ios); - { - std::noshowpos(ios); - { - std::noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0X9.32C05A44P+27"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0X9.32C05A44P+27*********"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*********0X9.32C05A44P+27"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0X*********9.32C05A44P+27"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0X9;32C05A44P+27"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0X9;32C05A44P+27*********"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*********0X9;32C05A44P+27"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0X*********9;32C05A44P+27"); - assert(ios.width() == 0); - } - } - } - std::showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0X9.32C05A44P+27"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0X9.32C05A44P+27*********"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*********0X9.32C05A44P+27"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0X*********9.32C05A44P+27"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0X9;32C05A44P+27"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0X9;32C05A44P+27*********"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*********0X9;32C05A44P+27"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0X*********9;32C05A44P+27"); - assert(ios.width() == 0); - } - } - } - } - std::showpos(ios); - { - std::noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0X9.32C05A44P+27"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0X9.32C05A44P+27********"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********+0X9.32C05A44P+27"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+********0X9.32C05A44P+27"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0X9;32C05A44P+27"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0X9;32C05A44P+27********"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********+0X9;32C05A44P+27"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+********0X9;32C05A44P+27"); - assert(ios.width() == 0); - } - } - } - std::showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0X9.32C05A44P+27"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0X9.32C05A44P+27********"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********+0X9.32C05A44P+27"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+********0X9.32C05A44P+27"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0X9;32C05A44P+27"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0X9;32C05A44P+27********"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********+0X9;32C05A44P+27"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+********0X9;32C05A44P+27"); - assert(ios.width() == 0); - } - } - } - } - } - } - ios.precision(6); - { - } - ios.precision(16); - { - } - ios.precision(60); - { - std::nouppercase(ios); - { - std::noshowpos(ios); - { - std::noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x9.32c05a44p+27"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x9.32c05a44p+27*********"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*********0x9.32c05a44p+27"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x*********9.32c05a44p+27"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x9;32c05a44p+27"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x9;32c05a44p+27*********"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*********0x9;32c05a44p+27"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x*********9;32c05a44p+27"); - assert(ios.width() == 0); - } - } - } - std::showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x9.32c05a44p+27"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x9.32c05a44p+27*********"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*********0x9.32c05a44p+27"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x*********9.32c05a44p+27"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x9;32c05a44p+27"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x9;32c05a44p+27*********"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*********0x9;32c05a44p+27"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0x*********9;32c05a44p+27"); - assert(ios.width() == 0); - } - } - } - } - std::showpos(ios); - { - std::noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0x9.32c05a44p+27"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0x9.32c05a44p+27********"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********+0x9.32c05a44p+27"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+********0x9.32c05a44p+27"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0x9;32c05a44p+27"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0x9;32c05a44p+27********"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********+0x9;32c05a44p+27"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+********0x9;32c05a44p+27"); - assert(ios.width() == 0); - } - } - } - std::showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0x9.32c05a44p+27"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0x9.32c05a44p+27********"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********+0x9.32c05a44p+27"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+********0x9.32c05a44p+27"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0x9;32c05a44p+27"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0x9;32c05a44p+27********"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********+0x9;32c05a44p+27"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+********0x9;32c05a44p+27"); - assert(ios.width() == 0); - } - } - } - } - } - std::uppercase(ios); - { - std::noshowpos(ios); - { - std::noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0X9.32C05A44P+27"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0X9.32C05A44P+27*********"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*********0X9.32C05A44P+27"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0X*********9.32C05A44P+27"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0X9;32C05A44P+27"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0X9;32C05A44P+27*********"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*********0X9;32C05A44P+27"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0X*********9;32C05A44P+27"); - assert(ios.width() == 0); - } - } - } - std::showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0X9.32C05A44P+27"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0X9.32C05A44P+27*********"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*********0X9.32C05A44P+27"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0X*********9.32C05A44P+27"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0X9;32C05A44P+27"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0X9;32C05A44P+27*********"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "*********0X9;32C05A44P+27"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "0X*********9;32C05A44P+27"); - assert(ios.width() == 0); - } - } - } - } - std::showpos(ios); - { - std::noshowpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0X9.32C05A44P+27"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0X9.32C05A44P+27********"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********+0X9.32C05A44P+27"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+********0X9.32C05A44P+27"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0X9;32C05A44P+27"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0X9;32C05A44P+27********"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********+0X9;32C05A44P+27"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+********0X9;32C05A44P+27"); - assert(ios.width() == 0); - } - } - } - std::showpoint(ios); - { - ios.imbue(lc); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0X9.32C05A44P+27"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0X9.32C05A44P+27********"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********+0X9.32C05A44P+27"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+********0X9.32C05A44P+27"); - assert(ios.width() == 0); - } - } - ios.imbue(lg); - { - ios.width(0); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0X9;32C05A44P+27"); - assert(ios.width() == 0); - } - ios.width(25); - std::left(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+0X9;32C05A44P+27********"); - assert(ios.width() == 0); - } - ios.width(25); - std::right(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "********+0X9;32C05A44P+27"); - assert(ios.width() == 0); - } - ios.width(25); - std::internal(ios); - { - cpp17_output_iterator iter = f.put(cpp17_output_iterator(str), ios, '*', v); - std::string ex(str, iter.base()); - assert(ex == "+********0X9;32C05A44P+27"); - assert(ios.width() == 0); - } - } - } - } - } - } - } - } -#endif -} - int main(int, char**) { test1(); @@ -26226,8 +22629,6 @@ test8(); test9(); test10(); - test11(); - test12(); std::locale lc = std::locale::classic(); std::locale lg(lc, new my_numpunct); const my_facet f(1); Index: libcxx/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_date.pass.cpp =================================================================== --- libcxx/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_date.pass.cpp +++ libcxx/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_date.pass.cpp @@ -14,9 +14,6 @@ // REQUIRES: locale.ru_RU.UTF-8 // REQUIRES: locale.zh_CN.UTF-8 -// GLIBC fails on the zh_CN test. -// XFAIL: linux - // // class time_get_byname @@ -92,7 +89,12 @@ { const my_facet f(LOCALE_zh_CN_UTF_8, 1); +#ifdef TEST_HAS_GLIBC + const char in[] = "2009" "\xe5\xb9\xb4" + "06" "\xe6\x9c\x88" "10" "\xe6\x97\xa5"; +#else const char in[] = "2009/06/10"; +#endif 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); Index: libcxx/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_date_wide.pass.cpp =================================================================== --- libcxx/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_date_wide.pass.cpp +++ libcxx/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_date_wide.pass.cpp @@ -16,9 +16,6 @@ // REQUIRES: locale.ru_RU.UTF-8 // REQUIRES: locale.zh_CN.UTF-8 -// GLIBC fails on the zh_CN test. -// XFAIL: linux - // // class time_get_byname @@ -93,7 +90,11 @@ } { const my_facet f(LOCALE_zh_CN_UTF_8, 1); +#ifdef TEST_HAS_GLIBC + const wchar_t in[] = L"2009" "\u5e74" "06" "\u6708" "10" "\u65e5"; +#else const wchar_t in[] = L"2009/06/10"; +#endif 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); Index: libcxx/test/std/re/re.traits/translate_nocase.pass.cpp =================================================================== --- libcxx/test/std/re/re.traits/translate_nocase.pass.cpp +++ libcxx/test/std/re/re.traits/translate_nocase.pass.cpp @@ -13,7 +13,7 @@ // charT translate_nocase(charT c) const; // REQUIRES: locale.en_US.UTF-8 -// XFAIL: broken-utf8-wchar-ctype +// XFAIL: win32-broken-utf8-wchar-ctype #include #include Index: libcxx/test/support/filesystem_test_helper.h =================================================================== --- libcxx/test/support/filesystem_test_helper.h +++ libcxx/test/support/filesystem_test_helper.h @@ -31,8 +31,12 @@ # include #endif -_LIBCPP_PUSH_MACROS -#include <__undef_macros> +#ifdef _WIN32 +// If built without -DNOMINMAX, Windows system headers can pollute the +// namespace with min/max defines that break standard C++. +#undef min +#undef max +#endif namespace utils { #ifdef _WIN32 @@ -736,6 +740,4 @@ return fs::path(); } -_LIBCPP_POP_MACROS - #endif /* FILESYSTEM_TEST_HELPER_H */ Index: libcxx/test/support/locale_helpers.h =================================================================== --- /dev/null +++ libcxx/test/support/locale_helpers.h @@ -0,0 +1,72 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +#ifndef LIBCXX_TEST_SUPPORT_LOCALE_HELPERS_H +#define LIBCXX_TEST_SUPPORT_LOCALE_HELPERS_H + +#include +#include "platform_support.h" +#include "test_macros.h" + +#ifndef TEST_HAS_NO_WIDE_CHARACTERS + +#include + +namespace LocaleHelpers { + +std::wstring convert_thousands_sep(std::wstring const& in, wchar_t sep) { + std::wstring out; + bool seen_num_start = false; + bool seen_decimal = false; + for (unsigned i = 0; i < in.size(); ++i) { + seen_decimal |= in[i] == L','; + seen_num_start |= in[i] == L'-' || std::iswdigit(in[i]); + if (seen_decimal || !seen_num_start || in[i] != L' ') { + out.push_back(in[i]); + continue; + } + assert(in[i] == L' '); + out.push_back(sep); + } + return out; +} + +// GLIBC 2.27 and newer use U+202F NARROW NO-BREAK SPACE as a thousands separator. +// This function converts the spaces in string inputs to U+202F if need +// be. FreeBSD's locale data also uses U+202F, since 2018. +// Windows uses U+00A0 NO-BREAK SPACE. +std::wstring convert_thousands_sep_fr_FR(std::wstring const& in) { +#if defined(_CS_GNU_LIBC_VERSION) || defined(__FreeBSD__) +#if defined(_CS_GNU_LIBC_VERSION) + if (glibc_version_less_than("2.27")) + return in; +#endif + return convert_thousands_sep(in, L'\u202F'); +#elif defined(_WIN32) + return convert_thousands_sep(in, L'\u00A0'); +#else + return in; +#endif +} + +// GLIBC 2.27 uses U+202F NARROW NO-BREAK SPACE as a thousands separator. +// FreeBSD and Windows use U+00A0 NO-BREAK SPACE. +std::wstring convert_thousands_sep_ru_RU(std::wstring const& in) { +#if defined(TEST_HAS_GLIBC) + return convert_thousands_sep(in, L'\u202F'); +#elif defined(__FreeBSD__) || defined(_WIN32) + return convert_thousands_sep(in, L'\u00A0'); +#else + return in; +#endif +} + +} // namespace LocaleHelpers + +#endif // TEST_HAS_NO_WIDE_CHARACTERS + +#endif // LIBCXX_TEST_SUPPORT_LOCALE_HELPERS_H Index: libcxx/utils/libcxx/test/config.py =================================================================== --- libcxx/utils/libcxx/test/config.py +++ libcxx/utils/libcxx/test/config.py @@ -133,7 +133,6 @@ self.configure_env() self.configure_coverage() self.configure_substitutions() - self.configure_features() libcxx.test.newconfig.configure( libcxx.test.params.DEFAULT_PARAMETERS, @@ -222,16 +221,6 @@ else: self.libcxx_obj_root = self.project_obj_root - def configure_features(self): - if self.target_info.is_windows(): - if self.cxx_stdlib_under_test == 'libc++': - # LIBCXX-WINDOWS-FIXME is the feature name used to XFAIL the - # initial Windows failures until they can be properly diagnosed - # and fixed. This allows easier detection of new test failures - # and regressions. Note: New failures should not be suppressed - # using this feature. (Also see llvm.org/PR32730) - self.config.available_features.add('LIBCXX-WINDOWS-FIXME') - def configure_compile_flags(self): self.configure_default_compile_flags() # Configure extra flags Index: libcxx/utils/libcxx/test/dsl.py =================================================================== --- libcxx/utils/libcxx/test/dsl.py +++ libcxx/utils/libcxx/test/dsl.py @@ -173,6 +173,8 @@ actualOut = re.search("# command output:\n(.+)\n$", out, flags=re.DOTALL) actualOut = actualOut.group(1) if actualOut else "" + if platform.system() == 'Windows': + actualOut = actualOut.replace('\r\n', '\n') return actualOut @_memoizeExpensiveOperation(lambda c, p, args=None: (c.substitutions, c.environment, p, args)) Index: libcxx/utils/libcxx/test/features.py =================================================================== --- libcxx/utils/libcxx/test/features.py +++ libcxx/utils/libcxx/test/features.py @@ -75,14 +75,27 @@ # Check for a Windows UCRT bug (fixed in UCRT/Windows 10.0.20348.0): # https://developercommunity.visualstudio.com/t/utf-8-locales-break-ctype-functions-for-wchar-type/1653678 - Feature(name='broken-utf8-wchar-ctype', + Feature(name='win32-broken-utf8-wchar-ctype', when=lambda cfg: '_WIN32' in compilerMacros(cfg) and not programSucceeds(cfg, """ - #include - #include - int main(int, char**) { - setlocale(LC_ALL, "en_US.UTF-8"); - return towlower(L'\\xDA') != L'\\xFA'; - } + #include + #include + int main(int, char**) { + setlocale(LC_ALL, "en_US.UTF-8"); + return towlower(L'\\xDA') != L'\\xFA'; + } + """)), + + # Check for a Windows UCRT bug (fixed in UCRT/Windows 10.0.19041.0). + # https://developercommunity.visualstudio.com/t/printf-formatting-with-g-outputs-too/1660837 + Feature(name='win32-broken-printf-g-precision', + when=lambda cfg: '_WIN32' in compilerMacros(cfg) and not programSucceeds(cfg, """ + #include + #include + int main(int, char**) { + char buf[100]; + snprintf(buf, sizeof(buf), "%#.*g", 0, 0.0); + return strcmp(buf, "0."); + } """)), # Whether Bash can run on the executor.