TEST_COND (modified == 0); const char * value = Ni_GetValue (node, NULL); TEST_COND (value == NULL); int error = Ni_SetValue (node, "", 0); TEST_COND (error < 0); Ni_Free (node); END_TEST () BEGIN_TEST (tree) Ni_node node = Ni_New (); assert (node != NULL); Ni_node child = Ni_GetChild (node, "a", -1, 1, NULL); assert (child != NULL); int children = Ni_GetNumChildren (node); TEST_COND (children == 1); Ni_node child2 = Ni_GetChild (child, "b", -1, 1, NULL); assert (child2 != NULL); int children2 = Ni_GetNumChildren (child); TEST_COND (children2 == 1); Ni_node child3 = Ni_GetChild (node, "a", -1, 1, NULL); TEST_COND (child3 == child); Ni_node child4 = Ni_GetChild (child, "b", -1, 1, NULL);
TEST_COND(modified == 0); const char * value = Ni_GetValue(node, NULL); TEST_COND(value == NULL); int error = Ni_SetValue(node, "", 0); TEST_COND(error < 0); Ni_Free(node); END_TEST() BEGIN_TEST(tree) Ni_node node = Ni_New(); assert(node != NULL); Ni_node child = Ni_GetChild(node, "a", -1, 1, NULL); assert(child != NULL); int children = Ni_GetNumChildren(node); TEST_COND(children == 1); Ni_node child2 = Ni_GetChild(child, "b", -1, 1, NULL); assert(child2 != NULL); int children2 = Ni_GetNumChildren(child); TEST_COND(children2 == 1); Ni_node child3 = Ni_GetChild(node, "a", -1, 1, NULL); TEST_COND(child3 == child); Ni_node child4 = Ni_GetChild(child, "b", -1, 1, NULL);