mfgnik

Untitled

May 6th, 2020
178
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.80 KB | None | 0 0
  1. #define REQUIRE_EQUAL(first, second)                                         \
  2.   do {                                                                       \
  3.     auto firstValue = (first);                                               \
  4.     auto secondValue = (second);                                             \
  5.     if (firstValue != secondValue) {                                         \
  6.       std::ostringstream oss;                                                \
  7.       oss << "Require equal failed: " << #first << " != " << #second << " (" \
  8.           << firstValue << " != " << secondValue << ")\n";                   \
  9.       throw TestNotPassedException(oss.str());                               \
  10.     }                                                                        \
  11.   } while (false)
Add Comment
Please, Sign In to add comment