#include "vtkTextActor.h" #include "vtkTextRepresentation.h" #include "vtkTextWidget.h" #include #include #include "WidgetTestingMacros.h" int vtkTextWidgetTest1(int, char*[]) { vtkSmartPointer node1 = vtkSmartPointer::New(); EXERCISE_BASIC_BORDER_METHODS(node1); vtkSmartPointer rep1 = vtkSmartPointer::New(); node1->SetRepresentation(rep1); vtkTextActor* textActor = node1->GetTextActor(); if (textActor) { std::cout << "Text actor is not null" << std::endl; } else { std::cout << "Text actor is null" << std::endl; } vtkSmartPointer textActor2 = vtkSmartPointer::New(); node1->SetTextActor(textActor2); if (node1->GetTextActor() != textActor2) { std::cerr << "Failed to get back expected text actor" << std::endl; return EXIT_FAILURE; } return EXIT_SUCCESS; }