diff options
Diffstat (limited to 'tests/main.c')
-rw-r--r-- | tests/main.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/main.c b/tests/main.c index 00b2bae02..207a6a8be 100644 --- a/tests/main.c +++ b/tests/main.c @@ -1,6 +1,10 @@ #include "clar_libgit2.h" #include "clar_libgit2_trace.h" +#ifdef GIT_WIN32_LEAKCHECK +# include "win32/w32_leakcheck.h" +#endif + #ifdef _WIN32 int __cdecl main(int argc, char *argv[]) #else @@ -29,6 +33,11 @@ int main(int argc, char *argv[]) cl_global_trace_disable(); git_libgit2_shutdown(); +#ifdef GIT_WIN32_LEAKCHECK + if (git_win32_leakcheck_has_leaks()) + res = res || 1; +#endif + at_exit_cmd = getenv("CLAR_AT_EXIT"); if (at_exit_cmd != NULL) { int at_exit = system(at_exit_cmd); |