srctree

Robin Linden parent 5d2bb9a9 6740270c
img/qoi: Don't use unreasonably large sizes in test images

inlinesplit
img/qoi_test.cpp added: 5, removed: 5, total 0
@@ -35,14 +35,14 @@ int main() {
});
 
etest::test("channels error handling", [] {
expect_eq(Qoi::from(std::stringstream{"qoif\1\0\0\0\1\0\0\0"s}), tl::unexpected{QoiError::AbruptEof});
expect_eq(Qoi::from(std::stringstream{"qoif\1\0\0\0\1\0\0\0\5"s}), tl::unexpected{QoiError::InvalidChannels});
expect_eq(Qoi::from(std::stringstream{"qoif\0\0\0\1\0\0\0\1"s}), tl::unexpected{QoiError::AbruptEof});
expect_eq(Qoi::from(std::stringstream{"qoif\0\0\0\1\0\0\0\1\5"s}), tl::unexpected{QoiError::InvalidChannels});
});
 
etest::test("colorspace error handling", [] {
expect_eq(Qoi::from(std::stringstream{"qoif\1\0\0\0\1\0\0\0\3"s}), tl::unexpected{QoiError::AbruptEof});
expect_eq(Qoi::from(std::stringstream{"qoif\0\0\0\1\0\0\0\1\3"s}), tl::unexpected{QoiError::AbruptEof});
expect_eq(
Qoi::from(std::stringstream{"qoif\1\0\0\0\1\0\0\0\3\2"s}), tl::unexpected{QoiError::InvalidColorspace});
Qoi::from(std::stringstream{"qoif\0\0\0\1\0\0\0\1\3\2"s}), tl::unexpected{QoiError::InvalidColorspace});
});
 
etest::test("missing pixel data", [] {