// Asserts that two `CanisterStatusResult`s are almost equal. Because
// `CanisterStatusResult` contains cycles balances, we can't assert on actual
// equality, so use the helper method that asserts two cycles balances are equal
// within some accuracy. Additionally, we ignore the memory size.
Asserts that two `CanisterStatusResult`s are almost equal. Because
`CanisterStatusResult` contains cycles balances, we can't assert on actual
equality, so use the helper method that asserts two cycles balances are equal
within some accuracy. Additionally, we ignore the memory size.
Asserts that two ` CanisterStatusResult ` s are almost equal . Because ` CanisterStatusResult ` contains cycles balances we can ' t assert on actual equality so use the helper method that asserts two cycles balances are equal within some accuracy . Additionally we ignore the memory size .
fn assert_canister_status_result_equals(
    expected: CanisterStatusResultV2,
    actual: CanisterStatusResultV2,
    epsilon: u64,
) {
    assert_eq!(expected.status(), actual.status());
    assert_eq!(expected.module_hash(), actual.module_hash());
    assert_eq!(expected.controller(), actual.controller());
    assert_balance_equals(
        Cycles::from(expected.cycles()),
        Cycles::from(actual.cycles()),
        Cycles::from(epsilon),
    );
}
fn assert_canister_status_result_equals ( expected : CanisterStatusResultV2 , actual : CanisterStatusResultV2 , epsilon : u64 , ) { assert_eq ! ( expected status ( ) actual status ( ) ) ; assert_eq ! ( expected module_hash ( ) actual module_hash ( ) ) ; assert_eq ! ( expected controller ( ) actual controller ( ) ) ; assert_balance_equals ( Cycles :: from ( expected . cycles ( ) ) , Cycles :: from ( actual . cycles ( ) ) , Cycles :: from ( epsilon ) , ) ; }
Asserts that two `CanisterStatusResult`s are almost equal.
Asserts that two ` CanisterStatusResult ` s are almost equal .
expected
CanisterStatusResultV2
actual
CanisterStatusResultV2
epsilon
u64