G+Smo  24.08.0
Geometry + Simulation Modules
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
gsClass_test.cpp File Reference

Tutorial for setting up unittests. More...

+ Include dependency graph for gsClass_test.cpp:

Detailed Description

Tutorial for setting up unittests.

This is an example unit test that doesn't really do anything useful. It is here as a reference for you when creating additional unit tests. For additional reference information, see the "test.h" header.

== BASIC REFERENCE ==

  • TEST(NAME_OF_TEST) { body_of_test }
  • TEST_FIXTURE(NAME_OF_FIXTURE,NAME_OF_TEST){ body_of_test }

== CHECK MACRO REFERENCE ==

  • CHECK(EXPR);
  • CHECK_EQUAL(EXPECTED,ACTUAL);
  • CHECK_CLOSE(EXPECTED,ACTUAL,EPSILON);
  • CHECK_ARRAY_EQUAL(EXPECTED,ACTUAL,LENGTH);
  • CHECK_ARRAY_CLOSE(EXPECTED,ACTUAL,LENGTH,EPSILON);
  • CHECK_ARRAY2D_EQUAL(EXPECTED,ACTUAL,ROWCOUNT,COLCOUNT);
  • CHECK_ARRAY2D_CLOSE(EXPECTED,ACTUAL,ROWCOUNT,COLCOUNT,EPSILON);
  • CHECK_THROW(EXPR,EXCEPTION_TYPE_EXPECTED);

== TIME CONSTRAINTS ==

  • UNITTEST_TIME_CONSTRAINT(TIME_IN_MILLISECONDS);
  • UNITTEST_TIME_CONSTRAINT_EXEMPT();

== MORE INFO == See: https://unittest-cpp.github.io/

Author(s): A. Mantzaflaris, H. Weiner