make.hpp 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. // Copyright Louis Dionne 2013-2017
  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. #ifndef BOOST_HANA_TEST_AUTO_MAKE_HPP
  5. #define BOOST_HANA_TEST_AUTO_MAKE_HPP
  6. #include <boost/hana/assert.hpp>
  7. #include <boost/hana/core/make.hpp>
  8. #include <boost/hana/equal.hpp>
  9. #include "test_case.hpp"
  10. #include <laws/base.hpp>
  11. TestCase test_make{[]{
  12. namespace hana = boost::hana;
  13. using hana::test::ct_eq;
  14. BOOST_HANA_CONSTANT_CHECK(hana::equal(
  15. MAKE_TUPLE(),
  16. hana::make<TUPLE_TAG>()
  17. ));
  18. BOOST_HANA_CONSTANT_CHECK(hana::equal(
  19. MAKE_TUPLE(ct_eq<0>{}),
  20. hana::make<TUPLE_TAG>(ct_eq<0>{})
  21. ));
  22. BOOST_HANA_CONSTANT_CHECK(hana::equal(
  23. MAKE_TUPLE(ct_eq<0>{}, ct_eq<1>{}),
  24. hana::make<TUPLE_TAG>(ct_eq<0>{}, ct_eq<1>{})
  25. ));
  26. BOOST_HANA_CONSTANT_CHECK(hana::equal(
  27. MAKE_TUPLE(ct_eq<0>{}, ct_eq<1>{}, ct_eq<2>{}),
  28. hana::make<TUPLE_TAG>(ct_eq<0>{}, ct_eq<1>{}, ct_eq<2>{})
  29. ));
  30. }};
  31. #endif // !BOOST_HANA_TEST_AUTO_MAKE_HPP