]> git.proxmox.com Git - efi-boot-shim.git/blob - test-pe-util.c
Clean up better after build. Closes: #1046268
[efi-boot-shim.git] / test-pe-util.c
1 // SPDX-License-Identifier: BSD-2-Clause-Patent
2 /*
3 * test-pe-util.c - test PE utilities
4 */
5
6 #ifndef SHIM_UNIT_TEST
7 #define SHIM_UNIT_TEST
8 #endif
9 #include "shim.h"
10
11 static int
12 test_is_page_aligned(void)
13 {
14 assert_true_return(IS_PAGE_ALIGNED(0), -1, "\n");
15 assert_false_return(IS_PAGE_ALIGNED(1), -1, "\n");
16 assert_false_return(IS_PAGE_ALIGNED(4095), -1, "\n");
17 assert_true_return(IS_PAGE_ALIGNED(4096), -1, "\n");
18 assert_false_return(IS_PAGE_ALIGNED(4097), -1, "\n");
19
20 return 0;
21 }
22
23 int
24 main(void)
25 {
26 int status = 0;
27 test(test_is_page_aligned);
28
29 return status;
30 }