summaryrefslogtreecommitdiff
path: root/tests/object/tree/write.c
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@github.com>2016-02-28 15:51:38 -0500
committerEdward Thomson <ethomson@github.com>2016-02-28 18:59:43 -0500
commitf2dddf52c041ff2f9185bdb320ddccad1523a2bf (patch)
tree6e818814d93e1781c51da842e6c02529a17167b6 /tests/object/tree/write.c
parent4afe536ba1c909ff8ab8d1b75997d3897b72571b (diff)
downloadlibgit2-f2dddf52c041ff2f9185bdb320ddccad1523a2bf.tar.gz
turn on strict object validation by default
Diffstat (limited to 'tests/object/tree/write.c')
-rw-r--r--tests/object/tree/write.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/object/tree/write.c b/tests/object/tree/write.c
index f779b8ce6..341f5db72 100644
--- a/tests/object/tree/write.c
+++ b/tests/object/tree/write.c
@@ -19,7 +19,7 @@ void test_object_tree_write__cleanup(void)
{
cl_git_sandbox_cleanup();
- cl_git_pass(git_libgit2_opts(GIT_OPT_ENABLE_STRICT_OBJECT_CREATION, 0));
+ cl_git_pass(git_libgit2_opts(GIT_OPT_ENABLE_STRICT_OBJECT_CREATION, 1));
}
void test_object_tree_write__from_memory(void)
@@ -492,11 +492,11 @@ static void test_invalid_objects(bool should_allow_invalid)
void test_object_tree_write__object_validity(void)
{
- /* Ensure that we can add invalid objects by default */
- test_invalid_objects(true);
-
- /* Ensure that we can turn on validation */
- cl_git_pass(git_libgit2_opts(GIT_OPT_ENABLE_STRICT_OBJECT_CREATION, 1));
+ /* Ensure that we cannot add invalid objects by default */
test_invalid_objects(false);
+
+ /* Ensure that we can turn off validation */
+ cl_git_pass(git_libgit2_opts(GIT_OPT_ENABLE_STRICT_OBJECT_CREATION, 0));
+ test_invalid_objects(true);
}