Skip to content

Test API internal functions

include/test/test_api_internal.h View source View on GitHub
#define TEST_INTENSITY_LOG(min, def, max, unit_str)
source

1D piecewise-log

Expansion
#define TEST_INTENSITY_LOG(min, def, max, unit_str) \
    .flags = TEST_FLAG_HONORS_INTENSITY, .intensity_desc = { \
                                             .curve = SCALE_PIECEWISE_LOG, \
                                             .min_val = (min), \
                                             .def_val = (def), \
                                             .max_val = (max), \
                                             .unit = (unit_str), \
    }
#define TEST_INTENSITY_LINEAR(min, def, max, unit_str)
source

Linear scaling

Expansion
#define TEST_INTENSITY_LINEAR(min, def, max, unit_str) \
    .flags = TEST_FLAG_HONORS_INTENSITY, .intensity_desc = { \
                                             .curve = SCALE_PIECEWISE_LINEAR, \
                                             .min_val = (min), \
                                             .def_val = (def), \
                                             .max_val = (max), \
                                             .unit = (unit_str), \
    }
#define TEST_INTENSITY_CORES(min_per_core, def_per_core, max_per_core, \ unit_str)
source

Core-scaled thread counts (threads = base * core_count)

Expansion
#define TEST_INTENSITY_CORES(min_per_core, def_per_core, max_per_core, \
                             unit_str) \
    .flags = TEST_FLAG_HONORS_INTENSITY, .intensity_desc = { \
                                             .curve = SCALE_CORE_MULTIPLIER, \
                                             .min_val = (min_per_core), \
                                             .def_val = (def_per_core), \
                                             .max_val = (max_per_core), \
                                             .unit = (unit_str), \
    }
#define TEST_INTENSITY_CUSTOM_PRINT(scale, min, def, max, unit_str, print_fn)
source

set scale with min and max

Expansion
#define TEST_INTENSITY_CUSTOM_PRINT(scale, min, def, max, unit_str, print_fn) \
    .flags = TEST_FLAG_HONORS_INTENSITY, .intensity_desc = { \
                                             .curve = scale, \
                                             .min_val = (min), \
                                             .def_val = (def), \
                                             .max_val = (max), \
                                             .unit = (unit_str), \
                                             .custom_print = (print_fn), \
    }
#define TEST_INTENSITY_CUSTOM(scale_fn, print_fn)
source

Entirely custom

Expansion
#define TEST_INTENSITY_CUSTOM(scale_fn, print_fn) \
    .flags = TEST_FLAG_HONORS_INTENSITY, .intensity_desc = { \
                                             .curve = SCALE_CUSTOM, \
                                             .custom_scale = (scale_fn), \
                                             .custom_print = (print_fn), \
    }
#define TEST_DEFINE_SMOKE(grp, id, ...)
source
Expansion
#define TEST_DEFINE_SMOKE(grp, id, ...) \
    TEST_DEFINE(grp, id, .tier = TEST_TIER_SMOKE, ##__VA_ARGS__)
#define TEST_DEFINE_UNIT(grp, id, ...)
source
Expansion
#define TEST_DEFINE_UNIT(grp, id, ...) \
    TEST_DEFINE(grp, id, .tier = TEST_TIER_UNIT, ##__VA_ARGS__)
#define TEST_DEFINE_INTEGRATION(grp, id, ...)
source
Expansion
#define TEST_DEFINE_INTEGRATION(grp, id, ...) \
    TEST_DEFINE(grp, id, .tier = TEST_TIER_INTEGRATION, ##__VA_ARGS__)
#define TEST_DEFINE_SMOKE(grp, id, ...)
source
Expansion
#define TEST_DEFINE_SMOKE(grp, id, ...) \
    TEST_DEFINE(grp, id, .tier = TEST_TIER_SMOKE, ##__VA_ARGS__)
#define TEST_DEFINE_UNIT(grp, id, ...)
source
Expansion
#define TEST_DEFINE_UNIT(grp, id, ...) \
    TEST_DEFINE(grp, id, .tier = TEST_TIER_UNIT, ##__VA_ARGS__)
#define TEST_DEFINE_INTEGRATION(grp, id, ...)
source
Expansion
#define TEST_DEFINE_INTEGRATION(grp, id, ...) \
    TEST_DEFINE(grp, id, .tier = TEST_TIER_INTEGRATION, ##__VA_ARGS__)
#define __test_group_TEST_GROUP_NONE test_group_orphan_parent
source

Goofy macros needed for the EXTERN macro, TODO: do something about this HACK:

#define __test_group_none test_group_orphan_parent
source
#define __test_group_orphan test_group_orphan_parent
source
#define __test_group_test_group_orphan_parent test_group_orphan_parent
source