Skip to content

Commit 1457b5f

Browse files
committed
Workaround for doctest.
1 parent 6921c8f commit 1457b5f

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

tests/basictest.cpp

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -477,9 +477,13 @@ TEST_CASE("32bit.general") {
477477
verify(append_zeros("1.1754941406275178592461758986628081843312458647327962400313859427181746759860647699724722770042717456817626953125",655), 0x1.2ced3p+0f);
478478
verify(append_zeros("1.1754941406275178592461758986628081843312458647327962400313859427181746759860647699724722770042717456817626953125",656), 0x1.2ced3p+0f);
479479
verify(append_zeros("1.1754941406275178592461758986628081843312458647327962400313859427181746759860647699724722770042717456817626953125",1000), 0x1.2ced3p+0f);
480-
verify(append_zeros("1.1754941406275178592461758986628081843312458647327962400313859427181746759860647699724722770042717456817626953125",655) + "e-38", 0x1.fffff8p-127f);
481-
verify(append_zeros("1.1754941406275178592461758986628081843312458647327962400313859427181746759860647699724722770042717456817626953125",656) + "e-38", 0x1.fffff8p-127f);
482-
verify(append_zeros("1.1754941406275178592461758986628081843312458647327962400313859427181746759860647699724722770042717456817626953125",1000) + "e-38", 0x1.fffff8p-127f);
480+
std::string test_string;
481+
test_string = append_zeros("1.1754941406275178592461758986628081843312458647327962400313859427181746759860647699724722770042717456817626953125",655) + std::string("e-38");
482+
verify(test_string, 0x1.fffff8p-127f);
483+
test_string = append_zeros("1.1754941406275178592461758986628081843312458647327962400313859427181746759860647699724722770042717456817626953125",656) + std::string("e-38");
484+
verify(test_string, 0x1.fffff8p-127f);
485+
test_string = append_zeros("1.1754941406275178592461758986628081843312458647327962400313859427181746759860647699724722770042717456817626953125",1000) + std::string("e-38");
486+
verify(test_string, 0x1.fffff8p-127f);
483487
verify32(1.00000006e+09f);
484488
verify32(1.4012984643e-45f);
485489
verify32(1.1754942107e-38f);

0 commit comments

Comments
 (0)