summaryrefslogtreecommitdiff
path: root/src/test.cpp
diff options
context:
space:
mode:
authorFlorent Le Coz <louiz@louiz.org>2014-05-06 22:39:09 +0200
committerFlorent Le Coz <louiz@louiz.org>2014-05-06 22:39:09 +0200
commitf35db5cebaf1b9e267a7f2341699bb50fbc54c65 (patch)
tree25b6538c8b3520fb6bd362d367084271f5121c61 /src/test.cpp
parent18b27793de8863f58b284ee791a8207a79738b85 (diff)
downloadbiboumi-f35db5cebaf1b9e267a7f2341699bb50fbc54c65.tar.gz
biboumi-f35db5cebaf1b9e267a7f2341699bb50fbc54c65.tar.bz2
biboumi-f35db5cebaf1b9e267a7f2341699bb50fbc54c65.tar.xz
biboumi-f35db5cebaf1b9e267a7f2341699bb50fbc54c65.zip
Implement next_id() to
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 0a1af49..1056926 100644
--- a/src/test.cpp
+++ b/src/test.cpp
@@ -2,6 +2,7 @@
* Just a very simple test suite, by hand, using assert()
*/
+#include <xmpp/xmpp_component.hpp>
#include <xmpp/xmpp_parser.hpp>
#include <utils/encoding.hpp>
#include <logger/logger.hpp>
@@ -59,6 +60,13 @@ int main()
assert(utils::remove_invalid_xml_chars("\acouco\u0008u\uFFFEt\uFFFFe\r\n♥") == "coucoute\r\n♥");
/**
+ * Id generation
+ */
+ assert(XmppComponent::next_id() == "0");
+ assert(XmppComponent::next_id() == "1");
+ assert(XmppComponent::next_id() == "2");
+
+ /**
* Utils
*/
std::cout << color << "Testing utils…" << reset << std::endl;