diff options
-rw-r--r-- | test/inputstream.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/test/inputstream.c b/test/inputstream.c index 426208d..ec72629 100644 --- a/test/inputstream.c +++ b/test/inputstream.c @@ -54,7 +54,8 @@ int main(int argc, char **argv) fseek(fp, 0, SEEK_SET); while (len >= CHUNK_SIZE) { - fread(buf, 1, CHUNK_SIZE, fp); + size_t read = fread(buf, 1, CHUNK_SIZE, fp); + assert(read == CHUNK_SIZE); assert(parserutils_inputstream_append(stream, buf, CHUNK_SIZE) == PARSERUTILS_OK); @@ -68,7 +69,8 @@ int main(int argc, char **argv) } if (len > 0) { - fread(buf, 1, len, fp); + size_t read = fread(buf, 1, len, fp); + assert(read == len); assert(parserutils_inputstream_append(stream, buf, len) == PARSERUTILS_OK); |