Menu
Logged-In As
ACCOUNTNot Logged In
Create numerics library (LIBBN) unit test for rand.cBRL-CAD
Status: ClosedTime to complete:
100 hrs
Mentors: Isaac Kamga, Jacob B
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/rand.c
- src/libbu/tests/*.c (note libbu, not libbn for examples)
- src/libbn/tests/*.c
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 all of the public functions and be hooked into our build system. We have lots of existing unit tests to follow as an example.
I would like to work on this task.
This task has been assigned to Marc Tannous. You have 100 hours to complete this task, good luck!
I have to create a unit test, similar to the others in the source code that tests all the public functions in rand.c .
In rand.c, there is only one public function, that is bn_mathtab_constant(); which turns all the elements in the specified interval into 0.0 .
My code is really simple and just calls the function, which should set all the elements on 0.0 , if it does not then we have a problem and return 1, if it runs smoothly we return 0. There is no input required for this test, therefore I checked the argc to be appropriate.
Am I missing something? Is my source code correct?
The work on this task is ready to be reviewed.
Hey, Marc!
The unit test looks good functionally use, but you should submit it in patch format(SVN diff).
Also, please check Coding Style Standards in the HACKING guide (http://svn.code.sf.net/p/brlcad/code/brlcad/trunk/HACKING)
Andrei
One of the mentors has sent this task back for more work. Talk to the mentor(s) assigned to this task to satisfy the requirements needed to complete this task, submit your work again and mark the task as complete once you re-submit your work.
The work on this task is ready to be reviewed.
Congratulations, this task has been completed successfully.
Accepted! Great work!
Hi Marc, You did a good job on this task.