summaryrefslogtreecommitdiff
path: root/tests/gd2
diff options
context:
space:
mode:
authorChristoph M. Becker <cmbecker69@gmx.de>2016-07-15 15:43:12 +0200
committerChristoph M. Becker <cmbecker69@gmx.de>2016-07-15 16:16:32 +0200
commitcea5c5aae09f30710bcf65a9e986dafb5c7b7a92 (patch)
tree3beb7a2f690b861c383e931ef44794a573382816 /tests/gd2
parente210ff1149e97b990900fd8165db15c3ab022d51 (diff)
downloadlibgd-cea5c5aae09f30710bcf65a9e986dafb5c7b7a92.tar.gz
Partially implement #220: replace all printf error messages with gdTestErrorMsg
Diffstat (limited to 'tests/gd2')
-rw-r--r--tests/gd2/gd2_read.c8
-rw-r--r--tests/gd2/gd2_read_corrupt.c2
2 files changed, 5 insertions, 5 deletions
diff --git a/tests/gd2/gd2_read.c b/tests/gd2/gd2_read.c
index e5a0782..37d36cf 100644
--- a/tests/gd2/gd2_read.c
+++ b/tests/gd2/gd2_read.c
@@ -24,7 +24,7 @@ int main(int argc, char *argv[])
while (path[i] != NULL) {
fp = gdTestFileOpen2("gd2", path[i]);
if (!fp) {
- printf("failed, cannot open file: %s\n", path[0]);
+ gdTestErrorMsg("failed, cannot open file: %s\n", path[0]);
return 1;
}
im = gdImageCreateFromGd2(fp);
@@ -33,12 +33,12 @@ int main(int argc, char *argv[])
if (path_exp[i] != NULL) {
fp = gdTestFileOpen2("gd2", path_exp[i]);
if (!fp) {
- printf("failed, cannot open file: %s\n", path_exp[i]);
+ gdTestErrorMsg("failed, cannot open file: %s\n", path_exp[i]);
return 1;
}
exp = gdImageCreateFromPng(fp);
if (!gdAssertImageEquals(exp, im)) {
- printf("image %s differ from expected result\n", path[i]);
+ gdTestErrorMsg("image %s differs from expected result\n", path[i]);
gdImageDestroy(im);
error = 1;
} else {
@@ -50,7 +50,7 @@ int main(int argc, char *argv[])
} else {
/* expected to fail */
if (im) {
- printf("image %s should have failed to be loaded\n", path[i]);
+ gdTestErrorMsg("image %s should have failed to be loaded\n", path[i]);
gdImageDestroy(im);
error = 1;
} else {
diff --git a/tests/gd2/gd2_read_corrupt.c b/tests/gd2/gd2_read_corrupt.c
index a295412..7afc303 100644
--- a/tests/gd2/gd2_read_corrupt.c
+++ b/tests/gd2/gd2_read_corrupt.c
@@ -12,7 +12,7 @@ int main(int argc, char *argv[])
fp = gdTestFileOpen2("gd2", "invalid_header.gd2");
if (!fp) {
- printf("failed, cannot open file: %s\n", "invalid_header.gd2");
+ gdTestErrorMsg("failed, cannot open file: %s\n", "invalid_header.gd2");
return 1;
}
im = gdImageCreateFromGd2(fp);