Create unit tests for our numerics math library (LIBBN) #2BRL-CAD
Status: ClosedTime to complete: 72 hrs Mentors: HarmanpreetTags: C, unit test, math

There are dozens of files 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/rand.c
  • src/libbu/tests/*.c (note libbu, not libbn for examples)
  • src/libbn/tests/*.c (also many examples, but not as good)

Code:

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

This task involves implementing a new unit test for any of LIBBN's source files that do not already have a unit test defined.  The test should run at least 10 public functions if there are multiple functions defined within one of our source files.

Some files, like our mat.c file, have LOTS of functions.  You don't have to test them all!  Just test at least 10 of them and if any prove to be challenging, let us know before you invest more than an hour.  Your unit test(s) must be hooked into our build system and "should" pass.  If you find a genuine bug, let us know (we can create follow-on tasks for any you investigate and fix).  We have lots of existing unit tests to follow as an example.

Submit your new unit test and build system changes as a patch file.  Let us know about any problems or bugs encountered.

Uploaded Work
File name/URLFile sizeDate submitted
tabdata_tests.diff18.3 KBDecember 28 2013 17:27 UTC
Comments
Peter Amidonon December 25 2013 19:32 UTCTask Claimed

I would like to work on this task.

Kesha Shah on December 25 2013 20:11 UTCTask Assigned

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

Peter Amidonon December 28 2013 17:27 UTCReady for review

The work on this task is ready to be reviewed.

Melange on December 28 2013 20:11 UTCNo more Work can be submitted

Melange has detected that the deadline has passed and no more work can be submitted. The submitted work should be reviewed.

Peter Amidonon December 28 2013 23:16 UTCTraveling

Hi,


I have been traveling and lost a large amount of time on this task due to that; if you are not fully satisfied with the work I submitted, can you please extend the deadline?

Sean on December 29 2013 04:19 UTCTask Closed

Congratulations, this task has been completed successfully.

Sean on December 29 2013 04:22 UTClooks good to me

This looks quite good to me.  Remember that now you have commit access, you can commit while you work.  You don't have to wait.  You can post the commit revision links here instead of needing to upload patch files.  That will also give us a sense for how long things are taking so you're credited tasks accordingly.


 

Peter Amidonon December 29 2013 04:42 UTCReviewing commits?

I can do that if you like; I have not been doing that right now because I thought that it would be a good idea not to commit until I was sure that my work satisfies your expectations, so I like to wait for you to review it...