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

T m_value
std::string m_file
int m_line

Detailed Description

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

Definition at line 48 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 51 of file expect.h.

Member Function Documentation

◆ EXPECTED()

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

Definition at line 55 of file expect.h.

55 {
56 if ( not cmp_eq(e, m_value) ) {
57 std::println (std::cerr, "{}:{}: error: Test failed, "
58 "expected: {} obtained: {}",
61 }
62 }
const U & val_form(const U &x)
Helpers for error message formatting.
Definition expect.h:31
bool cmp_eq(T a, T b)
Definition expect.h:22

◆ NOT_EXPECTED()

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

Definition at line 63 of file expect.h.

63 {
64 if ( cmp_eq(e, m_value) ) {
65 std::println (std::cerr, "{}:{}: error: Test failed, "
66 "NOT expected: {} obtained: {}",
69 }
70 }

Member Data Documentation

◆ m_file

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

Definition at line 73 of file expect.h.

◆ m_line

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

Definition at line 74 of file expect.h.

◆ m_value

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

Definition at line 72 of file expect.h.


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