From 8dad985328e2183b224300aa992951131956fdb3 Mon Sep 17 00:00:00 2001 From: "Claudius \"keldu\" Holeksa" Date: Tue, 23 Jan 2024 13:12:11 +0100 Subject: core,codec-json,codec-minecraft,codec-netcdf,codec,io-tls,io,io_codec,window,window-opengl: Renamed file endings and changed includes --- modules/core/c++/test/suite.h | 43 ----------------------------------------- modules/core/c++/test/suite.hpp | 43 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+), 43 deletions(-) delete mode 100644 modules/core/c++/test/suite.h create mode 100644 modules/core/c++/test/suite.hpp (limited to 'modules/core') diff --git a/modules/core/c++/test/suite.h b/modules/core/c++/test/suite.h deleted file mode 100644 index e28a94c..0000000 --- a/modules/core/c++/test/suite.h +++ /dev/null @@ -1,43 +0,0 @@ -#pragma once - -#include -#include -#include -#include - -#include "../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}};\ - } diff --git a/modules/core/c++/test/suite.hpp b/modules/core/c++/test/suite.hpp new file mode 100644 index 0000000..fd6ca68 --- /dev/null +++ b/modules/core/c++/test/suite.hpp @@ -0,0 +1,43 @@ +#pragma once + +#include +#include +#include +#include + +#include "../common.hpp + +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}};\ + } -- cgit v1.2.3