Commit 16501685 authored by Ben Boeckel's avatar Ben Boeckel

IOXML: add test for outputting to a string

parent a7c2dd73
......@@ -6,6 +6,7 @@ vtk_add_test_cxx(${vtk-module}CxxTests tests
TestXMLHierarchicalBoxDataFileConverter.cxx,NO_VALID
TestXMLUnstructuredGridReader.cxx
TestXML.cxx,NO_DATA,NO_VALID,NO_OUTPUT
TestXMLToString.cxx,NO_DATA,NO_VALID,NO_OUTPUT
TestDataObjectXMLIO.cxx,NO_VALID
)
......
#include "vtkNew.h"
#include "vtkSphereSource.h"
#include "vtkTestUtilities.h"
#include "vtkXMLPolyDataWriter.h"
int TestXMLToString(int argc, char*argv[])
{
vtkNew<vtkSphereSource> sphere;
vtkNew<vtkXMLPolyDataWriter> writer;
writer->WriteToOutputStringOn();
writer->SetInputConnection(0, sphere->GetOutputPort(0));
writer->Update();
writer->Write();
writer->GetOutputString();
return 0;
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment