Hash :
2b866e5e
Author :
Thomas de Grivel
Date :
2025-06-29T20:27:15
make test
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
/* ext4fs
* Copyright 2025 kmx.io <contact@kmx.io>
*
* Permission is hereby granted to use this software granted the above
* copyright notice and this permission paragraph are included in all
* copies and substantial portions of this software.
*
* THIS SOFTWARE IS PROVIDED "AS-IS" WITHOUT ANY GUARANTEE OF
* PURPOSE AND PERFORMANCE. IN NO EVENT WHATSOEVER SHALL THE
* AUTHOR BE CONSIDERED LIABLE FOR THE USE AND PERFORMANCE OF
* THIS SOFTWARE.
*/
#include <stdio.h>
#include <ext4fs.h>
long g_test_ko = 0;
long g_test_ok = 0;
long g_test_total = 0;
#define TEST_ASSERT(test) \
do { \
if (! (test)) { \
fprintf(stderr, "KO: %s\n", # test); \
g_test_ko++; \
g_test_total++; \
} \
else { \
g_test_ok++; \
g_test_total++; \
} \
} while (0)
void test_summary (void)
{
fflush(stdout);
fprintf(stderr, "OK: %ld\tKO: %ld\tTotal: %ld\n",
g_test_ok, g_test_ko, g_test_total);
fflush(stderr);
}
int main (int argc, char **argv)
{
(void) argc;
(void) argv;
TEST_ASSERT(sizeof(struct ext4fs_super_block) == 1024);
TEST_ASSERT(sizeof(struct ext4fs_group_desc) == 64);
test_summary();
return 0;
}