Skip to content

Commit

Permalink
Add test cases for syntax errors in decimal input strings
Browse files Browse the repository at this point in the history
  • Loading branch information
younies committed Nov 19, 2024
1 parent a50c928 commit 87dfd16
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions utils/fixed_decimal/src/decimal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2677,6 +2677,14 @@ fn test_syntax_error() {
pub expected_err: Option<ParseError>,
}
let cases = [
TestCase {
input_str: "+1234567890",
expected_err: Some(ParseError::Syntax),
},
TestCase {
input_str: "-1234567890",
expected_err: Some(ParseError::Syntax),
},
TestCase {
input_str: "-12a34",
expected_err: Some(ParseError::Syntax),
Expand Down

0 comments on commit 87dfd16

Please sign in to comment.