2
0
mirror of https://github.com/boostorg/json.git synced 2026-01-19 16:22:20 +00:00

basic_parser errors are sticky

This commit is contained in:
Vinnie Falco
2020-09-13 12:02:52 -07:00
parent 76d8c9c8b1
commit a39a6113f5
3 changed files with 31 additions and 3 deletions

View File

@@ -1499,6 +1499,21 @@ public:
check("1000000000000000.0e1000000d");
}
void
testStickyErrors()
{
null_parser p;
error_code ec;
p.write("*", 1, ec);
BOOST_TEST(ec);
error_code ec2;
p.write("[]", 2, ec2);
BOOST_TEST(ec2 == ec);
p.reset();
p.write("[]", 2, ec2);
BOOST_TEST(! ec2);
}
void
run()
{
@@ -1519,6 +1534,7 @@ public:
testUTF8Validation();
testMaxDepth();
testNumberLiteral();
testStickyErrors();
}
};