fix leaks in tests and extend a bit the timeout for ASAN mode

master
Pierre Joye 2021-08-13 21:57:22 +07:00
parent 9cb2d1dcf5
commit b68f9a34c0
5 changed files with 7 additions and 5 deletions

View File

@ -1,5 +1,5 @@
if (BUILD_TEST)
SET(DART_TESTING_TIMEOUT 5)
SET(DART_TESTING_TIMEOUT 15)
INCLUDE(Dart)
@ -97,5 +97,4 @@ if (BUILD_TEST)
FOREACH(test_dir ${TESTS_DIRS})
add_subdirectory (${test_dir})
ENDFOREACH(test_dir)
endif (BUILD_TEST)

View File

@ -21,6 +21,7 @@ int main()
file = gdTestTempFile("bug00002_1.png");
fp = fopen(file, "wb");
free(file);
if (fp == NULL) {
gdTestErrorMsg("Cannot create image from <%s>\n", file);
gdImageDestroy(im);

View File

@ -20,6 +20,7 @@ int main()
char *res = gdImageStringFT(im, rect, fg, path, 12, 0, 10, 10, "");
gdTestAssert(res == NULL);
free(path);
gdImageDestroy(im);
return gdNumFailures();
}

View File

@ -20,6 +20,7 @@ int main()
im = gdImageCreateFromGif(fp);
gdTestAssert(im != NULL);
fclose(fp);
gdImageDestroy(im);
return gdNumFailures();
}

View File

@ -11,9 +11,9 @@
int main()
{
gdImagePtr src, dst;
gdImagePtr src = NULL, dst = NULL;
int r, g, b;
void *p;
void *p = NULL;
int size = 0;
CuTestImageResult result = {0, 0};