5
#include "libmongo-private.h"
10
test_mongo_sync_cursor_new (void)
12
mongo_sync_connection *conn;
18
p = mongo_wire_packet_new ();
19
conn = test_make_fake_sync_conn (-1, FALSE);
21
c = mongo_sync_cursor_new (conn, config.ns, NULL);
23
"mongo_sync_cursor_new() fails with a NULL packet");
24
c = mongo_sync_cursor_new (conn, NULL, p);
26
"mongo_sync_cursor_new() fails with a NULL namespace");
27
c = mongo_sync_cursor_new (NULL, config.ns, p);
29
"mongo_sync_cursor_new() fails with a NULL connection");
31
c = mongo_sync_cursor_new (conn, config.ns, p);
33
"mongo_sync_cursor_new() works");
35
mongo_sync_cursor_free (c);
36
mongo_sync_disconnect (conn);
40
RUN_TEST (4, mongo_sync_cursor_new);