summaryrefslogtreecommitdiff
path: root/src/unittests/fs/virtfs
diff options
context:
space:
mode:
Diffstat (limited to 'src/unittests/fs/virtfs')
-rw-r--r--src/unittests/fs/virtfs/throw.cc25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/unittests/fs/virtfs/throw.cc b/src/unittests/fs/virtfs/throw.cc
index 377230686..b15572d20 100644
--- a/src/unittests/fs/virtfs/throw.cc
+++ b/src/unittests/fs/virtfs/throw.cc
@@ -20,6 +20,10 @@
#include "unittests/unittests.h"
+#include "configmanager.h"
+#include "configuration.h"
+#include "dirs.h"
+
#include "fs/files.h"
#include "fs/virtfs/fs.h"
@@ -231,3 +235,24 @@ TEST_CASE("throw VirtFs1 unmount", "")
VirtFs::deinit();
delete2(logger);
}
+
+TEST_CASE("throw configuration tests", "configuration")
+{
+ logger = new Logger();
+
+ Dirs::initRootDir();
+ Dirs::initHomeDir();
+
+ ConfigManager::initConfiguration();
+
+ SECTION("configuration undefined")
+ {
+ const char *const key = "nonsetvalue";
+ REQUIRE_THROWS(config.getIntValue(key) == 0);
+ REQUIRE_THROWS(config.getFloatValue(key) >= 0.0f);
+ REQUIRE_THROWS(config.getStringValue(key).empty());
+ REQUIRE_THROWS(config.getBoolValue(key) == false);
+ }
+
+ delete2(logger);
+}