7
test_bson_cursor_find_next (void)
12
b = test_bson_generate_full ();
13
c = bson_find (b, "TRUE");
15
ok (bson_cursor_find_next (c, NULL) == FALSE,
16
"bson_cursor_find_next() should fail with a NULL key");
17
ok (bson_cursor_find_next (NULL, "int32") == FALSE,
18
"bson_cursor_find_next() should fail with a NULL cursor");
20
ok (bson_cursor_find_next (c, "sex") == TRUE,
21
"bson_cursor_find_next() works");
23
ok (bson_cursor_find_next (c, "str") == FALSE,
24
"bson_cursor_find_next() should fail when the key is not found");
26
ok (bson_cursor_find_next (c, "int64") == TRUE,
27
"bson_cursor_find_next() works, even after a previous failure");
33
RUN_TEST (5, bson_cursor_find_next);