| 343 | } |
| 344 | |
| 345 | void iterateOverSingleColumReversely(IPatch& patch, std::size_t colToTest) |
| 346 | { |
| 347 | std::vector<Vector3> expectedValues; |
| 348 | |
| 349 | // Fill the vector with the expected values |
| 350 | for (auto row = static_cast<int>(patch.getHeight()) - 1; row >= 0; --row) |
| 351 | { |
| 352 | expectedValues.push_back(patch.ctrlAt(row, colToTest).vertex); |
| 353 | } |
| 354 | |
| 355 | patch::SinglePatchColumnReverseIterator it(patch, colToTest); |
| 356 | auto expected = expectedValues.begin(); |
| 357 | |
| 358 | while (it.isValid()) |
| 359 | { |
| 360 | EXPECT_EQ((it++)->vertex, *(expected++)); |
| 361 | } |
| 362 | |
| 363 | EXPECT_EQ(expected, expectedValues.end()); // assume no underflow |
| 364 | } |
| 365 | |
| 366 | TEST_F(PatchIteratorTest, IterateOverSingleColumn) |
| 367 | { |