mirror of
https://github.com/pezkuwichain/serde.git
synced 2026-11-07 17:41:06 +00:00
Add test for #77, integer overflow when parsing JSON scientific notation number.
This commit is contained in:
1 parent
745a95b607
commit
2e8ef0f768
1 file changed
+1
@@ -703,6 +703,7 @@ fn test_parse_number_errors() {
|
|||||||
("1e+", Error::SyntaxError(ErrorCode::InvalidNumber, 1, 3)),
|
("1e+", Error::SyntaxError(ErrorCode::InvalidNumber, 1, 3)),
|
||||||
("1a", Error::SyntaxError(ErrorCode::TrailingCharacters, 1, 2)),
|
("1a", Error::SyntaxError(ErrorCode::TrailingCharacters, 1, 2)),
|
||||||
("777777777777777777777777777", Error::SyntaxError(ErrorCode::InvalidNumber, 1, 20)),
|
("777777777777777777777777777", Error::SyntaxError(ErrorCode::InvalidNumber, 1, 20)),
|
||||||
|
("1e777777777777777777777777777", Error::SyntaxError(ErrorCode::InvalidNumber, 1, 22)),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user