| 44 | } |
| 45 | |
| 46 | TEST_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 | |
| 72 | TEST_F(PatchIteratorTest, IterateOverWholePatchColumnWiseRowBackwards) |
| 73 | { |
nothing calls this directly
no test coverage detected