Skip to content
deadend_test_driver

deadend_test_driver

deadend_test_driver

Description

Run an array of deadend test functions (all expecting failure).

Parameters

Name Direction Description
tests in Array of test function pointers.
count in Number 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)

Usage examples (Cross-references)
    
    /// Run an array of deadend tests (all expecting failure)
    int deadend_test_driver(TestFunction *tests, int count) {
        if (!tests) {
            WriteFmt("[ERROR] deadend_test_driver: NULL tests array provided\n");
    int deadend_test_driver(TestFunction *tests, int count) {
        if (!tests) {
            WriteFmt("[ERROR] deadend_test_driver: NULL tests array provided\n");
            return count; // All tests failed
        }
        // Run deadend tests if any
        if (deadend_tests && deadend_count > 0) {
            int deadend_failed  = deadend_test_driver(deadend_tests, deadend_count);
            total_failed       += deadend_failed;
        }
Last updated on