]>
Commit | Line | Data |
---|---|---|
b32b8144 | 1 | // Copyright Louis Dionne 2013-2017 |
7c673cae FG |
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/equal.hpp> | |
7 | #include <boost/hana/functional/lockstep.hpp> | |
8 | ||
9 | #include <laws/base.hpp> | |
10 | namespace hana = boost::hana; | |
11 | using hana::test::ct_eq; | |
12 | ||
13 | ||
14 | int main() { | |
15 | hana::test::_injection<0> f{}; | |
16 | hana::test::_injection<1> g{}; | |
17 | hana::test::_injection<2> h{}; | |
18 | hana::test::_injection<3> i{}; | |
19 | ||
20 | BOOST_HANA_CONSTANT_CHECK(hana::equal( | |
21 | hana::lockstep(f)()(), | |
22 | f() | |
23 | )); | |
24 | BOOST_HANA_CONSTANT_CHECK(hana::equal( | |
25 | hana::lockstep(f)(g)(ct_eq<1>{}), | |
26 | f(g(ct_eq<1>{})) | |
27 | )); | |
28 | BOOST_HANA_CONSTANT_CHECK(hana::equal( | |
29 | hana::lockstep(f)(g, h)(ct_eq<1>{}, ct_eq<2>{}), | |
30 | f(g(ct_eq<1>{}), h(ct_eq<2>{})) | |
31 | )); | |
32 | BOOST_HANA_CONSTANT_CHECK(hana::equal( | |
33 | hana::lockstep(f)(g, h, i)(ct_eq<1>{}, ct_eq<2>{}, ct_eq<3>{}), | |
34 | f(g(ct_eq<1>{}), h(ct_eq<2>{}), i(ct_eq<3>{})) | |
35 | )); | |
36 | } |