Lines Matching refs:addr
13 let addr = MacAddr6::from_str("12-34-56-78-9A-BC"); in test_parse_v6_upper_case_canonical_format() localVariable
15 assert!(addr.is_ok()); in test_parse_v6_upper_case_canonical_format()
16 let addr = addr.unwrap(); in test_parse_v6_upper_case_canonical_format() localVariable
18 assert_eq!(&[0x12, 0x34, 0x56, 0x78, 0x9A, 0xBC], addr.as_bytes()); in test_parse_v6_upper_case_canonical_format()
23 let addr = MacAddr6::from_str("ab-cd-ef-ab-cd-ef"); in test_parse_v6_lower_case_canonical_format() localVariable
25 assert!(addr.is_ok()); in test_parse_v6_lower_case_canonical_format()
26 let addr = addr.unwrap(); in test_parse_v6_lower_case_canonical_format() localVariable
28 assert_eq!(&[0xAB, 0xCD, 0xEF, 0xAB, 0xCD, 0xEF], addr.as_bytes()); in test_parse_v6_lower_case_canonical_format()
33 let addr = MacAddr6::from_str("AB-cd-Ef-Ab-cD-EF"); in test_parse_v6_mixed_case_canonical_format() localVariable
35 assert!(addr.is_ok()); in test_parse_v6_mixed_case_canonical_format()
36 let addr = addr.unwrap(); in test_parse_v6_mixed_case_canonical_format() localVariable
38 assert_eq!(&[0xAB, 0xCD, 0xEF, 0xAB, 0xCD, 0xEF], addr.as_bytes()); in test_parse_v6_mixed_case_canonical_format()
43 let addr = MacAddr6::from_str("12:34:56:78:9A:BC"); in test_parse_v6_colon_format() localVariable
45 assert!(addr.is_ok()); in test_parse_v6_colon_format()
46 let addr = addr.unwrap(); in test_parse_v6_colon_format() localVariable
48 assert_eq!(&[0x12, 0x34, 0x56, 0x78, 0x9A, 0xBC], addr.as_bytes()); in test_parse_v6_colon_format()
53 let addr = MacAddr6::from_str("1234.5678.9ABC"); in test_parse_v6_cisco_format() localVariable
55 assert!(addr.is_ok()); in test_parse_v6_cisco_format()
56 let addr = addr.unwrap(); in test_parse_v6_cisco_format() localVariable
58 assert_eq!(&[0x12, 0x34, 0x56, 0x78, 0x9A, 0xBC], addr.as_bytes()); in test_parse_v6_cisco_format()
63 let addr = MacAddr8::from_str("12-34-56-78-9A-BC-DE-F0"); in test_parse_v8_canonical_format() localVariable
65 assert!(addr.is_ok()); in test_parse_v8_canonical_format()
66 let addr = addr.unwrap(); in test_parse_v8_canonical_format() localVariable
68 assert_eq!(&[0x12, 0x34, 0x56, 0x78, 0x9A, 0xBC, 0xDE, 0xF0], addr.as_bytes()); in test_parse_v8_canonical_format()
73 let addr = MacAddr8::from_str("12:34:56:78:9A:BC:DE:F0"); in test_parse_v8_colon_format() localVariable
75 assert!(addr.is_ok()); in test_parse_v8_colon_format()
76 let addr = addr.unwrap(); in test_parse_v8_colon_format() localVariable
78 assert_eq!(&[0x12, 0x34, 0x56, 0x78, 0x9A, 0xBC, 0xDE, 0xF0], addr.as_bytes()); in test_parse_v8_colon_format()
83 let addr = MacAddr::from_str("12-34-56-78-9A-BC-DE-F0"); in test_parse_canonical_format() localVariable
85 assert!(addr.is_ok()); in test_parse_canonical_format()
86 let addr = addr.unwrap(); in test_parse_canonical_format() localVariable
87 assert_matches!(addr, MacAddr::V8(..)); in test_parse_canonical_format()
88 assert_eq!(&[0x12, 0x34, 0x56, 0x78, 0x9A, 0xBC, 0xDE, 0xF0], addr.as_bytes()); in test_parse_canonical_format()
93 let addr = MacAddr::from_str("12:34:56:78:9A:BC:DE:F0"); in test_parse_colon_format() localVariable
95 assert!(addr.is_ok()); in test_parse_colon_format()
96 let addr = addr.unwrap(); in test_parse_colon_format() localVariable
97 assert_matches!(addr, MacAddr::V8(..)); in test_parse_colon_format()
98 assert_eq!(&[0x12, 0x34, 0x56, 0x78, 0x9A, 0xBC, 0xDE, 0xF0], addr.as_bytes()); in test_parse_colon_format()
103 let addr = MacAddr6::from_str(""); in test_parse_v6_empty() localVariable
105 assert!(addr.is_err()); in test_parse_v6_empty()
110 let addr = MacAddr8::from_str(""); in test_parse_v8_empty() localVariable
112 assert!(addr.is_err()); in test_parse_v8_empty()
117 let addr = MacAddr::from_str(""); in test_parse_empty() localVariable
119 assert!(addr.is_err()); in test_parse_empty()
124 let addr = MacAddr6::from_str("b-cd-ef-12-34-56"); in test_parse_v6_partial_start() localVariable
126 assert!(addr.is_err()); in test_parse_v6_partial_start()
131 let addr = MacAddr8::from_str("b-cd-ef-12-34-56-78-9A"); in test_parse_v8_partial_start() localVariable
133 assert!(addr.is_err()); in test_parse_v8_partial_start()
138 let addr = MacAddr6::from_str("ab-cd-ef-12-34-5"); in test_parse_v6_partial_end() localVariable
140 assert!(addr.is_err()); in test_parse_v6_partial_end()
145 let addr = MacAddr8::from_str("ab-cd-ef-12-34-56-78-9"); in test_parse_v8_partial_end() localVariable
147 assert!(addr.is_err()); in test_parse_v8_partial_end()
152 let addr = MacAddr6::from_str("ab-Qd-ef-12-34-56"); in test_parse_v6_invalid_char() localVariable
154 assert!(addr.is_err()); in test_parse_v6_invalid_char()
159 let addr = MacAddr8::from_str("ab-Qd-ef-12-34-56-78-9A"); in test_parse_v8_invalid_char() localVariable
161 assert!(addr.is_err()); in test_parse_v8_invalid_char()
166 let addr = MacAddr6::from_str("ab-cd:ef-12-34-56"); in test_parse_v6_different_delimiters() localVariable
168 assert!(addr.is_err()); in test_parse_v6_different_delimiters()
173 let addr = MacAddr8::from_str("ab-cd-ef-12-34-56-78:9A"); in test_parse_v8_different_delimiters() localVariable
175 assert!(addr.is_err()); in test_parse_v8_different_delimiters()