Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9479 for code/branches


Ignore:
Timestamp:
Nov 30, 2012, 9:41:09 PM (12 years ago)
Author:
landauf
Message:

consider different float to string conversions

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/testing/test/util/ConvertTest.cc

    r9356 r9479  
    2020        EXPECT_EQ("10", multi_cast<std::string>(10.0f));
    2121        EXPECT_EQ("123.456", multi_cast<std::string>(123.456f));
    22         EXPECT_EQ("1.234e+012", multi_cast<std::string>(1234000000000.0f));
     22        {
     23            // expect 1.234e+012 or 1.234e+12
     24            std::string value = multi_cast<std::string>(1234000000000.0f);
     25            EXPECT_TRUE(value == "1.234e+012" || value == "1.234e+12");
     26        }
    2327
    2428        // double
     
    2630        EXPECT_EQ("10", multi_cast<std::string>(10.0));
    2731        EXPECT_EQ("123.456", multi_cast<std::string>(123.456));
    28         EXPECT_EQ("1.234e+012", multi_cast<std::string>(1234000000000.0));
     32        {
     33            // expect 1.234e+012 or 1.234e+12
     34            std::string value = multi_cast<std::string>(1234000000000.0);
     35            EXPECT_TRUE(value == "1.234e+012" || value == "1.234e+12");
     36        }
    2937
    3038        // char
Note: See TracChangeset for help on using the changeset viewer.