<br><br><div class="gmail_quote">On Tue, Dec 22, 2009 at 4:45 PM, David Doria <span dir="ltr"><<a href="mailto:daviddoria%2Bvtk@gmail.com">daviddoria+vtk@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;">
<div><div></div><div class="h5"><div> Tue, Dec 22, 2009 at 4:39 PM, David Cole <span dir="ltr"><<a href="mailto:david.cole@kitware.com" target="_blank">david.cole@kitware.com</a>></span> wrote:</div><div class="gmail_quote">
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="gmail_quote"><div><div></div><div>On Tue, Dec 22, 2009 at 4:34 PM, David Doria <span dir="ltr"><<a href="mailto:daviddoria%2Bvtk@gmail.com" target="_blank">daviddoria+vtk@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;">
<div><br><div class="gmail_quote">On Tue, Dec 22, 2009 at 4:21 PM, 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;">



1) I would modify the current test for triangle.<br>
2) When you add the TestPolygon test, check vtkPolygon's coverage to<br>
see if you can exercise some uncovered code. There are 193 uncovered<br>
lines of code:<br>
<a href="http://www.cdash.org/CDash/viewCoverageFile.php?buildid=498540&fileid=10908473" target="_blank">http://www.cdash.org/CDash/viewCoverageFile.php?buildid=498540&fileid=10908473</a><br>
<font color="#888888"><br>
Bill<br>
</font><div><div></div><div></div></div></blockquote></div><br></div><div>Ok, I'll add more polygon tests. I've never looked at these coverage files - I'm assuming that the red 000000 means that line is not tested? Can you figure out where the line is tested by the number? e.g.</div>



<div><span style="font-family: Arial,Helvetica,sans-serif; font-size: 14px;"><pre>00037579   void vtkPolygon::ComputeNormal(vtkPoints *p, double *n)</pre><pre><font face="arial"><span style="white-space: normal; font-size: small;">How would you turn 00037579 into a file name?</span></font></pre>


</span></div></blockquote><div><br></div></div></div><div>The number preceding each line is supposed to be the number of times that line was called. To find callers, grep for the function name, once you find a candidate, set a breakpoint on the line and run a test in the debugger to verify that you can stop there...</div>


<div><br></div><div><br></div></div>
</blockquote></div><div><br></div></div></div><div>A couple more things...</div><div><br></div>1) Can/should tests use smart pointers?</blockquote><div><br>I think they can be used in tests, and I have done this in multiple places. <br>
</div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><br></div><div>2) Can this function be placed somewhere so it doesn't need to be copied into many of the tests?</div>

<div><br><div><div>// Perform a fuzzy compare of floats/doubles</div><div>template<class A></div><div>bool fuzzyCompare(A a, A b) {</div><div>  return fabs(a - b) < vtkstd::numeric_limits<A>::epsilon();</div>

<div>}</div><div><br></div></div></div></blockquote>I was thinking about moving it (is this from one of my tests), but I wanted to see how it did before doing so. If this is generally useful (I suspect it would be) I can add it to vtkMath and exclude it from the wrapping. Any opinions from the more seasoned VTK developers out there on why it might not be a good idea to add functions like this?<br>
<br>Marcus<br></div>-- <br>Marcus D. Hanwell, Ph.D.<br>R&D Engineer, Kitware Inc.<br>(518) 881-4937<br>