Template Function mu::tiny::test::check_compare

Function Documentation

template<typename T, typename U>
void mu::tiny::test::check_compare(const T &first, const U &second, bool success, const char *relop_str, const char *text, const char *file, int_least32_t line)

Implementation helper for CHECK_COMPARE.

The boolean result of the relational operation is pre-evaluated at the call site (inside the macro), so first and second are used only for display via string_from(). Prefer the CHECK_COMPARE macro.

Parameters:
  • first – Left-hand operand (display only).

  • second – Right-hand operand (display only).

  • success – Pre-evaluated result of first relop second.

  • relop_strString representation of the relational operator.

  • text – Optional failure message.

  • file – Source file path.

  • line – Source line number.