Adobe Source Libraries 1.49.0
A collection of C++ libraries.
Loading...
Searching...
No Matches
check_regular.hpp
Go to the documentation of this file.
1/*
2 Copyright 2013 Adobe
3 Distributed under the Boost Software License, Version 1.0.
4 (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
5*/
6/**************************************************************************************************/
7
8#include <adobe/config.hpp>
9#include <adobe/implementation/swap.hpp>
10#include <boost/test/unit_test.hpp>
11
12namespace adobe {
17
18template <typename T>
20
21
22template <typename T>
23void check_regular(const T& x) {
24 using std::swap;
25
26 BOOST_CHECK(x != T());
27 T y = x;
28 BOOST_CHECK_MESSAGE(x == y, "copy-ctor");
29 T z = T();
30 BOOST_CHECK_MESSAGE(z != x, "default-ctor");
31 z = y;
32 BOOST_CHECK_MESSAGE(x == z, "assignment");
33 T w = T();
34 swap(y, w);
35 BOOST_CHECK(x == w && x != y && y == T());
36}
37
38
42
44} // namespace adobe
BOOST_TEST_CASE_TEMPLATE_FUNCTION(check_regulars, T)
T arbitrary_regular_value()
void check_regular(const T &x)
void swap(any_regular_t &x, any_regular_t &y)
void swap(adobe::extents_t::slice_t &x, adobe::extents_t::slice_t &y) BOOST_NOEXCEPT
Definition extents.hpp:120