test4u.cpp 1.0 KB

12345678910111213141516171819202122232425262728293031
  1. ///////////////////////////////////////////////////////////////////////////////
  2. // test4.cpp
  3. //
  4. // Copyright 2008 Eric Niebler. Distributed under the Boost
  5. // Software License, Version 1.0. (See accompanying file
  6. // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  7. #include <algorithm>
  8. #include "./test4.hpp"
  9. ///////////////////////////////////////////////////////////////////////////////
  10. // test_main
  11. // read the tests from the input file and execute them
  12. void test_main()
  13. {
  14. #ifndef BOOST_XPRESSIVE_NO_WREGEX
  15. typedef std::wstring::const_iterator iterator_type;
  16. boost::iterator_range<xpr_test_case<iterator_type> const *> rng = get_test_cases<iterator_type>();
  17. std::for_each(rng.begin(), rng.end(), test_runner<iterator_type>());
  18. #endif
  19. }
  20. ///////////////////////////////////////////////////////////////////////////////
  21. // init_unit_test_suite
  22. //
  23. test_suite* init_unit_test_suite( int argc, char* argv[] )
  24. {
  25. test_suite *test = BOOST_TEST_SUITE("test4u");
  26. test->add(BOOST_TEST_CASE(&test_main));
  27. return test;
  28. }