diff --git a/src/std/option.rs b/src/std/option.rs index 1b14faa..b592bdd 100644 --- a/src/std/option.rs +++ b/src/std/option.rs @@ -16,6 +16,7 @@ where #[cfg(test)] mod tests { use super::*; + use crate::structs::Pair; #[test] fn should_parse_empty_string_as_none() { @@ -34,4 +35,13 @@ mod tests { _ => unreachable!(), } } + + #[test] + fn should_parse_pair() { + let estr = EString::from("1+2"); + match estr.parse::>>() { + Ok(res) => assert_eq!(res, Some(Pair(1, 2))), + _ => unreachable!(), + } + } }