// // Copyright 2020 Debabrata Mandal // // Distributed under the Boost Software License, Version 1.0 // See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt // #include #include #include namespace gil = boost::gil; namespace mp11 = boost::mp11; void check_is_pixel_compatible() { gil::histogram h1; gil::histogram h2; gil::histogram h3; gil::histogram h4; BOOST_TEST(h1.is_pixel_compatible()); BOOST_TEST(h2.is_pixel_compatible()); BOOST_TEST(h3.is_pixel_compatible()); BOOST_TEST(!h4.is_pixel_compatible()); } void check_is_tuple_compatible() { gil::histogram h1; gil::histogram h2; gil::histogram h3; gil::histogram h4; gil::histogram h5; std::tuple t1; std::tuple t2; std::tuple t3; std::tuple t4; std::tuple t5; BOOST_TEST(h1.is_tuple_compatible(t1)); BOOST_TEST(h1.is_tuple_compatible(t2)); BOOST_TEST(!h1.is_tuple_compatible(t3)); BOOST_TEST(!h1.is_tuple_compatible(t5)); BOOST_TEST(h2.is_tuple_compatible(t1)); BOOST_TEST(h2.is_tuple_compatible(t2)); BOOST_TEST(!h2.is_tuple_compatible(t3)); BOOST_TEST(!h3.is_tuple_compatible(t1)); BOOST_TEST(h3.is_tuple_compatible(t3)); BOOST_TEST(h3.is_tuple_compatible(t4)); BOOST_TEST(!h3.is_tuple_compatible(t5)); BOOST_TEST(!h4.is_tuple_compatible(t1)); BOOST_TEST(h4.is_tuple_compatible(t3)); BOOST_TEST(h4.is_tuple_compatible(t4)); BOOST_TEST(!h4.is_tuple_compatible(t5)); } int main() { check_is_pixel_compatible(); check_is_tuple_compatible(); return boost::report_errors(); }