MCPcopy Index your code
hub / github.com/cloud-hypervisor/cloud-hypervisor / test_convert_integer

Function test_convert_integer

option_parser/src/lib.rs:704–710  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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() {

Callers

nothing calls this directly

Calls 3

newFunction · 0.85
addMethod · 0.80
parseMethod · 0.45

Tested by

no test coverage detected