// Copyright Louis Dionne 2013-2016 // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) #include #include #include #include #include #include using namespace boost::hana; using test::ct_eq; int main() { ////////////////////////////////////////////////////////////////////////// // Laws with a minimal Searchable ////////////////////////////////////////////////////////////////////////// { auto eqs = make( test::seq() , test::seq(ct_eq<0>{}) , test::seq(ct_eq<0>{}, ct_eq<1>{}) , test::seq(ct_eq<0>{}, ct_eq<1>{}, ct_eq<2>{}) , test::seq(ct_eq<0>{}, ct_eq<1>{}, ct_eq<2>{}, ct_eq<3>{}) ); auto eq_keys = make(ct_eq<0>{}, ct_eq<3>{}, ct_eq<10>{}); test::TestSearchable{eqs, eq_keys}; auto bools = make( test::seq(true_c) , test::seq(false_c) , test::seq(true_c, true_c) , test::seq(true_c, false_c) , test::seq(false_c, true_c) , test::seq(false_c, false_c) ); test::TestSearchable{bools, make(true_c, false_c)}; } }