diff options
author | Vicent Marti <tanoku@gmail.com> | 2013-01-24 03:09:55 +0400 |
---|---|---|
committer | Vicent Marti <tanoku@gmail.com> | 2013-01-24 03:09:55 +0400 |
commit | 0d52cb4aea2e0af1b8a4a8557e26c9edf85c96db (patch) | |
tree | 8f3a10dfc3653864420329b36617aedfe8790626 /tests-clar/core | |
parent | a0f777c87f1dca716ef71fbd378de86ab1bafeba (diff) |
opts: Some basic tests
Diffstat (limited to 'tests-clar/core')
-rw-r--r-- | tests-clar/core/opts.c | 18 |
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); +} |