summaryrefslogtreecommitdiff
path: root/unittests/ADT/StringExtrasTest.cpp
diff options
context:
space:
mode:
authorSimon Pilgrim <llvm-dev@redking.me.uk>2017-06-23 13:53:55 +0000
committerSimon Pilgrim <llvm-dev@redking.me.uk>2017-06-23 13:53:55 +0000
commitd263a71f37d8fceb109058661ed91ad04863e2fb (patch)
treeafd3191eb05fec7b6cc9e8f939331267bcb78fc8 /unittests/ADT/StringExtrasTest.cpp
parent2cfdb4aa6ccbdbd2bf91a865e3db0e490eb690aa (diff)
Fix double->float truncation warning on MSVC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@306101 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests/ADT/StringExtrasTest.cpp')
-rw-r--r--unittests/ADT/StringExtrasTest.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/unittests/ADT/StringExtrasTest.cpp b/unittests/ADT/StringExtrasTest.cpp
index 8f06f1e6e38..234a40d26cf 100644
--- a/unittests/ADT/StringExtrasTest.cpp
+++ b/unittests/ADT/StringExtrasTest.cpp
@@ -70,7 +70,7 @@ TEST(StringExtrasTest, ToAndFromHex) {
TEST(StringExtrasTest, to_float) {
float F;
EXPECT_TRUE(to_float("4.7", F));
- EXPECT_FLOAT_EQ(4.7, F);
+ EXPECT_FLOAT_EQ(4.7f, F);
double D;
EXPECT_TRUE(to_float("4.7", D));
@@ -82,5 +82,5 @@ TEST(StringExtrasTest, to_float) {
EXPECT_FALSE(to_float("foo", F));
EXPECT_FALSE(to_float("7.4 foo", F));
- EXPECT_FLOAT_EQ(4.7, F); // F should be unchanged
+ EXPECT_FLOAT_EQ(4.7f, F); // F should be unchanged
}