lib: unit tests: improve / better coverage
This commit is contained in:
@ -79,6 +79,16 @@ test_basic()
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
test_read_only()
|
||||
{
|
||||
MemDb db{true/*read-only*/};
|
||||
Config conf_db{db};
|
||||
|
||||
auto res = conf_db.set<Config::Id::MaxMessageSize>(12345);
|
||||
g_assert_false(!!res);
|
||||
}
|
||||
|
||||
int
|
||||
main(int argc, char* argv[])
|
||||
{
|
||||
@ -86,6 +96,7 @@ main(int argc, char* argv[])
|
||||
|
||||
g_test_add_func("/config-db/props", test_props);
|
||||
g_test_add_func("/config-db/basic", test_basic);
|
||||
g_test_add_func("/config-db/read-only", test_read_only);
|
||||
|
||||
return g_test_run();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user