Create unit tests for plane.c dist functionsBRL-CAD
Status: ClosedTime to complete: 72 hrs Mentors: SeanTags:

There are more than 300 library functions in our core LIBBN library. As a core library used by nearly every one of BRL-CAD's tools, testing those functions for correct behavior is important.

References:

  • include/bn.h
  • include/plot3.h
  • include/vmath.h
  • src/libbn/qmath.c
  • src/libbu/tests/*.c (note libbu, not libbn for examples)
  • src/libbn/tests/*.c

Code:

  • src/libbn/tests/qmath.c
  • src/libbn/tests/CMakeLists.txt

This task involves implementing a new unit test for any of LIBBN's plane.c public distance functions:

grep -E '^bn' plane.c  | sort | cut -f1 -d\( | sort | grep _dist_

Uploaded Work
File name/URLFile sizeDate submitted
plane_dist.diff8.6 KBDecember 07 2013 01:02 UTC
Comments
Peter Amidonon December 5 2013 20:40 UTCTask Claimed

I would like to work on this task.

Gauravjeet Singh on December 6 2013 02:08 UTCTask Assigned

This task has been assigned to Andromeda Galaxy. You have 72 hours to complete this task, good luck!

Peter Amidonon December 7 2013 01:02 UTCReady for review

The work on this task is ready to be reviewed.

Sean on December 7 2013 08:18 UTCTask Closed

Congratulations, this task has been completed successfully.

Sean on December 7 2013 08:23 UTCpatch applied cleanly

Nearly perfect patch.  The comment header was wrong, but the content looked good.  A little surprised you didn't find any test cases that fail, though.


Failures are generally more useful, so we can detect and fix the bugs. ;)


Regardless, nicely done with the patch.  What's next? :)