MCPcopy Create free account
hub / github.com/codereader/DarkRadiant / iterateOverSingleColumReversely

Function iterateOverSingleColumReversely

test/PatchIterators.cpp:345–364  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

343}
344
345void 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
366TEST_F(PatchIteratorTest, IterateOverSingleColumn)
367{

Callers 1

TEST_FFunction · 0.85

Calls 5

getHeightMethod · 0.45
push_backMethod · 0.45
beginMethod · 0.45
isValidMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected