2
0
mirror of https://github.com/boostorg/gil.git synced 2026-02-01 20:42:10 +00:00
Files
gil/test/pixel/pixel_reference_is_mutable.cpp
Mateusz Łoskot b1998d9a74 Add pixel test fixture with all core pixel types (#248)
Add test for pixel_reference_is_mutable metafunction.

From the legacy tests
- port value_core and reference_core fixtures, see
  https://lists.boost.org/boost-gil/2019/02/0138.php
- port representative pixel types and verify with tests of some
  metafunctions.

Clean up test names for CTest in the CMake configuration.
Disable some GCC/clang warnings in tests to avoid CI build
termination due to too long logs.
2019-03-02 23:18:54 +01:00

41 lines
1.1 KiB
C++

//
// Copyright 2019 Mateusz Loskot <mateusz at loskot dot net>
//
// 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 <boost/gil/concepts/pixel.hpp>
//#include <boost/gil/metafunctions.hpp>
//#include <boost/gil/pixel.hpp>
//#include <boost/gil/typedefs.hpp>
#include <boost/gil.hpp>
#include <boost/mp11.hpp>
#include <boost/mp11/mpl.hpp>
#include "test_fixture.hpp"
namespace gil = boost::gil;
using namespace boost::mp11;
int main()
{
static_assert(mp_all_of
<
gil::test::fixture::pixel_typedefs,
gil::pixel_reference_is_mutable
>::value,
"pixel_reference_is_mutable should yield true for all core pixel typedefs");
static_assert(!mp_all_of
<
mp_transform
<
gil::test::fixture::nested_type,
gil::test::fixture::representative_pixel_types
>,
gil::pixel_reference_is_mutable
>::value,
"pixel_reference_is_mutable should yield true for some representative core pixel types");
}