From 46ff73662cc94220c5ee962b591c8ee327de6f85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?louiz=E2=80=99?= Date: Tue, 14 Jun 2016 03:02:36 +0200 Subject: Clean the Config module, use static things instead of a stupid singleton --- tests/config.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'tests') 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) { -- cgit v1.2.3