2
0
mirror of https://github.com/boostorg/spirit.git synced 2026-01-19 04:42:11 +00:00

Revert "Merge pull request #820 from saki7/modernize-expect"

This reverts commit 70f968ef6c, reversing
changes made to b6acdc57d3.
This commit is contained in:
Nana Sakisaka
2025-09-13 08:56:56 +09:00
parent ac6ed01642
commit 385a9c3f06
2 changed files with 40 additions and 61 deletions

View File

@@ -1,14 +1,11 @@
/*=============================================================================
Copyright (c) 2001-2013 Joel de Guzman
Copyright (c) 2017 wanghan02
Copyright (c) 2024-2025 Nana Sakisaka
Copyright (c) 2024 Nana Sakisaka
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
=============================================================================*/
#define BOOST_SPIRIT_X3_USE_BOOST_OPTIONAL 0
#define BOOST_SPIRIT_X3_NO_BOOST_ITERATOR_RANGE
#include <boost/spirit/home/x3.hpp>
#include <boost/spirit/home/x3/binary.hpp>
#include <boost/spirit/home/x3/directive/with.hpp>
@@ -265,10 +262,10 @@ int TEST_MAIN_FUNC()
using x3::eps;
using x3::eoi;
using x3::eol;
//using x3::attr;
using x3::attr;
using x3::dword;
using x3::int_;
using x3::shared_symbols;
using x3::symbols;
using x3::confix;
using x3::with;
using x3::expectation_failure;
@@ -491,7 +488,7 @@ int TEST_MAIN_FUNC()
});
int n = 0;
TEST_ATTR_SUCCESS_PASS("abc", lit("abc") > x3::attr(12) > eoi, n);
TEST_ATTR_SUCCESS_PASS("abc", lit("abc") > attr(12) > eoi, n);
BOOST_TEST(n == 12);
}
@@ -512,7 +509,7 @@ int TEST_MAIN_FUNC()
BOOST_TEST(x.where() == "a"sv);
});
shared_symbols<> s;
symbols<> s;
s.add("cat");
TEST_SUCCESS_PASS("12cat", +digit > s);
TEST_FAILURE("12dog", +digit > s, {