Changeset 9479
- Timestamp:
- Nov 30, 2012, 9:41:09 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/testing/test/util/ConvertTest.cc
r9356 r9479 20 20 EXPECT_EQ("10", multi_cast<std::string>(10.0f)); 21 21 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 } 23 27 24 28 // double … … 26 30 EXPECT_EQ("10", multi_cast<std::string>(10.0)); 27 31 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 } 29 37 30 38 // char
Note: See TracChangeset
for help on using the changeset viewer.