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

Function TestPath

Common/DataModel/Testing/Cxx/TestPath.cxx:9–36  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7#include "vtkPoints.h"
8
9int TestPath(int, char*[])
10{
11 vtkNew<vtkPath> path;
12
13 path->Allocate(7);
14
15 path->InsertNextPoint(0.0, 0.0, 0.0, vtkPath::MOVE_TO);
16 path->InsertNextPoint(1.0, 0.0, 0.0, vtkPath::LINE_TO);
17 path->InsertNextPoint(1.5, 2.0, 0.0, vtkPath::CONIC_CURVE);
18 path->InsertNextPoint(1.0, 1.5, 0.0, vtkPath::CONIC_CURVE);
19 path->InsertNextPoint(0.0, 3.0, 0.0, vtkPath::CUBIC_CURVE);
20 path->InsertNextPoint(0.0, 1.0, 0.0, vtkPath::CUBIC_CURVE);
21 path->InsertNextPoint(path->GetPoint(0), vtkPath::CUBIC_CURVE);
22
23 if (path->GetCodes()->GetNumberOfTuples() != 7 || path->GetPoints()->GetNumberOfPoints() != 7)
24 {
25 return EXIT_FAILURE;
26 }
27
28 path->Reset();
29
30 if (path->GetCodes()->GetNumberOfTuples() != 0 || path->GetPoints()->GetNumberOfPoints() != 0)
31 {
32 return EXIT_FAILURE;
33 }
34
35 return EXIT_SUCCESS;
36}

Callers

nothing calls this directly

Calls 8

GetCodesMethod · 0.80
AllocateMethod · 0.45
InsertNextPointMethod · 0.45
GetPointMethod · 0.45
GetNumberOfTuplesMethod · 0.45
GetNumberOfPointsMethod · 0.45
GetPointsMethod · 0.45
ResetMethod · 0.45

Tested by

no test coverage detected