From d894d3719b4d2b60d6895354fd1cb98d1fe4160c Mon Sep 17 00:00:00 2001 From: Vreixo Formoso Date: Sun, 2 Mar 2008 18:21:58 +0100 Subject: [PATCH] Some little unit test assert. --- test/test_node.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/test_node.c b/test/test_node.c index 7c05d8f..1211028 100644 --- a/test/test_node.c +++ b/test/test_node.c @@ -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);