MCPcopy Create free account
hub / github.com/cloud-hypervisor/cloud-hypervisor / test_add_all

Function test_add_all

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

Source from the content-addressed store, hash-verified

681
682 #[test]
683 fn test_add_all() {
684 let mut parser = OptionParser::new();
685 parser.add_all(&["a", "b", "c"]);
686 parser.parse("a=1,b=2,c=3").unwrap();
687 assert_eq!(parser.get("a"), Some("1".to_owned()));
688 assert_eq!(parser.get("b"), Some("2".to_owned()));
689 assert_eq!(parser.get("c"), Some("3".to_owned()));
690 }
691
692 #[test]
693 fn test_add_valueless() {

Callers

nothing calls this directly

Calls 3

newFunction · 0.85
add_allMethod · 0.80
parseMethod · 0.45

Tested by

no test coverage detected