Fix wxString::From[C]Double() unit test for MSVC 14 and later
Since MSVC 14, VC CRT uses standard-conforming 2 digits for the exponent instead of the non-standard 3 used previously.
This commit is contained in:
@@ -845,10 +845,9 @@ void StringTestCase::FromDouble()
|
|||||||
} testData[] =
|
} testData[] =
|
||||||
{
|
{
|
||||||
{ 1.23, -1, "1.23" },
|
{ 1.23, -1, "1.23" },
|
||||||
// NB: there are no standards about the minimum exponent width
|
// All MSVC versions until MSVC 14 used 3 digits for the exponent
|
||||||
// and newer MSVC versions use 3 digits as minimum exponent
|
// unnecessarily, account for this non-standard behaviour.
|
||||||
// width while GNU libc uses 2 digits as minimum width...
|
#if defined(wxUSING_VC_CRT_IO) && !wxCHECK_VISUALC_VERSION(14)
|
||||||
#ifdef wxUSING_VC_CRT_IO
|
|
||||||
{ -3e-10, -1, "-3e-010" },
|
{ -3e-10, -1, "-3e-010" },
|
||||||
#else
|
#else
|
||||||
{ -3e-10, -1, "-3e-10" },
|
{ -3e-10, -1, "-3e-10" },
|
||||||
|
Reference in New Issue
Block a user