Some little unit test assert.

This commit is contained in:
Vreixo Formoso 2008-03-02 18:21:58 +01:00
parent 6d633caadb
commit d894d3719b
1 changed files with 4 additions and 0 deletions

View File

@ -612,6 +612,10 @@ void test_iso_dir_iter_take()
CU_ASSERT_EQUAL(result, 1);
CU_ASSERT_EQUAL(dir->nchildren, 1);
CU_ASSERT_PTR_EQUAL(dir->children, node1);
/* we can't take two times without next()!! */
result = iso_dir_iter_take(iter);
CU_ASSERT_TRUE(result < 0); /* should fail */
/* next should still work */
result = iso_dir_iter_next(iter, &node);