8
test_bson_cursor_next (void)
13
ok (bson_cursor_next (NULL) == FALSE,
14
"bson_cursor_next (NULL) should fail");
18
c = bson_cursor_new (b);
20
ok (bson_cursor_next (c) == FALSE,
21
"bson_cursor_next() should fail with an empty document");
26
b = test_bson_generate_full ();
27
c = bson_cursor_new (b);
28
ok (bson_cursor_next (c),
29
"initial bson_cursor_next() works");
30
ok (bson_cursor_next (c),
31
"subsequent bson_cursor_next() works too");
33
while (bson_cursor_next (c)) ;
35
ok (bson_cursor_next (c) == FALSE,
36
"bson_cursor_next() fails after the end of the BSON object");
42
RUN_TEST (5, bson_cursor_next);