Imported Upstream version 1.72.0
[platform/upstream/boost.git] / libs / gil / test / extension / toolbox / get_pixel_type.cpp
1 //
2 // Copyright 2013 Christian Henning
3 //
4 // Distributed under the Boost Software License, Version 1.0
5 // See accompanying file LICENSE_1_0.txt or copy at
6 // http://www.boost.org/LICENSE_1_0.txt
7 //
8 #include <boost/gil.hpp>
9 #include <boost/gil/extension/toolbox/metafunctions/get_pixel_type.hpp>
10
11 #include <boost/test/unit_test.hpp>
12
13 #include <type_traits>
14
15 using namespace boost;
16 using namespace gil;
17
18 BOOST_AUTO_TEST_SUITE( toolbox_tests )
19
20 BOOST_AUTO_TEST_CASE( get_pixel_type_test )
21 {
22     {
23         using image_t = bit_aligned_image3_type<4, 15, 4, rgb_layout_t>::type;
24         static_assert(std::is_same
25             <
26                 get_pixel_type<image_t::view_t>::type,
27                 image_t::view_t::reference
28             >::value, "");
29     }
30
31     {
32         using image_t = rgb8_image_t;
33         static_assert(std::is_same
34             <
35                 get_pixel_type<image_t::view_t>::type,
36                 image_t::view_t::value_type
37             >::value, "");
38     }
39 }
40
41 BOOST_AUTO_TEST_SUITE_END()