1 // Copyright Louis Dionne 2013-2017
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)
5 #include <boost/hana/bool.hpp>
6 #include <boost/hana/core/make.hpp>
7 #include <boost/hana/tuple.hpp>
9 #include <support/seq.hpp>
11 #include <laws/base.hpp>
12 #include <laws/searchable.hpp>
13 namespace hana = boost::hana;
14 using hana::test::ct_eq;
18 //////////////////////////////////////////////////////////////////////////
19 // Laws with a minimal Searchable
20 //////////////////////////////////////////////////////////////////////////
22 auto eqs = hana::make_tuple(
25 , ::seq(ct_eq<0>{}, ct_eq<1>{})
26 , ::seq(ct_eq<0>{}, ct_eq<1>{}, ct_eq<2>{})
27 , ::seq(ct_eq<0>{}, ct_eq<1>{}, ct_eq<2>{}, ct_eq<3>{})
30 auto eq_keys = hana::make_tuple(ct_eq<0>{}, ct_eq<3>{}, ct_eq<10>{});
32 hana::test::TestSearchable<::Seq>{eqs, eq_keys};
34 auto bools = hana::make_tuple(
36 , ::seq(hana::false_c)
37 , ::seq(hana::true_c, hana::true_c)
38 , ::seq(hana::true_c, hana::false_c)
39 , ::seq(hana::false_c, hana::true_c)
40 , ::seq(hana::false_c, hana::false_c)
42 hana::test::TestSearchable<::Seq>{bools, hana::make_tuple(hana::true_c, hana::false_c)};