mirror of
https://github.com/dlang/phobos.git
synced 2025-04-28 22:21:09 +03:00
Fix partially Issue 20371 - std.format limited to 500 characters for floats
This commit is contained in:
parent
e084f5eb33
commit
5516a03e68
1 changed files with 19 additions and 0 deletions
19
std/format.d
19
std/format.d
|
@ -2882,6 +2882,25 @@ useSnprintf:
|
|||
assert(format!"%a"(nextUp(0.0)) == "0x0.0000000000001p-1022");
|
||||
}
|
||||
|
||||
// issue 20371
|
||||
@safe unittest
|
||||
{
|
||||
assert(format!"%.1000a"(1.0) ==
|
||||
"0x1.000000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
~"000000000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
~"000000000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
~"000000000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
~"000000000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
~"000000000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
~"000000000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
~"000000000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
~"000000000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
~"000000000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
~"000000000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
~"000000000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
~"0000000000000000000000000000000000000000000000000000000000000000000p+0");
|
||||
}
|
||||
|
||||
/*
|
||||
Formatting a `creal` is deprecated but still kept around for a while.
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue