summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Straub <bs@github.com>2012-10-18 15:35:03 -0700
committerBen Straub <bs@github.com>2012-10-19 19:36:23 -0700
commit25e8b20169a6f6919ad49cf32220975ab96b35c8 (patch)
treef74ca6fc75a056de4a2ea0c7114d112951ef1788
parent909f626541a78cad0366ba85c04f29522bb47da7 (diff)
downloadlibgit2-25e8b20169a6f6919ad49cf32220975ab96b35c8.tar.gz
Fix broken tests
-rw-r--r--tests-clar/checkout/index.c10
-rw-r--r--tests-clar/checkout/tree.c10
2 files changed, 10 insertions, 10 deletions
diff --git a/tests-clar/checkout/index.c b/tests-clar/checkout/index.c
index a21af5f60..eac8515da 100644
--- a/tests-clar/checkout/index.c
+++ b/tests-clar/checkout/index.c
@@ -364,16 +364,16 @@ void test_checkout_index__wont_notify_of_expected_line_ending_changes(void)
static void progress(const char *path, float progress, void *payload)
{
GIT_UNUSED(path); GIT_UNUSED(progress);
- int *count = (int*)payload;
- (*count)++;
+ bool *was_called = (bool*)payload;
+ *was_called = true;
}
void test_checkout_index__calls_progress_callback(void)
{
- int count = 0;
+ bool was_called = 0;
g_opts.progress_cb = progress;
- g_opts.progress_payload = &count;
+ g_opts.progress_payload = &was_called;
cl_git_pass(git_checkout_index(g_repo, &g_opts));
- cl_assert_equal_i(count, 5);
+ cl_assert_equal_i(was_called, true);
}
diff --git a/tests-clar/checkout/tree.c b/tests-clar/checkout/tree.c
index c6989598d..88d3b3467 100644
--- a/tests-clar/checkout/tree.c
+++ b/tests-clar/checkout/tree.c
@@ -67,17 +67,17 @@ void test_checkout_tree__can_checkout_a_subdirectory_from_a_subtree(void)
static void progress(const char *path, float progress, void *payload)
{
GIT_UNUSED(path); GIT_UNUSED(progress);
- int *count = (int*)payload;
- (*count)++;
+ bool *was_called = (bool*)payload;
+ *was_called = true;
}
void test_checkout_tree__calls_progress_callback(void)
{
- int count = 0;
+ bool was_called = 0;
g_opts.progress_cb = progress;
- g_opts.progress_payload = &count;
+ g_opts.progress_payload = &was_called;
cl_git_pass(git_revparse_single(&g_object, g_repo, "master"));
cl_git_pass(git_checkout_tree(g_repo, g_object, &g_opts));
- cl_assert_equal_i(count, 4);
+ cl_assert_equal_i(was_called, true);
}