Create numerics library (LIBBN) unit test for qmath.cBRL-CAD
Status: ClosedTime to complete: 100 hrs Mentors: Hardeep Singh Rai, Gauravjeet SinghTags: C, testing, library, quality, api, unit test, assurance, math

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 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.

Uploaded Work
File name/URLFile sizeDate submitted
task-30-add-qmath-tests.diff16.4 KBDecember 15 2014 05:28 UTC
Comments
Marc Tannouson December 3 2014 15:16 UTCTask Claimed

I would like to work on this task.

Gauravjeet Singh on December 3 2014 15:21 UTCTask Assigned

This task has been assigned to Marc Tannous. You have 100 hours to complete this task, good luck!

Marc Tannouson December 3 2014 16:39 UTCQuestion

I require a bit of help :

Over IRC, one of the mentors, maths22, helped me setup a debian VM and build brlcad. The building part is taking ages, I'm 1 hour in and it's only at 40%, hope that it will work out in the end. After the building is done, I should just make my changes in the src folder, then once I'm done do srv diff and upload the diff file over here?

Regards,
Marc

Marc Tannouson December 3 2014 18:02 UTCQuaternions not a highschool topic, can I please get some help?

Highschool mathematics never goes beyond complex numbers. After setting up a VM environment for BRL-CAD, which took me hours, I finally can work on the code, and realized that qmath.c is solely composed of operations on quaternions and I have no idea how these work.


I do not want to back out of this task, as I can code it, it's just that I do not have the examples to work with. As far as I understood from the references, each unit test has an expected result for each function, and returns true if it's correct, false otherwise. Could you guys please provide the expected results on basic tests so I can code it?


Regards,


Marc

Marc Tannouson December 3 2014 19:16 UTCClaim Removed

The claim on this task has been removed, someone else can claim it now.

Andromeda Galaxyon December 15 2014 05:11 UTCTask Claimed

I would like to work on this task.

Sean on December 15 2014 05:27 UTCTask Assigned

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

Andromeda Galaxyon December 15 2014 05:29 UTCReady for review

The work on this task is ready to be reviewed.

Andromeda Galaxyon December 15 2014 05:31 UTCQuaternion test-case verification

I just wanted to let you know that finding tools to verify the correctness of the quaternion calculations is quite difficult, which eventually led me to write a quick Mathematica function based off of the information from http://number-none.com/product/Understanding%20Slerp,%20Then%20Not%20Using%20It/

Popescu Andrei on December 15 2014 08:10 UTCTask Closed

Congratulations, this task has been completed successfully.