diff --git a/config_utilities/test/src/utils.cpp b/config_utilities/test/src/utils.cpp index e0bef4c..7e8697a 100644 --- a/config_utilities/test/src/utils.cpp +++ b/config_utilities/test/src/utils.cpp @@ -62,8 +62,8 @@ bool expectEqual(const YAML::Node& a, const YAML::Node& b, double epsilon) { return false; } for (size_t i = 0; i < a.size(); ++i) { - EXPECT_TRUE(expectEqual(a[i], b[i])); - if (!expectEqual(a[i], b[i])) { + EXPECT_TRUE(expectEqual(a[i], b[i], epsilon)); + if (!expectEqual(a[i], b[i], epsilon)) { return false; } } @@ -79,8 +79,8 @@ bool expectEqual(const YAML::Node& a, const YAML::Node& b, double epsilon) { ADD_FAILURE() << "Key '" << key << "' not found in b."; return false; } - EXPECT_TRUE(expectEqual(kv_pair.second, b[key])); - if (!expectEqual(kv_pair.second, b[key])) { + EXPECT_TRUE(expectEqual(kv_pair.second, b[key], epsilon)); + if (!expectEqual(kv_pair.second, b[key], epsilon)) { return false; } } diff --git a/config_utilities/test/tests/field_input_info.cpp b/config_utilities/test/tests/field_input_info.cpp index 5a7b020..1187e28 100644 --- a/config_utilities/test/tests/field_input_info.cpp +++ b/config_utilities/test/tests/field_input_info.cpp @@ -220,7 +220,7 @@ name: DefaultConfig lower_exclusive: true )"; // Epect near equal for floating point values. - expectEqual(info, YAML::Load(expected), 1e-4); + expectEqual(info, YAML::Load(expected), 1e-6); } } // namespace config::test