summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/test_encode1.c1
-rw-r--r--tests/test_encode2.c5
-rw-r--r--tests/test_encode3.c2
3 files changed, 7 insertions, 1 deletions
diff --git a/tests/test_encode1.c b/tests/test_encode1.c
index 2e978296..742c99f4 100644
--- a/tests/test_encode1.c
+++ b/tests/test_encode1.c
@@ -27,6 +27,7 @@ int main()
}
else
{
+ fprintf(stderr, "Encoding failed: %s\n", PB_GET_ERROR(&stream));
return 1; /* Failure */
}
}
diff --git a/tests/test_encode2.c b/tests/test_encode2.c
index b1105ce6..fd25c6cb 100644
--- a/tests/test_encode2.c
+++ b/tests/test_encode2.c
@@ -26,7 +26,12 @@ int main()
/* Now encode it and check if we succeeded. */
if (pb_encode(&stream, Person_fields, &person))
+ {
return 0; /* Success */
+ }
else
+ {
+ fprintf(stderr, "Encoding failed: %s\n", PB_GET_ERROR(&stream));
return 1; /* Failure */
+ }
}
diff --git a/tests/test_encode3.c b/tests/test_encode3.c
index 4f6859ac..982ad3c8 100644
--- a/tests/test_encode3.c
+++ b/tests/test_encode3.c
@@ -124,7 +124,7 @@ int main(int argc, char **argv)
}
else
{
- fprintf(stderr, "Encoding failed!\n");
+ fprintf(stderr, "Encoding failed: %s\n", PB_GET_ERROR(&stream));
return 1; /* Failure */
}
}