1
0
Fork 0
mirror of https://github.com/tailix/libkernaux.git synced 2024-11-13 11:04:27 -05:00
libkernaux/tests/test_pfa.c
2020-11-30 23:32:27 +05:00

35 lines
628 B
C

#include <kernaux/pfa.h>
#include <assert.h>
int main()
{
struct KernAux_PFA pfa;
assert(KernAux_PFA_initialize_start(&pfa));
assert(KernAux_PFA_initialize_add_zone(
&pfa,
"foo",
0,
16 * 1024 * 1024 - 1
));
assert(KernAux_PFA_initialize_add_zone(
&pfa,
"bar",
16 * 1024 * 1024,
896 * 1024 * 1024 - 1
));
assert(KernAux_PFA_initialize_add_zone(
&pfa,
"car",
896 * 1024 * 1024,
(unsigned long long)4 * 1024 * 1024 * 1024 - 1
));
assert(KernAux_PFA_initialize_finish(&pfa));
return 0;
}