SpiecsEngine
 
Loading...
Searching...
No Matches

◆ TEST() [54/59]

SpicesTest::TEST ( tuple_test ,
IterTuple  )

Testing std::tuple Helper Function.

Definition at line 17 of file Tuple_test.h.

17 {
18
20
21 auto t = std::make_tuple(1, 2.0f, "Hellp", nullptr);
22
23 int index = 0;
24
25 scl::IterTuple(t, [&](auto&& elem) {
26
27 if (index == 0)
28 {
29 EXPECT_EQ((void*)&elem, (void*)&std::get<0>(t));
30 }
31 else if (index == 1)
32 {
33 EXPECT_EQ((void*)&elem, (void*)&std::get<1>(t));
34 }
35 else if (index == 2)
36 {
37 EXPECT_EQ((void*)&elem, (void*)&std::get<2>(t));
38 }
39 else if (index == 3)
40 {
41 EXPECT_EQ((void*)&elem, (void*)&std::get<3>(t));
42 }
43
44 index++;
45 });
46 }
#define SPICESTEST_PROFILE_FUNCTION()
void IterTuple(Tuple &tuple, Function &&f)
Iter a tuple.
Definition Tuple.h:34