Sha256: 25fb6ea3ed54f558ad5df22b1841fece0cf4a8d7d6725e94ba53d470fb6f30a2

Contents?: true

Size: 742 Bytes

Versions: 3

Compression:

Stored size: 742 Bytes

Contents

#include "../foundationallib.h"
#include <assert.h>
#include <stdio.h>

// Test cases
void test_set_del_key()
{
    struct Set set;
    // initialize the set with some keys

    // Test deleting a key that exists in the set
    const char *existing_key = "existing_key";
    set_del_key(&set, existing_key);
    // assert that the key has been deleted from the set
    assert(!has_key(&set, existing_key));

    // Test deleting a key that does not exist in the set
    const char *non_existing_key = "non_existing_key";
    set_del_key(&set, non_existing_key);
    // assert that the set remains unchanged
    assert(get_size(&set) == initial_size);
}

int main()
{
    test_set_del_key();
    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_set_del_key.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_set_del_key.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_set_del_key.c