• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 //
2 // Copyright 2020 Samuel Debionne
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/dynamic_image/any_image.hpp>
10 
11 #include <boost/core/lightweight_test.hpp>
12 
13 #include "test_fixture.hpp"
14 #include "core/image/test_fixture.hpp"
15 
16 namespace gil = boost::gil;
17 namespace fixture = boost::gil::test::fixture;
18 
19 struct test_any_image_move_ctor
20 {
21     template <typename Image>
operator ()test_any_image_move_ctor22     void operator()(Image const&)
23     {
24         using image_t = Image;
25         fixture::dynamic_image i0(fixture::create_image<image_t>(4, 4, 128));
26         BOOST_TEST_EQ(i0.dimensions().x, 4);
27         BOOST_TEST_EQ(i0.dimensions().y, 4);
28 
29         fixture::dynamic_image i1 = fixture::create_image<image_t>(4, 4, 128);
30         BOOST_TEST_EQ(i1.dimensions().x, 4);
31         BOOST_TEST_EQ(i1.dimensions().y, 4);
32     }
runtest_any_image_move_ctor33     static void run()
34     {
35         boost::mp11::mp_for_each<fixture::image_types>(test_any_image_move_ctor{});
36     }
37 };
38 
39 
main()40 int main()
41 {
42     test_any_image_move_ctor::run();
43 
44     return ::boost::report_errors();
45 }
46