Skip to content
Snippets Groups Projects
Commit 8cf2fc7c authored by David Gobbi's avatar David Gobbi
Browse files

Test was not setting length of array

Allocate() just reserves memory, e.g. in preparation for insertion,
but SetNumberOfTuples() is necessary to set size before SetTuple().
parent a180e106
No related branches found
No related tags found
No related merge requests found
......@@ -50,7 +50,7 @@ int TestFieldNames(int, char*[])
image0->GetPointData()->AddArray(arr0);
vtkSmartPointer<vtkDoubleArray> arr1 = vtkSmartPointer<vtkDoubleArray>::New();
arr1->Allocate(numPts);
arr1->SetNumberOfTuples(numPts);
arr1->SetName("array 1");
for (vtkIdType idx = 0; idx < numPts; idx++)
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment