Add tests for amount op int

We aim to support three ops on amount types that use an integer for the
right hand size. Prove that implement them.
This commit is contained in:
Tobin C. Harding 2025-03-03 05:20:01 +11:00
parent 58baee62ca
commit 8bb9ce3e47
No known key found for this signature in database
GPG Key ID: 40BF9E4C269D6607
1 changed files with 9 additions and 0 deletions

View File

@ -1289,6 +1289,15 @@ fn num_op_result_ops_integer() {
}
}
check_op! {
// Operations on an amount type and an integer.
let _ = sat * 3_u64; // Explicit type for the benefit of the reader.
let _ = sat / 3;
let _ = sat % 3;
let _ = ssat * 3_i64; // Explicit type for the benefit of the reader.
let _ = ssat / 3;
let _ = ssat % 3;
// Operations on a `NumOpResult` and integer.
let _ = res * 3_u64; // Explicit type for the benefit of the reader.
let _ = res / 3;