summaryrefslogtreecommitdiff
path: root/tests/test_lib.h
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_lib.h')
-rwxr-xr-xtests/test_lib.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/test_lib.h b/tests/test_lib.h
index d0b62c8d4..f3febe857 100755
--- a/tests/test_lib.h
+++ b/tests/test_lib.h
@@ -38,8 +38,9 @@ typedef git_testsuite *(*libgit2_suite)(void);
void git_test__init(git_test *t, const char *name, const char *description);
void git_test__fail(git_test *tc, const char *file, int line, const char *message);
void git_test__assert(git_test *tc, const char *file, int line, const char *message, int condition);
+void git_test__assert_pass(git_test *tc, const char *file, int line, const char *message, int ret_value);
-#define must_pass(expr) git_test__assert(_gittest, __FILE__, __LINE__, "Method failed: " #expr, (expr) == 0)
+#define must_pass(expr) git_test__assert_pass(_gittest, __FILE__, __LINE__, "Method failed: " #expr, (expr))
#define must_fail(expr) git_test__assert(_gittest, __FILE__, __LINE__, "Expected method to fail: " #expr, (expr) < 0)
#define must_be_true(expr) git_test__assert(_gittest, __FILE__, __LINE__, "Expression is not true: " #expr, !!(expr))