Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(636)

Unified Diff: tests/DocumentTest.cpp

Issue 34803004: Fix a test warning on some linux machines (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698