mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-25 07:23:34 +08:00
GDTR: much faster type signature computation
This commit is contained in:
@@ -249,6 +249,14 @@ TEST(GlobalDataTypeRegistry, AggregateSignature)
|
||||
check_signature.extend(DataTypeB::getDataTypeSignature());
|
||||
ASSERT_EQ(check_signature, sign);
|
||||
}
|
||||
|
||||
// One
|
||||
mask[1] = mask[43] = true;
|
||||
sign = GlobalDataTypeRegistry::instance().computeAggregateSignature(uavcan::DataTypeKindService, mask);
|
||||
ASSERT_TRUE(mask[43]); // DataTypeD
|
||||
mask[43] = false;
|
||||
ASSERT_FALSE(mask.any());
|
||||
ASSERT_EQ(DataTypeD::getDataTypeSignature(), sign);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user