[libcxx-commits] [libcxx] [libc++][test] Adjust expected hexfloat format (PR #95011)
Jake Egan via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Jun 10 10:02:28 PDT 2024
https://github.com/jakeegan created https://github.com/llvm/llvm-project/pull/95011
The test expects a hex float format of `0x0p+0`, but AIX prints `0x0.0p+0`. This change adjusts the test to accept both.
>From 518546b964a9c9ab0ea01cdd51e4ef6319f50ea7 Mon Sep 17 00:00:00 2001
From: Jake Egan <jake.egan at ibm.com>
Date: Thu, 6 Jun 2024 11:17:21 -0400
Subject: [PATCH] [libc++][test] Adjust expected hexfloat format
---
.../put_double.hex.pass.cpp | 445 ++++++++++--------
.../put_long_double.hex.pass.cpp | 445 ++++++++++--------
2 files changed, 502 insertions(+), 388 deletions(-)
diff --git a/libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_double.hex.pass.cpp b/libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_double.hex.pass.cpp
index 21efa978abdcc..caca4bf71d92b 100644
--- a/libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_double.hex.pass.cpp
+++ b/libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_double.hex.pass.cpp
@@ -17,12 +17,11 @@
// https://developercommunity.visualstudio.com/t/Printf-formatting-of-float-as-hex-prints/1660844
// XFAIL: msvc
-// XFAIL: LIBCXX-AIX-FIXME
-
#include <locale>
#include <ios>
#include <cassert>
#include <streambuf>
+#include <sstream>
#include <cmath>
#include "test_macros.h"
#include "test_iterators.h"
@@ -49,6 +48,13 @@ class my_numpunct
virtual std::string do_grouping() const {return std::string("\1\2\3");}
};
+const std::string hexfloat_fmt(const double& v, const std::ios& ios){
+ std::ostringstream oss;
+ oss.copyfmt(ios);
+ oss << std::noshowpos << std::hexfloat << v;
+ return oss.str();
+}
+
void test1()
{
char str[200];
@@ -60,6 +66,9 @@ void test1()
std::ios ios(0);
std::hexfloat(ios);
// %a
+
+ std::string hf(hexfloat_fmt(0., ios));
+ const std::string padding(25 - hf.length() - 1, '*');
{
ios.precision(0);
{
@@ -70,12 +79,13 @@ void test1()
std::noshowpoint(ios);
{
ios.imbue(lc);
+ hf = hexfloat_fmt(0., ios);
{
ios.width(0);
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0x0p+0");
+ assert(ex == "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -83,7 +93,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0x0p+0******************");
+ assert(ex == "-" + hf + padding);
assert(ios.width() == 0);
}
ios.width(25);
@@ -91,7 +101,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "******************-0x0p+0");
+ assert(ex == padding + "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -99,17 +109,18 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-******************0x0p+0");
+ assert(ex == "-" + padding + hf);
assert(ios.width() == 0);
}
}
ios.imbue(lg);
+ hf = hexfloat_fmt(0., ios);
{
ios.width(0);
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0x0p+0");
+ assert(ex == "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -117,7 +128,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0x0p+0******************");
+ assert(ex == "-" + hf + padding);
assert(ios.width() == 0);
}
ios.width(25);
@@ -125,7 +136,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "******************-0x0p+0");
+ assert(ex == padding + "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -133,7 +144,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-******************0x0p+0");
+ assert(ex == "-" + padding + hf);
assert(ios.width() == 0);
}
}
@@ -141,12 +152,13 @@ void test1()
std::showpoint(ios);
{
ios.imbue(lc);
+ hf = hexfloat_fmt(0., ios);
{
ios.width(0);
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0x0.p+0");
+ assert(ex == "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -154,7 +166,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0x0.p+0*****************");
+ assert(ex == "-" + hf + padding);
assert(ios.width() == 0);
}
ios.width(25);
@@ -162,7 +174,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "*****************-0x0.p+0");
+ assert(ex == padding + "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -170,17 +182,18 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-*****************0x0.p+0");
+ assert(ex == "-" + padding + hf);
assert(ios.width() == 0);
}
}
ios.imbue(lg);
+ hf = hexfloat_fmt(0., ios);
{
ios.width(0);
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0x0;p+0");
+ assert(ex == "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -188,7 +201,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0x0;p+0*****************");
+ assert(ex == "-" + hf + padding);
assert(ios.width() == 0);
}
ios.width(25);
@@ -196,7 +209,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "*****************-0x0;p+0");
+ assert(ex == padding + "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -204,7 +217,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-*****************0x0;p+0");
+ assert(ex == "-" + padding + hf);
assert(ios.width() == 0);
}
}
@@ -215,12 +228,13 @@ void test1()
std::noshowpoint(ios);
{
ios.imbue(lc);
+ hf = hexfloat_fmt(0., ios);
{
ios.width(0);
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0x0p+0");
+ assert(ex == "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -228,7 +242,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0x0p+0******************");
+ assert(ex == "-" + hf + padding);
assert(ios.width() == 0);
}
ios.width(25);
@@ -236,7 +250,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "******************-0x0p+0");
+ assert(ex == padding + "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -244,17 +258,18 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-******************0x0p+0");
+ assert(ex == "-" + padding + hf);
assert(ios.width() == 0);
}
}
ios.imbue(lg);
+ hf = hexfloat_fmt(0., ios);
{
ios.width(0);
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0x0p+0");
+ assert(ex == "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -262,7 +277,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0x0p+0******************");
+ assert(ex == "-" + hf + padding);
assert(ios.width() == 0);
}
ios.width(25);
@@ -270,7 +285,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "******************-0x0p+0");
+ assert(ex == padding + "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -278,7 +293,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-******************0x0p+0");
+ assert(ex == "-" + padding + hf);
assert(ios.width() == 0);
}
}
@@ -286,12 +301,13 @@ void test1()
std::showpoint(ios);
{
ios.imbue(lc);
+ hf = hexfloat_fmt(0., ios);
{
ios.width(0);
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0x0.p+0");
+ assert(ex == "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -299,7 +315,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0x0.p+0*****************");
+ assert(ex == "-" + hf + padding);
assert(ios.width() == 0);
}
ios.width(25);
@@ -307,7 +323,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "*****************-0x0.p+0");
+ assert(ex == padding + "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -315,17 +331,18 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-*****************0x0.p+0");
+ assert(ex == "-" + padding + hf);
assert(ios.width() == 0);
}
}
ios.imbue(lg);
+ hf = hexfloat_fmt(0., ios);
{
ios.width(0);
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0x0;p+0");
+ assert(ex == "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -333,7 +350,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0x0;p+0*****************");
+ assert(ex == "-" + hf + padding);
assert(ios.width() == 0);
}
ios.width(25);
@@ -341,7 +358,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "*****************-0x0;p+0");
+ assert(ex == padding + "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -349,7 +366,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-*****************0x0;p+0");
+ assert(ex == "-" + padding + hf);
assert(ios.width() == 0);
}
}
@@ -363,12 +380,13 @@ void test1()
std::noshowpoint(ios);
{
ios.imbue(lc);
+ hf = hexfloat_fmt(0., ios);
{
ios.width(0);
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0X0P+0");
+ assert(ex == "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -376,7 +394,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0X0P+0******************");
+ assert(ex == "-" + hf + padding);
assert(ios.width() == 0);
}
ios.width(25);
@@ -384,7 +402,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "******************-0X0P+0");
+ assert(ex == padding + "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -392,17 +410,18 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-******************0X0P+0");
+ assert(ex == "-" + padding + hf);
assert(ios.width() == 0);
}
}
ios.imbue(lg);
+ hf = hexfloat_fmt(0., ios);
{
ios.width(0);
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0X0P+0");
+ assert(ex == "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -410,7 +429,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0X0P+0******************");
+ assert(ex == "-" + hf + padding);
assert(ios.width() == 0);
}
ios.width(25);
@@ -418,7 +437,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "******************-0X0P+0");
+ assert(ex == padding + "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -426,7 +445,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-******************0X0P+0");
+ assert(ex == "-" + padding + hf);
assert(ios.width() == 0);
}
}
@@ -434,12 +453,13 @@ void test1()
std::showpoint(ios);
{
ios.imbue(lc);
+ hf = hexfloat_fmt(0., ios);
{
ios.width(0);
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0X0.P+0");
+ assert(ex == "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -447,7 +467,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0X0.P+0*****************");
+ assert(ex == "-" + hf + padding);
assert(ios.width() == 0);
}
ios.width(25);
@@ -455,7 +475,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "*****************-0X0.P+0");
+ assert(ex == padding + "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -463,17 +483,18 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-*****************0X0.P+0");
+ assert(ex == "-" + padding + hf);
assert(ios.width() == 0);
}
}
ios.imbue(lg);
+ hf = hexfloat_fmt(0., ios);
{
ios.width(0);
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0X0;P+0");
+ assert(ex == "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -481,7 +502,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0X0;P+0*****************");
+ assert(ex == "-" + hf + padding);
assert(ios.width() == 0);
}
ios.width(25);
@@ -489,7 +510,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "*****************-0X0;P+0");
+ assert(ex == padding + "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -497,7 +518,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-*****************0X0;P+0");
+ assert(ex == "-" + padding + hf);
assert(ios.width() == 0);
}
}
@@ -508,12 +529,13 @@ void test1()
std::noshowpoint(ios);
{
ios.imbue(lc);
+ hf = hexfloat_fmt(0., ios);
{
ios.width(0);
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0X0P+0");
+ assert(ex == "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -521,7 +543,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0X0P+0******************");
+ assert(ex == "-" + hf + padding);
assert(ios.width() == 0);
}
ios.width(25);
@@ -529,7 +551,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "******************-0X0P+0");
+ assert(ex == padding + "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -537,17 +559,18 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-******************0X0P+0");
+ assert(ex == "-" + padding + hf);
assert(ios.width() == 0);
}
}
ios.imbue(lg);
+ hf = hexfloat_fmt(0., ios);
{
ios.width(0);
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0X0P+0");
+ assert(ex == "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -555,7 +578,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0X0P+0******************");
+ assert(ex == "-" + hf + padding);
assert(ios.width() == 0);
}
ios.width(25);
@@ -563,7 +586,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "******************-0X0P+0");
+ assert(ex == padding + "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -571,7 +594,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-******************0X0P+0");
+ assert(ex == "-" + padding + hf);
assert(ios.width() == 0);
}
}
@@ -579,12 +602,13 @@ void test1()
std::showpoint(ios);
{
ios.imbue(lc);
+ hf = hexfloat_fmt(0., ios);
{
ios.width(0);
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0X0.P+0");
+ assert(ex == "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -592,7 +616,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0X0.P+0*****************");
+ assert(ex == "-" + hf + padding);
assert(ios.width() == 0);
}
ios.width(25);
@@ -600,7 +624,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "*****************-0X0.P+0");
+ assert(ex == padding + "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -608,17 +632,18 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-*****************0X0.P+0");
+ assert(ex == "-" + padding + hf);
assert(ios.width() == 0);
}
}
ios.imbue(lg);
+ hf = hexfloat_fmt(0., ios);
{
ios.width(0);
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0X0;P+0");
+ assert(ex == "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -626,7 +651,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0X0;P+0*****************");
+ assert(ex == "-" + hf + padding);
assert(ios.width() == 0);
}
ios.width(25);
@@ -634,7 +659,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "*****************-0X0;P+0");
+ assert(ex == padding + "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -642,7 +667,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-*****************0X0;P+0");
+ assert(ex == "-" + padding + hf);
assert(ios.width() == 0);
}
}
@@ -659,12 +684,13 @@ void test1()
std::noshowpoint(ios);
{
ios.imbue(lc);
+ hf = hexfloat_fmt(0., ios);
{
ios.width(0);
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0x0p+0");
+ assert(ex == "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -672,7 +698,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0x0p+0******************");
+ assert(ex == "-" + hf + padding);
assert(ios.width() == 0);
}
ios.width(25);
@@ -680,7 +706,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "******************-0x0p+0");
+ assert(ex == padding + "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -688,17 +714,18 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-******************0x0p+0");
+ assert(ex == "-" + padding + hf);
assert(ios.width() == 0);
}
}
ios.imbue(lg);
+ hf = hexfloat_fmt(0., ios);
{
ios.width(0);
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0x0p+0");
+ assert(ex == "-" + hf );
assert(ios.width() == 0);
}
ios.width(25);
@@ -706,7 +733,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0x0p+0******************");
+ assert(ex == "-" + hf + padding);
assert(ios.width() == 0);
}
ios.width(25);
@@ -714,7 +741,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "******************-0x0p+0");
+ assert(ex == padding + "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -722,7 +749,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-******************0x0p+0");
+ assert(ex == "-" + padding + hf);
assert(ios.width() == 0);
}
}
@@ -730,12 +757,13 @@ void test1()
std::showpoint(ios);
{
ios.imbue(lc);
+ hf = hexfloat_fmt(0., ios);
{
ios.width(0);
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0x0.p+0");
+ assert(ex == "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -743,7 +771,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0x0.p+0*****************");
+ assert(ex == "-" + hf + padding);
assert(ios.width() == 0);
}
ios.width(25);
@@ -751,7 +779,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "*****************-0x0.p+0");
+ assert(ex == padding + "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -759,17 +787,18 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-*****************0x0.p+0");
+ assert(ex == "-" + padding + hf);
assert(ios.width() == 0);
}
}
ios.imbue(lg);
+ hf = hexfloat_fmt(0., ios);
{
ios.width(0);
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0x0;p+0");
+ assert(ex == "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -777,7 +806,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0x0;p+0*****************");
+ assert(ex == "-" + hf + padding);
assert(ios.width() == 0);
}
ios.width(25);
@@ -785,7 +814,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "*****************-0x0;p+0");
+ assert(ex == padding + "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -793,7 +822,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-*****************0x0;p+0");
+ assert(ex == "-" + padding + hf);
assert(ios.width() == 0);
}
}
@@ -804,12 +833,13 @@ void test1()
std::noshowpoint(ios);
{
ios.imbue(lc);
+ hf = hexfloat_fmt(0., ios);
{
ios.width(0);
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0x0p+0");
+ assert(ex == "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -817,7 +847,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0x0p+0******************");
+ assert(ex == "-" + hf + padding);
assert(ios.width() == 0);
}
ios.width(25);
@@ -825,7 +855,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "******************-0x0p+0");
+ assert(ex == padding + "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -833,17 +863,18 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-******************0x0p+0");
+ assert(ex == "-" + padding + hf);
assert(ios.width() == 0);
}
}
ios.imbue(lg);
+ hf = hexfloat_fmt(0., ios);
{
ios.width(0);
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0x0p+0");
+ assert(ex == "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -851,7 +882,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0x0p+0******************");
+ assert(ex == "-" + hf + padding);
assert(ios.width() == 0);
}
ios.width(25);
@@ -859,7 +890,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "******************-0x0p+0");
+ assert(ex == padding + "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -867,7 +898,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-******************0x0p+0");
+ assert(ex == "-" + padding + hf);
assert(ios.width() == 0);
}
}
@@ -875,12 +906,13 @@ void test1()
std::showpoint(ios);
{
ios.imbue(lc);
+ hf = hexfloat_fmt(0., ios);
{
ios.width(0);
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0x0.p+0");
+ assert(ex == "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -888,7 +920,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0x0.p+0*****************");
+ assert(ex == "-" + hf + padding);
assert(ios.width() == 0);
}
ios.width(25);
@@ -896,7 +928,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "*****************-0x0.p+0");
+ assert(ex == padding + "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -904,17 +936,18 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-*****************0x0.p+0");
+ assert(ex == "-" + padding + hf);
assert(ios.width() == 0);
}
}
ios.imbue(lg);
+ hf = hexfloat_fmt(0., ios);
{
ios.width(0);
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0x0;p+0");
+ assert(ex == "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -922,7 +955,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0x0;p+0*****************");
+ assert(ex == "-" + hf + padding);
assert(ios.width() == 0);
}
ios.width(25);
@@ -930,7 +963,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "*****************-0x0;p+0");
+ assert(ex == padding + "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -938,7 +971,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-*****************0x0;p+0");
+ assert(ex == "-" + padding + hf);
assert(ios.width() == 0);
}
}
@@ -952,12 +985,13 @@ void test1()
std::noshowpoint(ios);
{
ios.imbue(lc);
+ hf = hexfloat_fmt(0., ios);
{
ios.width(0);
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0X0P+0");
+ assert(ex == "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -965,7 +999,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0X0P+0******************");
+ assert(ex == "-" + hf + padding);
assert(ios.width() == 0);
}
ios.width(25);
@@ -973,7 +1007,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "******************-0X0P+0");
+ assert(ex == padding + "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -981,17 +1015,18 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-******************0X0P+0");
+ assert(ex == "-" + padding + hf);
assert(ios.width() == 0);
}
}
ios.imbue(lg);
+ hf = hexfloat_fmt(0., ios);
{
ios.width(0);
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0X0P+0");
+ assert(ex == "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -999,7 +1034,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0X0P+0******************");
+ assert(ex == "-" + hf + padding);
assert(ios.width() == 0);
}
ios.width(25);
@@ -1007,7 +1042,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "******************-0X0P+0");
+ assert(ex == padding + "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -1015,7 +1050,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-******************0X0P+0");
+ assert(ex == "-" + padding + hf);
assert(ios.width() == 0);
}
}
@@ -1023,12 +1058,13 @@ void test1()
std::showpoint(ios);
{
ios.imbue(lc);
+ hf = hexfloat_fmt(0., ios);
{
ios.width(0);
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0X0.P+0");
+ assert(ex == "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -1036,7 +1072,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0X0.P+0*****************");
+ assert(ex == "-" + hf + padding);
assert(ios.width() == 0);
}
ios.width(25);
@@ -1044,7 +1080,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "*****************-0X0.P+0");
+ assert(ex == padding + "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -1052,17 +1088,18 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-*****************0X0.P+0");
+ assert(ex == "-" + padding + hf);
assert(ios.width() == 0);
}
}
ios.imbue(lg);
+ hf = hexfloat_fmt(0., ios);
{
ios.width(0);
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0X0;P+0");
+ assert(ex == "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -1070,7 +1107,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0X0;P+0*****************");
+ assert(ex == "-" + hf + padding);
assert(ios.width() == 0);
}
ios.width(25);
@@ -1078,7 +1115,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "*****************-0X0;P+0");
+ assert(ex == padding + "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -1086,7 +1123,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-*****************0X0;P+0");
+ assert(ex == "-" + padding + hf);
assert(ios.width() == 0);
}
}
@@ -1097,12 +1134,13 @@ void test1()
std::noshowpoint(ios);
{
ios.imbue(lc);
+ hf = hexfloat_fmt(0., ios);
{
ios.width(0);
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0X0P+0");
+ assert(ex == "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -1110,7 +1148,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0X0P+0******************");
+ assert(ex == "-" + hf + padding);
assert(ios.width() == 0);
}
ios.width(25);
@@ -1118,7 +1156,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "******************-0X0P+0");
+ assert(ex == padding + "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -1126,17 +1164,18 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-******************0X0P+0");
+ assert(ex == "-" + padding + hf);
assert(ios.width() == 0);
}
}
ios.imbue(lg);
+ hf = hexfloat_fmt(0., ios);
{
ios.width(0);
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0X0P+0");
+ assert(ex == "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -1144,7 +1183,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0X0P+0******************");
+ assert(ex == "-" + hf + padding);
assert(ios.width() == 0);
}
ios.width(25);
@@ -1152,7 +1191,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "******************-0X0P+0");
+ assert(ex == padding + "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -1160,7 +1199,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-******************0X0P+0");
+ assert(ex == "-" + padding + hf);
assert(ios.width() == 0);
}
}
@@ -1168,12 +1207,13 @@ void test1()
std::showpoint(ios);
{
ios.imbue(lc);
+ hf = hexfloat_fmt(0., ios);
{
ios.width(0);
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0X0.P+0");
+ assert(ex == "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -1181,7 +1221,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0X0.P+0*****************");
+ assert(ex == "-" + hf + padding);
assert(ios.width() == 0);
}
ios.width(25);
@@ -1189,7 +1229,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "*****************-0X0.P+0");
+ assert(ex == padding + "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -1197,17 +1237,18 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-*****************0X0.P+0");
+ assert(ex == "-" + padding + hf);
assert(ios.width() == 0);
}
}
ios.imbue(lg);
+ hf = hexfloat_fmt(0., ios);
{
ios.width(0);
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0X0;P+0");
+ assert(ex == "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -1215,7 +1256,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0X0;P+0*****************");
+ assert(ex == "-" + hf + padding);
assert(ios.width() == 0);
}
ios.width(25);
@@ -1223,7 +1264,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "*****************-0X0;P+0");
+ assert(ex == padding + "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -1231,7 +1272,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-*****************0X0;P+0");
+ assert(ex == "-" + padding + hf);
assert(ios.width() == 0);
}
}
@@ -1248,12 +1289,13 @@ void test1()
std::noshowpoint(ios);
{
ios.imbue(lc);
+ hf = hexfloat_fmt(0., ios);
{
ios.width(0);
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0x0p+0");
+ assert(ex == "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -1261,7 +1303,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0x0p+0******************");
+ assert(ex == "-" + hf + padding);
assert(ios.width() == 0);
}
ios.width(25);
@@ -1269,7 +1311,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "******************-0x0p+0");
+ assert(ex == padding + "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -1277,17 +1319,18 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-******************0x0p+0");
+ assert(ex == "-" + padding + hf);
assert(ios.width() == 0);
}
}
ios.imbue(lg);
+ hf = hexfloat_fmt(0., ios);
{
ios.width(0);
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0x0p+0");
+ assert(ex == "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -1295,7 +1338,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0x0p+0******************");
+ assert(ex == "-" + hf + padding);
assert(ios.width() == 0);
}
ios.width(25);
@@ -1303,7 +1346,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "******************-0x0p+0");
+ assert(ex == padding + "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -1311,7 +1354,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-******************0x0p+0");
+ assert(ex == "-" + padding + hf);
assert(ios.width() == 0);
}
}
@@ -1319,12 +1362,13 @@ void test1()
std::showpoint(ios);
{
ios.imbue(lc);
+ hf = hexfloat_fmt(0., ios);
{
ios.width(0);
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0x0.p+0");
+ assert(ex == "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -1332,7 +1376,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0x0.p+0*****************");
+ assert(ex == "-" + hf + padding);
assert(ios.width() == 0);
}
ios.width(25);
@@ -1340,7 +1384,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "*****************-0x0.p+0");
+ assert(ex == padding + "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -1348,17 +1392,18 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-*****************0x0.p+0");
+ assert(ex == "-" + padding + hf);
assert(ios.width() == 0);
}
}
ios.imbue(lg);
+ hf = hexfloat_fmt(0., ios);
{
ios.width(0);
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0x0;p+0");
+ assert(ex == "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -1366,7 +1411,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0x0;p+0*****************");
+ assert(ex == "-" + hf + padding);
assert(ios.width() == 0);
}
ios.width(25);
@@ -1374,7 +1419,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "*****************-0x0;p+0");
+ assert(ex == padding + "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -1382,7 +1427,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-*****************0x0;p+0");
+ assert(ex == "-" + padding + hf);
assert(ios.width() == 0);
}
}
@@ -1393,12 +1438,13 @@ void test1()
std::noshowpoint(ios);
{
ios.imbue(lc);
+ hf = hexfloat_fmt(0., ios);
{
ios.width(0);
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0x0p+0");
+ assert(ex == "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -1406,7 +1452,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0x0p+0******************");
+ assert(ex == "-" + hf + padding);
assert(ios.width() == 0);
}
ios.width(25);
@@ -1414,7 +1460,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "******************-0x0p+0");
+ assert(ex == padding + "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -1422,17 +1468,18 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-******************0x0p+0");
+ assert(ex == "-" + padding + hf);
assert(ios.width() == 0);
}
}
ios.imbue(lg);
+ hf = hexfloat_fmt(0., ios);
{
ios.width(0);
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0x0p+0");
+ assert(ex == "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -1440,7 +1487,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0x0p+0******************");
+ assert(ex == "-" + hf + padding);
assert(ios.width() == 0);
}
ios.width(25);
@@ -1448,7 +1495,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "******************-0x0p+0");
+ assert(ex == padding + "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -1456,7 +1503,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-******************0x0p+0");
+ assert(ex == "-" + padding + hf);
assert(ios.width() == 0);
}
}
@@ -1464,12 +1511,13 @@ void test1()
std::showpoint(ios);
{
ios.imbue(lc);
+ hf = hexfloat_fmt(0., ios);
{
ios.width(0);
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0x0.p+0");
+ assert(ex == "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -1477,7 +1525,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0x0.p+0*****************");
+ assert(ex == "-" + hf + padding);
assert(ios.width() == 0);
}
ios.width(25);
@@ -1485,7 +1533,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "*****************-0x0.p+0");
+ assert(ex == padding + "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -1493,17 +1541,18 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-*****************0x0.p+0");
+ assert(ex == "-" + padding + hf);
assert(ios.width() == 0);
}
}
ios.imbue(lg);
+ hf = hexfloat_fmt(0., ios);
{
ios.width(0);
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0x0;p+0");
+ assert(ex == "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -1511,7 +1560,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0x0;p+0*****************");
+ assert(ex == "-" + hf + padding);
assert(ios.width() == 0);
}
ios.width(25);
@@ -1519,7 +1568,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "*****************-0x0;p+0");
+ assert(ex == padding + "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -1527,7 +1576,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-*****************0x0;p+0");
+ assert(ex == "-" + padding + hf);
assert(ios.width() == 0);
}
}
@@ -1541,12 +1590,13 @@ void test1()
std::noshowpoint(ios);
{
ios.imbue(lc);
+ hf = hexfloat_fmt(0., ios);
{
ios.width(0);
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0X0P+0");
+ assert(ex == "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -1554,7 +1604,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0X0P+0******************");
+ assert(ex == "-" + hf + padding);
assert(ios.width() == 0);
}
ios.width(25);
@@ -1562,7 +1612,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "******************-0X0P+0");
+ assert(ex == padding + "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -1570,17 +1620,18 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-******************0X0P+0");
+ assert(ex == "-" + padding + hf);
assert(ios.width() == 0);
}
}
ios.imbue(lg);
+ hf = hexfloat_fmt(0., ios);
{
ios.width(0);
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0X0P+0");
+ assert(ex == "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -1588,7 +1639,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0X0P+0******************");
+ assert(ex == "-" + hf + padding);
assert(ios.width() == 0);
}
ios.width(25);
@@ -1596,7 +1647,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "******************-0X0P+0");
+ assert(ex == padding + "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -1604,7 +1655,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-******************0X0P+0");
+ assert(ex == "-" + padding + hf);
assert(ios.width() == 0);
}
}
@@ -1612,12 +1663,13 @@ void test1()
std::showpoint(ios);
{
ios.imbue(lc);
+ hf = hexfloat_fmt(0., ios);
{
ios.width(0);
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0X0.P+0");
+ assert(ex == "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -1625,7 +1677,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0X0.P+0*****************");
+ assert(ex == "-" + hf + padding);
assert(ios.width() == 0);
}
ios.width(25);
@@ -1633,7 +1685,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "*****************-0X0.P+0");
+ assert(ex == padding + "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -1641,17 +1693,18 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-*****************0X0.P+0");
+ assert(ex == "-" + padding + hf);
assert(ios.width() == 0);
}
}
ios.imbue(lg);
+ hf = hexfloat_fmt(0., ios);
{
ios.width(0);
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0X0;P+0");
+ assert(ex == "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -1659,7 +1712,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0X0;P+0*****************");
+ assert(ex == "-" + hf + padding);
assert(ios.width() == 0);
}
ios.width(25);
@@ -1667,7 +1720,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "*****************-0X0;P+0");
+ assert(ex == padding + "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -1675,7 +1728,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-*****************0X0;P+0");
+ assert(ex == "-" + padding + hf);
assert(ios.width() == 0);
}
}
@@ -1686,12 +1739,13 @@ void test1()
std::noshowpoint(ios);
{
ios.imbue(lc);
+ hf = hexfloat_fmt(0., ios);
{
ios.width(0);
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0X0P+0");
+ assert(ex == "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -1699,7 +1753,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0X0P+0******************");
+ assert(ex == "-" + hf + padding);
assert(ios.width() == 0);
}
ios.width(25);
@@ -1707,7 +1761,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "******************-0X0P+0");
+ assert(ex == padding + "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -1715,17 +1769,18 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-******************0X0P+0");
+ assert(ex == "-" + padding + hf);
assert(ios.width() == 0);
}
}
ios.imbue(lg);
+ hf = hexfloat_fmt(0., ios);
{
ios.width(0);
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0X0P+0");
+ assert(ex == "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -1733,7 +1788,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0X0P+0******************");
+ assert(ex == "-" + hf + padding);
assert(ios.width() == 0);
}
ios.width(25);
@@ -1741,7 +1796,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "******************-0X0P+0");
+ assert(ex == padding + "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -1749,7 +1804,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-******************0X0P+0");
+ assert(ex == "-" + padding + hf);
assert(ios.width() == 0);
}
}
@@ -1757,12 +1812,13 @@ void test1()
std::showpoint(ios);
{
ios.imbue(lc);
+ hf = hexfloat_fmt(0., ios);
{
ios.width(0);
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0X0.P+0");
+ assert(ex == "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -1770,7 +1826,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0X0.P+0*****************");
+ assert(ex == "-" + hf + padding);
assert(ios.width() == 0);
}
ios.width(25);
@@ -1778,7 +1834,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "*****************-0X0.P+0");
+ assert(ex == padding + "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -1786,17 +1842,18 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-*****************0X0.P+0");
+ assert(ex == "-" + padding + hf);
assert(ios.width() == 0);
}
}
ios.imbue(lg);
+ hf = hexfloat_fmt(0., ios);
{
ios.width(0);
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0X0;P+0");
+ assert(ex == "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -1804,7 +1861,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0X0;P+0*****************");
+ assert(ex == "-" + hf + padding);
assert(ios.width() == 0);
}
ios.width(25);
@@ -1812,7 +1869,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "*****************-0X0;P+0");
+ assert(ex == padding + "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -1820,7 +1877,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-*****************0X0;P+0");
+ assert(ex == "-" + padding + hf);
assert(ios.width() == 0);
}
}
diff --git a/libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_long_double.hex.pass.cpp b/libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_long_double.hex.pass.cpp
index c97c9a0c40369..b210d9428d549 100644
--- a/libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_long_double.hex.pass.cpp
+++ b/libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_long_double.hex.pass.cpp
@@ -17,12 +17,11 @@
// https://developercommunity.visualstudio.com/t/Printf-formatting-of-float-as-hex-prints/1660844
// XFAIL: msvc
-// XFAIL: LIBCXX-AIX-FIXME
-
#include <locale>
#include <ios>
#include <cassert>
#include <streambuf>
+#include <sstream>
#include <cmath>
#include "test_macros.h"
#include "test_iterators.h"
@@ -49,6 +48,13 @@ class my_numpunct
virtual std::string do_grouping() const {return std::string("\1\2\3");}
};
+const std::string hexfloat_fmt(const long double& v, const std::ios& ios){
+ std::ostringstream oss;
+ oss.copyfmt(ios);
+ oss << std::noshowpos << std::hexfloat << v;
+ return oss.str();
+}
+
void test1()
{
char str[200];
@@ -60,6 +66,9 @@ void test1()
std::ios ios(0);
std::hexfloat(ios);
// %a
+
+ std::string hf(hexfloat_fmt(0., ios));
+ const std::string padding(25 - hf.length() - 1, '*');
{
ios.precision(0);
{
@@ -70,12 +79,13 @@ void test1()
std::noshowpoint(ios);
{
ios.imbue(lc);
+ hf = hexfloat_fmt(0., ios);
{
ios.width(0);
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0x0p+0");
+ assert(ex == "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -83,7 +93,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0x0p+0******************");
+ assert(ex == "-" + hf + padding);
assert(ios.width() == 0);
}
ios.width(25);
@@ -91,7 +101,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "******************-0x0p+0");
+ assert(ex == padding + "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -99,17 +109,18 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-******************0x0p+0");
+ assert(ex == "-" + padding + hf);
assert(ios.width() == 0);
}
}
ios.imbue(lg);
+ hf = hexfloat_fmt(0., ios);
{
ios.width(0);
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0x0p+0");
+ assert(ex == "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -117,7 +128,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0x0p+0******************");
+ assert(ex == "-" + hf + padding);
assert(ios.width() == 0);
}
ios.width(25);
@@ -125,7 +136,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "******************-0x0p+0");
+ assert(ex == padding + "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -133,7 +144,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-******************0x0p+0");
+ assert(ex == "-" + padding + hf);
assert(ios.width() == 0);
}
}
@@ -141,12 +152,13 @@ void test1()
std::showpoint(ios);
{
ios.imbue(lc);
+ hf = hexfloat_fmt(0., ios);
{
ios.width(0);
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0x0.p+0");
+ assert(ex == "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -154,7 +166,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0x0.p+0*****************");
+ assert(ex == "-" + hf + padding);
assert(ios.width() == 0);
}
ios.width(25);
@@ -162,7 +174,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "*****************-0x0.p+0");
+ assert(ex == padding + "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -170,17 +182,18 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-*****************0x0.p+0");
+ assert(ex == "-" + padding + hf);
assert(ios.width() == 0);
}
}
ios.imbue(lg);
+ hf = hexfloat_fmt(0., ios);
{
ios.width(0);
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0x0;p+0");
+ assert(ex == "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -188,7 +201,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0x0;p+0*****************");
+ assert(ex == "-" + hf + padding);
assert(ios.width() == 0);
}
ios.width(25);
@@ -196,7 +209,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "*****************-0x0;p+0");
+ assert(ex == padding + "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -204,7 +217,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-*****************0x0;p+0");
+ assert(ex == "-" + padding + hf);
assert(ios.width() == 0);
}
}
@@ -215,12 +228,13 @@ void test1()
std::noshowpoint(ios);
{
ios.imbue(lc);
+ hf = hexfloat_fmt(0., ios);
{
ios.width(0);
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0x0p+0");
+ assert(ex == "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -228,7 +242,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0x0p+0******************");
+ assert(ex == "-" + hf + padding);
assert(ios.width() == 0);
}
ios.width(25);
@@ -236,7 +250,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "******************-0x0p+0");
+ assert(ex == padding + "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -244,17 +258,18 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-******************0x0p+0");
+ assert(ex == "-" + padding + hf);
assert(ios.width() == 0);
}
}
ios.imbue(lg);
+ hf = hexfloat_fmt(0., ios);
{
ios.width(0);
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0x0p+0");
+ assert(ex == "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -262,7 +277,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0x0p+0******************");
+ assert(ex == "-" + hf + padding);
assert(ios.width() == 0);
}
ios.width(25);
@@ -270,7 +285,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "******************-0x0p+0");
+ assert(ex == padding + "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -278,7 +293,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-******************0x0p+0");
+ assert(ex == "-" + padding + hf);
assert(ios.width() == 0);
}
}
@@ -286,12 +301,13 @@ void test1()
std::showpoint(ios);
{
ios.imbue(lc);
+ hf = hexfloat_fmt(0., ios);
{
ios.width(0);
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0x0.p+0");
+ assert(ex == "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -299,7 +315,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0x0.p+0*****************");
+ assert(ex == "-" + hf + padding);
assert(ios.width() == 0);
}
ios.width(25);
@@ -307,7 +323,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "*****************-0x0.p+0");
+ assert(ex == padding + "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -315,17 +331,18 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-*****************0x0.p+0");
+ assert(ex == "-" + padding + hf);
assert(ios.width() == 0);
}
}
ios.imbue(lg);
+ hf = hexfloat_fmt(0., ios);
{
ios.width(0);
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0x0;p+0");
+ assert(ex == "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -333,7 +350,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0x0;p+0*****************");
+ assert(ex == "-" + hf + padding);
assert(ios.width() == 0);
}
ios.width(25);
@@ -341,7 +358,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "*****************-0x0;p+0");
+ assert(ex == padding + "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -349,7 +366,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-*****************0x0;p+0");
+ assert(ex == "-" + padding + hf);
assert(ios.width() == 0);
}
}
@@ -363,12 +380,13 @@ void test1()
std::noshowpoint(ios);
{
ios.imbue(lc);
+ hf = hexfloat_fmt(0., ios);
{
ios.width(0);
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0X0P+0");
+ assert(ex == "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -376,7 +394,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0X0P+0******************");
+ assert(ex == "-" + hf + padding);
assert(ios.width() == 0);
}
ios.width(25);
@@ -384,7 +402,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "******************-0X0P+0");
+ assert(ex == padding + "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -392,17 +410,18 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-******************0X0P+0");
+ assert(ex == "-" + padding + hf);
assert(ios.width() == 0);
}
}
ios.imbue(lg);
+ hf = hexfloat_fmt(0., ios);
{
ios.width(0);
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0X0P+0");
+ assert(ex == "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -410,7 +429,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0X0P+0******************");
+ assert(ex == "-" + hf + padding);
assert(ios.width() == 0);
}
ios.width(25);
@@ -418,7 +437,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "******************-0X0P+0");
+ assert(ex == padding + "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -426,7 +445,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-******************0X0P+0");
+ assert(ex == "-" + padding + hf);
assert(ios.width() == 0);
}
}
@@ -434,12 +453,13 @@ void test1()
std::showpoint(ios);
{
ios.imbue(lc);
+ hf = hexfloat_fmt(0., ios);
{
ios.width(0);
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0X0.P+0");
+ assert(ex == "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -447,7 +467,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0X0.P+0*****************");
+ assert(ex == "-" + hf + padding);
assert(ios.width() == 0);
}
ios.width(25);
@@ -455,7 +475,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "*****************-0X0.P+0");
+ assert(ex == padding + "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -463,17 +483,18 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-*****************0X0.P+0");
+ assert(ex == "-" + padding + hf);
assert(ios.width() == 0);
}
}
ios.imbue(lg);
+ hf = hexfloat_fmt(0., ios);
{
ios.width(0);
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0X0;P+0");
+ assert(ex == "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -481,7 +502,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0X0;P+0*****************");
+ assert(ex == "-" + hf + padding);
assert(ios.width() == 0);
}
ios.width(25);
@@ -489,7 +510,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "*****************-0X0;P+0");
+ assert(ex == padding + "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -497,7 +518,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-*****************0X0;P+0");
+ assert(ex == "-" + padding + hf);
assert(ios.width() == 0);
}
}
@@ -508,12 +529,13 @@ void test1()
std::noshowpoint(ios);
{
ios.imbue(lc);
+ hf = hexfloat_fmt(0., ios);
{
ios.width(0);
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0X0P+0");
+ assert(ex == "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -521,7 +543,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0X0P+0******************");
+ assert(ex == "-" + hf + padding);
assert(ios.width() == 0);
}
ios.width(25);
@@ -529,7 +551,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "******************-0X0P+0");
+ assert(ex == padding + "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -537,17 +559,18 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-******************0X0P+0");
+ assert(ex == "-" + padding + hf);
assert(ios.width() == 0);
}
}
ios.imbue(lg);
+ hf = hexfloat_fmt(0., ios);
{
ios.width(0);
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0X0P+0");
+ assert(ex == "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -555,7 +578,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0X0P+0******************");
+ assert(ex == "-" + hf + padding);
assert(ios.width() == 0);
}
ios.width(25);
@@ -563,7 +586,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "******************-0X0P+0");
+ assert(ex == padding + "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -571,7 +594,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-******************0X0P+0");
+ assert(ex == "-" + padding + hf);
assert(ios.width() == 0);
}
}
@@ -579,12 +602,13 @@ void test1()
std::showpoint(ios);
{
ios.imbue(lc);
+ hf = hexfloat_fmt(0., ios);
{
ios.width(0);
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0X0.P+0");
+ assert(ex == "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -592,7 +616,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0X0.P+0*****************");
+ assert(ex == "-" + hf + padding);
assert(ios.width() == 0);
}
ios.width(25);
@@ -600,7 +624,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "*****************-0X0.P+0");
+ assert(ex == padding + "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -608,17 +632,18 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-*****************0X0.P+0");
+ assert(ex == "-" + padding + hf);
assert(ios.width() == 0);
}
}
ios.imbue(lg);
+ hf = hexfloat_fmt(0., ios);
{
ios.width(0);
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0X0;P+0");
+ assert(ex == "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -626,7 +651,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0X0;P+0*****************");
+ assert(ex == "-" + hf + padding);
assert(ios.width() == 0);
}
ios.width(25);
@@ -634,7 +659,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "*****************-0X0;P+0");
+ assert(ex == padding + "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -642,7 +667,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-*****************0X0;P+0");
+ assert(ex == "-" + padding + hf);
assert(ios.width() == 0);
}
}
@@ -659,12 +684,13 @@ void test1()
std::noshowpoint(ios);
{
ios.imbue(lc);
+ hf = hexfloat_fmt(0., ios);
{
ios.width(0);
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0x0p+0");
+ assert(ex == "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -672,7 +698,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0x0p+0******************");
+ assert(ex == "-" + hf + padding);
assert(ios.width() == 0);
}
ios.width(25);
@@ -680,7 +706,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "******************-0x0p+0");
+ assert(ex == padding + "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -688,17 +714,18 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-******************0x0p+0");
+ assert(ex == "-" + padding + hf);
assert(ios.width() == 0);
}
}
ios.imbue(lg);
+ hf = hexfloat_fmt(0., ios);
{
ios.width(0);
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0x0p+0");
+ assert(ex == "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -706,7 +733,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0x0p+0******************");
+ assert(ex == "-" + hf + padding);
assert(ios.width() == 0);
}
ios.width(25);
@@ -714,7 +741,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "******************-0x0p+0");
+ assert(ex == padding + "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -722,7 +749,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-******************0x0p+0");
+ assert(ex == "-" + padding + hf);
assert(ios.width() == 0);
}
}
@@ -730,12 +757,13 @@ void test1()
std::showpoint(ios);
{
ios.imbue(lc);
+ hf = hexfloat_fmt(0., ios);
{
ios.width(0);
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0x0.p+0");
+ assert(ex == "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -743,7 +771,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0x0.p+0*****************");
+ assert(ex == "-" + hf + padding);
assert(ios.width() == 0);
}
ios.width(25);
@@ -751,7 +779,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "*****************-0x0.p+0");
+ assert(ex == padding + "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -759,17 +787,18 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-*****************0x0.p+0");
+ assert(ex == "-" + padding + hf);
assert(ios.width() == 0);
}
}
ios.imbue(lg);
+ hf = hexfloat_fmt(0., ios);
{
ios.width(0);
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0x0;p+0");
+ assert(ex == "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -777,7 +806,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0x0;p+0*****************");
+ assert(ex == "-" + hf + padding);
assert(ios.width() == 0);
}
ios.width(25);
@@ -785,7 +814,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "*****************-0x0;p+0");
+ assert(ex == padding + "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -793,7 +822,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-*****************0x0;p+0");
+ assert(ex == "-" + padding + hf);
assert(ios.width() == 0);
}
}
@@ -804,12 +833,13 @@ void test1()
std::noshowpoint(ios);
{
ios.imbue(lc);
+ hf = hexfloat_fmt(0., ios);
{
ios.width(0);
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0x0p+0");
+ assert(ex == "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -817,7 +847,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0x0p+0******************");
+ assert(ex == "-" + hf + padding);
assert(ios.width() == 0);
}
ios.width(25);
@@ -825,7 +855,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "******************-0x0p+0");
+ assert(ex == padding + "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -833,17 +863,18 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-******************0x0p+0");
+ assert(ex == "-" + padding + hf);
assert(ios.width() == 0);
}
}
ios.imbue(lg);
+ hf = hexfloat_fmt(0., ios);
{
ios.width(0);
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0x0p+0");
+ assert(ex == "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -851,7 +882,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0x0p+0******************");
+ assert(ex == "-" + hf + padding);
assert(ios.width() == 0);
}
ios.width(25);
@@ -859,7 +890,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "******************-0x0p+0");
+ assert(ex == padding + "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -867,7 +898,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-******************0x0p+0");
+ assert(ex == "-" + padding + hf);
assert(ios.width() == 0);
}
}
@@ -875,12 +906,13 @@ void test1()
std::showpoint(ios);
{
ios.imbue(lc);
+ hf = hexfloat_fmt(0., ios);
{
ios.width(0);
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0x0.p+0");
+ assert(ex == "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -888,7 +920,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0x0.p+0*****************");
+ assert(ex == "-" + hf + padding);
assert(ios.width() == 0);
}
ios.width(25);
@@ -896,7 +928,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "*****************-0x0.p+0");
+ assert(ex == padding + "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -904,17 +936,18 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-*****************0x0.p+0");
+ assert(ex == "-" + padding + hf);
assert(ios.width() == 0);
}
}
ios.imbue(lg);
+ hf = hexfloat_fmt(0., ios);
{
ios.width(0);
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0x0;p+0");
+ assert(ex == "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -922,7 +955,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0x0;p+0*****************");
+ assert(ex == "-" + hf + padding);
assert(ios.width() == 0);
}
ios.width(25);
@@ -930,7 +963,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "*****************-0x0;p+0");
+ assert(ex == padding + "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -938,7 +971,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-*****************0x0;p+0");
+ assert(ex == "-" + padding + hf);
assert(ios.width() == 0);
}
}
@@ -952,12 +985,13 @@ void test1()
std::noshowpoint(ios);
{
ios.imbue(lc);
+ hf = hexfloat_fmt(0., ios);
{
ios.width(0);
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0X0P+0");
+ assert(ex == "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -965,7 +999,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0X0P+0******************");
+ assert(ex == "-" + hf + padding);
assert(ios.width() == 0);
}
ios.width(25);
@@ -973,7 +1007,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "******************-0X0P+0");
+ assert(ex == padding + "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -981,17 +1015,18 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-******************0X0P+0");
+ assert(ex == "-" + padding + hf);
assert(ios.width() == 0);
}
}
ios.imbue(lg);
+ hf = hexfloat_fmt(0., ios);
{
ios.width(0);
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0X0P+0");
+ assert(ex == "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -999,7 +1034,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0X0P+0******************");
+ assert(ex == "-" + hf + padding);
assert(ios.width() == 0);
}
ios.width(25);
@@ -1007,7 +1042,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "******************-0X0P+0");
+ assert(ex == padding + "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -1015,7 +1050,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-******************0X0P+0");
+ assert(ex == "-" + padding + hf);
assert(ios.width() == 0);
}
}
@@ -1023,12 +1058,13 @@ void test1()
std::showpoint(ios);
{
ios.imbue(lc);
+ hf = hexfloat_fmt(0., ios);
{
ios.width(0);
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0X0.P+0");
+ assert(ex == "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -1036,7 +1072,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0X0.P+0*****************");
+ assert(ex == "-" + hf + padding);
assert(ios.width() == 0);
}
ios.width(25);
@@ -1044,7 +1080,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "*****************-0X0.P+0");
+ assert(ex == padding + "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -1052,17 +1088,18 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-*****************0X0.P+0");
+ assert(ex == "-" + padding + hf);
assert(ios.width() == 0);
}
}
ios.imbue(lg);
+ hf = hexfloat_fmt(0., ios);
{
ios.width(0);
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0X0;P+0");
+ assert(ex == "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -1070,7 +1107,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0X0;P+0*****************");
+ assert(ex == "-" + hf + padding);
assert(ios.width() == 0);
}
ios.width(25);
@@ -1078,7 +1115,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "*****************-0X0;P+0");
+ assert(ex == padding + "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -1086,7 +1123,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-*****************0X0;P+0");
+ assert(ex == "-" + padding + hf);
assert(ios.width() == 0);
}
}
@@ -1097,12 +1134,13 @@ void test1()
std::noshowpoint(ios);
{
ios.imbue(lc);
+ hf = hexfloat_fmt(0., ios);
{
ios.width(0);
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0X0P+0");
+ assert(ex == "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -1110,7 +1148,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0X0P+0******************");
+ assert(ex == "-" + hf + padding);
assert(ios.width() == 0);
}
ios.width(25);
@@ -1118,7 +1156,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "******************-0X0P+0");
+ assert(ex == padding + "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -1126,17 +1164,18 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-******************0X0P+0");
+ assert(ex == "-" + padding + hf);
assert(ios.width() == 0);
}
}
ios.imbue(lg);
+ hf = hexfloat_fmt(0., ios);
{
ios.width(0);
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0X0P+0");
+ assert(ex == "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -1144,7 +1183,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0X0P+0******************");
+ assert(ex == "-" + hf + padding);
assert(ios.width() == 0);
}
ios.width(25);
@@ -1152,7 +1191,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "******************-0X0P+0");
+ assert(ex == padding + "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -1160,7 +1199,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-******************0X0P+0");
+ assert(ex == "-" + padding + hf);
assert(ios.width() == 0);
}
}
@@ -1168,12 +1207,13 @@ void test1()
std::showpoint(ios);
{
ios.imbue(lc);
+ hf = hexfloat_fmt(0., ios);
{
ios.width(0);
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0X0.P+0");
+ assert(ex == "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -1181,7 +1221,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0X0.P+0*****************");
+ assert(ex == "-" + hf + padding);
assert(ios.width() == 0);
}
ios.width(25);
@@ -1189,7 +1229,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "*****************-0X0.P+0");
+ assert(ex == padding + "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -1197,17 +1237,18 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-*****************0X0.P+0");
+ assert(ex == "-" + padding + hf);
assert(ios.width() == 0);
}
}
ios.imbue(lg);
+ hf = hexfloat_fmt(0., ios);
{
ios.width(0);
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0X0;P+0");
+ assert(ex == "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -1215,7 +1256,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0X0;P+0*****************");
+ assert(ex == "-" + hf + padding);
assert(ios.width() == 0);
}
ios.width(25);
@@ -1223,7 +1264,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "*****************-0X0;P+0");
+ assert(ex == padding + "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -1231,7 +1272,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-*****************0X0;P+0");
+ assert(ex == "-" + padding + hf);
assert(ios.width() == 0);
}
}
@@ -1248,12 +1289,13 @@ void test1()
std::noshowpoint(ios);
{
ios.imbue(lc);
+ hf = hexfloat_fmt(0., ios);
{
ios.width(0);
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0x0p+0");
+ assert(ex == "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -1261,7 +1303,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0x0p+0******************");
+ assert(ex == "-" + hf + padding);
assert(ios.width() == 0);
}
ios.width(25);
@@ -1269,7 +1311,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "******************-0x0p+0");
+ assert(ex == padding + "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -1277,17 +1319,18 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-******************0x0p+0");
+ assert(ex == "-" + padding + hf);
assert(ios.width() == 0);
}
}
ios.imbue(lg);
+ hf = hexfloat_fmt(0., ios);
{
ios.width(0);
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0x0p+0");
+ assert(ex == "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -1295,7 +1338,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0x0p+0******************");
+ assert(ex == "-" + hf + padding);
assert(ios.width() == 0);
}
ios.width(25);
@@ -1303,7 +1346,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "******************-0x0p+0");
+ assert(ex == padding + "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -1311,7 +1354,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-******************0x0p+0");
+ assert(ex == "-" + padding + hf);
assert(ios.width() == 0);
}
}
@@ -1319,12 +1362,13 @@ void test1()
std::showpoint(ios);
{
ios.imbue(lc);
+ hf = hexfloat_fmt(0., ios);
{
ios.width(0);
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0x0.p+0");
+ assert(ex == "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -1332,7 +1376,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0x0.p+0*****************");
+ assert(ex == "-" + hf + padding);
assert(ios.width() == 0);
}
ios.width(25);
@@ -1340,7 +1384,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "*****************-0x0.p+0");
+ assert(ex == padding + "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -1348,17 +1392,18 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-*****************0x0.p+0");
+ assert(ex == "-" + padding + hf);
assert(ios.width() == 0);
}
}
ios.imbue(lg);
+ hf = hexfloat_fmt(0., ios);
{
ios.width(0);
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0x0;p+0");
+ assert(ex == "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -1366,7 +1411,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0x0;p+0*****************");
+ assert(ex == "-" + hf + padding);
assert(ios.width() == 0);
}
ios.width(25);
@@ -1374,7 +1419,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "*****************-0x0;p+0");
+ assert(ex == padding + "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -1382,7 +1427,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-*****************0x0;p+0");
+ assert(ex == "-" + padding + hf);
assert(ios.width() == 0);
}
}
@@ -1393,12 +1438,13 @@ void test1()
std::noshowpoint(ios);
{
ios.imbue(lc);
+ hf = hexfloat_fmt(0., ios);
{
ios.width(0);
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0x0p+0");
+ assert(ex == "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -1406,7 +1452,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0x0p+0******************");
+ assert(ex == "-" + hf + padding);
assert(ios.width() == 0);
}
ios.width(25);
@@ -1414,7 +1460,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "******************-0x0p+0");
+ assert(ex == padding + "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -1422,17 +1468,18 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-******************0x0p+0");
+ assert(ex == "-" + padding + hf);
assert(ios.width() == 0);
}
}
ios.imbue(lg);
{
ios.width(0);
+ hf = hexfloat_fmt(0., ios);
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0x0p+0");
+ assert(ex == "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -1440,7 +1487,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0x0p+0******************");
+ assert(ex == "-" + hf + padding);
assert(ios.width() == 0);
}
ios.width(25);
@@ -1448,7 +1495,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "******************-0x0p+0");
+ assert(ex == padding + "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -1456,7 +1503,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-******************0x0p+0");
+ assert(ex == "-" + padding + hf);
assert(ios.width() == 0);
}
}
@@ -1464,12 +1511,13 @@ void test1()
std::showpoint(ios);
{
ios.imbue(lc);
+ hf = hexfloat_fmt(0., ios);
{
ios.width(0);
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0x0.p+0");
+ assert(ex == "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -1477,7 +1525,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0x0.p+0*****************");
+ assert(ex == "-" + hf + padding);
assert(ios.width() == 0);
}
ios.width(25);
@@ -1485,7 +1533,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "*****************-0x0.p+0");
+ assert(ex == padding + "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -1493,17 +1541,18 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-*****************0x0.p+0");
+ assert(ex == "-" + padding + hf);
assert(ios.width() == 0);
}
}
ios.imbue(lg);
+ hf = hexfloat_fmt(0., ios);
{
ios.width(0);
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0x0;p+0");
+ assert(ex == "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -1511,7 +1560,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0x0;p+0*****************");
+ assert(ex == "-" + hf + padding);
assert(ios.width() == 0);
}
ios.width(25);
@@ -1519,7 +1568,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "*****************-0x0;p+0");
+ assert(ex == padding + "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -1527,7 +1576,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-*****************0x0;p+0");
+ assert(ex == "-" + padding + hf);
assert(ios.width() == 0);
}
}
@@ -1541,12 +1590,13 @@ void test1()
std::noshowpoint(ios);
{
ios.imbue(lc);
+ hf = hexfloat_fmt(0., ios);
{
ios.width(0);
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0X0P+0");
+ assert(ex == "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -1554,7 +1604,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0X0P+0******************");
+ assert(ex == "-" + hf + padding);
assert(ios.width() == 0);
}
ios.width(25);
@@ -1562,7 +1612,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "******************-0X0P+0");
+ assert(ex == padding + "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -1570,17 +1620,18 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-******************0X0P+0");
+ assert(ex == "-" + padding + hf);
assert(ios.width() == 0);
}
}
ios.imbue(lg);
+ hf = hexfloat_fmt(0., ios);
{
ios.width(0);
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0X0P+0");
+ assert(ex == "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -1588,7 +1639,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0X0P+0******************");
+ assert(ex == "-" + hf + padding);
assert(ios.width() == 0);
}
ios.width(25);
@@ -1596,7 +1647,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "******************-0X0P+0");
+ assert(ex == padding + "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -1604,7 +1655,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-******************0X0P+0");
+ assert(ex == "-" + padding + hf);
assert(ios.width() == 0);
}
}
@@ -1612,12 +1663,13 @@ void test1()
std::showpoint(ios);
{
ios.imbue(lc);
+ hf = hexfloat_fmt(0., ios);
{
ios.width(0);
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0X0.P+0");
+ assert(ex == "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -1625,7 +1677,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0X0.P+0*****************");
+ assert(ex == "-" + hf + padding);
assert(ios.width() == 0);
}
ios.width(25);
@@ -1633,7 +1685,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "*****************-0X0.P+0");
+ assert(ex == padding + "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -1641,17 +1693,18 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-*****************0X0.P+0");
+ assert(ex == "-" + padding + hf);
assert(ios.width() == 0);
}
}
ios.imbue(lg);
+ hf = hexfloat_fmt(0., ios);
{
ios.width(0);
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0X0;P+0");
+ assert(ex == "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -1659,7 +1712,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0X0;P+0*****************");
+ assert(ex == "-" + hf + padding);
assert(ios.width() == 0);
}
ios.width(25);
@@ -1667,7 +1720,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "*****************-0X0;P+0");
+ assert(ex == padding + "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -1675,7 +1728,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-*****************0X0;P+0");
+ assert(ex == "-" + padding + hf);
assert(ios.width() == 0);
}
}
@@ -1686,12 +1739,13 @@ void test1()
std::noshowpoint(ios);
{
ios.imbue(lc);
+ hf = hexfloat_fmt(0., ios);
{
ios.width(0);
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0X0P+0");
+ assert(ex == "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -1699,7 +1753,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0X0P+0******************");
+ assert(ex == "-" + hf + padding);
assert(ios.width() == 0);
}
ios.width(25);
@@ -1707,7 +1761,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "******************-0X0P+0");
+ assert(ex == padding + "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -1715,17 +1769,18 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-******************0X0P+0");
+ assert(ex == "-" + padding + hf);
assert(ios.width() == 0);
}
}
ios.imbue(lg);
+ hf = hexfloat_fmt(0., ios);
{
ios.width(0);
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0X0P+0");
+ assert(ex == "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -1733,7 +1788,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0X0P+0******************");
+ assert(ex == "-" + hf + padding);
assert(ios.width() == 0);
}
ios.width(25);
@@ -1741,7 +1796,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "******************-0X0P+0");
+ assert(ex == padding + "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -1749,7 +1804,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-******************0X0P+0");
+ assert(ex == "-" + padding + hf);
assert(ios.width() == 0);
}
}
@@ -1757,12 +1812,13 @@ void test1()
std::showpoint(ios);
{
ios.imbue(lc);
+ hf = hexfloat_fmt(0., ios);
{
ios.width(0);
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0X0.P+0");
+ assert(ex == "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -1770,7 +1826,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0X0.P+0*****************");
+ assert(ex == "-" + hf + padding);
assert(ios.width() == 0);
}
ios.width(25);
@@ -1778,7 +1834,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "*****************-0X0.P+0");
+ assert(ex == padding + "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -1786,17 +1842,18 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-*****************0X0.P+0");
+ assert(ex == "-" + padding + hf);
assert(ios.width() == 0);
}
}
ios.imbue(lg);
+ hf = hexfloat_fmt(0., ios);
{
ios.width(0);
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0X0;P+0");
+ assert(ex == "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -1804,7 +1861,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-0X0;P+0*****************");
+ assert(ex == "-" + hf + padding);
assert(ios.width() == 0);
}
ios.width(25);
@@ -1812,7 +1869,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "*****************-0X0;P+0");
+ assert(ex == padding + "-" + hf);
assert(ios.width() == 0);
}
ios.width(25);
@@ -1820,7 +1877,7 @@ void test1()
{
cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
std::string ex(str, base(iter));
- assert(ex == "-*****************0X0;P+0");
+ assert(ex == "-" + padding + hf);
assert(ios.width() == 0);
}
}
More information about the libcxx-commits
mailing list