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

Function TestShallowCopy

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

Source from the content-addressed store, hash-verified

1400
1401template <bool FixedSize>
1402void TestShallowCopy(vtkSmartPointer<vtkCellArray> cellArray)
1403{
1404 vtkLogScopeFunction(INFO);
1405
1406 FillCellArray<FixedSize>(cellArray);
1407
1408 vtkNew<vtkCellArray> other;
1409 other->ShallowCopy(cellArray);
1410
1411 TEST_ASSERT(cellArray->GetStorageType() == other->GetStorageType());
1412 ValidateCellArray<FixedSize>(other);
1413
1414 cellArray->InsertNextCell({ 0, 1, 2 });
1415 TEST_ASSERT(cellArray->GetNumberOfCells() == other->GetNumberOfCells());
1416 TEST_ASSERT(cellArray->GetOffsetsArray() == other->GetOffsetsArray());
1417 TEST_ASSERT(cellArray->GetConnectivityArray() == other->GetConnectivityArray());
1418}
1419
1420template <bool FixedSize>
1421void TestAppendImpl(vtkSmartPointer<vtkCellArray> first, vtkSmartPointer<vtkCellArray> second)

Callers

nothing calls this directly

Calls 4

GetConnectivityArrayMethod · 0.80
ShallowCopyMethod · 0.45
InsertNextCellMethod · 0.45
GetNumberOfCellsMethod · 0.45

Tested by

no test coverage detected