Go to the documentation of this file. 12 #ifndef EMP_UNIT_TESTS_H 13 #define EMP_UNIT_TESTS_H 19 #define EMP_TEST_MACRO( MACRO, EXP_RESULT ) \ 21 std::string result = std::string(EMP_STRINGIFY( MACRO )); \ 22 bool match = (result == EXP_RESULT); \ 23 if (verbose || !match) { \ 24 std::cout << #MACRO << " == " << result << std::endl; \ 27 std::cout << "MATCH FAILED! Expected: " \ 28 << EXP_RESULT << std::endl; \ 40 #define EMP_TEST_VALUE( VALUE, EXP_RESULT ) \ 42 std::stringstream ss; \ 43 auto result = VALUE; \ 45 bool match = (ss.str() == EXP_RESULT); \ 46 if (verbose || !match) { \ 47 std::cout << #VALUE << " == " << result << std::endl; \ 50 std::cout << "MATCH FAILED! Expected: " \ 51 << EXP_RESULT << std::endl; \