From 251d0dda345e6b3d067232a32db7afad098c8522 Mon Sep 17 00:00:00 2001 From: Paulo Gabriel Justino Bezerra Date: Thu, 13 Jan 2022 18:11:52 -0300 Subject: [PATCH] feat(iterators4): add factorial of zero test --- exercises/standard_library_types/iterators4.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/exercises/standard_library_types/iterators4.rs b/exercises/standard_library_types/iterators4.rs index 8886283..0b3b5d8 100644 --- a/exercises/standard_library_types/iterators4.rs +++ b/exercises/standard_library_types/iterators4.rs @@ -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));