diff options
author | louiz’ <louiz@louiz.org> | 2016-06-14 03:02:36 +0200 |
---|---|---|
committer | louiz’ <louiz@louiz.org> | 2016-06-14 03:02:36 +0200 |
commit | 46ff73662cc94220c5ee962b591c8ee327de6f85 (patch) | |
tree | 482596a4c341477eee53456aac5e7b4746733630 /tests | |
parent | 550ab46f02511614d7ce7b46a4b4f63beae1aebc (diff) | |
download | biboumi-46ff73662cc94220c5ee962b591c8ee327de6f85.tar.gz biboumi-46ff73662cc94220c5ee962b591c8ee327de6f85.tar.bz2 biboumi-46ff73662cc94220c5ee962b591c8ee327de6f85.tar.xz biboumi-46ff73662cc94220c5ee962b591c8ee327de6f85.zip |
Clean the Config module, use static things instead of a stupid singleton
Diffstat (limited to 'tests')
-rw-r--r-- | tests/config.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/config.cpp b/tests/config.cpp index 346dea1..ddea151 100644 --- a/tests/config.cpp +++ b/tests/config.cpp @@ -4,18 +4,18 @@ TEST_CASE("Config basic") { - Config::filename = "test.cfg"; - Config::file_must_exist = false; + // Write a value in the config file + Config::read_conf("test.cfg"); Config::set("coucou", "bonjour", true); - Config::close(); + Config::clear(); bool error = false; try { - Config::file_must_exist = true; + CHECK(Config::read_conf()); CHECK(Config::get("coucou", "") == "bonjour"); CHECK(Config::get("does not exist", "default") == "default"); - Config::close(); + Config::clear(); } catch (const std::ios::failure& e) { |