Add more asserts and debug_asserts (#8541)

* Add more asserts and debug_asserts

fixing #8106

* Remove assignments

* convert debug_assert to runtime assert
This commit is contained in:
Falco Hirschenberger
2021-04-07 23:40:28 +02:00
committed by GitHub
parent a600e278ed
commit e932c3ecd2
14 changed files with 66 additions and 58 deletions
@@ -1411,7 +1411,7 @@ mod tests {
roll_to(30);
assert!(MultiPhase::current_phase().is_signed());
let _ = MultiPhase::elect().unwrap();
assert_ok!(MultiPhase::elect());
assert!(MultiPhase::current_phase().is_off());
assert!(MultiPhase::snapshot().is_none());
@@ -1434,7 +1434,7 @@ mod tests {
assert!(MultiPhase::current_phase().is_off());
// this module is now only capable of doing on-chain backup.
let _ = MultiPhase::elect().unwrap();
assert_ok!(MultiPhase::elect());
assert!(MultiPhase::current_phase().is_off());
});