|
|
|
@ -4,9 +4,13 @@ |
|
|
|
#include <fmt/core.h> |
|
|
|
#include <fmt/core.h> |
|
|
|
#include <functional> |
|
|
|
#include <functional> |
|
|
|
|
|
|
|
|
|
|
|
namespace fuc2 { |
|
|
|
// macro to help adding tests
|
|
|
|
#define TEST(N) {#N, N} |
|
|
|
#define TEST(N) {#N, N} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// macro to help with the main.cpp
|
|
|
|
|
|
|
|
#define TEST_SET(N) namespace N { extern fuc2::Set TESTS; } |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
namespace fuc2 { |
|
|
|
using Func = std::function<void()>; |
|
|
|
using Func = std::function<void()>; |
|
|
|
using Case = std::pair<std::string, Func>; |
|
|
|
using Case = std::pair<std::string, Func>; |
|
|
|
|
|
|
|
|
|
|
|
@ -52,6 +56,4 @@ namespace fuc2 { |
|
|
|
|
|
|
|
|
|
|
|
void BLOWS_UP(std::function<void()> cb, const std::string &message, |
|
|
|
void BLOWS_UP(std::function<void()> cb, const std::string &message, |
|
|
|
const std::source_location location = std::source_location::current()); |
|
|
|
const std::source_location location = std::source_location::current()); |
|
|
|
|
|
|
|
|
|
|
|
int run(const Set& test_set); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|