This source file includes following definitions.
- create_document_node
1
2
3
4
5
6
7
8
9
10 #include <crm_internal.h>
11
12 #include <crm/common/unittest_internal.h>
13
14 #include "crmcommon_private.h"
15
16
17
18
19
20
21 static void
22 create_document_node(void **state) {
23 xml_doc_private_t *docpriv = NULL;
24 xmlDoc *doc = pcmk__xml_new_doc();
25
26 assert_non_null(doc);
27 assert_int_equal(doc->type, XML_DOCUMENT_NODE);
28
29 docpriv = doc->_private;
30 assert_non_null(docpriv);
31 assert_int_equal(docpriv->check, PCMK__XML_DOC_PRIVATE_MAGIC);
32 assert_true(pcmk_all_flags_set(docpriv->flags,
33 pcmk__xf_dirty|pcmk__xf_created));
34
35 pcmk__xml_free_doc(doc);
36 }
37
38 PCMK__UNIT_TEST(pcmk__xml_test_setup_group, pcmk__xml_test_teardown_group,
39 cmocka_unit_test(create_document_node))