<div> Tue, Dec 22, 2009 at 4:39 PM, David Cole <span dir="ltr"><<a href="mailto:david.cole@kitware.com">david.cole@kitware.com</a>></span> wrote:</div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="gmail_quote"><div><div></div><div class="h5">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="margin:0 0 0 .8ex;border-left:1px #ccc solid;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="margin:0 0 0 .8ex;border-left:1px #ccc solid;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>A couple more things...</div><div><br></div>1) Can/should tests use smart pointers?<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>Thanks,<br><br>David</div></div>