FEAT 3
Finite Element Analysis Toolbox
Loading...
Searching...
No Matches
FEAT::TestSystem::UnitTest Class Referenceabstract

base class for all Tests More...

#include <test_system.hpp>

Inheritance diagram for FEAT::TestSystem::UnitTest:
FEAT::LAFEM::MetaMatrixTestBase< DataType_, IndexType_ > FEAT::LAFEM::MetaVectorTestBase< DataType_, IndexType_ >

Public Member Functions

 UnitTest (const String &id_in, const String &datatype_name="none", const String &index_name="none", PreferredBackend preferred_backend=PreferredBackend::generic)
 CTOR. More...
 
virtual ~UnitTest ()
 DTOR. More...
 
virtual void check (const char *const function, const char *const file, const long line, bool was_ok, const String &message) const
 utility method used bei TEST_CHECK_THROWS More...
 
virtual String get_datatype_name ()
 returns our target platform More...
 
virtual String get_index_name ()
 returns our target platform More...
 
virtual PreferredBackend get_preferred_backend () const
 
virtual String get_preferred_backend_name () const
 
virtual const String id () const
 returns our id string More...
 
virtual void run () const =0
 runs the test case More...
 

Protected Attributes

String _datatype_name
 precision description String More...
 
const String _id
 test description String More...
 
String _index_name
 index type description String More...
 
PreferredBackend _preferred_backend
 preferred compute intensive backend More...
 

Detailed Description

base class for all Tests

Author
Dirk Ribbrock

Definition at line 225 of file test_system.hpp.

Constructor & Destructor Documentation

◆ UnitTest()

FEAT::TestSystem::UnitTest::UnitTest ( const String id_in,
const String datatype_name = "none",
const String index_name = "none",
PreferredBackend  preferred_backend = PreferredBackend::generic 
)
inlineexplicit

CTOR.

Parameters
[in]id_inthe testcase's id string

Definition at line 247 of file test_system.hpp.

References FEAT::TestSystem::TestList::instance(), and FEAT::TestSystem::TestList::register_test().

◆ ~UnitTest()

virtual FEAT::TestSystem::UnitTest::~UnitTest ( )
inlinevirtual

DTOR.

Definition at line 257 of file test_system.hpp.

Member Function Documentation

◆ check()

virtual void FEAT::TestSystem::UnitTest::check ( const char *const  function,
const char *const  file,
const long  line,
bool  was_ok,
const String message 
) const
inlinevirtual

utility method used bei TEST_CHECK_THROWS

Definition at line 266 of file test_system.hpp.

◆ get_datatype_name()

virtual String FEAT::TestSystem::UnitTest::get_datatype_name ( )
inlinevirtual

returns our target platform

Definition at line 281 of file test_system.hpp.

References _datatype_name.

◆ get_index_name()

virtual String FEAT::TestSystem::UnitTest::get_index_name ( )
inlinevirtual

returns our target platform

Definition at line 287 of file test_system.hpp.

References _index_name.

◆ get_preferred_backend()

virtual PreferredBackend FEAT::TestSystem::UnitTest::get_preferred_backend ( ) const
inlinevirtual

Definition at line 292 of file test_system.hpp.

◆ get_preferred_backend_name()

virtual String FEAT::TestSystem::UnitTest::get_preferred_backend_name ( ) const
inlinevirtual

Definition at line 297 of file test_system.hpp.

◆ id()

virtual const String FEAT::TestSystem::UnitTest::id ( ) const
inlinevirtual

returns our id string

Definition at line 260 of file test_system.hpp.

References _id.

◆ run()

virtual void FEAT::TestSystem::UnitTest::run ( ) const
pure virtual

runs the test case

Called by unittest framework only.

Member Data Documentation

◆ _datatype_name

String FEAT::TestSystem::UnitTest::_datatype_name
protected

precision description String

Definition at line 232 of file test_system.hpp.

Referenced by get_datatype_name().

◆ _id

const String FEAT::TestSystem::UnitTest::_id
protected

test description String

Definition at line 230 of file test_system.hpp.

Referenced by id().

◆ _index_name

String FEAT::TestSystem::UnitTest::_index_name
protected

index type description String

Definition at line 234 of file test_system.hpp.

Referenced by get_index_name().

◆ _preferred_backend

PreferredBackend FEAT::TestSystem::UnitTest::_preferred_backend
protected

preferred compute intensive backend

Definition at line 236 of file test_system.hpp.


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