Pushed to origin/master<br><br>----<br>commit 89834b422050c4912fb64e1b22de8d4a8ec3da41<br>Author: Bill Lorensen <<a href="mailto:bill.lorensen@gmail.com">bill.lorensen@gmail.com</a>><br>Date: Tue Aug 31 15:21:11 2010 +0530<br>
<br> Patch from Bill Lorensen on modernizing the widget test framework<br> <br> 1) Use SmartPointers where possible. This removes most ->Delete()'s at<br> end of tests.<br> 2) Use std::cout, std::cerr and std::endl<br>
3) Use vtkTestingObjectFactory and vtkTestingInteractor. Remove<br> explicit regression testing code. The TestingInteractor handles all test<br> command line options. No longer need to have separate logic if running<br>
interactively.<br> 4) Use proper vtk indentation.<br>----<br><br><br>There are 4 (new) failing tests on my machine after the commit. I'll look at them in a bit.<br><br> <a href="http://www.cdash.org/CDash/viewTest.php?onlyfailed&buildid=708801">http://www.cdash.org/CDash/viewTest.php?onlyfailed&buildid=708801</a><br>
<br>----<br><br><br>Thanks<br>--<br>karthik<br><br><div class="gmail_quote">On Tue, Aug 31, 2010 at 11:39 AM, Karthik Krishnan <span dir="ltr"><<a href="mailto:karthik.krishnan@kitware.com">karthik.krishnan@kitware.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="im"><div class="gmail_quote">On Tue, Aug 24, 2010 at 2:24 AM, Bill Lorensen <span dir="ltr"><<a href="mailto:bill.lorensen@gmail.com" target="_blank">bill.lorensen@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Karthik,<br>
<br>
I'm trying to complete a project I started last year to modernize the<br>
vtk cxx tests. I have gone through all of the Widgets cxx tests and<br>
changed them to use smart pointers and the vtkTestingInteractor. This<br>
reduces the number of lines in each test and makes them more readable.<br>
<br>
Can you apply the attached patch and give me some feedback? Marcus is<br>
also working to modernize the Charts testing.<br>
<br></blockquote></div><br></div>Thanks Bill.<br><br>I'll submit this after my experimental build ends up nice and green.<br><br>In addition to your attached patch, I'll also try and trim it a bit more but I was hoping to get some feedback.<br>
<br>(a) I'd also like to replace lines of the form<br>
<br> vtkSmartPointer<vtkInteractorEventRecorder> recorder =<br> vtkSmartPointer<vtkInteractorEventRecorder>::New();<br> recorder->SetInteractor(iren);<br> recorder->ReadFromInputStringOn();<br> recorder->SetInputString(BoxWidgetEventLog2);<br>
recorder->Play();<br> recorder->Off();<br>
iren->Start();<br>
return EXIT_SUCCESS;<br>
<br>
with just<br>
<br>
return vtkTesting::InteractorEventLoop( argc, argv, iren, BoxWidgetEventLog2 );<br>
<br>
Perhaps we should move that recorder stuff into vtkTestingInteractor instead; something like <br>
iren->Start(BoxWidgetEventLog2) <br><br>
It would also be great to pass the event log as a command line; I'll try and submit a patch ?<br>
<br>
Thanks<br>
--<br><font color="#888888">
karthik<br>
</font></blockquote></div><br>