Enable another test

This commit is contained in:
Denis Blank 2018-02-07 02:43:25 +01:00
parent 217aad83ef
commit 0982748ad6
2 changed files with 16 additions and 17 deletions

View File

@ -71,7 +71,8 @@ namespace cti {
///
/// \since 3.0.0
template <typename Mapper, typename... T>
decltype(auto) map_pack(Mapper&& mapper, T&&... pack) {
/*keep this inline*/ inline decltype(auto) map_pack(Mapper&& mapper,
T&&... pack) {
return detail::traversal::transform(detail::traversal::strategy_remap_tag{},
std::forward<Mapper>(mapper),
std::forward<T>(pack)...);

View File

@ -752,15 +752,15 @@ void test_spread_traverse() {
void test_spread_container_traverse() {
// 1:2 mappings (multiple arguments)
//{
// std::vector<tuple<int, int>> res =
// map_pack(duplicate_mapper{}, std::vector<int>{1});
{
std::vector<tuple<int, int>> res =
map_pack(duplicate_mapper{}, std::vector<int>{1});
// std::vector<tuple<int, int>> expected;
// expected.push_back(make_tuple(1, 1));
std::vector<tuple<int, int>> expected;
expected.push_back(make_tuple(1, 1));
// EXPECT_TRUE((res == expected));
//}
EXPECT_TRUE((res == expected));
}
// 1:0 mappings
{
@ -769,8 +769,7 @@ void test_spread_container_traverse() {
}
}
/*
static void test_spread_tuple_like_traverse() {
void test_spread_tuple_like_traverse() {
// 1:2 mappings (multiple arguments)
{
tuple<tuple<int, int, int, int>> res =
@ -790,14 +789,14 @@ static void test_spread_tuple_like_traverse() {
}
// 1:2 mappings (multiple arguments)
{
std::array<int, 4> res =
map_pack(duplicate_mapper{}, std::array<int, 2>{{1, 2}});
//{
// std::array<int, 4> res =
// map_pack(duplicate_mapper{}, std::array<int, 2>{{1, 2}});
std::array<int, 4> expected{{1, 1, 2, 2}};
// std::array<int, 4> expected{{1, 1, 2, 2}};
EXPECT_TRUE((res == expected));
}
// EXPECT_TRUE((res == expected));
//}
// 1:0 mappings
{
@ -806,7 +805,6 @@ static void test_spread_tuple_like_traverse() {
static_assert(std::is_void<Result>::value, "Failed...");
}
}
*/
/*
TODO Convert this to gtest