Skip to content

Commit

Permalink
Refs #21385: Fix DDSTypesTest_KeyedLongDoubleStruct test
Browse files Browse the repository at this point in the history
Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>
  • Loading branch information
Mario-DL committed Aug 1, 2024
1 parent d8d2610 commit 0f90163
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,10 @@ TEST_F(DynamicTypesDDSTypesTest, DDSTypesTest_KeyedLongDoubleStruct)
{
KeyedLongDoubleStruct struct_data;
TypeSupport static_pubsubType {new KeyedLongDoubleStructPubSubType()};
check_serialization_deserialization(struct_type, data, encoding, struct_data, static_pubsubType);
// Experimental analysis showed that long double is mostly accepted to truly
// use/have 10 bytes across implementations.
// Compare only those number of bytes of the instance handle.
check_serialization_deserialization(struct_type, data, encoding, struct_data, static_pubsubType, 10);
EXPECT_EQ(struct_data.key_longdouble(), test_value);
EXPECT_EQ(struct_data.var_longdouble(), test_value);
}
Expand Down

0 comments on commit 0f90163

Please sign in to comment.