]>
Commit | Line | Data |
---|---|---|
b32b8144 | 1 | // Copyright Louis Dionne 2013-2017 |
7c673cae FG |
2 | // Distributed under the Boost Software License, Version 1.0. |
3 | // (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) | |
4 | ||
5 | #include <boost/hana/tuple.hpp> | |
6 | ||
7 | #include <laws/base.hpp> | |
8 | #include <laws/comparable.hpp> | |
9 | #include <laws/foldable.hpp> | |
10 | #include <laws/iterable.hpp> | |
11 | #include <laws/orderable.hpp> | |
12 | #include <laws/sequence.hpp> | |
13 | namespace hana = boost::hana; | |
14 | using hana::test::ct_eq; | |
15 | using hana::test::ct_ord; | |
16 | ||
17 | ||
18 | int main() { | |
19 | auto eq_tuples = hana::make_tuple( | |
20 | hana::make_tuple() | |
21 | , hana::make_tuple(ct_eq<0>{}) | |
22 | , hana::make_tuple(ct_eq<0>{}, ct_eq<1>{}) | |
23 | , hana::make_tuple(ct_eq<0>{}, ct_eq<1>{}, ct_eq<2>{}) | |
24 | , hana::make_tuple(ct_eq<0>{}, ct_eq<1>{}, ct_eq<2>{}, ct_eq<3>{}) | |
25 | , hana::make_tuple(ct_eq<0>{}, ct_eq<1>{}, ct_eq<2>{}, ct_eq<3>{}, ct_eq<4>{}) | |
26 | , hana::make_tuple(ct_eq<0>{}, ct_eq<1>{}, ct_eq<2>{}, ct_eq<3>{}, ct_eq<4>{}, ct_eq<5>{}) | |
27 | ); | |
28 | ||
29 | auto ord_tuples = hana::make_tuple( | |
30 | hana::make_tuple() | |
31 | , hana::make_tuple(ct_ord<0>{}) | |
32 | , hana::make_tuple(ct_ord<0>{}, ct_ord<1>{}) | |
33 | , hana::make_tuple(ct_ord<0>{}, ct_ord<1>{}, ct_ord<2>{}) | |
34 | , hana::make_tuple(ct_ord<0>{}, ct_ord<1>{}, ct_ord<2>{}, ct_ord<3>{}) | |
35 | , hana::make_tuple(ct_ord<0>{}, ct_ord<1>{}, ct_ord<2>{}, ct_ord<3>{}, ct_ord<4>{}) | |
36 | ); | |
37 | ||
38 | hana::test::TestComparable<hana::tuple_tag>{eq_tuples}; | |
39 | hana::test::TestOrderable<hana::tuple_tag>{ord_tuples}; | |
40 | hana::test::TestFoldable<hana::tuple_tag>{eq_tuples}; | |
41 | hana::test::TestIterable<hana::tuple_tag>{eq_tuples}; | |
42 | hana::test::TestSequence<hana::tuple_tag>{}; | |
43 | } |