feat(iterators4): add factorial of zero test
@@ -18,6 +18,11 @@ pub fn factorial(num: u64) -> u64 {
mod tests {
use super::*;
+ #[test]
+ fn factorial_of_0() {
+ assert_eq!(1, factorial(0));
+ }
+
#[test]
fn factorial_of_1() {
assert_eq!(1, factorial(1));
