#ifndef CONST_CONTAINER_TEST_RETURN_VAL_H_ #define CONST_CONTAINER_TEST_RETURN_VAL_H_ #include #include #define TEST_FAIL(name, msg) ret_val_s { name, ReturnCode::FAILED, msg } #define TEST_PASS(name, msg) ret_val_s { name, ReturnCode::PASSED, msg } enum ReturnCode { FAILED = -1, PASSED = 0 }; /*struct test_ret_val { struct ret_val_s : public cc::const_list_node { ReturnCode val = FAILED; const char *msg = ""; }; cc::const_list list; constexpr test_ret_val() = default; constexpr test_ret_val(const test_ret_val& other) = delete; constexpr test_ret_val(test_ret_val&& other) = default; constexpr test_ret_val& operator=(const test_ret_val& other) = delete; constexpr test_ret_val& operator=(test_ret_val&& other) = default; constexpr operator bool() const { return std::all_of(list.cbegin(), list.cend(), [](auto e){ return !static_cast(e.val); }); } };*/ struct ret_val_s { const char *test_name = ""; ReturnCode val = FAILED; const char *msg = ""; }; template using ret_val = std::array; #endif //CONST_CONTAINER_TEST_RETURN_VAL_H_