FOSSology
4.4.0
Open Source License Compliance by Open Source Software
|
Unit tests for the fossconfig library section of libfossology. More...
Go to the source code of this file.
Macros | |
#define | CONF_FILE "confdata/conftest.conf" |
#define | NONE "none" |
#define | GROUP(g) GROUP_##g |
#define | KEY(g, k) GROUP_##g##_KEY_##k |
#define | VAL(g, v) GROUP_##g##_VALUE_##v |
#define | VAL_IDX(g, v, i) GROUP_##g##_VALUE_##v##_##i |
#define | GROUP_0 "one" |
#define | GROUP_0_KEY_0 "key_a" |
#define | GROUP_0_VALUE_0 "hello" |
#define | GROUP_0_KEY_1 "key_b" |
#define | GROUP_0_VALUE_1 "goodbye" |
#define | GROUP_1 "two" |
#define | GROUP_1_KEY_0 "another" |
#define | GROUP_1_VALUE_0 "value" |
#define | GROUP_1_KEY_1 "names" |
#define | GROUP_1_VALUE_1 "Bob, Marry, Mark, Larry, Vincent, Alex" |
#define | GROUP_2 "three" |
#define | GROUP_2_KEY_0 "this" |
#define | GROUP_2_VALUE_0 "group" |
#define | GROUP_2_KEY_1 "has" |
#define | GROUP_2_VALUE_1 "3" |
#define | GROUP_2_KEY_2 "key" |
#define | GROUP_2_VALUE_2 "literals" |
#define | GROUP_3 "four" |
#define | GROUP_3_KEY_0 "is" |
#define | GROUP_3_VALUE_0_0 "is" |
#define | GROUP_3_VALUE_0_1 "a" |
#define | GROUP_3_VALUE_0_2 "list" |
#define | GROUP_3_VALUE_0_3 "group" |
#define | GROUP_3_KEY_1 "there" |
#define | GROUP_3_VALUE_1_0 "there" |
#define | GROUP_3_VALUE_1_1 "are" |
#define | GROUP_3_VALUE_1_2 "two" |
#define | GROUP_3_VALUE_1_3 "lists" |
#define | GROUP_3_VALUE_1_4 "in" |
#define | GROUP_3_VALUE_1_5 "this" |
#define | GROUP_3_VALUE_1_6 "group" |
#define | GROUP_3_KEY_2 "not" |
#define | GROUP_3_VALUE_2 "list" |
#define | CONFIG_GET_LIST_ASSERT(g, k, i) |
Functions | |
void | test_fo_config_load () |
test the fo_config_load function. More... | |
void | test_fo_config_group_set () |
Test the group set function. More... | |
void | test_fo_config_key_set () |
Test the key set function. Again, keys are stored in alphabetical order, so the comparison order may be wonky. More... | |
void | test_fo_config_has_group () |
Tests the has group function. More... | |
void | test_fo_config_has_key () |
Test the has key function. More... | |
void | test_fo_config_get () |
Test the get function. This will also test the error cases of invalid key and invalid group names. More... | |
void | test_fo_config_is_list () |
Tests the is list function. More... | |
void | test_fo_config_list_length () |
Tests the list length function. More... | |
void | test_fo_config_get_list () |
Tests the get list function. More... | |
void | test_fo_config_free () |
Tests the config free function. This makes sure that everything is correctly set to NULL after a free. More... | |
Variables | |
fo_conf * | test_data |
CU_TestInfo | fossconfig_testcases [] |
Unit tests for the fossconfig library section of libfossology.
Definition in file test_fossconfig.c.
#define CONFIG_GET_LIST_ASSERT | ( | g, | |
k, | |||
i | |||
) |
void test_fo_config_free | ( | ) |
Tests the config free function. This makes sure that everything is correctly set to NULL after a free.
Definition at line 426 of file test_fossconfig.c.
void test_fo_config_get | ( | ) |
Test the get function. This will also test the error cases of invalid key and invalid group names.
Definition at line 262 of file test_fossconfig.c.
void test_fo_config_get_list | ( | ) |
Tests the get list function.
Definition at line 367 of file test_fossconfig.c.
void test_fo_config_group_set | ( | ) |
Test the group set function.
Definition at line 172 of file test_fossconfig.c.
void test_fo_config_has_group | ( | ) |
Tests the has group function.
Definition at line 230 of file test_fossconfig.c.
void test_fo_config_has_key | ( | ) |
Test the has key function.
Definition at line 246 of file test_fossconfig.c.
void test_fo_config_is_list | ( | ) |
Tests the is list function.
Definition at line 315 of file test_fossconfig.c.
void test_fo_config_key_set | ( | ) |
Test the key set function. Again, keys are stored in alphabetical order, so the comparison order may be wonky.
Definition at line 194 of file test_fossconfig.c.
void test_fo_config_list_length | ( | ) |
Tests the list length function.
Definition at line 333 of file test_fossconfig.c.
void test_fo_config_load | ( | ) |
test the fo_config_load function.
Definition at line 105 of file test_fossconfig.c.
CU_TestInfo fossconfig_testcases[] |
Definition at line 435 of file test_fossconfig.c.