8
test_bson_cursor_get_array (void)
13
ok (bson_cursor_get_array (NULL, &a) == FALSE,
14
"bson_cursor_get_array() with a NULL cursor fails");
16
b = test_bson_generate_full ();
17
c = bson_cursor_new (b);
19
ok (bson_cursor_get_array (c, NULL) == FALSE,
20
"bson_cursor_get_array() with a NULL destination fails");
21
ok (bson_cursor_get_array (c, &a) == FALSE,
22
"bson_cursor_get_array() at the initial position fails");
24
"destination remains unchanged after failed cursor operations");
27
c = bson_find (b, "array");
28
ok (bson_cursor_get_array (c, &a),
29
"bson_cursor_get_array() works");
30
cmp_ok (bson_size (a), ">", 0,
31
"the returned document is finished");
36
ok (bson_cursor_get_array (c, &a) == FALSE,
37
"bson_cursor_get_array() fails if the cursor points to "
44
RUN_TEST (7, bson_cursor_get_array);