Skip to content

Commit

Permalink
test_checked_big_div
Browse files Browse the repository at this point in the history
  • Loading branch information
wojciech-cichocki committed Oct 11, 2023
1 parent e7de8dd commit 39bd3d2
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions decimal_core/src/big_ops.rs
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,14 @@ pub fn generate_big_ops(characteristics: DecimalCharacteristics) -> proc_macro::
assert_eq!(a.big_div(b), #struct_name::new(2));
}


#[test]
fn test_checked_big_div () {
let a = #struct_name::new(29);
let b = #struct_name::new(#struct_name::one());
assert_eq!(a.big_div(b), #struct_name::new(29));
}

#[test]
fn test_big_div_up () {
let a = #struct_name::new(2);
Expand Down

0 comments on commit 39bd3d2

Please sign in to comment.