mirror of
https://github.com/reactos/reactos.git
synced 2025-01-03 21:09:19 +00:00
[NTDLL_APITEST]
Add some more tests for rtl bitmap functions svn path=/trunk/; revision=56798
This commit is contained in:
parent
32d6beb209
commit
1e6ffd8f10
1 changed files with 20 additions and 5 deletions
|
@ -290,6 +290,7 @@ Test_RtlFindClearBits(void)
|
|||
ok_int(RtlFindClearBits(&BitMapHeader, 1, 1), -1);
|
||||
|
||||
RtlInitializeBitMap(&BitMapHeader, Buffer, 8);
|
||||
ok_int(RtlFindClearBits(&BitMapHeader, 0, 3), 0);
|
||||
ok_int(RtlFindClearBits(&BitMapHeader, 1, 0), 1);
|
||||
ok_int(RtlFindClearBits(&BitMapHeader, 1, 1), 1);
|
||||
ok_int(RtlFindClearBits(&BitMapHeader, 1, 2), 4);
|
||||
|
@ -298,14 +299,21 @@ Test_RtlFindClearBits(void)
|
|||
ok_int(RtlFindClearBits(&BitMapHeader, 3, 0), -1);
|
||||
|
||||
RtlInitializeBitMap(&BitMapHeader, Buffer, 32);
|
||||
ok_int(RtlFindClearBits(&BitMapHeader, 0, 3), 0);
|
||||
ok_int(RtlFindClearBits(&BitMapHeader, 0, 21), 16);
|
||||
ok_int(RtlFindClearBits(&BitMapHeader, 0, 12), 8);
|
||||
ok_int(RtlFindClearBits(&BitMapHeader, 0, 31), 24);
|
||||
ok_int(RtlFindClearBits(&BitMapHeader, 0, 32), 0);
|
||||
ok_int(RtlFindClearBits(&BitMapHeader, 0, 39), 0);
|
||||
ok_int(RtlFindClearBits(&BitMapHeader, 4, 0), 11);
|
||||
ok_int(RtlFindClearBits(&BitMapHeader, 5, 0), 20);
|
||||
ok_int(RtlFindClearBits(&BitMapHeader, 4, 11), 11);
|
||||
ok_int(RtlFindClearBits(&BitMapHeader, 4, 12), 20);
|
||||
ok_int(RtlFindClearBits(&BitMapHeader, 2, 11), 11);
|
||||
ok_int(RtlFindClearBits(&BitMapHeader, 2, 12), 12);
|
||||
ok_int(RtlFindClearBits(&BitMapHeader, 0, 12), 8);
|
||||
ok_int(RtlFindClearBits(&BitMapHeader, 0, 39), 0);
|
||||
ok_int(RtlFindClearBits(&BitMapHeader, 1, 32), 1);
|
||||
ok_int(RtlFindClearBits(&BitMapHeader, 4, 32), 11);
|
||||
ok_int(RtlFindClearBits(&BitMapHeader, 5, 32), 20);
|
||||
|
||||
}
|
||||
|
||||
|
@ -325,6 +333,7 @@ Test_RtlFindSetBits(void)
|
|||
ok_int(RtlFindSetBits(&BitMapHeader, 1, 1), -1);
|
||||
|
||||
RtlInitializeBitMap(&BitMapHeader, Buffer, 8);
|
||||
ok_int(RtlFindSetBits(&BitMapHeader, 0, 3), 0);
|
||||
ok_int(RtlFindSetBits(&BitMapHeader, 1, 0), 1);
|
||||
ok_int(RtlFindSetBits(&BitMapHeader, 1, 1), 1);
|
||||
ok_int(RtlFindSetBits(&BitMapHeader, 1, 2), 4);
|
||||
|
@ -333,14 +342,20 @@ Test_RtlFindSetBits(void)
|
|||
ok_int(RtlFindSetBits(&BitMapHeader, 3, 0), -1);
|
||||
|
||||
RtlInitializeBitMap(&BitMapHeader, Buffer, 32);
|
||||
ok_int(RtlFindSetBits(&BitMapHeader, 0, 3), 0);
|
||||
ok_int(RtlFindSetBits(&BitMapHeader, 0, 21), 16);
|
||||
ok_int(RtlFindSetBits(&BitMapHeader, 0, 12), 8);
|
||||
ok_int(RtlFindSetBits(&BitMapHeader, 0, 31), 24);
|
||||
ok_int(RtlFindSetBits(&BitMapHeader, 0, 32), 0);
|
||||
ok_int(RtlFindSetBits(&BitMapHeader, 0, 39), 0);
|
||||
ok_int(RtlFindSetBits(&BitMapHeader, 4, 0), 11);
|
||||
ok_int(RtlFindSetBits(&BitMapHeader, 5, 0), 20);
|
||||
ok_int(RtlFindSetBits(&BitMapHeader, 4, 11), 11);
|
||||
ok_int(RtlFindSetBits(&BitMapHeader, 4, 12), 20);
|
||||
ok_int(RtlFindSetBits(&BitMapHeader, 2, 11), 11);
|
||||
ok_int(RtlFindSetBits(&BitMapHeader, 2, 12), 12);
|
||||
ok_int(RtlFindSetBits(&BitMapHeader, 0, 12), 8);
|
||||
ok_int(RtlFindSetBits(&BitMapHeader, 0, 39), 0);
|
||||
ok_int(RtlFindSetBits(&BitMapHeader, 1, 32), 1);
|
||||
ok_int(RtlFindSetBits(&BitMapHeader, 4, 32), 11);
|
||||
ok_int(RtlFindSetBits(&BitMapHeader, 5, 32), 20);
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue