summaryrefslogtreecommitdiff
path: root/tests/tiff
diff options
context:
space:
mode:
authorChristoph M. Becker <cmbecker69@gmx.de>2016-07-13 04:44:04 +0200
committerChristoph M. Becker <cmbecker69@gmx.de>2016-07-15 14:59:21 +0200
commite210ff1149e97b990900fd8165db15c3ab022d51 (patch)
tree04b3f264d4d8f2fe9ffb6bf3c8b63586aeef6462 /tests/tiff
parent5a3f19e962b507560c9206965087db4dc0ad107f (diff)
downloadlibgd-e210ff1149e97b990900fd8165db15c3ab022d51.tar.gz
Partially implement #220: tests: replace all printf error messages with gdTestErrorMsg
Diffstat (limited to 'tests/tiff')
-rw-r--r--tests/tiff/tiff_dpi.c12
-rw-r--r--tests/tiff/tiff_im2im.c8
2 files changed, 10 insertions, 10 deletions
diff --git a/tests/tiff/tiff_dpi.c b/tests/tiff/tiff_dpi.c
index cdffe6d..584ae68 100644
--- a/tests/tiff/tiff_dpi.c
+++ b/tests/tiff/tiff_dpi.c
@@ -16,7 +16,7 @@ int main()
src = gdImageCreate(100, 100);
if (src == NULL) {
- printf("could not create src\n");
+ gdTestErrorMsg("could not create src\n");
return 1;
}
r = gdImageColorAllocate(src, 0xFF, 0, 0);
@@ -40,30 +40,30 @@ int main()
p = gdImageTiffPtr(src, &size);
if (p == NULL) {
status = 1;
- printf("p is null\n");
+ gdTestErrorMsg("p is null\n");
goto door0;
}
if (size <= 0) {
status = 1;
- printf("size is non-positive\n");
+ gdTestErrorMsg("size is non-positive\n");
goto door1;
}
dst = gdImageCreateFromTiffPtr(size, p);
if (dst == NULL) {
status = 1;
- printf("could not create dst\n");
+ gdTestErrorMsg("could not create dst\n");
goto door1;
}
if (dst->res_x != res_x) {
status = 1;
- printf("mismatch in res_x (got %d, expected %d)", dst->res_x, res_x);
+ gdTestErrorMsg("mismatch in res_x (got %d, expected %d)", dst->res_x, res_x);
}
if (dst->res_y != res_y) {
status = 1;
- printf("mismatch in res_y (got %d, expected %d)", dst->res_y, res_y);
+ gdTestErrorMsg("mismatch in res_y (got %d, expected %d)", dst->res_y, res_y);
}
gdImageDestroy(dst);
diff --git a/tests/tiff/tiff_im2im.c b/tests/tiff/tiff_im2im.c
index 2fc113d..31deafa 100644
--- a/tests/tiff/tiff_im2im.c
+++ b/tests/tiff/tiff_im2im.c
@@ -14,7 +14,7 @@ int main()
src = gdImageCreate(100, 100);
if (src == NULL) {
- printf("could not create src\n");
+ gdTestErrorMsg("could not create src\n");
return 1;
}
r = gdImageColorAllocate(src, 0xFF, 0, 0);
@@ -34,19 +34,19 @@ int main()
p = gdImageTiffPtr(src, &size);
if (p == NULL) {
status = 1;
- printf("p is null\n");
+ gdTestErrorMsg("p is null\n");
goto door0;
}
if (size <= 0) {
status = 1;
- printf("size is non-positive\n");
+ gdTestErrorMsg("size is non-positive\n");
goto door1;
}
dst = gdImageCreateFromTiffPtr(size, p);
if (dst == NULL) {
status = 1;
- printf("could not create dst\n");
+ gdTestErrorMsg("could not create dst\n");
goto door1;
}
OUTPUT_TIFF(dst);