| 1 | // Copyright Louis Dionne 2013-2022 |
| 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/set.hpp> |
| 6 | #include <boost/hana/tuple.hpp> |
| 7 | |
| 8 | #include <laws/base.hpp> |
| 9 | #include <laws/comparable.hpp> |
| 10 | #include <laws/foldable.hpp> |
| 11 | #include <laws/searchable.hpp> |
| 12 | namespace hana = boost::hana; |
| 13 | using hana::test::ct_eq; |
| 14 | |
| 15 | |
| 16 | int main() { |
| 17 | auto eqs = hana::make_tuple( |
| 18 | hana::make_set(), |
| 19 | hana::make_set(ct_eq<0>{}), |
| 20 | hana::make_set(ct_eq<0>{}, ct_eq<1>{}), |
| 21 | hana::make_set(ct_eq<1>{}, ct_eq<0>{}), |
| 22 | hana::make_set(ct_eq<0>{}, ct_eq<1>{}, ct_eq<2>{}) |
| 23 | ); |
| 24 | |
| 25 | auto keys = hana::make_tuple( |
| 26 | ct_eq<2>{}, |
| 27 | ct_eq<3>{} |
| 28 | ); |
| 29 | |
| 30 | hana::test::TestComparable<hana::set_tag>{eqs}; |
| 31 | hana::test::TestSearchable<hana::set_tag>{eqs, keys}; |
| 32 | hana::test::TestFoldable<hana::set_tag>{eqs}; |
| 33 | } |
| 34 | |