Skip to content

Commit

Permalink
fix: float case
Browse files Browse the repository at this point in the history
Signed-off-by: Dup4 <lyuzhi.pan@gmail.com>
  • Loading branch information
Dup4 committed Sep 18, 2023
1 parent 57575e4 commit 3fd3667
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions test/rapidjson_utility_usage_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ TEST_F(RapidJsonUtilityUsageTest, from_and_to_json) {
node.int_ = 2;
node.int64_t_ = int64_t(0x3f3f3f3f3f3f3f3f);
node.bool_ = true;
node.float_ = 4.8;
node.double_ = 4.8;
node.float_ = 0;
node.double_ = 0;
node.string_ = "test_string";
node.vector_int_ = std::vector<int>(2, 4);

Expand All @@ -48,8 +48,8 @@ TEST_F(RapidJsonUtilityUsageTest, from_and_to_json) {
"int_": 2,
"int64_t_": 4557430888798830399,
"bool_": true,
"float_": 4.800000190734863,
"double_": 4.8,
"float_": 0.0,
"double_": 0.0,
"string_": "test_string",
"vector_int_": [
4,
Expand All @@ -62,8 +62,8 @@ TEST_F(RapidJsonUtilityUsageTest, from_and_to_json) {
EXPECT_EQ(new_node.int_, 2);
EXPECT_EQ(new_node.int64_t_, 4557430888798830399);
EXPECT_EQ(new_node.bool_, true);
EXPECT_EQ(new_node.float_, 4.800000);
EXPECT_EQ(new_node.double_, 4.800000);
EXPECT_EQ(new_node.float_, 0.000000);
EXPECT_EQ(new_node.double_, 0.000000);
EXPECT_EQ(new_node.string_, std::string("test_string"));
EXPECT_EQ(new_node.vector_int_,
std::vector<int>({
Expand Down

0 comments on commit 3fd3667

Please sign in to comment.