Skip to content

Commit

Permalink
Add a negative test
Browse files Browse the repository at this point in the history
  • Loading branch information
wantehchang committed Nov 10, 2023
1 parent bb9ad5d commit 0b7783e
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/gtest/avifclaptest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,15 @@ constexpr InvalidClapPropertyParam kInvalidClapPropertyTestParams[] = {
722,
AVIF_PIXEL_FORMAT_YUV420,
{330, 1, 385, 1, static_cast<uint32_t>(-308), 1, 103, 1}},
// pcX = -1/2 + (99 - 1)/2 = 48.5
// pcY = -1/2 + (99 - 1)/2 = 48.5
// leftmost = 48.5 - (99 - 1)/2 = -0.5 (not an integer)
// topmost = 48.5 - (99 - 1)/2 = -0.5 (not an integer)
{99,
99,
AVIF_PIXEL_FORMAT_YUV420,
{99, 1, 99, 1, static_cast<uint32_t>(-1), 2, static_cast<uint32_t>(-1),
2}},
};

using InvalidClapPropertyTest =
Expand Down

0 comments on commit 0b7783e

Please sign in to comment.