ATLAS Offline Software
Public Member Functions | Private Attributes | List of all members
Athena_test::TestedValue< T > Class Template Reference

#include <expect.h>

Collaboration diagram for Athena_test::TestedValue< T >:

Public Member Functions

 TestedValue (T v, std::string &&f, int l)
 
void EXPECTED (const T &e)
 
void NOT_EXPECTED (const T &e)
 

Private Attributes

m_value
 
std::string m_file
 
int m_line
 

Detailed Description

template<typename T>
class Athena_test::TestedValue< T >

Definition at line 32 of file expect.h.

Constructor & Destructor Documentation

◆ TestedValue()

template<typename T >
Athena_test::TestedValue< T >::TestedValue ( v,
std::string &&  f,
int  l 
)
inline

Definition at line 34 of file expect.h.

35  : m_value(v),
36  m_file(std::move(f)),
37  m_line(l) {}

Member Function Documentation

◆ EXPECTED()

template<typename T >
void Athena_test::TestedValue< T >::EXPECTED ( const T &  e)
inline

Definition at line 38 of file expect.h.

38  {
39  if ( not cmp_eq(e, m_value) ) {
40  std::cerr << m_file << ":" << m_line << ": error: Test failed, "
41  << "expected: " << e << " obtained: " << m_value << "\n";
42  assert( cmp_eq(e, m_value) );
43  }
44  }

◆ NOT_EXPECTED()

template<typename T >
void Athena_test::TestedValue< T >::NOT_EXPECTED ( const T &  e)
inline

Definition at line 45 of file expect.h.

45  {
46  if ( cmp_eq(e, m_value) ) {
47  std::cerr << m_file << ":" << m_line << ": error: Test failed, "
48  << "NOT expected: " << e << " obtained: " << m_value << "\n";
49  assert( not cmp_eq(e, m_value) );
50  }
51  }

Member Data Documentation

◆ m_file

template<typename T >
std::string Athena_test::TestedValue< T >::m_file
private

Definition at line 54 of file expect.h.

◆ m_line

template<typename T >
int Athena_test::TestedValue< T >::m_line
private

Definition at line 55 of file expect.h.

◆ m_value

template<typename T >
T Athena_test::TestedValue< T >::m_value
private

Definition at line 53 of file expect.h.


The documentation for this class was generated from the following file:
AllowedVariables::e
e
Definition: AsgElectronSelectorTool.cxx:37
Athena_test::cmp_eq
bool cmp_eq(T a, T b)
Definition: expect.h:18
Athena_test::TestedValue::m_file
std::string m_file
Definition: expect.h:54
Athena_test::TestedValue::m_value
T m_value
Definition: expect.h:53
UploadAMITag.l
list l
Definition: UploadAMITag.larcaf.py:158
Athena_test::TestedValue::m_line
int m_line
Definition: expect.h:55
hist_file_dump.f
f
Definition: hist_file_dump.py:135
python.PyAthena.v
v
Definition: PyAthena.py:154