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

Function TEST_F

test/PatchIterators.cpp:46–70  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

44}
45
46TEST_F(PatchIteratorTest, IterateOverWholePatchColumnWise)
47{
48 auto patch = createWorldspawnPatch(3, 5);
49
50 std::vector<Vector3> expectedValues;
51
52 // Fill the vector with the expected values
53 for (auto col = 0; col < patch->getPatch().getWidth(); ++col)
54 {
55 for (auto row = 0; row < patch->getPatch().getHeight(); ++row)
56 {
57 expectedValues.push_back(patch->getPatch().ctrlAt(row, col).vertex);
58 }
59 }
60
61 patch::ColumnWisePatchIterator it(patch->getPatch());
62 auto expected = expectedValues.begin();
63
64 while (it.isValid())
65 {
66 EXPECT_EQ((it++)->vertex, *(expected++));
67 }
68
69 EXPECT_EQ(expected, expectedValues.end()); // assume no underflow
70}
71
72TEST_F(PatchIteratorTest, IterateOverWholePatchColumnWiseRowBackwards)
73{

Callers

nothing calls this directly

Calls 14

createWorldspawnPatchFunction · 0.85
iterateOverSingleColumFunction · 0.85
iterateOverSingleRowFunction · 0.85
getPatchMethod · 0.80
getWidthMethod · 0.45
getHeightMethod · 0.45
push_backMethod · 0.45
beginMethod · 0.45

Tested by

no test coverage detected