ATLAS Offline Software
Loading...
Searching...
No Matches
Athena_test::TestedValue< T > Class Template Reference

#include <expect.h>

Collaboration diagram for Athena_test::TestedValue< T >:

Public Member Functions

 TestedValue (const 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 ( const T & v,
std::string && f,
int l )
inline

Definition at line 34 of file expect.h.

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";
43 }
44 }
bool cmp_eq(T a, T b)
Definition expect.h:18

◆ 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";
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: