1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-19 14:25:20 +03:00

Use ARRAYLEN macro where applicable

This commit is contained in:
Mathias Rasmussen 2021-12-28 21:54:26 +01:00 committed by KarateBrot
parent 8462dd1bea
commit 90e792e243
9 changed files with 19 additions and 13 deletions

View file

@ -18,6 +18,7 @@
extern "C" {
#include "common/encoding.h"
#include "common/utils.h"
}
#include "unittest_macros.h"
@ -48,7 +49,7 @@ TEST(EncodingTest, ZigzagEncodingTest)
{ 2147483647, 4294967294},
{-2147483648, 4294967295},
};
int expectationCount = sizeof(expectations) / sizeof(expectations[0]);
int expectationCount = ARRAYLEN(expectations);
// expect
@ -67,7 +68,7 @@ TEST(EncodingTest, FloatToIntEncodingTest)
{2.0, 0x40000000}, // Exponent should be in the top bits
{4.5, 0x40900000}
};
int expectationCount = sizeof(expectations) / sizeof(expectations[0]);
int expectationCount = ARRAYLEN(expectations);
// expect