mirror of
https://github.com/google/sandboxed-api.git
synced 2024-03-22 13:11:30 +08:00
clear array initialization
This commit is contained in:
parent
466259a985
commit
1d1c4b9579
|
@ -214,8 +214,7 @@ void TestWriting(const char* mode, int tiled, int height) {
|
||||||
for (int i = 0; i < (height + 15) / 16; ++i) {
|
for (int i = 0; i < (height + 15) / 16; ++i) {
|
||||||
std::array<uint8_t, kTileBufferSize> tilebuffer;
|
std::array<uint8_t, kTileBufferSize> tilebuffer;
|
||||||
tilebuffer.fill(i);
|
tilebuffer.fill(i);
|
||||||
sapi::v::Array<uint8_t> tilebuffer_(tilebuffer.data(),
|
sapi::v::Array<uint8_t> tilebuffer_(tilebuffer.data(), tilebuffer.size());
|
||||||
kTileBufferSize);
|
|
||||||
|
|
||||||
status_or_int = api.TIFFWriteEncodedTile(&tif, i, tilebuffer_.PtrBoth(),
|
status_or_int = api.TIFFWriteEncodedTile(&tif, i, tilebuffer_.PtrBoth(),
|
||||||
kTileBufferSize);
|
kTileBufferSize);
|
||||||
|
@ -255,8 +254,8 @@ void TestWriting(const char* mode, int tiled, int height) {
|
||||||
uint8_t expected_c = static_cast<uint8_t>(i);
|
uint8_t expected_c = static_cast<uint8_t>(i);
|
||||||
tilebuffer.fill(0);
|
tilebuffer.fill(0);
|
||||||
|
|
||||||
sapi::v::Array<uint8_t> tilebuffer_(tilebuffer.data(),
|
sapi::v::Array<uint8_t> tilebuffer_(tilebuffer.data(), tilebuffer.size());
|
||||||
kTileBufferSize);
|
|
||||||
status_or_long = api.TIFFReadEncodedTile(
|
status_or_long = api.TIFFReadEncodedTile(
|
||||||
&tif2, i, tilebuffer_.PtrBoth(), kTileBufferSize);
|
&tif2, i, tilebuffer_.PtrBoth(), kTileBufferSize);
|
||||||
ASSERT_THAT(status_or_long, IsOk())
|
ASSERT_THAT(status_or_long, IsOk())
|
||||||
|
|
|
@ -51,7 +51,7 @@ TEST(SandboxTest, LongTag) {
|
||||||
ASSERT_THAT(sandbox.Init(), IsOk()) << "Couldn't initialize Sandboxed API";
|
ASSERT_THAT(sandbox.Init(), IsOk()) << "Couldn't initialize Sandboxed API";
|
||||||
|
|
||||||
std::array<uint8_t, kSamplePerPixel> buffer = {0, 127, 255};
|
std::array<uint8_t, kSamplePerPixel> buffer = {0, 127, 255};
|
||||||
sapi::v::Array<uint8_t> buffer_(buffer.data(), kSamplePerPixel);
|
sapi::v::Array<uint8_t> buffer_(buffer.data(), buffer.size());
|
||||||
|
|
||||||
absl::StatusOr<int> status_or_int;
|
absl::StatusOr<int> status_or_int;
|
||||||
absl::StatusOr<TIFF*> status_or_tif;
|
absl::StatusOr<TIFF*> status_or_tif;
|
||||||
|
|
|
@ -72,7 +72,7 @@ TEST(SandboxTest, ShortTag) {
|
||||||
ASSERT_THAT(sandbox.Init(), IsOk()) << "Couldn't initialize Sandboxed API";
|
ASSERT_THAT(sandbox.Init(), IsOk()) << "Couldn't initialize Sandboxed API";
|
||||||
|
|
||||||
std::array<uint8_t, kSamplePerPixel> buffer = {0, 127, 255};
|
std::array<uint8_t, kSamplePerPixel> buffer = {0, 127, 255};
|
||||||
sapi::v::Array<uint8_t> buffer_(buffer.data(), kSamplePerPixel);
|
sapi::v::Array<uint8_t> buffer_(buffer.data(), buffer.size());
|
||||||
|
|
||||||
absl::StatusOr<int> status_or_int;
|
absl::StatusOr<int> status_or_int;
|
||||||
absl::StatusOr<TIFF*> status_or_tif;
|
absl::StatusOr<TIFF*> status_or_tif;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user