/
githubmirror
/
shim
Обзор
Документация
Войти
/
githubmirror
/
shim
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
test-pe-util.c
30 строк
570 B
Nicholas Bishop
pe: Add IS_PAGE_ALIGNED macro
27 янв 2023, 22:18
27 янв 2023, 22:18
e4f40ae
Код
Авторство
О чём код?
// SPDX-License-Identifier: BSD-2-Clause-Patent /* * test-pe-util.c - test PE utilities */ #ifndef SHIM_UNIT_TEST #define SHIM_UNIT_TEST #endif #include "shim.h" static int test_is_page_aligned(void) { assert_true_return(IS_PAGE_ALIGNED(0), -1, "\n"); assert_false_return(IS_PAGE_ALIGNED(1), -1, "\n"); assert_false_return(IS_PAGE_ALIGNED(4095), -1, "\n"); assert_true_return(IS_PAGE_ALIGNED(4096), -1, "\n"); assert_false_return(IS_PAGE_ALIGNED(4097), -1, "\n"); return 0; } int main(void) { int status = 0; test(test_is_page_aligned); return status; }