mirror of
https://github.com/iNavFlight/inav.git
synced 2025-07-25 01:05:21 +03:00
Add ZeroFArray Macro and make use of it in some parts
This commit is contained in:
parent
c30025b9fc
commit
59d81d6f6f
8 changed files with 13 additions and 12 deletions
|
@ -10,7 +10,7 @@ extern "C" {
|
|||
TEST(BitArrayTest, TestGetSet)
|
||||
{
|
||||
BITARRAY_DECLARE(p, 32);
|
||||
memset(p, 0, sizeof(p));
|
||||
ZERO_FARRAY(p);
|
||||
|
||||
bitArraySet(p, 14);
|
||||
EXPECT_EQ(bitArrayGet(p, 14), true);
|
||||
|
@ -25,7 +25,7 @@ TEST(BitArrayTest, TestGetSet)
|
|||
TEST(BitArrayTest, TestClr)
|
||||
{
|
||||
BITARRAY_DECLARE(p, 32);
|
||||
memset(p, 0, sizeof(p));
|
||||
ZERO_FARRAY(p);
|
||||
|
||||
bitArraySet(p, 31);
|
||||
EXPECT_EQ(bitArrayGet(p, 31), true);
|
||||
|
@ -37,8 +37,8 @@ TEST(BitArrayTest, TestClr)
|
|||
|
||||
TEST(BitArrayTest, TestFind)
|
||||
{
|
||||
BITARRAY_DECLARE(p, 32*4);
|
||||
memset(p, 0, sizeof(p));
|
||||
BITARRAY_DECLARE(p, 32 * 4);
|
||||
ZERO_FARRAY(p);
|
||||
|
||||
EXPECT_EQ(bitArrayFindFirstSet(p, 0, sizeof(p)), -1);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue