summaryrefslogtreecommitdiff
path: root/src/test/test_libconfig.c
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2016-02-16 13:31:41 +0100
committerHaru <haru@dotalux.com>2016-02-17 10:40:43 +0100
commit5b673efa121320d1575e126243fa2c7ec460952d (patch)
tree609fa0a08bf4065a07ccb469039df43e96d095ee /src/test/test_libconfig.c
parent6c127b3ec4f73f02aff5b37e9526dcc249d95c54 (diff)
downloadhercules-5b673efa121320d1575e126243fa2c7ec460952d.tar.gz
hercules-5b673efa121320d1575e126243fa2c7ec460952d.tar.bz2
hercules-5b673efa121320d1575e126243fa2c7ec460952d.tar.xz
hercules-5b673efa121320d1575e126243fa2c7ec460952d.zip
Renamed config->read_file to config->load_file
- The return value is now consistent with the libconfig standard (CONFIG_TRUE/CONFIG_FALSE). - Removed some redundant error messages. Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/test/test_libconfig.c')
-rw-r--r--src/test/test_libconfig.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/test/test_libconfig.c b/src/test/test_libconfig.c
index 3fcc9692f..e5e6b4d70 100644
--- a/src/test/test_libconfig.c
+++ b/src/test/test_libconfig.c
@@ -122,11 +122,11 @@ static const char *test_libconfig_read(void)
return NULL;
}
-static const char *test_libconfig_read_file(void)
+static const char *test_libconfig_load_file(void)
{
config_t config;
#define FILENAME "src/test/libconfig/test.conf"
- if (libconfig->read_file(&config, FILENAME) != 0) {
+ if (libconfig->load_file(&config, FILENAME) == CONFIG_FALSE) {
return "Unable to read file '" FILENAME "'.";
}
#undef FILENAME
@@ -809,7 +809,7 @@ int do_init(int argc, char **argv)
TEST("libconfig->init and libconfig->destroy", test_libconfig_init_destroy);
TEST("libconfig->read_file_src", test_libconfig_read_file_src);
TEST("libconfig->read", test_libconfig_read);
- TEST("libconfig->read_file", test_libconfig_read_file);
+ TEST("libconfig->load_file", test_libconfig_load_file);
(void)test_libconfig_write; //TEST("libconfig->write", test_libconfig_write);
(void)test_libconfig_write_file; //TEST("libconfig->write_file", test_libconfig_write_file);
TEST("libconfig->read_string", test_libconfig_read_string);