SOFA API  1c8b807d
Open source framework for multi-physics simuation
sofa::testing::BaseTest Class Reference

#include <BaseTest.h>

Base class for Sofa test fixtures. More...

Inheritance diagram for sofa::testing::BaseTest:

Detailed Description

Base class for Sofa test fixtures.

Public Attributes

sofa::testing::MessageAsTestFailure m_fatal
 
sofa::testing::MessageAsTestFailure m_error
 

Static Public Attributes

static int seed = (unsigned int)time(nullptr)
 Seed value. More...
 

Public Member Functions

 BaseTest ()
 Initialize Sofa and the random number generator. More...
 
 ~BaseTest () override
 
virtual void onSetUp ()
 
virtual void onTearDown ()
 

Attribute details

◆ m_error

sofa::testing::MessageAsTestFailure sofa::testing::BaseTest::m_error

◆ m_fatal

sofa::testing::MessageAsTestFailure sofa::testing::BaseTest::m_fatal

To prevent that you simply need to add the line EXPECT_MSG_EMIT(Error); Where you want to allow a message.

◆ seed

int sofa::testing::BaseTest::seed = (unsigned int)time(nullptr)
static

Seed value.

Constructor details

◆ BaseTest()

sofa::testing::BaseTest::BaseTest ( )

Initialize Sofa and the random number generator.

◆ ~BaseTest()

sofa::testing::BaseTest::~BaseTest ( )
override

Function details

◆ onSetUp()

virtual void sofa::testing::BaseTest::onSetUp ( )
inlinevirtual

◆ onTearDown()

virtual void sofa::testing::BaseTest::onTearDown ( )
inlinevirtual