Assert error type
Improve test granularity by asserting the specific type of overflow returned.
This commit is contained in:
parent
2f7e74da45
commit
a7d059151e
|
@ -344,8 +344,11 @@ mod tests {
|
|||
|
||||
#[test]
|
||||
fn fee_wu() {
|
||||
let fee_overflow = FeeRate::from_sat_per_kwu(10).to_fee(Weight::MAX);
|
||||
assert!(fee_overflow.is_error());
|
||||
let operation = FeeRate::from_sat_per_kwu(10)
|
||||
.to_fee(Weight::MAX)
|
||||
.unwrap_err()
|
||||
.operation();
|
||||
assert!(operation.is_multiplication());
|
||||
|
||||
let fee_rate = FeeRate::from_sat_per_vb(2).unwrap();
|
||||
let weight = Weight::from_vb(3).unwrap();
|
||||
|
|
Loading…
Reference in New Issue