From ba235622db7a79567166ea363dd3c0c3ef353d98 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Tue, 15 Nov 2022 23:33:41 +0100 Subject: now that it's done, remove it It can always be brought back later. --- test/entity.cpp | 52 ---------------------------------------------------- 1 file changed, 52 deletions(-) (limited to 'test') diff --git a/test/entity.cpp b/test/entity.cpp index e1bbb055..8266ec47 100644 --- a/test/entity.cpp +++ b/test/entity.cpp @@ -64,62 +64,10 @@ static constexpr bool test_visitor() return true; } -namespace test_sorting { - -template -struct item { - static constexpr std::size_t size = I-1; - std::array data; - consteval item(const char(&str)[I]) { - std::copy(str, str+I, data.data()); - } - template - constexpr bool operator==(const item& o) const { return data == o.data; } -}; - -static constexpr void test() -{ - using namespace floormat::entities::detail; - constexpr auto tuple = std::make_tuple(item{"bb"}, item{"aaa"}, item{"cccc"}, item{"d"}); - constexpr auto size = std::tuple_size_v>; - constexpr auto key = [](const auto& x) constexpr { return StringView(x.data.data(), x.data.size()); }; - constexpr auto comp = [](auto a, auto b) constexpr { return a < b; }; - using Sort = sort_tuple_, key, comp>; - constexpr auto indices = Sort::sort_indices(tuple, std::make_index_sequence()); - constexpr auto tuple2 = Sort::helper::do_sort(tuple, std::make_index_sequence()); - static_assert(tuple2 == std::make_tuple(item{"aaa"}, item{"bb"}, item{"cccc"}, item{"d"})); -} - -} // namespace test_sorting - void test_app::test_entity() { static_assert(test_accessors()); static_assert(test_visitor()); - test_sorting::test(); } -namespace type_tests { - -using namespace floormat::entities::detail; - -template using common_type2 = std::common_type_t; -static_assert(std::is_same_v>>); -static_assert(std::is_same_v, - map>>); - -static_assert(std::is_same_v, - map>>); -static_assert(std::is_same_v, lift, std::tuple, int>>); -static_assert(std::is_same_v, - skip<3, std::tuple>>); -static_assert(std::is_same_v, - take<3, std::tuple>>); -static_assert(std::is_same_v>>); - -static_assert(std::is_same_v, - except_nth<2, parameter_pack>>); - -} // namespace type_tests - } // namespace floormat -- cgit v1.2.3