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

36 lines
628 B
C
Raw Normal View History

2020-11-30 13:32:27 -05:00
#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;
}