summaryrefslogtreecommitdiff
path: root/tests/unit/mongo/sync-gridfs-chunk/sync_gridfs_chunked_file_free.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/unit/mongo/sync-gridfs-chunk/sync_gridfs_chunked_file_free.c')
-rw-r--r--tests/unit/mongo/sync-gridfs-chunk/sync_gridfs_chunked_file_free.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/unit/mongo/sync-gridfs-chunk/sync_gridfs_chunked_file_free.c b/tests/unit/mongo/sync-gridfs-chunk/sync_gridfs_chunked_file_free.c
new file mode 100644
index 0000000..c9fddfa
--- /dev/null
+++ b/tests/unit/mongo/sync-gridfs-chunk/sync_gridfs_chunked_file_free.c
@@ -0,0 +1,16 @@
+#include "test.h"
+#include "mongo.h"
+
+#include <errno.h>
+
+void
+test_mongo_sync_gridfs_chunked_file_free (void)
+{
+ errno = 0;
+ mongo_sync_gridfs_chunked_file_free (NULL);
+
+ cmp_ok (errno, "==", ENOTCONN,
+ "mongo_sync_gridfs_chunked_file_free() fails with a NULL file");
+}
+
+RUN_TEST (1, mongo_sync_gridfs_chunked_file_free);