#include #include #include #include #include "lib.h" #include "array.h" #ifdef AL_HAVE_GNU_EXTENSIONS #include "array_typed.h" #endif #include "str.h" #include "ring_buffer.h" #include "common.h" s32 main(s32 argc, char *argv[]) { al_random_init((u32)time(NULL)); u32 skip_mask = 0; if (argc > 1) { for (s32 i = 1; i < argc; i++) { if (al_str_eq(&al_str_cr(argv[i]), &al_str_c("run_limits"))) { skip_mask |= AL_TESTS_RUN_LIMITS; al_printf("MAX_ALLOC_32: %u, INT32_MAX: %u, UINT32_MAX: %u.\n", MAX_ALLOC_32, INT32_MAX, UINT32_MAX); } } } if (!array_tests_run(skip_mask)) goto fail; #ifdef AL_HAVE_GNU_EXTENSIONS if (!array_typed_tests_run(skip_mask)) goto fail; #endif if (!str_tests_run(skip_mask)) goto fail; if (!ring_buffer_tests_run()) goto fail; if (!lib_tests_run()) goto fail; return EXIT_SUCCESS; fail: return EXIT_FAILURE; }