Remove test from test names for Weight type

This commit is contained in:
yancy 2023-08-23 09:36:13 +02:00
parent 142dde64c3
commit 55e94b5dea
1 changed files with 15 additions and 15 deletions

View File

@ -125,24 +125,24 @@ mod tests {
use super::*;
#[test]
fn weight_constructor_test() {
fn weight_constructor() {
assert_eq!(Weight::ZERO, Weight::from_wu(0));
assert_eq!(Weight::ZERO, Weight::from_wu_usize(0_usize));
}
#[test]
fn kilo_weight_constructor_test() {
fn kilo_weight_constructor() {
assert_eq!(Weight(1_000), Weight::from_kwu(1).expect("expected weight unit"));
}
#[test]
#[should_panic]
fn kilo_weight_constructor_panic_test() {
fn kilo_weight_constructor_panic() {
Weight::from_kwu(u64::MAX).expect("expected weight unit");
}
#[test]
fn from_vb_test() {
fn from_vb() {
let vb = Weight::from_vb(1).expect("expected weight unit");
assert_eq!(Weight(4), vb);
@ -151,45 +151,45 @@ mod tests {
}
#[test]
fn from_vb_unchecked_test() {
fn from_vb_unchecked() {
let vb = Weight::from_vb_unchecked(1);
assert_eq!(Weight(4), vb);
}
#[test]
#[should_panic]
fn from_vb_unchecked_panic_test() { Weight::from_vb_unchecked(u64::MAX); }
fn from_vb_unchecked_panic() { Weight::from_vb_unchecked(u64::MAX); }
#[test]
fn from_witness_data_size_test() {
fn from_witness_data_size() {
let witness_data_size = 1;
assert_eq!(Weight(witness_data_size), Weight::from_witness_data_size(witness_data_size));
}
#[test]
fn from_non_witness_data_size_test() {
fn from_non_witness_data_size() {
assert_eq!(Weight(4), Weight::from_non_witness_data_size(1));
}
#[test]
fn to_kwu_floor_test() {
fn to_kwu_floor() {
assert_eq!(1, Weight(1_000).to_kwu_floor());
}
#[test]
fn to_vb_floor_test() {
fn to_vb_floor() {
assert_eq!(1, Weight(4).to_vbytes_floor());
assert_eq!(1, Weight(5).to_vbytes_floor());
}
#[test]
fn to_vb_ceil_test() {
fn to_vb_ceil() {
assert_eq!(1, Weight(4).to_vbytes_ceil());
assert_eq!(2, Weight(5).to_vbytes_ceil());
}
#[test]
fn checked_add_test() {
fn checked_add() {
let result = Weight(1).checked_add(Weight(1)).expect("expected weight unit");
assert_eq!(Weight(2), result);
@ -198,7 +198,7 @@ mod tests {
}
#[test]
fn checked_sub_test() {
fn checked_sub() {
let result = Weight(1).checked_sub(Weight(1)).expect("expected weight unit");
assert_eq!(Weight::ZERO, result);
@ -207,7 +207,7 @@ mod tests {
}
#[test]
fn checked_mul_test() {
fn checked_mul() {
let result = Weight(2).checked_mul(2).expect("expected weight unit");
assert_eq!(Weight(4), result);
@ -216,7 +216,7 @@ mod tests {
}
#[test]
fn checked_div_test() {
fn checked_div() {
let result = Weight(2).checked_div(2).expect("expected weight unit");
assert_eq!(Weight(1), result);