94 typedef Types1::List
L1;
95 typedef Types2::List
L2;
96 typedef Types3::List
L3;
109 EXPECT (Types1,
"-<1>-<3>-<5>-");
112 CHECK (toString(
tup1x) ==
"«tuple<Num<1>, Num<3>, Num<5> >»──({11},(3),{55})"_expect);
124 using L1 = Types1::List;
133 CHECK (toString(
tup1) ==
"«tuple<Num<1>, Num<3>, Num<5> >»──((1),(3),(5))"_expect);
140 CHECK (toString(
prep) ==
"«tuple<int, Num<1>, Num<3>, Num<5> >»──(22,{11},{33},(5))"_expect);
151 using S4 =
struct{
int a,b,c,
d;};
165 cout << showSizeof(
tup1) <<endl
166 << showSizeof(
prep) <<endl
167 << showSizeof(
nulT) <<endl
168 << showSizeof(
nulL) <<endl;
186 auto tup = make_tuple (1, 2.3,
'4');
187 using Tup =
decltype(
tup);
188 CHECK (toString(
tup) ==
"«tuple<int, double, char>»──(1,2.3,4)"_expect);
205 using Idx =
decltype(idx);
206 using Iii = std::integral_constant<size_t, idx.value>;
222 auto integralCheckFun = [](
auto idx){
return std::is_integral_v<std::tuple_element_t<idx,Tup>>;};
239 return lib::test::showType<X>();
242 template<tuple_like X>
247 res +=
"("+toString(std::tuple_size_v<X>)+
") : "+ lib::test::showType<X>();
250 using Elm = std::tuple_element_t<i, X>;
251 res +=
" ▷"+ toString(
uint(i)) +
": " + lib::test::showType<Elm>();
268 using Tup = std::tuple<long,short>;
269 using Arr = std::array<int,3>;
326 CHECK (
render<Het>() ==
"Tup(5) : HeteroData<Node<StorageFrame<0ul, int, string>, "
327 "Node<StorageFrame<1ul, short>, "
328 "Node<StorageFrame<2ul, bool, Nil>, Nil> > > > "
329 "▷0: int ▷1: string ▷2: short ▷3: bool ▷4: Nil"_expect);
333 CHECK (std::tuple_size_v<const Tup> == 2 );
335 using Elm1 = std::tuple_element_t<1, const Tup>;
336 CHECK (lib::test::showType<Elm1>() ==
"const short"_expect);
340 CHECK (lib::test::showType<TupConstSeq>() ==
"Types<long const, short const>"_expect);
353 CHECK (lib::test::showType<T3>() ==
"long const&"_expect);
362 CHECK (lib::test::showType<H3>() ==
"Nil const&"_expect);
A setup with chained data tuples residing in distributed storage.
A front-end for using printf-style formatting.
Helpers typically used while writing tests.
Maintain a chained sequence of heterogeneous data blocks without allocation.
string showSizeof(size_t siz, string name)
for printing sizeof().
Implementation namespace for support and library code.
Test runner and basic definitions for tests.
std::string toString(TY const &val) noexcept
get some string representation of any object, reliably.
Simplistic test class runner.
#define LAUNCHER(_TEST_CLASS_, _GROUPS_)
A collection of frequently used helper functions to support unit testing.
an extension to typelist-diagnostics.hpp, allowing to dump the contents of a Tuple datatype.
Metaprogramming with tuples-of-types and the std::tuple record.
Support for writing metaprogramming unit-tests dealing with typelists and flags.
#define EXPECT(_TY_, RENDERED_STRUCTURE)