Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/libgit2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVicent Marti <tanoku@gmail.com>2013-01-24 03:09:55 +0400
committerVicent Marti <tanoku@gmail.com>2013-01-24 03:09:55 +0400
commit0d52cb4aea2e0af1b8a4a8557e26c9edf85c96db (patch)
tree8f3a10dfc3653864420329b36617aedfe8790626 /tests-clar/core
parenta0f777c87f1dca716ef71fbd378de86ab1bafeba (diff)
opts: Some basic tests
Diffstat (limited to 'tests-clar/core')
-rw-r--r--tests-clar/core/opts.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests-clar/core/opts.c b/tests-clar/core/opts.c
new file mode 100644
index 000000000..6468b357a
--- /dev/null
+++ b/tests-clar/core/opts.c
@@ -0,0 +1,18 @@
+#include "clar_libgit2.h"
+
+void test_core_opts__readwrite(void)
+{
+ size_t old_val = 0;
+ size_t new_val = 0;
+
+ git_libgit2_opts(GIT_OPT_GET_MWINDOW_SIZE, &old_val);
+ git_libgit2_opts(GIT_OPT_SET_MWINDOW_SIZE, (size_t)1234);
+ git_libgit2_opts(GIT_OPT_GET_MWINDOW_SIZE, &new_val);
+
+ cl_assert(new_val == 1234);
+
+ git_libgit2_opts(GIT_OPT_SET_MWINDOW_SIZE, old_val);
+ git_libgit2_opts(GIT_OPT_GET_MWINDOW_SIZE, &new_val);
+
+ cl_assert(new_val == old_val);
+}