not_predicate.cpp 815 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 <iostream>
  10. #include "test.hpp"
  11. int
  12. main()
  13. {
  14. using spirit_test::test;
  15. using boost::spirit::qi::int_;
  16. {
  17. BOOST_TEST((!test("1234", !int_)));
  18. BOOST_TEST((test("abcd", !int_, false)));
  19. BOOST_TEST((!test("abcd", !!int_, false)));
  20. }
  21. return boost::report_errors();
  22. }