test-malloc-api-common.h 381 字节
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
#ifndef TEST_ITERATE_DISABLE_COMMON_H
#define TEST_ITERATE_DISABLE_COMMON_H

#include "test.h"

int check_and_report(const char *message, int (*check_func)(void))
{
    t_printf("%s...", message);
    int ret = check_func();
    if (ret == 0) {
        t_printf("Success\n");
    } else {
        t_error("Failed\n");
    }
    return ret;
}

#endif //TEST_ITERATE_DISABLE_COMMON_H