KvConfigInit
KvConfigInit
Description
Initialize a KvConfig object with deep-copy ownership for both keys and values.
Success
Returns initialized config object.
Usage example (Cross-references)
Usage examples (Cross-references)
- In
Parse.c:7:
static bool test_kvconfig_basic_parse(void) {
KvConfig cfg = KvConfigInit();
Str src = StrInitFromZstr(
"host = localhost\n"- In
Parse.c:33:
static bool test_kvconfig_comments_quotes_and_duplicates(void) {
KvConfig cfg = KvConfigInit();
Str src = StrInitFromZstr(
"# comment line\n"- In
Parse.c:64:
static bool test_kvconfig_get_returns_copy(void) {
KvConfig cfg = KvConfigInit();
Str src = StrInitFromZstr("host = localhost\n");
StrIter input = StrIterFromStr(src);- In
Parse.c:95:
static bool test_kvconfig_numeric_and_bool_accessors(void) {
KvConfig cfg = KvConfigInit();
Str src = StrInitFromZstr(
"workers = 16\n"- In
Parse.c:126:
static bool test_kvconfig_invalid_line_fails(void) {
KvConfig cfg = KvConfigInit();
Str src = StrInitFromZstr(
"valid = yes\n"
Last updated on