Rename test_compiles.c to test_multiple_files.c
[apps/agl-service-can-low-level.git] / tests / test_decode2.c
index d38e625..2142977 100644 (file)
@@ -59,13 +59,6 @@ bool callback(pb_istream_t *stream, uint8_t *buf, size_t count)
     FILE *file = (FILE*)stream->state;
     bool status;
     
-    if (buf == NULL)
-    {
-       /* Skipping data */
-        while (count-- && fgetc(file) != EOF);
-        return count == 0;
-    }
-    
     status = (fread(buf, 1, count, file) == count);
     
     if (feof(file))
@@ -82,7 +75,7 @@ int main()
     pb_istream_t stream = {&callback, stdin, 10000};
     if (!print_person(&stream))
     {
-        printf("Parsing failed.\n");
+        printf("Parsing failed: %s\n", PB_GET_ERROR(&stream));
         return 1;
     } else {
         return 0;