type_erased.cpp 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. // Boost.Range library
  2. //
  3. // Copyright Neil Groves 2010. Use, modification and
  4. // distribution is subject to the Boost Software License, Version
  5. // 1.0. (See accompanying file LICENSE_1_0.txt or copy at
  6. // http://www.boost.org/LICENSE_1_0.txt)
  7. //
  8. #include <boost/range/adaptor/type_erased.hpp>
  9. #include "type_erased_test.hpp"
  10. #include <boost/test/unit_test.hpp>
  11. #include <list>
  12. #include <vector>
  13. namespace boost_range_adaptor_type_erased_test
  14. {
  15. namespace
  16. {
  17. void test_type_erased()
  18. {
  19. test_driver< std::list<int> >();
  20. test_driver< std::vector<int> >();
  21. test_driver< std::list<MockType> >();
  22. test_driver< std::vector<MockType> >();
  23. }
  24. } // anonymous namespace
  25. } // namespace boost_range_adaptor_type_erased_test
  26. boost::unit_test::test_suite*
  27. init_unit_test_suite(int argc, char* argv[])
  28. {
  29. boost::unit_test::test_suite* test =
  30. BOOST_TEST_SUITE("RangeTestSuite.adaptor.type_erased");
  31. test->add(BOOST_TEST_CASE(
  32. &boost_range_adaptor_type_erased_test::test_type_erased));
  33. return test;
  34. }