test harness fixes on win32

This commit is contained in:
Lloyd Hilaiel 2011-04-25 11:24:55 -07:00
parent 88a3c16c78
commit 888ac11de6
2 changed files with 14 additions and 11 deletions

View File

@ -16,14 +16,17 @@ fi
# find test binary on both platforms. allow the caller to force a
# particular test binary (useful for non-cmake build systems).
if [ -z "$testBin" ]; then
testBin="../build/test/Debug/yajl_test.exe"
if [ ! -x $testBin ] ; then
testBin="../build/test/yajl_test"
if [ ! -x $testBin ] ; then
${ECHO} "cannot execute test binary: '$testBin'"
exit 1;
fi
fi
testBin="../build/test/Release/yajl_test.exe"
if [ ! -x $testBin ] ; then
testBin="../build/test/Debug/yajl_test.exe"
if [ ! -x $testBin ] ; then
testBin="../build/test/yajl_test"
if [ ! -x $testBin ] ; then
${ECHO} "cannot execute test binary: '$testBin'"
exit 1;
fi
fi
fi
fi
${ECHO} "using test binary: $testBin"

View File

@ -26,8 +26,8 @@
/* memory debugging routines */
typedef struct
{
size_t numFrees;
size_t numMallocs;
unsigned int numFrees;
unsigned int numMallocs;
/* XXX: we really need a hash table here with per-allocation
* information */
} yajlTestMemoryContext;
@ -275,7 +275,7 @@ main(int argc, char ** argv)
*/
fflush(stderr);
fflush(stdout);
printf("memory leaks:\t%zu\n", memCtx.numMallocs - memCtx.numFrees);
printf("memory leaks:\t%u\n", memCtx.numMallocs - memCtx.numFrees);
return 0;
}