summaryrefslogtreecommitdiff
path: root/src/test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/test.cpp')
-rw-r--r--src/test.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/test.cpp b/src/test.cpp
index bc85cb0..79fcd0b 100644
--- a/src/test.cpp
+++ b/src/test.cpp
@@ -13,6 +13,7 @@
#include <utils/tolower.hpp>
#include <utils/revstr.hpp>
#include <irc/irc_user.hpp>
+#include <utils/string.hpp>
#include <utils/split.hpp>
#include <utils/xdg.hpp>
#include <xmpp/jid.hpp>
@@ -170,6 +171,13 @@ int main()
const std::string ltr = "coucou";
assert(utils::revstr(ltr) == "uocuoc");
+ assert(to_bool("true"));
+ assert(!to_bool("trou"));
+ assert(to_bool("1"));
+ assert(!to_bool("0"));
+ assert(!to_bool("-1"));
+ assert(!to_bool("false"));
+
/**
* XML parsing
*/