Write CoreInterface unit test #4BRL-CAD
Status: ClosedTime to complete: 100 hrs Mentors: Kesha Shah, Mihai NeacsuTags: unit test, library, oop, testing, C++

The C++ Object-oriented API, called CoreInterface aims to provide an easier-to-use, object-oriented interface over the already very powerful set of BRL-CAD tools some of the primitives(classes representing objects have already been written)

You can check out the core interface code from our subversion repository: svn checkout https://svn.code.sf.net/p/brlcad/code/rt^3/trunk rt^3

Your task is to write a unit test for the elliptical torus primitive. It should be put in /rt^3/tests/

Code:

  • rt^3/src/coreInterface/EllipticalTorus.cpp
  • rt^3/include/brlcad/EllipticalTorus.h

Please upload your work in a svn patch(diff) format: svn diff rt^3 my_changes.patch

References:
  • rt^3/tests/halfspace.cpp
  • rt^3/tests/primitives.cpp
  • rt^3/tests/PrintTitle.cpp
Modify:
  • rt^3/tests/ellipticaltorus.cpp -- you create this
  • rt^3/tests/CMakeLists.txt -- add your new file in here
Uploaded Work
File name/URLFile sizeDate submitted
ellipticaltorus.cpp7.9 KBDecember 29 2014 10:41 UTC
ellipticaltorus.patch9.3 KBDecember 29 2014 10:46 UTC
Comments
Marc Tannouson December 28 2014 08:51 UTCTask Claimed

I would like to work on this task.

Deepak on December 28 2014 12:16 UTCTask Assigned

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

Marc Tannouson December 29 2014 10:46 UTCReady for review

The work on this task is ready to be reviewed.

Sean on December 30 2014 04:56 UTCTask Closed

Congratulations, this task has been completed successfully.

Sean on December 30 2014 05:07 UTCpretty good

Marc, this looks pretty good and obviously substantive work.  Without comparing to the other completed unit tests, the only two issues I see are not using vmath.h for some of the math testing and using CAPS for arguments.  Capitals are usually reserved for global constant symbols and macros.  Things to think about and correct if you take on other unit testing tasks.