Skip to content

Commit

Permalink
add basic unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
qdrs committed May 31, 2023
1 parent 36ca84b commit b5ef5a9
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3211,4 +3211,14 @@ mod bigdecimal_tests {
fn test_bad_string_only_decimal_and_exponent() {
BigDecimal::from_str(".e4").unwrap();
}

#[test]
fn test_from_i128() {
BigDecimal::from_i128(-368934881474191032320).unwrap();
}

#[test]
fn test_from_u128() {
BigDecimal::from_i128(668934881474191032320).unwrap();
}
}

0 comments on commit b5ef5a9

Please sign in to comment.