File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -18,34 +18,34 @@ using TestResult = std::optional<std::string>;
1818
1919#define TEST (name ) TestResult test_##name()
2020
21- #define RUN_TEST (name ) \
22- do { \
23- std::cout << " Running " #name " ... " ; \
24- TestResult result = test_##name (); \
25- if (!result.has_value ()) { \
26- std::cout << " PASSED" << std::endl; \
27- g_tests_passed++; \
28- } else { \
21+ #define RUN_TEST (name ) \
22+ do { \
23+ std::cout << " Running " #name " ... " ; \
24+ TestResult result = test_##name (); \
25+ if (!result.has_value ()) { \
26+ std::cout << " PASSED" << std::endl; \
27+ g_tests_passed++; \
28+ } else { \
2929 std::cout << " FAILED: " << *result << std::endl; \
30- g_tests_failed++; \
31- } \
30+ g_tests_failed++; \
31+ } \
3232 } while (0 )
3333
3434#define TEST_PASS () return std::nullopt
3535#define TEST_FAIL (msg ) return std::string(msg)
3636
37- #define ASSERT (cond ) \
38- do { \
39- if (!(cond)) { \
40- return " Assertion failed: " #cond; \
41- } \
37+ #define ASSERT (cond ) \
38+ do { \
39+ if (!(cond)) { \
40+ return " Assertion failed: " #cond; \
41+ } \
4242 } while (0 )
4343
44- #define ASSERT_EQ (a, b ) \
45- do { \
46- if ((a) != (b)) { \
47- return " Assertion failed: " #a " == " #b; \
48- } \
44+ #define ASSERT_EQ (a, b ) \
45+ do { \
46+ if ((a) != (b)) { \
47+ return " Assertion failed: " #a " == " #b; \
48+ } \
4949 } while (0 )
5050
5151#endif // ARCHSPEC_TEST_COMMON_HPP
You can’t perform that action at this time.
0 commit comments