From 1f6d6c61849e89527c9b7be0818a16ce4833e8cf Mon Sep 17 00:00:00 2001 From: hia3 Date: Sun, 27 Mar 2016 12:26:09 +0300 Subject: [PATCH] Tst for bug #12085 https://svn.boost.org/trac/boost/ticket/12085 --- test/x3/not_predicate.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/test/x3/not_predicate.cpp b/test/x3/not_predicate.cpp index 808c3fc2ec..036814ef7d 100644 --- a/test/x3/not_predicate.cpp +++ b/test/x3/not_predicate.cpp @@ -15,7 +15,10 @@ int main() { using spirit_test::test; + using spirit_test::test_attr; + using boost::spirit::x3::alpha; using boost::spirit::x3::int_; + using boost::spirit::x3::lexeme; { BOOST_TEST((!test("1234", !int_))); @@ -23,5 +26,13 @@ main() BOOST_TEST((!test("abcd", !!int_, false))); } + // Test attributes + { + std::string attr1, attr2; + BOOST_TEST(test_attr("abc", !int_ >> lexeme[alpha >> *alpha], attr1)); + BOOST_TEST(test_attr("abc", lexeme[alpha >> *alpha] - int_, attr2)); + BOOST_TEST_EQ(attr1, attr2); + } + return boost::report_errors(); }