summaryrefslogtreecommitdiff
path: root/tests/clar_libgit2.h
diff options
context:
space:
mode:
authorRussell Belfer <rb@github.com>2014-04-06 10:42:26 -0700
committerRussell Belfer <rb@github.com>2014-04-06 10:42:26 -0700
commitc8c91433a8c3c144273d4b362590ebc8761c0523 (patch)
tree0f8a6c90b71a7f83b3437a09dc02d6a9184b11ff /tests/clar_libgit2.h
parent2b6b85f1168206f6f53144b9c98ecc4ce2e74a88 (diff)
downloadlibgit2-c8c91433a8c3c144273d4b362590ebc8761c0523.tar.gz
More ** tests for pattern rules
Diffstat (limited to 'tests/clar_libgit2.h')
-rw-r--r--tests/clar_libgit2.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/clar_libgit2.h b/tests/clar_libgit2.h
index 915111244..3de80bfa0 100644
--- a/tests/clar_libgit2.h
+++ b/tests/clar_libgit2.h
@@ -11,11 +11,13 @@
*
* Use this wrapper around all `git_` library calls that return error codes!
*/
-#define cl_git_pass(expr) do { \
+#define cl_git_pass(expr) cl_git_pass_(expr, __FILE__, __LINE__)
+
+#define cl_git_pass_(expr, file, line) do { \
int _lg2_error; \
giterr_clear(); \
if ((_lg2_error = (expr)) != 0) \
- cl_git_report_failure(_lg2_error, __FILE__, __LINE__, "Function call failed: " #expr); \
+ cl_git_report_failure(_lg2_error, file, line, "Function call failed: " #expr); \
} while (0)
/**