Add tests and benches for epoch processing

This commit is contained in:
Paul Hauner
2019-02-26 16:27:42 +13:00
parent 53663e54b5
commit 906131f882
4 changed files with 60 additions and 8 deletions

View File

@@ -9,6 +9,8 @@ use types::{
Crosslink, Epoch, Hash256, InclusionError, PendingAttestation, RelativeEpoch,
};
mod tests;
macro_rules! safe_add_assign {
($a: expr, $b: expr) => {
$a = $a.saturating_add($b);
@@ -725,11 +727,3 @@ impl From<BeaconStateError> for WinningRootError {
WinningRootError::BeaconStateError(e)
}
}
#[cfg(test)]
mod tests {
#[test]
fn it_works() {
assert_eq!(2 + 2, 4);
}
}