and_predicate.cpp 808 B

123456789101112131415161718192021222324252627
  1. /*=============================================================================
  2. Copyright (c) 2001-2010 Joel de Guzman
  3. Distributed under the Boost Software License, Version 1.0. (See accompanying
  4. file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  5. =============================================================================*/
  6. #include <boost/detail/lightweight_test.hpp>
  7. #include <boost/spirit/include/qi_operator.hpp>
  8. #include <boost/spirit/include/qi_numeric.hpp>
  9. #include <boost/spirit/include/phoenix_core.hpp>
  10. #include <iostream>
  11. #include "test.hpp"
  12. int
  13. main()
  14. {
  15. using spirit_test::test;
  16. using boost::spirit::int_;
  17. {
  18. BOOST_TEST((test("1234", &int_, false)));
  19. BOOST_TEST((!test("abcd", &int_)));
  20. }
  21. return boost::report_errors();
  22. }