Sha256: 3c05a1d39b8f241dbefb5e70fbba1284edbc8e0262825303514dfc42240c8411

Contents?: true

Size: 440 Bytes

Versions: 3

Compression:

Stored size: 440 Bytes

Contents

#include "../foundationallib.h"
#include <assert.h>
int main()
{
    // Test cases
    assert(last_index_of_char("hello", 'l') == 3);
    assert(last_index_of_char("hello", 'o') == 4);
    assert(last_index_of_char("hello", 'h') == 0);
    assert(last_index_of_char("hello", 'z') == -1);
    assert(last_index_of_char("", 'a') == -1);
    assert(last_index_of_char("hello", '\0') == -1);

    printf("All tests passed!\n");
    return 0;
}

Version data entries

3 entries across 3 versions & 2 rubygems

Version Path
foundational_lib-1.0.1 ./tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_last_index_of_char.c
foundational_lib2-1.0 ./tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_last_index_of_char.c
foundational_lib-1.0 ./tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_last_index_of_char.c