Imported Upstream version 1.71.0
[platform/upstream/boost.git] / libs / gil / toolbox / test / rgb_to_luminance.cpp
1 //
2 // Copyright 2013 Christian Henning
3 // Copyright 2013 Davide Anastasia <davideanastasia@users.sourceforge.net>
4 //
5 // Distributed under the Boost Software License, Version 1.0
6 // See accompanying file LICENSE_1_0.txt or copy at
7 // http://www.boost.org/LICENSE_1_0.txt
8 //
9 #include <boost/gil.hpp>
10 #include <boost/gil/extension/toolbox/color_converters/rgb_to_luminance.hpp>
11
12 #include <boost/test/unit_test.hpp>
13
14 using namespace boost;
15 using namespace gil;
16
17 struct double_zero { static double apply() { return 0.0; } };
18 struct double_one  { static double apply() { return 1.0; } };
19
20 using gray64f_pixel_t = pixel<double, gray_layout_t>;
21 using rgb64f_pixel_t = pixel<double, rgb_layout_t >;
22
23 BOOST_AUTO_TEST_SUITE( toolbox_tests )
24
25 BOOST_AUTO_TEST_CASE( rgb_to_luminance_test )
26 {
27     rgb64f_pixel_t a( 10, 20, 30 );
28     gray64f_pixel_t b;
29
30     color_convert( a, b );
31 }
32
33 BOOST_AUTO_TEST_SUITE_END()