simple_test_driver

Table of Contents

simple_test_driver

Description

Run an array of simple test functions.

Parameters

NameDirectionDescription
testsinArray of test function pointers.
countinNumber of tests in the array.

Success

Returns number of failed tests (0 = all passed).

Failure

Function cannot fail - always returns valid count.

Usage example (Cross-references)

    
    /// Run an array of simple tests
    int simple_test_driver(TestFunction* tests, int count) {
    if (!tests) {
    printf("[ERROR] simple_test_driver: NULL tests array provided\n");
    int simple_test_driver(TestFunction* tests, int count) {
    if (!tests) {
    printf("[ERROR] simple_test_driver: NULL tests array provided\n");
    return count; // All tests failed
    }
    // Run normal tests if any
    if (normal_tests && normal_count > 0) {
    int failed    = simple_test_driver(normal_tests, normal_count);
    total_failed += failed;
    }

Share :

Related Posts

SysSetAbortCallback

SysSetAbortCallback Description Set a custom callback function for SysAbort. If no callback is set, SysAbort will call the standard abort() function.

Read More

SysAbort

SysAbort Description Custom abort function that can be redirected for testing purposes. By default, this calls the standard abort() function. If a callback is set via SysSetAbortCallback, it calls the callback instead.

Read More