File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -502,14 +502,15 @@ TEST_CASE_FIXTURE(JsonLogStreamFixture, "TestJsonLogParams")
502
502
logValue.as_object ()[" MessageParams" ]
503
503
.as_object ()[" Field2" ]
504
504
.get_uint64 () == std::numeric_limits<std::uint64_t >::max ());
505
- CHECK (
506
- logValue.as_object ()[" MessageParams" ]
505
+ auto field3Val = logValue.as_object ()[" MessageParams" ]
507
506
.as_object ()[" Field3" ]
508
- .get_double () == 3.141593 );
507
+ .get_double ();
508
+ auto difference = std::abs (field3Val - std::numbers::pi);
509
+ CHECK (difference < 1e-4 );
509
510
CHECK (logValue.as_object ()[" Message" ].is_string ());
510
511
CHECK (
511
512
logValue.as_object ()[" Message" ].get_string () ==
512
- std::string{" Test: 1, 18446744073709551615, 3.141593 " });
513
+ std::string{" Test: 1, 18446744073709551615, 3.141592653589793 " });
513
514
}
514
515
515
516
TEST_CASE_FIXTURE (JsonLogStreamFixture, " TestJsonLogFields" )
You can’t perform that action at this time.
0 commit comments