mirror of
https://github.com/boostorg/spirit.git
synced 2026-01-19 04:42:11 +00:00
X3: Remove forced iterator rollback in rule
Removes inconsistency when a parser part is factorized into a rule. Fixes regression introduced in #670.
This commit is contained in:
@@ -62,9 +62,11 @@ auto parse = [](std::string const& source, fs::path input_path)-> std::string
|
||||
};
|
||||
|
||||
int num_files_tested = 0;
|
||||
int num_tests_failed = 0;
|
||||
auto compare = [](fs::path input_path, fs::path expect_path)
|
||||
{
|
||||
testing::compare(input_path, expect_path, parse);
|
||||
if (!testing::compare(input_path, expect_path, parse))
|
||||
++num_tests_failed;
|
||||
++num_files_tested;
|
||||
};
|
||||
|
||||
@@ -82,5 +84,5 @@ int main(int argc, char* argv[])
|
||||
if (r == 0)
|
||||
std::cout << num_files_tested << " files tested." << std::endl;
|
||||
std::cout << "===================================================================================================" << std::endl;
|
||||
return r;
|
||||
return num_tests_failed;
|
||||
}
|
||||
|
||||
@@ -233,8 +233,8 @@ namespace boost { namespace spirit { namespace x3 { namespace testing
|
||||
auto result = compare(output, expected, re_prefix, re_suffix);
|
||||
if (!result.full_match)
|
||||
{
|
||||
std::cout << "=============================================" << std::endl;
|
||||
std::cout << "==== Mismatch Found:" << std::endl;
|
||||
std::cerr << "=============================================" << std::endl;
|
||||
std::cerr << "==== Mismatch Found:" << std::endl;
|
||||
int line = 1;
|
||||
int col = 1;
|
||||
for (auto i = output.begin(); i != result.pos; ++i)
|
||||
|
||||
Reference in New Issue
Block a user