summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@microsoft.com>2014-12-03 15:28:44 -0500
committerEdward Thomson <ethomson@microsoft.com>2014-12-04 20:42:27 -0500
commit6d91dc53514aa9eec4bdf2326d1f7657ac2426b3 (patch)
tree562fc7818cef583864792a8b4cb261a067f90119 /tests
parent792d750bed52070ffd10ecb96d12c4889c162ee4 (diff)
downloadlibgit2-6d91dc53514aa9eec4bdf2326d1f7657ac2426b3.tar.gz
init: return the number of initializations
Diffstat (limited to 'tests')
-rw-r--r--tests/core/init.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/core/init.c b/tests/core/init.c
new file mode 100644
index 000000000..e17b7845f
--- /dev/null
+++ b/tests/core/init.c
@@ -0,0 +1,14 @@
+#include "clar_libgit2.h"
+
+void test_core_init__returns_count(void)
+{
+ /* libgit2_clar initializes us first, so we have an existing
+ * initialization.
+ */
+ cl_assert_equal_i(2, git_libgit2_init());
+ cl_assert_equal_i(3, git_libgit2_init());
+
+ cl_assert_equal_i(2, git_libgit2_shutdown());
+ cl_assert_equal_i(1, git_libgit2_shutdown());
+}
+