[vtk-developers] Patch to modernize Widgets/Testing/Cxx
Karthik Krishnan
karthik.krishnan at kitware.com
Tue Aug 31 02:09:23 EDT 2010
On Tue, Aug 24, 2010 at 2:24 AM, Bill Lorensen <bill.lorensen at gmail.com>wrote:
> Karthik,
>
> I'm trying to complete a project I started last year to modernize the
> vtk cxx tests. I have gone through all of the Widgets cxx tests and
> changed them to use smart pointers and the vtkTestingInteractor. This
> reduces the number of lines in each test and makes them more readable.
>
> Can you apply the attached patch and give me some feedback? Marcus is
> also working to modernize the Charts testing.
>
>
Thanks Bill.
I'll submit this after my experimental build ends up nice and green.
In addition to your attached patch, I'll also try and trim it a bit more but
I was hoping to get some feedback.
(a) I'd also like to replace lines of the form
vtkSmartPointer<vtkInteractorEventRecorder> recorder =
vtkSmartPointer<vtkInteractorEventRecorder>::New();
recorder->SetInteractor(iren);
recorder->ReadFromInputStringOn();
recorder->SetInputString(BoxWidgetEventLog2);
recorder->Play();
recorder->Off();
iren->Start();
return EXIT_SUCCESS;
with just
return vtkTesting::InteractorEventLoop( argc, argv, iren,
BoxWidgetEventLog2 );
Perhaps we should move that recorder stuff into vtkTestingInteractor
instead; something like
iren->Start(BoxWidgetEventLog2)
It would also be great to pass the event log as a command line; I'll try and
submit a patch ?
Thanks
--
karthik
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20100831/f201840c/attachment.html>
More information about the vtk-developers
mailing list