mirror of
https://git.sr.ht/~thestr4ng3r/chiaki
synced 2025-08-14 18:57:07 -07:00
Add ChiakiSeqNum32
This commit is contained in:
parent
044159e83d
commit
b3f71fc5ab
2 changed files with 45 additions and 19 deletions
|
@ -51,6 +51,20 @@ static MunitResult test_seq_num_16(const MunitParameter params[], void *user)
|
|||
}
|
||||
|
||||
|
||||
static MunitResult test_seq_num_32(const MunitParameter params[], void *user)
|
||||
{
|
||||
munit_assert(chiaki_seq_num_32_gt(1, 0));
|
||||
munit_assert(!chiaki_seq_num_32_gt(0, 1));
|
||||
munit_assert(!chiaki_seq_num_32_lt(1, 0));
|
||||
munit_assert(chiaki_seq_num_32_lt(0, 1));
|
||||
munit_assert(chiaki_seq_num_32_gt(1, 0xfffffff5));
|
||||
munit_assert(!chiaki_seq_num_32_gt(0xfffffff5, 1));
|
||||
|
||||
return MUNIT_OK;
|
||||
}
|
||||
|
||||
|
||||
|
||||
MunitTest tests_seq_num[] = {
|
||||
{
|
||||
"/seq_num_16",
|
||||
|
@ -60,5 +74,13 @@ MunitTest tests_seq_num[] = {
|
|||
MUNIT_TEST_OPTION_NONE,
|
||||
NULL
|
||||
},
|
||||
{
|
||||
"/seq_num_32",
|
||||
test_seq_num_32,
|
||||
NULL,
|
||||
NULL,
|
||||
MUNIT_TEST_OPTION_NONE,
|
||||
NULL
|
||||
},
|
||||
{ NULL, NULL, NULL, NULL, MUNIT_TEST_OPTION_NONE, NULL }
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue