mirror of
https://github.com/boostorg/parser.git
synced 2026-01-19 16:32:13 +00:00
Attempt to fix odd error in happy path of code submitted with issue 223.
This commit is contained in:
@@ -271,12 +271,6 @@ void github_issue_223()
|
||||
BOOST_TEST(v.size() == 1);
|
||||
BOOST_TEST(v == std::vector<char>({'y'}));
|
||||
|
||||
std::cout << "v.size()=" << v.size() << "\n";
|
||||
for (auto c : v) {
|
||||
std::cout << std::hex << (int)c << ' ';
|
||||
}
|
||||
std::cout << "\n";
|
||||
|
||||
// the assert fails since there are two elements in the vector: '\0'
|
||||
// and 'y'. Seems pretty surprising to me
|
||||
}
|
||||
@@ -287,7 +281,7 @@ void github_issue_223()
|
||||
const auto result = bp::parse("xy", parser, bp::ws);
|
||||
|
||||
BOOST_TEST(result->size() == 1);
|
||||
BOOST_TEST(*result == std::vector<std::optional<char>>({'y'}));
|
||||
BOOST_TEST(*(*result)[0] == 'y');
|
||||
|
||||
// success, the vector has only one 'y' element
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user