diff options
Diffstat (limited to 'tests/test_encode2.c')
-rw-r--r-- | tests/test_encode2.c | 5 |
1 files changed, 5 insertions, 0 deletions
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 */ + } } |