MCPcopy Create free account
hub / github.com/Kitware/VTK / ValidateCellArray

Function ValidateCellArray

Common/DataModel/Testing/Cxx/TestCellArrayHelpers.h:245–261  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

243
244template <bool FixedSize>
245void ValidateCellArray(vtkCellArray* cellArray, bool reverse = false, vtkIdType offset = 0)
246{
247 vtkIdType npts;
248 const vtkIdType* pts;
249 auto it = vtk::TakeSmartPointer(cellArray->NewIterator());
250 it->GoToFirstCell();
251
252 for (int i = 0; i < 3; ++i)
253 {
254 TEST_ASSERT(!it->IsDoneWithTraversal());
255 it->GetCurrentCell(npts, pts);
256 TEST_ASSERT(ValidateCell<FixedSize>(i, npts, pts, reverse, offset));
257 it->GoToNextCell();
258 }
259
260 TEST_ASSERT(it->IsDoneWithTraversal());
261}
262
263void TestAllocate(vtkSmartPointer<vtkCellArray> cellArray)
264{

Callers

nothing calls this directly

Calls 3

GoToNextCellMethod · 0.80
NewIteratorMethod · 0.45
IsDoneWithTraversalMethod · 0.45

Tested by

no test coverage detected