summaryrefslogtreecommitdiff
path: root/modules/test/suite.h
diff options
context:
space:
mode:
Diffstat (limited to 'modules/test/suite.h')
-rw-r--r--modules/test/suite.h43
1 files changed, 0 insertions, 43 deletions
diff --git a/modules/test/suite.h b/modules/test/suite.h
deleted file mode 100644
index 34f29bf..0000000
--- a/modules/test/suite.h
+++ /dev/null
@@ -1,43 +0,0 @@
-#pragma once
-
-#include <string>
-#include <memory>
-#include <stdexcept>
-#include <type_traits>
-
-#include <forstio/core/common.h>
-
-namespace saw {
-namespace test {
-class test_runner;
-class test_case {
-private:
- std::string file;
- uint line;
- std::string description;
- bool matched_filter;
- test_case* next;
- test_case** prev;
-
- friend class test_runner;
-public:
- test_case(const std::string& file_, uint line_, const std::string& description_);
- ~test_case();
-
- virtual void run() = 0;
-};
-}
-}
-#define SAW_TEST(description) \
- class SAW_UNIQUE_NAME(test_case) : public ::saw::test::test_case { \
- public: \
- SAW_UNIQUE_NAME(test_case)(): ::saw::test::test_case(__FILE__,__LINE__,description) {} \
- void run() override; \
- }SAW_UNIQUE_NAME(test_case_); \
- void SAW_UNIQUE_NAME(test_case)::run()
-
-#define SAW_EXPECT(expr, msg_split) \
- if( ! (expr) ){ \
- auto msg = msg_split; \
- throw std::runtime_error{std::string{msg}};\
- }