Peano
Loading...
Searching...
No Matches
peano4::stacks::tests::STDVectorStackOverObjectsWithSmartPointersTest Class Reference

This is a ping pong test for objects hosting some smart pointers and their stack. More...

#include <STDVectorStackOverObjectsWithSmartPointersTest.h>

Inheritance diagram for peano4::stacks::tests::STDVectorStackOverObjectsWithSmartPointersTest:
Collaboration diagram for peano4::stacks::tests::STDVectorStackOverObjectsWithSmartPointersTest:

Public Member Functions

 STDVectorStackOverObjectsWithSmartPointersTest ()
 
virtual void run () override
 This routine is triggered by the TestCaseCollection.
 
- Public Member Functions inherited from tarch::tests::TestCase
 TestCase (const std::string &testCaseName)
 Constructor.
 
virtual ~TestCase ()
 Destructor.
 
int getNumberOfErrors () const
 
std::string getTestCaseName () const
 

Private Member Functions

void testFlattening ()
 The objects with the smart pointers rely on flattening internally.
 
void testMPIExchangeOfFlattenedObject ()
 
void testMPIExchangeOfSingleObject ()
 Works only for more than one MPI rank and then checks only the flattened object, as we do not support sends or receives on objects with smart pointers directly.
 
void testStack (int repetitions)
 Test if stack implementation works.
 
void testSingleStackExchange ()
 
void testMultipleConcurrentStackExchanges ()
 

Static Private Attributes

static tarch::logging::Log _log
 Logging device.
 

Additional Inherited Members

- Protected Member Functions inherited from tarch::tests::TestCase
 TestCase ()=delete
 
- Protected Attributes inherited from tarch::tests::TestCase
const std::string _testCaseName
 Name of the test case.
 
int _errors
 Error counter.
 
bool _error
 Indicate within macro if one specific validation failed.
 

Detailed Description

This is a ping pong test for objects hosting some smart pointers and their stack.

This routine requires a couple of generated/C++ files that you might want to regenerate sometimes. To do so, switch into the test directory and type in

export PYTHONPATH=~/git/Peano/python
python3 prepare-test-datastructures.py
-test-datastructures This Python script uses/invokes DaStGen2 to generate all the datatypes required ...

Definition at line 33 of file STDVectorStackOverObjectsWithSmartPointersTest.h.

Constructor & Destructor Documentation

◆ STDVectorStackOverObjectsWithSmartPointersTest()

peano4::stacks::tests::STDVectorStackOverObjectsWithSmartPointersTest::STDVectorStackOverObjectsWithSmartPointersTest ( )

Member Function Documentation

◆ run()

virtual void peano4::stacks::tests::STDVectorStackOverObjectsWithSmartPointersTest::run ( )
overridevirtual

This routine is triggered by the TestCaseCollection.

Implements tarch::tests::TestCase.

◆ testFlattening()

void peano4::stacks::tests::STDVectorStackOverObjectsWithSmartPointersTest::testFlattening ( )
private

The objects with the smart pointers rely on flattening internally.

We check if this flatteneing works properly.

◆ testMPIExchangeOfFlattenedObject()

void peano4::stacks::tests::STDVectorStackOverObjectsWithSmartPointersTest::testMPIExchangeOfFlattenedObject ( )
private

◆ testMPIExchangeOfSingleObject()

void peano4::stacks::tests::STDVectorStackOverObjectsWithSmartPointersTest::testMPIExchangeOfSingleObject ( )
private

Works only for more than one MPI rank and then checks only the flattened object, as we do not support sends or receives on objects with smart pointers directly.

We can use the original object directly, as long as we use the generated send() and receive(). These guys do the flatteneing inside the routine.

◆ testMultipleConcurrentStackExchanges()

void peano4::stacks::tests::STDVectorStackOverObjectsWithSmartPointersTest::testMultipleConcurrentStackExchanges ( )
private

◆ testSingleStackExchange()

void peano4::stacks::tests::STDVectorStackOverObjectsWithSmartPointersTest::testSingleStackExchange ( )
private

◆ testStack()

void peano4::stacks::tests::STDVectorStackOverObjectsWithSmartPointersTest::testStack ( int  repetitions)
private

Test if stack implementation works.

Field Documentation

◆ _log

tarch::logging::Log peano4::stacks::tests::STDVectorStackOverObjectsWithSmartPointersTest::_log
staticprivate

Logging device.

Definition at line 38 of file STDVectorStackOverObjectsWithSmartPointersTest.h.


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