riot::testing::test_suite Class Reference

Test suite base class. More...

Detailed Description

Test suite base class.

Should not be instantiated directly. To customize a test suite with custom set_up and tear down methods, inherit from this class and override set_up() and/or tear_down(). They will before / after every test.

See also
TEST_SUITE(name) macro
TEST_SUITE_F(suite, name) macro
test_suite::set_up()
test_suite::tear_down()

Definition at line 83 of file cppunit_base.hpp.

#include <cppunit_base.hpp>

Public Member Functions

virtual void set_up ()
 method to run before each test
 
virtual void tear_down ()
 method to run after each test
 
virtual const char * get_name () const
 get the name of the test suite More...
 
virtual void run ()
 Run all tests in the suite.
 
void addTest (test *test)
 Run all tests in the suite.
 

Protected Attributes

bool suc = true
 Indicates success of all tests after running the suite.
 
std::array< test *, CPPUNIT_SUITE_CNTtests {}
 array of tests to run
 

Member Function Documentation

◆ get_name()

virtual const char* riot::testing::test_suite::get_name ( ) const
inlinevirtual

get the name of the test suite

Returns
name string

Definition at line 102 of file cppunit_base.hpp.


The documentation for this class was generated from the following file: