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

Function test_add_valueless

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

Source from the content-addressed store, hash-verified

691
692 #[test]
693 fn test_add_valueless() {
694 let mut parser = OptionParser::new();
695 parser.add_valueless("readonly");
696 parser.add("path");
697 parser.parse("path=/dev/sda,readonly").unwrap();
698 assert!(parser.is_set("readonly"));
699 assert_eq!(parser.get("readonly"), None);
700 assert_eq!(parser.get("path"), Some("/dev/sda".to_owned()));
701 }
702
703 #[test]
704 fn test_convert_integer() {

Callers

nothing calls this directly

Calls 4

newFunction · 0.85
add_valuelessMethod · 0.80
addMethod · 0.80
parseMethod · 0.45

Tested by

no test coverage detected