Skip to content

Commit

Permalink
update unittests.
Browse files Browse the repository at this point in the history
  • Loading branch information
jonahwilliams committed Apr 17, 2024
1 parent 3fff1cb commit cdbb63e
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions impeller/tessellator/tessellator_unittests.cc
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ TEST(TessellatorTest, TessellateConvex) {
PathBuilder{}.AddRect(Rect::MakeLTRB(0, 0, 10, 10)).TakePath(), points,
indices, 1.0);

std::vector<Point> expected = {{0, 0}, {10, 0}, {10, 10}, {0, 10}};
// Note: the origin point is repeated but not referenced in the indices
// below
std::vector<Point> expected = {{0, 0}, {10, 0}, {10, 10}, {0, 10}, {0, 0}};
std::vector<uint16_t> expected_indices = {0, 1, 3, 2};
EXPECT_EQ(points, expected);
EXPECT_EQ(indices, expected_indices);
Expand All @@ -40,8 +42,9 @@ TEST(TessellatorTest, TessellateConvex) {
points, indices, 1.0);

std::vector<Point> expected = {{0, 0}, {10, 0}, {10, 10}, {0, 10},
{20, 20}, {30, 20}, {30, 30}, {20, 30}};
std::vector<uint16_t> expected_indices = {0, 1, 3, 2, 2, 4, 4, 5, 7, 6};
{0, 0}, {20, 20}, {30, 20}, {30, 30},
{20, 30}, {20, 20}};
std::vector<uint16_t> expected_indices = {0, 1, 3, 2, 2, 5, 5, 6, 8, 7};
EXPECT_EQ(points, expected);
EXPECT_EQ(indices, expected_indices);
}
Expand Down

0 comments on commit cdbb63e

Please sign in to comment.