diff --git a/oss-internship-2020/libtiff/test/defer_strile_writing.cc b/oss-internship-2020/libtiff/test/defer_strile_writing.cc index 1428d50..e403112 100644 --- a/oss-internship-2020/libtiff/test/defer_strile_writing.cc +++ b/oss-internship-2020/libtiff/test/defer_strile_writing.cc @@ -214,8 +214,7 @@ void TestWriting(const char* mode, int tiled, int height) { for (int i = 0; i < (height + 15) / 16; ++i) { std::array tilebuffer; tilebuffer.fill(i); - sapi::v::Array tilebuffer_(tilebuffer.data(), - kTileBufferSize); + sapi::v::Array tilebuffer_(tilebuffer.data(), tilebuffer.size()); status_or_int = api.TIFFWriteEncodedTile(&tif, i, tilebuffer_.PtrBoth(), kTileBufferSize); @@ -255,8 +254,8 @@ void TestWriting(const char* mode, int tiled, int height) { uint8_t expected_c = static_cast(i); tilebuffer.fill(0); - sapi::v::Array tilebuffer_(tilebuffer.data(), - kTileBufferSize); + sapi::v::Array tilebuffer_(tilebuffer.data(), tilebuffer.size()); + status_or_long = api.TIFFReadEncodedTile( &tif2, i, tilebuffer_.PtrBoth(), kTileBufferSize); ASSERT_THAT(status_or_long, IsOk()) diff --git a/oss-internship-2020/libtiff/test/long_tag.cc b/oss-internship-2020/libtiff/test/long_tag.cc index 04f7d16..99c0eb7 100644 --- a/oss-internship-2020/libtiff/test/long_tag.cc +++ b/oss-internship-2020/libtiff/test/long_tag.cc @@ -51,7 +51,7 @@ TEST(SandboxTest, LongTag) { ASSERT_THAT(sandbox.Init(), IsOk()) << "Couldn't initialize Sandboxed API"; std::array buffer = {0, 127, 255}; - sapi::v::Array buffer_(buffer.data(), kSamplePerPixel); + sapi::v::Array buffer_(buffer.data(), buffer.size()); absl::StatusOr status_or_int; absl::StatusOr status_or_tif; diff --git a/oss-internship-2020/libtiff/test/short_tag.cc b/oss-internship-2020/libtiff/test/short_tag.cc index 283a6ba..aa7d0c5 100644 --- a/oss-internship-2020/libtiff/test/short_tag.cc +++ b/oss-internship-2020/libtiff/test/short_tag.cc @@ -72,7 +72,7 @@ TEST(SandboxTest, ShortTag) { ASSERT_THAT(sandbox.Init(), IsOk()) << "Couldn't initialize Sandboxed API"; std::array buffer = {0, 127, 255}; - sapi::v::Array buffer_(buffer.data(), kSamplePerPixel); + sapi::v::Array buffer_(buffer.data(), buffer.size()); absl::StatusOr status_or_int; absl::StatusOr status_or_tif;