From c71825f80ea2eb0f40efc7494361f5fde81eb642 Mon Sep 17 00:00:00 2001 From: Milo Yip Date: Sat, 16 Apr 2016 22:14:38 +0800 Subject: [PATCH] Improve Value::IsFloat() coverage --- test/unittest/valuetest.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/unittest/valuetest.cpp b/test/unittest/valuetest.cpp index aac0a441c..feec049d0 100644 --- a/test/unittest/valuetest.cpp +++ b/test/unittest/valuetest.cpp @@ -402,6 +402,7 @@ TEST(Value, Int) { EXPECT_TRUE(x.IsUint64()); EXPECT_FALSE(x.IsDouble()); + EXPECT_FALSE(x.IsFloat()); EXPECT_FALSE(x.IsNull()); EXPECT_FALSE(x.IsBool()); EXPECT_FALSE(x.IsFalse()); @@ -456,6 +457,7 @@ TEST(Value, Uint) { EXPECT_NEAR(1234.0, x.GetDouble(), 0.0); // Number can always be cast as double but !IsDouble(). EXPECT_FALSE(x.IsDouble()); + EXPECT_FALSE(x.IsFloat()); EXPECT_FALSE(x.IsNull()); EXPECT_FALSE(x.IsBool()); EXPECT_FALSE(x.IsFalse()); @@ -500,6 +502,7 @@ TEST(Value, Int64) { EXPECT_TRUE(x.IsUint64()); EXPECT_FALSE(x.IsDouble()); + EXPECT_FALSE(x.IsFloat()); EXPECT_FALSE(x.IsNull()); EXPECT_FALSE(x.IsBool()); EXPECT_FALSE(x.IsFalse()); @@ -561,6 +564,7 @@ TEST(Value, Uint64) { EXPECT_TRUE(x.IsUint64()); EXPECT_FALSE(x.IsDouble()); + EXPECT_FALSE(x.IsFloat()); EXPECT_FALSE(x.IsNull()); EXPECT_FALSE(x.IsBool()); EXPECT_FALSE(x.IsFalse());