From f35db5cebaf1b9e267a7f2341699bb50fbc54c65 Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Tue, 6 May 2014 22:39:09 +0200 Subject: Implement next_id() to --- src/test.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/test.cpp') 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 #include #include #include @@ -58,6 +59,13 @@ int main() assert(utils::remove_invalid_xml_chars(in) == in); 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 */ -- cgit v1.2.3