diff options
author | louiz’ <louiz@louiz.org> | 2016-12-14 18:28:44 +0100 |
---|---|---|
committer | louiz’ <louiz@louiz.org> | 2016-12-14 18:28:44 +0100 |
commit | 5a5bb7f63222189ea0dcfbd387d5e34458ccefe5 (patch) | |
tree | 21d1c93156f7cf5dd20a69d29401c72bc1ab22e0 /tests | |
parent | f512c9c666b2c629e8b9af29ec65c534e536e749 (diff) | |
download | biboumi-5a5bb7f63222189ea0dcfbd387d5e34458ccefe5.tar.gz biboumi-5a5bb7f63222189ea0dcfbd387d5e34458ccefe5.tar.bz2 biboumi-5a5bb7f63222189ea0dcfbd387d5e34458ccefe5.tar.xz biboumi-5a5bb7f63222189ea0dcfbd387d5e34458ccefe5.zip |
Introduce a XmlSubNode class that automatically adds itself into its parent
Diffstat (limited to 'tests')
-rw-r--r-- | tests/xmpp.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/xmpp.cpp b/tests/xmpp.cpp index 37d2b54..42b7c08 100644 --- a/tests/xmpp.cpp +++ b/tests/xmpp.cpp @@ -52,3 +52,20 @@ TEST_CASE("handshake_digest") const auto res = get_handshake_digest("id1234", "S4CR3T"); CHECK(res == "c92901b5d376ad56269914da0cce3aab976847df"); } + +TEST_CASE("substanzas") +{ + Stanza a("a"); + { + XmlSubNode b(a, "b"); + { + CHECK(!a.has_children()); + XmlSubNode c(b, "c"); + XmlSubNode d(b, "d"); + CHECK(!c.has_children()); + CHECK(!d.has_children()); + } + CHECK(b.has_children()); + } + CHECK(a.has_children()); +}
\ No newline at end of file |