PhoenixMock  1.8.7
Tools to split/merge/print mock used in Phoenix
phoenix_isOk.cpp File Reference
#include <iostream>
#include "phoenix_isOk.h"
+ Include dependency graph for phoenix_isOk.cpp:

Go to the source code of this file.

Functions

void phoenix_functionOk (const std::string &functionName, bool b)
 Print the check function return. More...
 
std::string phoenix_isOk (bool b)
 Print OK or FAIL depending on the given boolean. More...
 

Function Documentation

◆ phoenix_functionOk()

void phoenix_functionOk ( const std::string &  functionName,
bool  b 
)

Print the check function return.

Parameters
functionName: name of the function
b: boolean to be checked

Definition at line 23 of file phoenix_isOk.cpp.

23  {
24  std::cout << functionName << " : " << phoenix_isOk(b) << std::endl;
25 }

References phoenix_isOk().

Referenced by testCharsType(), and testOptionValue().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ phoenix_isOk()

std::string phoenix_isOk ( bool  b)

Print OK or FAIL depending on the given boolean.

Parameters
b: boolean to be checked
Returns
OK on true, FAIL on false

Definition at line 14 of file phoenix_isOk.cpp.

14  {
15  const char* res[] = {"\033[31mFAIL\033[0m", "\033[32mOK\033[0m"};
16  return std::string(res[b]);
17 }

Referenced by phoenix_check(), phoenix_functionOk(), and testIsOk().

+ Here is the caller graph for this function:
phoenix_isOk
std::string phoenix_isOk(bool b)
Print OK or FAIL depending on the given boolean.
Definition: phoenix_isOk.cpp:14