Skip to content

Commit

Permalink
Add tick comparsion tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Shatur committed Oct 2, 2023
1 parent b8d1820 commit 298d5c7
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/replicon_core.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,3 +111,15 @@ impl PartialOrd for NetworkTick {
}
}
}

#[cfg(test)]
mod tests {
use super::*;

#[test]
fn tick_comparsion() {
assert_eq!(NetworkTick(0), NetworkTick(0));
assert!(NetworkTick(0) < NetworkTick(1));
assert!(NetworkTick(0) > NetworkTick(u32::MAX));
}
}

0 comments on commit 298d5c7

Please sign in to comment.