Create a utility library (LIBBU) API unit test ... for avs.cBRL-CAD
Status: ClosedTime to complete: 48 hrs Mentors: SeanTags: unit test, API, C, C++, Tcl, Python, Ruby

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

This task involves implementing a new unit test for any of LIBBU's source files that do not already have a unit test defined. The test should run all of the public functions and be hooked into our build system. We have lots of existing unit tests to follow as an example.  You can implement this task in any language you like, but you'll have to bind all of the functions you test.

References:

  • include/bu.h
  • src/libbu/avs.c
  • src/libbu/tests/*.c

Code:

  • src/libbu/tests/bu_avs.c
  • src/libbu/tests/CMakeLists.txt
Uploaded Work
File name/URLFile sizeDate submitted
my.patch9.1 KBDecember 04 2012 10:46 UTC
my.patch9.0 KBDecember 04 2012 10:48 UTC
Comments
Lachlan Pon December 4 2012 00:09 UTCTask Claimed

I would like to work on this task.

Lachlan Pon December 4 2012 00:18 UTCCMakeLists.txt

Hi,


Is it necessary for me to write tests that are parameterised? By that I mean that you supply data using the CMakeLists.txt. For this test (testing the attribute/value set) I don't think it will be very easy...


(Looking at some of the existing tests I think some like the redblack test and the timer test have only one test definition)


Thanks,
Lachlan

Sean on December 4 2012 03:55 UTCTask Assigned

This task has been assigned to Lachlan P. You have 48 hours to complete this task, good luck!

Sean on December 4 2012 04:00 UTCdepends on the unit

Hi Lachlan, it depends on what you're testing but in general no.  It doesn't have to be parameterized but strictly speaking, it'd still be parameterized just with zero parameters. ;)


 

Lachlan Pon December 4 2012 10:46 UTCReady for review

The work on this task is ready to be reviewed.

Lachlan Pon December 4 2012 10:49 UTCOops

Sorry, I missed something and therefore resubmitted the patch. Please use the latest :-)


Thanks,
Lachlan

Sean on December 5 2012 04:18 UTCnicely done

Still have to commit the patch, but a manual inspection looks great.  Nice work.


You may have already provided it elsewhere, but I don't see it in my notes.  If you provide your full name, we'll credit you accordingly in our authorship documentation.


 

Sean on December 5 2012 04:18 UTCTask Closed

Congratulations, this task has been completed successfully.

Lachlan Pon December 5 2012 04:20 UTCThanks

Hi,


Thanks for that (very hard to be patient waiting for it to be checked...)


Lachlan Phillips, if you need it, but I think its already in the AUTHORS file from a previous task.


Thanks,
Lachlan