|
#define | MUNIT_VERSION(major, minor, revision) (((major) << 16) | ((minor) << 8) | (revision)) |
|
#define | MUNIT_CURRENT_VERSION MUNIT_VERSION(0, 4, 1) |
|
#define | munit_int8_t int8_t |
|
#define | munit_uint8_t uint8_t |
|
#define | munit_int16_t int16_t |
|
#define | munit_uint16_t uint16_t |
|
#define | munit_int32_t int32_t |
|
#define | munit_uint32_t uint32_t |
|
#define | munit_int64_t int64_t |
|
#define | munit_uint64_t uint64_t |
|
#define | munit_bool int |
|
#define | MUNIT_LIKELY(expr) (expr) |
|
#define | MUNIT_UNLIKELY(expr) (expr) |
|
#define | MUNIT_UNUSED |
|
#define | MUNIT_ARRAY_PARAM(name) |
|
#define | MUNIT_SIZE_MODIFIER "z" |
|
#define | MUNIT_CHAR_MODIFIER "hh" |
|
#define | MUNIT_SHORT_MODIFIER "h" |
|
#define | MUNIT_NO_RETURN |
|
#define | MUNIT_PUSH_DISABLE_MSVC_C4127_ |
|
#define | MUNIT_POP_DISABLE_MSVC_C4127_ |
|
#define | MUNIT_PRINTF(string_index, first_to_check) |
|
#define | munit_logf(level, format, ...) munit_logf_ex(level, __FILE__, __LINE__, format, __VA_ARGS__) |
|
#define | munit_log(level, msg) munit_logf(level, "%s", msg) |
|
#define | munit_errorf(format, ...) munit_errorf_ex(__FILE__, __LINE__, format, __VA_ARGS__) |
|
#define | munit_error(msg) munit_errorf("%s", msg) |
|
#define | munit_assert(expr) |
|
#define | munit_assert_true(expr) |
|
#define | munit_assert_false(expr) |
|
#define | munit_assert_type_full(prefix, suffix, T, fmt, a, op, b) |
|
#define | munit_assert_type(T, fmt, a, op, b) munit_assert_type_full("", "", T, fmt, a, op, b) |
|
#define | munit_assert_char(a, op, b) munit_assert_type_full("'\\x", "'", char, "02" MUNIT_CHAR_MODIFIER "x", a, op, b) |
|
#define | munit_assert_uchar(a, op, b) munit_assert_type_full("'\\x", "'", unsigned char, "02" MUNIT_CHAR_MODIFIER "x", a, op, b) |
|
#define | munit_assert_short(a, op, b) munit_assert_type(short, MUNIT_SHORT_MODIFIER "d", a, op, b) |
|
#define | munit_assert_ushort(a, op, b) munit_assert_type(unsigned short, MUNIT_SHORT_MODIFIER "u", a, op, b) |
|
#define | munit_assert_int(a, op, b) munit_assert_type(int, "d", a, op, b) |
|
#define | munit_assert_uint(a, op, b) munit_assert_type(unsigned int, "u", a, op, b) |
|
#define | munit_assert_long(a, op, b) munit_assert_type(long int, "ld", a, op, b) |
|
#define | munit_assert_ulong(a, op, b) munit_assert_type(unsigned long int, "lu", a, op, b) |
|
#define | munit_assert_llong(a, op, b) munit_assert_type(long long int, "lld", a, op, b) |
|
#define | munit_assert_ullong(a, op, b) munit_assert_type(unsigned long long int, "llu", a, op, b) |
|
#define | munit_assert_size(a, op, b) munit_assert_type(size_t, MUNIT_SIZE_MODIFIER "u", a, op, b) |
|
#define | munit_assert_float(a, op, b) munit_assert_type(float, "f", a, op, b) |
|
#define | munit_assert_double(a, op, b) munit_assert_type(double, "g", a, op, b) |
|
#define | munit_assert_ptr(a, op, b) munit_assert_type(const void*, "p", a, op, b) |
|
#define | munit_assert_int8(a, op, b) munit_assert_type(munit_int8_t, PRIi8, a, op, b) |
|
#define | munit_assert_uint8(a, op, b) munit_assert_type(munit_uint8_t, PRIu8, a, op, b) |
|
#define | munit_assert_int16(a, op, b) munit_assert_type(munit_int16_t, PRIi16, a, op, b) |
|
#define | munit_assert_uint16(a, op, b) munit_assert_type(munit_uint16_t, PRIu16, a, op, b) |
|
#define | munit_assert_int32(a, op, b) munit_assert_type(munit_int32_t, PRIi32, a, op, b) |
|
#define | munit_assert_uint32(a, op, b) munit_assert_type(munit_uint32_t, PRIu32, a, op, b) |
|
#define | munit_assert_int64(a, op, b) munit_assert_type(munit_int64_t, PRIi64, a, op, b) |
|
#define | munit_assert_uint64(a, op, b) munit_assert_type(munit_uint64_t, PRIu64, a, op, b) |
|
#define | munit_assert_double_equal(a, b, precision) |
|
#define | munit_assert_string_equal(a, b) |
|
#define | munit_assert_string_not_equal(a, b) |
|
#define | munit_assert_memory_equal(size, a, b) |
|
#define | munit_assert_memory_not_equal(size, a, b) |
|
#define | munit_assert_ptr_equal(a, b) munit_assert_ptr(a, ==, b) |
|
#define | munit_assert_ptr_not_equal(a, b) munit_assert_ptr(a, !=, b) |
|
#define | munit_assert_null(ptr) munit_assert_ptr(ptr, ==, NULL) |
|
#define | munit_assert_not_null(ptr) munit_assert_ptr(ptr, !=, NULL) |
|
#define | munit_assert_ptr_null(ptr) munit_assert_ptr(ptr, ==, NULL) |
|
#define | munit_assert_ptr_not_null(ptr) munit_assert_ptr(ptr, !=, NULL) |
|
#define | munit_malloc(size) munit_malloc_ex(__FILE__, __LINE__, (size)) |
|
#define | munit_new(type) ((type*) munit_malloc(sizeof(type))) |
|
#define | munit_calloc(nmemb, size) munit_malloc((nmemb) * (size)) |
|
#define | munit_newa(type, nmemb) ((type*) munit_calloc((nmemb), sizeof(type))) |
|
Definition at line 1867 of file munit.c.
1869 {
1875
1879 unsigned long long iterations;
1885
1893 runner.single_parameter_mode = 0;
1895
1896 runner.report.successful = 0;
1897 runner.report.skipped = 0;
1898 runner.report.failed = 0;
1899 runner.report.errored = 0;
1900#if defined(MUNIT_ENABLE_TIMING)
1901 runner.report.cpu_clock = 0;
1902 runner.report.wall_clock = 0;
1903#endif
1904
1906#if !defined(_WIN32)
1908#else
1910#endif
1912 runner.fatal_failures = 0;
1914 runner.user_data = user_data;
1915 runner.seed = munit_rand_generate_seed();
1917
1923 goto cleanup;
1924 }
1925
1931 goto cleanup;
1932 }
1934
1939 goto cleanup;
1940 }
1941
1947 goto cleanup;
1948 }
1949
1950 runner.iterations = (
unsigned int) iterations;
1951
1956 goto cleanup;
1957 }
1958
1961 munit_log_internal(
MUNIT_LOG_ERROR, stderr,
"failed to allocate memory");
1962 goto cleanup;
1963 }
1973 goto cleanup;
1974 }
1975
1982 else {
1985 goto cleanup;
1986 }
1987
1990 munit_print_help(
argc,
argv, user_data, arguments);
1992 goto cleanup;
1994 runner.single_parameter_mode = 1;
1997#if !defined(_WIN32)
2000#endif
2002 runner.fatal_failures = 1;
2007 goto cleanup;
2008 }
2009
2018 else {
2021 goto cleanup;
2022 }
2023
2025 munit_log_level_visible =
level;
2026 else
2027 munit_log_level_fatal =
level;
2028
2031 munit_suite_list_tests(suite, 0,
NULL);
2033 goto cleanup;
2035 munit_suite_list_tests(suite, 1,
NULL);
2037 goto cleanup;
2038 } else {
2042 goto cleanup;
2043 }
2044
2046 goto cleanup;
2047 }
2048 } else {
2051 munit_log_internal(
MUNIT_LOG_ERROR, stderr,
"failed to allocate memory");
2052 goto cleanup;
2053 }
2057 }
2058 }
2059
2062
2063 munit_test_runner_run(&
runner);
2064
2068 fprintf(stderr,
"No tests run, %d (100%%) skipped.\n",
runner.report.skipped);
2069 } else {
2075 }
2076
2077
2078#if defined(MUNIT_FAIL_NO_TEST_RUN)
2080#else
2081 if (
runner.report.failed == 0 &&
runner.report_simple.errored == 0) {
2082#endif
2084 }
2085
2086 cleanup:
2089
2091}
#define MUNIT_OUTPUT_FILE
References MunitTestRunner::colorize, MunitReport::cpu_clock, MunitTestRunner::current_suite, MunitReport::errored, MunitReport::failed, MunitTestRunner::fatal_failures, MunitTestRunner::fork, MunitTestRunner::iterations, MUNIT_LOG_DEBUG, MUNIT_LOG_ERROR, MUNIT_LOG_INFO, MUNIT_LOG_WARNING, MUNIT_OUTPUT_FILE, munit_uint32_t, MunitParameter::name, MunitTestRunner::parameters, MunitArgument_::parse_argument, MunitTestRunner::prefix, MunitTestRunner::report, MunitTestRunner::seed, MunitTestRunner::show_stderr, MunitTestRunner::single_parameter_mode, MunitReport::skipped, MunitReport::successful, MunitTestRunner::suite, MunitTestRunner::tests, MunitTestRunner::user_data, MunitParameter::value, and MunitReport::wall_clock.
Referenced by munit_suite_main().