diff options
author | Lloyd Hilaiel <lloyd@hilaiel.com> | 2011-04-25 11:24:55 -0700 |
---|---|---|
committer | Lloyd Hilaiel <lloyd@hilaiel.com> | 2011-04-25 11:24:55 -0700 |
commit | 888ac11de66ec7fabd6fb5e05cb457a79a79eeae (patch) | |
tree | a34a95f93d66aa44f7400e7e79f1fd68b14d935e | |
parent | 88a3c16c784fc14008f1cf3af525a71f735d6617 (diff) | |
download | yajl-888ac11de66ec7fabd6fb5e05cb457a79a79eeae.tar.gz |
test harness fixes on win32
-rwxr-xr-x | test/run_tests.sh | 19 | ||||
-rw-r--r-- | test/yajl_test.c | 6 |
2 files changed, 14 insertions, 11 deletions
diff --git a/test/run_tests.sh b/test/run_tests.sh index d6fd175..55a665b 100755 --- a/test/run_tests.sh +++ b/test/run_tests.sh @@ -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" diff --git a/test/yajl_test.c b/test/yajl_test.c index d669ca4..5c373d0 100644 --- a/test/yajl_test.c +++ b/test/yajl_test.c @@ -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; } |