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

Unified Diff: core/src/fxcodec/codec/fx_codec_jpx_unittest.cpp

Issue 1036743005: Use correctly-typed error codes for fx_codec_jpx_unittest (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 5 years, 9 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: core/src/fxcodec/codec/fx_codec_jpx_unittest.cpp
diff --git a/core/src/fxcodec/codec/fx_codec_jpx_unittest.cpp b/core/src/fxcodec/codec/fx_codec_jpx_unittest.cpp
index f86778875973211fab9fe583c4f5d10991d19184..3e16bd0aa7653b4d8868e912b0ec694e690d9546 100644
--- a/core/src/fxcodec/codec/fx_codec_jpx_unittest.cpp
+++ b/core/src/fxcodec/codec/fx_codec_jpx_unittest.cpp
@@ -45,16 +45,16 @@ TEST(fxcodec, DecodeDataNullStream) {
EXPECT_EQ(0xbd, buffer[0]);
// writes of size 0 do nothing but return an error code.
- EXPECT_EQ(kReadError, opj_write_from_memory(buffer, 0, &dd));
+ EXPECT_EQ(kWriteError, opj_write_from_memory(buffer, 0, &dd));
// writes of nonzero size do nothing but return an error code.
- EXPECT_EQ(kReadError, opj_write_from_memory(buffer, sizeof(buffer), &dd));
+ EXPECT_EQ(kWriteError, opj_write_from_memory(buffer, sizeof(buffer), &dd));
// Skips of size 0 always return an error code.
- EXPECT_EQ(kReadError, opj_skip_from_memory(0, &dd));
+ EXPECT_EQ(kSkipError, opj_skip_from_memory(0, &dd));
// Skips of nonzero size always return an error code.
- EXPECT_EQ(kReadError, opj_skip_from_memory(1, &dd));
+ EXPECT_EQ(kSkipError, opj_skip_from_memory(1, &dd));
// Seeks to 0 offset return in error.
EXPECT_FALSE(opj_seek_from_memory(0, &dd));
@@ -78,16 +78,16 @@ TEST(fxcodec, DecodeDataZeroSize) {
EXPECT_EQ(0xbd, buffer[0]);
// writes of size 0 do nothing but return an error code.
- EXPECT_EQ(kReadError, opj_write_from_memory(buffer, 0, &dd));
+ EXPECT_EQ(kWriteError, opj_write_from_memory(buffer, 0, &dd));
// writes of nonzero size do nothing but return an error code.
- EXPECT_EQ(kReadError, opj_write_from_memory(buffer, sizeof(buffer), &dd));
+ EXPECT_EQ(kWriteError, opj_write_from_memory(buffer, sizeof(buffer), &dd));
// Skips of size 0 always return an error code.
- EXPECT_EQ(kReadError, opj_skip_from_memory(0, &dd));
+ EXPECT_EQ(kSkipError, opj_skip_from_memory(0, &dd));
// Skips of nonzero size always return an error code.
- EXPECT_EQ(kReadError, opj_skip_from_memory(1, &dd));
+ EXPECT_EQ(kSkipError, opj_skip_from_memory(1, &dd));
// Seeks to 0 offset return in error.
EXPECT_FALSE(opj_seek_from_memory(0, &dd));
« 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