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:
@@ -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();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user