()
| 702 | |
| 703 | #[test] |
| 704 | fn test_convert_integer() { |
| 705 | let mut parser = OptionParser::new(); |
| 706 | parser.add("count"); |
| 707 | parser.parse("count=42").unwrap(); |
| 708 | assert_eq!(parser.convert::<u64>("count").unwrap(), Some(42)); |
| 709 | assert_eq!(parser.convert::<u32>("count").unwrap(), Some(42)); |
| 710 | } |
| 711 | |
| 712 | #[test] |
| 713 | fn test_convert_unset_returns_none() { |