summaryrefslogtreecommitdiff
path: root/core/src/fxcodec
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-03-26 09:36:42 -0700
committerTom Sepez <tsepez@chromium.org>2015-03-26 09:36:42 -0700
commit30506b41ea88cf6743c314743ce477e8186a3945 (patch)
tree4503b1a63d442882bc9d9612c7374b86f122123a /core/src/fxcodec
parent95363408a8efc2ec86a1ec8ba0307e5bdcf00a03 (diff)
downloadpdfium-30506b41ea88cf6743c314743ce477e8186a3945.tar.xz
Use correctly-typed error codes for fx_codec_jpx_unittest
Needed to fix the failed pdfium_unittests on windows. Ironically, I created these constants so I wouldn't mix up size_t's and off_t's in these tests, but I didn't apply them consistently. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1036743005
Diffstat (limited to 'core/src/fxcodec')
-rw-r--r--core/src/fxcodec/codec/fx_codec_jpx_unittest.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/core/src/fxcodec/codec/fx_codec_jpx_unittest.cpp b/core/src/fxcodec/codec/fx_codec_jpx_unittest.cpp
index f867788759..3e16bd0aa7 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));