AliPhysics  2f4fa0a (2f4fa0a)
PWG::EMCAL::TestAliEmcalTrackSelResultPtr Class Reference

Unit test for class AliEmcalTrackSelResultPtr. More...

#include <AliEmcalTrackSelResultPtr.h>

Inheritance diagram for PWG::EMCAL::TestAliEmcalTrackSelResultPtr:

Public Member Functions

 TestAliEmcalTrackSelResultPtr ()
 Constructor. More...
 
virtual ~TestAliEmcalTrackSelResultPtr ()
 Destructor. More...
 
bool RunAllTests () const
 Run test suite. More...
 
bool TestOperatorBool () const
 Test for operator bool. More...
 
bool TestCopyConstructor () const
 Test copy constructor with user information. More...
 
bool TestOperatorAssign () const
 Tests assignment operatator with user info. More...
 
bool TestUserInfo () const
 Test handling of user storage. More...
 

Protected Member Functions

bool AssertBool (const AliEmcalTrackSelResultPtr &test, bool testvalue) const
 
bool AssertPayload (const AliEmcalTrackSelResultPtr &test, void *payload) const
 

Detailed Description

Unit test for class AliEmcalTrackSelResultPtr.

Author
Markus Fasel marku.nosp@m.s.fa.nosp@m.sel@c.nosp@m.ern..nosp@m.ch, Oak Ridge National Laboratory
Since
Dec 18, 2017

Unit test for AliEmcalTrackSelResultPtr, covering

  • operator bool
  • Copy constructor
  • Assignment operator
  • user info

Definition at line 432 of file AliEmcalTrackSelResultPtr.h.

Constructor & Destructor Documentation

PWG::EMCAL::TestAliEmcalTrackSelResultPtr::TestAliEmcalTrackSelResultPtr ( )
inline

Constructor.

Definition at line 437 of file AliEmcalTrackSelResultPtr.h.

virtual PWG::EMCAL::TestAliEmcalTrackSelResultPtr::~TestAliEmcalTrackSelResultPtr ( )
inlinevirtual

Destructor.

Definition at line 442 of file AliEmcalTrackSelResultPtr.h.

Member Function Documentation

bool TestAliEmcalTrackSelResultPtr::AssertBool ( const AliEmcalTrackSelResultPtr test,
bool  testvalue 
) const
protected

Definition at line 320 of file AliEmcalTrackSelResultPtr.cxx.

bool TestAliEmcalTrackSelResultPtr::AssertPayload ( const AliEmcalTrackSelResultPtr test,
void *  payload 
) const
protected

Definition at line 324 of file AliEmcalTrackSelResultPtr.cxx.

bool TestAliEmcalTrackSelResultPtr::RunAllTests ( ) const

Run test suite.

Running all unit tests implemented for AliEmcalTrackSelResultPtr

  • operator bool
  • Assignment operator
  • Copy constructor
  • User information
Returns
true All tests passed
false At least one test failed

Definition at line 261 of file AliEmcalTrackSelResultPtr.cxx.

bool TestAliEmcalTrackSelResultPtr::TestCopyConstructor ( ) const

Test copy constructor with user information.

Test prepared with 10 instances of user objects and 10 instances without user objects

Returns
true All tests passed
false At least one test failed

Definition at line 274 of file AliEmcalTrackSelResultPtr.cxx.

bool TestAliEmcalTrackSelResultPtr::TestOperatorAssign ( ) const

Tests assignment operatator with user info.

Test prepared with 10 instances of user objects and 10 instances without user objects

Returns
true All tests passed
false All tests failed

Definition at line 291 of file AliEmcalTrackSelResultPtr.cxx.

bool TestAliEmcalTrackSelResultPtr::TestOperatorBool ( ) const

Test for operator bool.

Both cases tested:

  • track selection is true, operator must return true
  • track selection is false, operator must return false
Returns
true Test passed
false Test failed

Definition at line 265 of file AliEmcalTrackSelResultPtr.cxx.

bool TestAliEmcalTrackSelResultPtr::TestUserInfo ( ) const

Test handling of user storage.

Prepared 10 pointers with and 10 without storage. Pointer must return

  • user object for test with user object
  • nullptr for test without user object
Returns
true Tests passed
false At least one test failed

Definition at line 308 of file AliEmcalTrackSelResultPtr.cxx.


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