Index: tests/DocumentTest.cpp |
diff --git a/tests/DocumentTest.cpp b/tests/DocumentTest.cpp |
index 9ca7881186f1739942898fe1a15d297f81998158..1838687c4d12d37a6df8d1eaa43b61a565b7767b 100644 |
--- a/tests/DocumentTest.cpp |
+++ b/tests/DocumentTest.cpp |
@@ -79,7 +79,7 @@ static void test_file(skiatest::Reporter* reporter) { |
FILE* file = fopen(path.c_str(), "r"); |
REPORTER_ASSERT(reporter, file != NULL); |
char header[100]; |
- fread(header, 4, 1, file); |
+ REPORTER_ASSERT(reporter, fread(header, 4, 1, file) != 0); |
REPORTER_ASSERT(reporter, strncmp(header, "%PDF", 4) == 0); |
fclose(file); |
} |