diff options
Diffstat (limited to 'lib/jxl/blending_test.cc')
-rw-r--r-- | lib/jxl/blending_test.cc | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/lib/jxl/blending_test.cc b/lib/jxl/blending_test.cc index e032b99..73d6f44 100644 --- a/lib/jxl/blending_test.cc +++ b/lib/jxl/blending_test.cc @@ -3,10 +3,13 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +#include <cstdint> +#include <vector> + #include "lib/extras/codec.h" #include "lib/jxl/image_test_utils.h" #include "lib/jxl/test_utils.h" -#include "lib/jxl/testdata.h" +#include "lib/jxl/testing.h" namespace jxl { namespace { @@ -14,22 +17,21 @@ namespace { using ::testing::SizeIs; TEST(BlendingTest, Crops) { - ThreadPool* pool = nullptr; - - const PaddedBytes compressed = - ReadTestData("jxl/blending/cropped_traffic_light.jxl"); + const std::vector<uint8_t> compressed = + jxl::test::ReadTestData("jxl/blending/cropped_traffic_light.jxl"); CodecInOut decoded; - ASSERT_TRUE(test::DecodeFile({}, compressed, &decoded, pool)); + ASSERT_TRUE(test::DecodeFile({}, Bytes(compressed), &decoded)); ASSERT_THAT(decoded.frames, SizeIs(4)); int i = 0; for (const ImageBundle& ib : decoded.frames) { std::ostringstream filename; filename << "jxl/blending/cropped_traffic_light_frame-" << i << ".png"; - const PaddedBytes compressed_frame = ReadTestData(filename.str()); + const std::vector<uint8_t> compressed_frame = + jxl::test::ReadTestData(filename.str()); CodecInOut frame; - ASSERT_TRUE(SetFromBytes(Span<const uint8_t>(compressed_frame), &frame)); - EXPECT_TRUE(SamePixels(ib.color(), *frame.Main().color())); + ASSERT_TRUE(SetFromBytes(Bytes(compressed_frame), &frame)); + JXL_EXPECT_OK(SamePixels(ib.color(), *frame.Main().color(), _)); ++i; } } |