mirror of
https://github.com/serde-rs/json.git
synced 2025-10-02 15:26:00 +00:00
More sensitive test for recursion error
If eat_char is moved before the recursion check, the original test will continue to pass but the new test will catch it.
This commit is contained in:
parent
19c959cf92
commit
1168aedc4d
@ -1760,7 +1760,7 @@ fn test_stack_overflow() {
|
||||
.collect();
|
||||
let _: Value = from_str(&brackets).unwrap();
|
||||
|
||||
let brackets: String = iter::repeat('[').take(128).collect();
|
||||
let brackets: String = iter::repeat('[').take(129).collect();
|
||||
test_parse_err::<Value>(&[(&brackets, "recursion limit exceeded at line 1 column 128")]);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user