// 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( ::seq() , ::seq(ct_eq<0>{}) , ::seq(ct_eq<0>{}, ct_eq<1>{}) , ::seq(ct_eq<0>{}, ct_eq<1>{}, ct_eq<2>{}) , ::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<::Seq>{eqs, eq_keys}; auto bools = make( ::seq(true_c) , ::seq(false_c) , ::seq(true_c, true_c) , ::seq(true_c, false_c) , ::seq(false_c, true_c) , ::seq(false_c, false_c) ); test::TestSearchable<::Seq>{bools, make(true_c, false_c)}; } }