Create unit tests for plane.c intersection 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 point functions:

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

Uploaded Work
File name/URLFile sizeDate submitted
plane_isect.diff8.3 KBDecember 07 2013 22:19 UTC
Comments
Peter Amidonon December 7 2013 15:54 UTCTask Claimed

I would like to work on this task.

Mandeep Kaur on December 7 2013 16:33 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 22:21 UTCReady for review

The work on this task is ready to be reviewed.

Sean on December 8 2013 14:53 UTCTask Closed

Congratulations, this task has been completed successfully.

Sean on December 8 2013 14:56 UTCanother

Another excellent patch.  Please create a Sourceforge account if you have not done so already and let me know what your account name is.

Sean on December 8 2013 15:02 UTCnearly perfect

Your patch was applied in r58881, slightly modified.  You had a typo on two lines, which I'm surprised you didn't run into compiling (be sure to always do one last compile before submitting your patches).


I also notice that several of the tests are failing, which is a good thing.  Do they fail for you as well (i.e., are they probably bugs) or do you have any insight as to why they're failing?


 

Peter Amidonon December 8 2013 15:12 UTCfailing tests

I tried to document which tests fail for me in the CMakeLists.txt file. I did notice that on all of the ones that failed for the bn_plane_isect_line_lseg, it used the same (incorrect) value for t.