Implement next_id() to

This commit is contained in:
Florent Le Coz
2014-05-06 22:39:09 +02:00
parent 18b27793de
commit f35db5ceba
3 changed files with 23 additions and 1 deletions
+8
View File
@@ -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>
@@ -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
*/