]>
Commit | Line | Data |
---|---|---|
7c673cae FG |
1 | // Copyright Louis Dionne 2013-2016 |
2 | // Distributed under the Boost Software License, Version 1.0. | |
3 | // (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) | |
4 | ||
5 | #include <boost/hana/assert.hpp> | |
6 | #include <boost/hana/concept/struct.hpp> | |
7 | #include <boost/hana/equal.hpp> | |
8 | #include <boost/hana/not.hpp> | |
9 | ||
10 | #include "minimal_struct.hpp" | |
11 | #include <laws/base.hpp> | |
12 | namespace hana = boost::hana; | |
13 | using hana::test::ct_eq; | |
14 | ||
15 | ||
16 | int main() { | |
17 | BOOST_HANA_CONSTANT_CHECK(hana::equal( | |
18 | obj(), | |
19 | obj() | |
20 | )); | |
21 | ||
22 | BOOST_HANA_CONSTANT_CHECK(hana::equal( | |
23 | obj(ct_eq<0>{}), | |
24 | obj(ct_eq<0>{}) | |
25 | )); | |
26 | BOOST_HANA_CONSTANT_CHECK(hana::not_(hana::equal( | |
27 | obj(ct_eq<0>{}), | |
28 | obj(ct_eq<1>{}) | |
29 | ))); | |
30 | ||
31 | BOOST_HANA_CONSTANT_CHECK(hana::equal( | |
32 | obj(ct_eq<0>{}, ct_eq<1>{}), | |
33 | obj(ct_eq<0>{}, ct_eq<1>{}) | |
34 | )); | |
35 | BOOST_HANA_CONSTANT_CHECK(hana::not_(hana::equal( | |
36 | obj(ct_eq<1>{}, ct_eq<0>{}), | |
37 | obj(ct_eq<0>{}, ct_eq<1>{}) | |
38 | ))); | |
39 | BOOST_HANA_CONSTANT_CHECK(hana::not_(hana::equal( | |
40 | obj(ct_eq<0>{}, ct_eq<99>{}), | |
41 | obj(ct_eq<0>{}, ct_eq<1>{}) | |
42 | ))); | |
43 | BOOST_HANA_CONSTANT_CHECK(hana::not_(hana::equal( | |
44 | obj(ct_eq<99>{}, ct_eq<1>{}), | |
45 | obj(ct_eq<0>{}, ct_eq<1>{}) | |
46 | ))); | |
47 | } |