PhoenixPresentation  2.0.0
Set of cmake function to automate presentation generation
phoenix_check_impl.h File Reference
#include <iostream>
#include "phoenix_check.h"
+ Include dependency graph for phoenix_check_impl.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

template<typename T >
bool phoenix_check (const std::string &testName, const T &val, const T &reference)
 Check two value. More...
 

Function Documentation

◆ phoenix_check()

template<typename T >
bool phoenix_check ( const std::string &  testName,
const T &  val,
const T &  reference 
)

Check two value.

Parameters
testName: name of the current test
val: value to be checked
reference: reference value
Returns
true if var == reference, false otherwise

Definition at line 20 of file phoenix_check_impl.h.

20  {
21  bool b(val == reference);
22  if(!b){
23  std::cout << "phoenix_check : " << testName << " => " << phoenix_isOk(b) << std::endl;
24  std::cout << "\tval = '"<<val<<"'" << std::endl;
25  std::cout << "\treference = '"<<reference<<"'" << std::endl;
26  }
27  return b;
28 }
std::string phoenix_isOk(bool b)
Print OK or FAIL depending on the given boolean.

References phoenix_isOk().

+ Here is the call graph for this function: