Cortenn
Macros
common.hpp File Reference
#include "fmts/fmts.hpp"
Include dependency graph for common.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define ASSERT_ARREQ(ARR, ARR2)
 
#define EXPECT_ARREQ(ARR, ARR2)
 
#define EXPECT_FATAL(EVENT, MSG)
 

Macro Definition Documentation

◆ ASSERT_ARREQ

#define ASSERT_ARREQ (   ARR,
  ARR2 
)
Value:
{ std::stringstream arrs, arrs2;\
fmts::to_stream(arrs, ARR.begin(), ARR.end());\
fmts::to_stream(arrs2, ARR2.begin(), ARR2.end());\
ASSERT_TRUE(std::equal(ARR.begin(), ARR.end(), ARR2.begin())) <<\
"expect list " << arrs.str() << ", got " << arrs2.str() << " instead"; }

◆ EXPECT_ARREQ

#define EXPECT_ARREQ (   ARR,
  ARR2 
)
Value:
{ std::stringstream arrs, arrs2;\
fmts::to_stream(arrs, ARR.begin(), ARR.end());\
fmts::to_stream(arrs2, ARR2.begin(), ARR2.end());\
EXPECT_TRUE(std::equal(ARR.begin(), ARR.end(), ARR2.begin())) <<\
"expect list " << arrs.str() << ", got " << arrs2.str() << " instead"; }

◆ EXPECT_FATAL

#define EXPECT_FATAL (   EVENT,
  MSG 
)
Value:
try { EVENT; } catch (std::runtime_error& e) {\
EXPECT_STREQ(MSG, e.what()); }