From d047b47aadf88501238f36f5c17dd0a50dc62087 Mon Sep 17 00:00:00 2001 From: Vicent Marti Date: Sun, 23 May 2010 04:41:07 +0200 Subject: [PATCH] Updated t0401 (commit parsing) to reflect the new API changes. Signed-off-by: Vicent Marti Signed-off-by: Andreas Ericsson --- tests/t0401-parse.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/tests/t0401-parse.c b/tests/t0401-parse.c index 5b209c9..ce4344f 100644 --- a/tests/t0401-parse.c +++ b/tests/t0401-parse.c @@ -3,6 +3,7 @@ #include "commit.h" #include #include +#include static char *test_commits_broken[] = { @@ -136,10 +137,12 @@ BEGIN_TEST(parse_buffer_test) const int working_commit_count = sizeof(test_commits_working) / sizeof(*test_commits_working); int i; + git_revpool *pool = gitrp_alloc(NULL); + for (i = 0; i < broken_commit_count; ++i) { git_commit commit; - commit.parsed = 0; - commit.pool = NULL; + memset(&commit, 0x0, sizeof(git_commit)); + commit.object.pool = pool; must_fail(git_commit__parse_buffer( &commit, @@ -150,8 +153,8 @@ BEGIN_TEST(parse_buffer_test) for (i = 0; i < working_commit_count; ++i) { git_commit commit; - commit.parsed = 0; - commit.pool = NULL; + memset(&commit, 0x0, sizeof(git_commit)); + commit.object.pool = pool; must_pass(git_commit__parse_buffer( &commit, @@ -160,4 +163,6 @@ BEGIN_TEST(parse_buffer_test) ); } + gitrp_free(pool); + END_TEST -- 2.11.4.GIT