Skip to content

Commit

Permalink
Improve Value::IsFloat() coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
miloyip committed Apr 16, 2016
1 parent fdd4431 commit c71825f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/unittest/valuetest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down Expand Up @@ -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());
Expand Down Expand Up @@ -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());
Expand Down Expand Up @@ -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());
Expand Down

0 comments on commit c71825f

Please sign in to comment.