mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-22 00:03:34 +08:00
Compile time BitLenToByteLen computation; marshal type util tests
This commit is contained in:
@@ -76,18 +76,6 @@ struct CustomType
|
||||
};
|
||||
|
||||
|
||||
TEST(Array, IntegerBitLen)
|
||||
{
|
||||
using uavcan::IntegerBitLen;
|
||||
|
||||
ASSERT_EQ(0, IntegerBitLen<0>::Result);
|
||||
ASSERT_EQ(1, IntegerBitLen<1>::Result);
|
||||
ASSERT_EQ(6, IntegerBitLen<42>::Result);
|
||||
ASSERT_EQ(8, IntegerBitLen<232>::Result);
|
||||
ASSERT_EQ(32, IntegerBitLen<0x81234567>::Result);
|
||||
}
|
||||
|
||||
|
||||
TEST(Array, Basic)
|
||||
{
|
||||
typedef Array<IntegerSpec<8, SignednessSigned, CastModeTruncate>, ArrayModeStatic, 4> A1;
|
||||
|
||||
Reference in New Issue
Block a user