From 729307460e77f62a532ee9841dcaed9c47f46419 Mon Sep 17 00:00:00 2001 From: "Claudius \"keldu\" Holeksa" Date: Wed, 26 Jun 2024 09:39:34 +0200 Subject: Added better structure for the data server --- modules/core/tests/core.cpp | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'modules/core/tests/core.cpp') diff --git a/modules/core/tests/core.cpp b/modules/core/tests/core.cpp index b1ce741..f418a07 100644 --- a/modules/core/tests/core.cpp +++ b/modules/core/tests/core.cpp @@ -1,6 +1,7 @@ #include "../c++/test/suite.hpp" #include "../c++/id.hpp" #include "../c++/string_literal.hpp" +#include "../c++/reduce_templates.hpp" namespace { SAW_TEST("ID functionality") { @@ -37,4 +38,26 @@ SAW_TEST("String Literal Append"){ SAW_EXPECT(c == "foobar", "CT String sum is not \"foobar\""); } + +SAW_TEST("Template Group Reduction"){ + using namespace saw; + + struct foo { + std::string name = "foo"; + }; + struct bar { + std::string name = "bar"; + }; + struct baz { + std::string name = "baz"; + }; + + using grp = tmpl_group; + using red_grp = tmpl_group; + + using alg_red_grp = tmpl_reduce::type; + + static_assert(std::is_same_v, "Should be same type"); + SAW_EXPECT((std::is_same_v), "Should be same type"); +} } -- cgit v1.2.3