Sha256: 17dbb13a30cdc67f0a07c1a13a4425e2561754bc8a6bbb5733fafc05d4bab0d9

Contents?: true

Size: 799 Bytes

Versions: 3

Compression:

Stored size: 799 Bytes

Contents

#include "../foundationallib.h"
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
// Test suite for set_del_keys function
void test_set_del_keys()
{
    // Test case 1: Deleting single key from an empty set
    Set set1 = {NULL, 0};
    set_del_keys(NULL);
    assert(set1.size == 0);

    // Test case 2: Deleting single key from a non-empty set
    char *key1 = "key1";
    Set set2 = {&key1, 1};
    set_del_keys(&key1);
    assert(set2.size == 0);

    // Test case 3: Deleting multiple keys from a non-empty set
    char *key2 = "key2";
    char *key3 = "key3";
    Set set3 = {&key1, 3};
    set_del_keys(&key2);
    set_del_keys(&key3);
    assert(set3.size == 1);

    printf("All test cases passed!\n");
}

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