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

Unified Diff: import/cross/targz_generator_test.cc

Issue 159168: This fixes a number of things that are warnings in the Mac compiler.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/o3d/
Patch Set: Created 11 years, 5 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
Index: import/cross/targz_generator_test.cc
===================================================================
--- import/cross/targz_generator_test.cc (revision 21208)
+++ import/cross/targz_generator_test.cc (working copy)
@@ -74,15 +74,13 @@
// Checks that the data from the reference tar.gz file matches the tar.gz
// stream we just ge5nerated
- void Validate(uint8 *reference_data) {
+ uint8* compressed_data() {
uint8 *received_data = compressed_data_;
+ return received_data;
+ }
- // on Windows the platform field is different than our reference file
- received_data[9] = 3; // Force platform in header to 'UNIX'.
-
- EXPECT_EQ(0, memcmp(reference_data,
- received_data,
- compressed_data_.GetLength()));
+ size_t compressed_data_length() {
+ return compressed_data_.GetLength();
}
#if defined(GENERATE_GOLDEN)
@@ -155,8 +153,16 @@
#endif
- test_client.Validate(targz_data);
+ uint8 *received_data = test_client.compressed_data();
+ // The platform header in our reference file is set to UNIX, so
+ // force received data to match for all platforms.
+ received_data[9] = 3;
+
+ EXPECT_EQ(0, memcmp(targz_data,
+ received_data,
+ test_client.compressed_data_length()));
+
free(targz_data);
free(image_data);
free(audio_data);

Powered by Google App Engine
This is Rietveld 408576698