Lines Matching full:b
20 ($len:literal, $a:expr, $b:expr) => {
22 assert_eq!($a, $b);
122 assert_eq!(trie.get(b""), None); in test_empty()
129 (&b""[..], 10), // in test_single_empty_value()
134 assert_eq!(trie.get(b""), Some(10)); in test_single_empty_value()
135 assert_eq!(trie.get(b"x"), None); in test_single_empty_value()
148 (&b"x"[..], 10), // in test_single_byte_string()
153 assert_eq!(trie.get(b""), None); in test_single_byte_string()
154 assert_eq!(trie.get(b"xy"), None); in test_single_byte_string()
156 let expected_bytes = &[b'x', 0b10001010]; in test_single_byte_string()
168 (&b"xyz"[..], 10), // in test_single_string()
173 assert_eq!(trie.get(b""), None); in test_single_string()
174 assert_eq!(trie.get(b"x"), None); in test_single_string()
175 assert_eq!(trie.get(b"xy"), None); in test_single_string()
176 assert_eq!(trie.get(b"xyzz"), None); in test_single_string()
178 let expected_bytes = &[b'x', b'y', b'z', 0b10001010]; in test_single_string()
189 let litemap: LiteMap<&[u8], usize> = [(&b"x"[..], 0), (b"xy", 1)].into_iter().collect(); in test_prefix_strings()
191 assert_eq!(trie.get(b""), None); in test_prefix_strings()
192 assert_eq!(trie.get(b"xyz"), None); in test_prefix_strings()
194 let expected_bytes = &[b'x', 0b10000000, b'y', 0b10000001]; in test_prefix_strings()
205 let litemap: LiteMap<&[u8], usize> = [(&b"x"[..], 0), (b"y", 1)].into_iter().collect(); in test_single_byte_branch()
207 assert_eq!(trie.get(b""), None); in test_single_byte_branch()
208 assert_eq!(trie.get(b"xy"), None); in test_single_byte_branch()
210 let expected_bytes = &[0b11000010, b'x', b'y', 1, 0b10000000, 0b10000001]; in test_single_byte_branch()
221 let litemap: LiteMap<&[u8], usize> = [(&b"axb"[..], 0), (b"ayc", 1)].into_iter().collect(); in test_multi_byte_branch()
223 assert_eq!(trie.get(b""), None); in test_multi_byte_branch()
224 assert_eq!(trie.get(b"a"), None); in test_multi_byte_branch()
225 assert_eq!(trie.get(b"ax"), None); in test_multi_byte_branch()
226 assert_eq!(trie.get(b"ay"), None); in test_multi_byte_branch()
229 b'a', 0b11000010, b'x', b'y', 2, b'b', 0b10000000, b'c', 0b10000001, in test_multi_byte_branch()
241 let litemap: LiteMap<&[u8], usize> = [(&b""[..], 100), (b"x", 500), (b"xyz", 5000)] in test_linear_varint_values()
245 assert_eq!(trie.get(b"xy"), None); in test_linear_varint_values()
246 assert_eq!(trie.get(b"xz"), None); in test_linear_varint_values()
247 assert_eq!(trie.get(b"xyzz"), None); in test_linear_varint_values()
249 let expected_bytes = &[0x90, 0x54, b'x', 0x93, 0x64, b'y', b'z', 0x90, 0x96, 0x78]; in test_linear_varint_values()
260 let litemap: LiteMap<&[u8], usize> = [(&b"abc"[..], 100), (b"abcd", 500), (b"abcde", 5000)] in test_bug()
264 assert_eq!(trie.get(b"ab"), None); in test_bug()
265 assert_eq!(trie.get(b"abd"), None); in test_bug()
266 assert_eq!(trie.get(b"abCD"), None); in test_bug()
281 assert_eq!(trie.get(b""), None); in test_varint_branch()
282 assert_eq!(trie.get(b"ax"), None); in test_varint_branch()
283 assert_eq!(trie.get(b"ay"), None); in test_varint_branch()
290 b'A', b'B', b'C', b'D', b'E', b'F', b'G', b'H', b'I', b'J', in test_varint_branch()
291 b'K', b'L', b'M', b'N', b'O', b'P', b'Q', b'R', b'S', b'T', in test_varint_branch()
292 b'U', b'V', b'W', b'X', b'Y', b'Z', in test_varint_branch()
293 b'a', b'b', b'c', b'd', b'e', b'f', b'g', b'h', b'i', b'j', in test_varint_branch()
294 b'k', b'l', b'm', b'n', b'o', b'p', b'q', b'r', b's', b't', in test_varint_branch()
295 b'u', b'v', b'w', b'x', b'y', b'z', in test_varint_branch()
325 b'h', b'i', b'j', b'k', b'l', b'm', b'n', b'o', in test_varint_branch()
326 b'p', b'u', b'v', b'w', b'D', b'E', b'F', b'q', in test_varint_branch()
327 b'r', b'A', b'B', b'C', b'x', b'y', b'z', b's', in test_varint_branch()
328 b'H', b'I', b'J', b'G', b'P', b'Q', b'R', b'S', in test_varint_branch()
329 b'T', b'U', b'V', b'W', b'X', b'Y', b'Z', b'K', in test_varint_branch()
330 b'L', b'M', b'N', b'O', b'g', b'a', b'b', b'c', in test_varint_branch()
331 b't', b'd', b'f', b'e', in test_varint_branch()
359 (&b"abcdefghijklmnopqrstuvwxyz"[..], 1), in test_below_wide()
360 (b"bcdefghijklmnopqrstuvwxyza", 2), in test_below_wide()
361 (b"cdefghijklmnopqrstuvwxyzab", 3), in test_below_wide()
362 (b"defghijklmnopqrstuvwxyzabc", 4), in test_below_wide()
363 (b"efghijklmnopqrstuvwxyzabcd", 5), in test_below_wide()
364 (b"fghijklmnopqrstuvwxyzabcde", 6), in test_below_wide()
365 (b"ghijklmnopqrstuvwxyzabcdef", 7), in test_below_wide()
366 (b"hijklmnopqrstuvwxyzabcdefg", 8), in test_below_wide()
367 (b"ijklmnopqrstuvwxyzabcdefgh", 9), in test_below_wide()
368 (b"jklmnopqrstuvwxyzabcd", 10), in test_below_wide()
373 assert_eq!(trie.get(b""), None); in test_below_wide()
374 assert_eq!(trie.get(b"abc"), None); in test_below_wide()
380 b'a', b'b', b'c', b'd', b'e', b'f', b'g', b'h', b'i', b'j', in test_below_wide()
384 b'b', b'c', b'd', b'e', b'f', b'g', b'h', b'i', b'j', b'k', b'l', b'm', b'n', in test_below_wide()
385 b'o', b'p', b'q', b'r', b's', b't', b'u', b'v', b'w', b'x', b'y', b'z', in test_below_wide()
387 b'c', b'd', b'e', b'f', b'g', b'h', b'i', b'j', b'k', b'l', b'm', b'n', b'o', in test_below_wide()
388 b'p', b'q', b'r', b's', b't', b'u', b'v', b'w', b'x', b'y', b'z', b'a', in test_below_wide()
390 b'd', b'e', b'f', b'g', b'h', b'i', b'j', b'k', b'l', b'm', b'n', b'o', b'p', in test_below_wide()
391 b'q', b'r', b's', b't', b'u', b'v', b'w', b'x', b'y', b'z', b'a', b'b', in test_below_wide()
393 b'e', b'f', b'g', b'h', b'i', b'j', b'k', b'l', b'm', b'n', b'o', b'p', b'q', in test_below_wide()
394 b'r', b's', b't', b'u', b'v', b'w', b'x', b'y', b'z', b'a', b'b', b'c', in test_below_wide()
396 b'f', b'g', b'h', b'i', b'j', b'k', b'l', b'm', b'n', b'o', b'p', b'q', b'r', in test_below_wide()
397 b's', b't', b'u', b'v', b'w', b'x', b'y', b'z', b'a', b'b', b'c', b'd', in test_below_wide()
399 b'g', b'h', b'i', b'j', b'k', b'l', b'm', b'n', b'o', b'p', b'q', b'r', b's', in test_below_wide()
400 b't', b'u', b'v', b'w', b'x', b'y', b'z', b'a', b'b', b'c', b'd', b'e', in test_below_wide()
402 b'h', b'i', b'j', b'k', b'l', b'm', b'n', b'o', b'p', b'q', b'r', b's', b't', in test_below_wide()
403 b'u', b'v', b'w', b'x', b'y', b'z', b'a', b'b', b'c', b'd', b'e', b'f', in test_below_wide()
405 b'i', b'j', b'k', b'l', b'm', b'n', b'o', b'p', b'q', b'r', b's', b't', b'u', in test_below_wide()
406 b'v', b'w', b'x', b'y', b'z', b'a', b'b', b'c', b'd', b'e', b'f', b'g', in test_below_wide()
408 b'j', b'k', b'l', b'm', b'n', b'o', b'p', b'q', b'r', b's', b't', b'u', b'v', in test_below_wide()
409 b'w', b'x', b'y', b'z', b'a', b'b', b'c', b'd', b'e', b'f', b'g', b'h', in test_below_wide()
411 b'k', b'l', b'm', b'n', b'o', b'p', b'q', b'r', b's', b't', b'u', b'v', b'w', in test_below_wide()
412 b'x', b'y', b'z', b'a', b'b', b'c', b'd', in test_below_wide()
421 (&b"abcdefghijklmnopqrstuvwxyz"[..], 1), in test_at_wide()
422 (b"bcdefghijklmnopqrstuvwxyza", 2), in test_at_wide()
423 (b"cdefghijklmnopqrstuvwxyzab", 3), in test_at_wide()
424 (b"defghijklmnopqrstuvwxyzabc", 4), in test_at_wide()
425 (b"efghijklmnopqrstuvwxyzabcd", 5), in test_at_wide()
426 (b"fghijklmnopqrstuvwxyzabcde", 6), in test_at_wide()
427 (b"ghijklmnopqrstuvwxyzabcdef", 7), in test_at_wide()
428 (b"hijklmnopqrstuvwxyzabcdefg", 8), in test_at_wide()
429 (b"ijklmnopqrstuvwxyzabcdefgh", 9), in test_at_wide()
430 (b"jklmnopqrstuvwxyzabcde", 10), in test_at_wide()
435 assert_eq!(trie.get(b""), None); in test_at_wide()
436 assert_eq!(trie.get(b"abc"), None); in test_at_wide()
443 b'a', b'b', b'c', b'd', b'e', b'f', b'g', b'h', b'i', b'j', in test_at_wide()
448 b'b', b'c', b'd', b'e', b'f', b'g', b'h', b'i', b'j', b'k', b'l', b'm', b'n', in test_at_wide()
449 b'o', b'p', b'q', b'r', b's', b't', b'u', b'v', b'w', b'x', b'y', b'z', in test_at_wide()
451 b'c', b'd', b'e', b'f', b'g', b'h', b'i', b'j', b'k', b'l', b'm', b'n', b'o', in test_at_wide()
452 b'p', b'q', b'r', b's', b't', b'u', b'v', b'w', b'x', b'y', b'z', b'a', in test_at_wide()
454 b'd', b'e', b'f', b'g', b'h', b'i', b'j', b'k', b'l', b'm', b'n', b'o', b'p', in test_at_wide()
455 b'q', b'r', b's', b't', b'u', b'v', b'w', b'x', b'y', b'z', b'a', b'b', in test_at_wide()
457 b'e', b'f', b'g', b'h', b'i', b'j', b'k', b'l', b'm', b'n', b'o', b'p', b'q', in test_at_wide()
458 b'r', b's', b't', b'u', b'v', b'w', b'x', b'y', b'z', b'a', b'b', b'c', in test_at_wide()
460 b'f', b'g', b'h', b'i', b'j', b'k', b'l', b'm', b'n', b'o', b'p', b'q', b'r', in test_at_wide()
461 b's', b't', b'u', b'v', b'w', b'x', b'y', b'z', b'a', b'b', b'c', b'd', in test_at_wide()
463 b'g', b'h', b'i', b'j', b'k', b'l', b'm', b'n', b'o', b'p', b'q', b'r', b's', in test_at_wide()
464 b't', b'u', b'v', b'w', b'x', b'y', b'z', b'a', b'b', b'c', b'd', b'e', in test_at_wide()
466 b'h', b'i', b'j', b'k', b'l', b'm', b'n', b'o', b'p', b'q', b'r', b's', b't', in test_at_wide()
467 b'u', b'v', b'w', b'x', b'y', b'z', b'a', b'b', b'c', b'd', b'e', b'f', in test_at_wide()
469 b'i', b'j', b'k', b'l', b'm', b'n', b'o', b'p', b'q', b'r', b's', b't', b'u', in test_at_wide()
470 b'v', b'w', b'x', b'y', b'z', b'a', b'b', b'c', b'd', b'e', b'f', b'g', in test_at_wide()
472 b'j', b'k', b'l', b'm', b'n', b'o', b'p', b'q', b'r', b's', b't', b'u', b'v', in test_at_wide()
473 b'w', b'x', b'y', b'z', b'a', b'b', b'c', b'd', b'e', b'f', b'g', b'h', in test_at_wide()
475 b'k', b'l', b'm', b'n', b'o', b'p', b'q', b'r', b's', b't', b'u', b'v', b'w', in test_at_wide()
476 b'x', b'y', b'z', b'a', b'b', b'c', b'd', b'e', in test_at_wide()
485 (&b"abcdefghijklmnopqrstuvwxyz"[..], 1), in test_at_wide_plus()
486 (b"bcdefghijklmnopqrstuvwxyza", 2), in test_at_wide_plus()
487 (b"cdefghijklmnopqrstuvwxyzab", 3), in test_at_wide_plus()
488 (b"defghijklmnopqrstuvwxyzabc", 4), in test_at_wide_plus()
489 (b"efghijklmnopqrstuvwxyzabcd", 5), in test_at_wide_plus()
490 (b"fghijklmnopqrstuvwxyzabcde", 6), in test_at_wide_plus()
491 (b"ghijklmnopqrstuvwxyzabcdef", 7), in test_at_wide_plus()
492 (b"hijklmnopqrstuvwxyzabcdefg", 8), in test_at_wide_plus()
493 (b"ijklmnopqrstuvwxyzabcdefgh", 9), in test_at_wide_plus()
494 (b"jklmnopqrstuvwxyzabcdef", 10), in test_at_wide_plus()
499 assert_eq!(trie.get(b""), None); in test_at_wide_plus()
500 assert_eq!(trie.get(b"abc"), None); in test_at_wide_plus()
507 b'a', b'b', b'c', b'd', b'e', b'f', b'g', b'h', b'i', b'j', in test_at_wide_plus()
512 b'b', b'c', b'd', b'e', b'f', b'g', b'h', b'i', b'j', b'k', b'l', b'm', b'n', in test_at_wide_plus()
513 b'o', b'p', b'q', b'r', b's', b't', b'u', b'v', b'w', b'x', b'y', b'z', in test_at_wide_plus()
515 b'c', b'd', b'e', b'f', b'g', b'h', b'i', b'j', b'k', b'l', b'm', b'n', b'o', in test_at_wide_plus()
516 b'p', b'q', b'r', b's', b't', b'u', b'v', b'w', b'x', b'y', b'z', b'a', in test_at_wide_plus()
518 b'd', b'e', b'f', b'g', b'h', b'i', b'j', b'k', b'l', b'm', b'n', b'o', b'p', in test_at_wide_plus()
519 b'q', b'r', b's', b't', b'u', b'v', b'w', b'x', b'y', b'z', b'a', b'b', in test_at_wide_plus()
521 b'e', b'f', b'g', b'h', b'i', b'j', b'k', b'l', b'm', b'n', b'o', b'p', b'q', in test_at_wide_plus()
522 b'r', b's', b't', b'u', b'v', b'w', b'x', b'y', b'z', b'a', b'b', b'c', in test_at_wide_plus()
524 b'f', b'g', b'h', b'i', b'j', b'k', b'l', b'm', b'n', b'o', b'p', b'q', b'r', in test_at_wide_plus()
525 b's', b't', b'u', b'v', b'w', b'x', b'y', b'z', b'a', b'b', b'c', b'd', in test_at_wide_plus()
527 b'g', b'h', b'i', b'j', b'k', b'l', b'm', b'n', b'o', b'p', b'q', b'r', b's', in test_at_wide_plus()
528 b't', b'u', b'v', b'w', b'x', b'y', b'z', b'a', b'b', b'c', b'd', b'e', in test_at_wide_plus()
530 b'h', b'i', b'j', b'k', b'l', b'm', b'n', b'o', b'p', b'q', b'r', b's', b't', in test_at_wide_plus()
531 b'u', b'v', b'w', b'x', b'y', b'z', b'a', b'b', b'c', b'd', b'e', b'f', in test_at_wide_plus()
533 b'i', b'j', b'k', b'l', b'm', b'n', b'o', b'p', b'q', b'r', b's', b't', b'u', in test_at_wide_plus()
534 b'v', b'w', b'x', b'y', b'z', b'a', b'b', b'c', b'd', b'e', b'f', b'g', in test_at_wide_plus()
536 b'j', b'k', b'l', b'm', b'n', b'o', b'p', b'q', b'r', b's', b't', b'u', b'v', in test_at_wide_plus()
537 b'w', b'x', b'y', b'z', b'a', b'b', b'c', b'd', b'e', b'f', b'g', b'h', in test_at_wide_plus()
539 b'k', b'l', b'm', b'n', b'o', b'p', b'q', b'r', b's', b't', b'u', b'v', b'w', in test_at_wide_plus()
540 b'x', b'y', b'z', b'a', b'b', b'c', b'd', b'e', b'f', in test_at_wide_plus()
549 (&b""[..], 0), in test_everything()
550 (b"axb", 100), in test_everything()
551 (b"ayc", 2), in test_everything()
552 (b"azd", 3), in test_everything()
553 (b"bxe", 4), in test_everything()
554 (b"bxefg", 500), in test_everything()
555 (b"bxefh", 6), in test_everything()
556 (b"bxei", 7), in test_everything()
557 (b"bxeikl", 8), in test_everything()
562 assert_eq!(trie.get(b""), Some(0)); in test_everything()
563 assert_eq!(trie.get(b"a"), None); in test_everything()
564 assert_eq!(trie.get(b"ax"), None); in test_everything()
565 assert_eq!(trie.get(b"ay"), None); in test_everything()
570 b'a', // in test_everything()
571 b'b', // in test_everything()
574 b'x', // in test_everything()
575 b'y', // in test_everything()
576 b'z', // in test_everything()
579 b'b', // in test_everything()
582 b'c', // in test_everything()
584 b'd', // in test_everything()
586 b'x', // in test_everything()
587 b'e', // in test_everything()
590 b'f', // in test_everything()
591 b'i', // in test_everything()
594 b'g', // in test_everything()
595 b'h', // in test_everything()
601 b'k', // in test_everything()
602 b'l', // in test_everything()
611 b'a', // in test_everything()
612 b'b', // in test_everything()
615 b'x', // in test_everything()
616 b'y', // in test_everything()
617 b'z', // in test_everything()
620 b'b', // in test_everything()
623 b'c', // in test_everything()
625 b'd', // in test_everything()
627 b'x', // start of 'b' subtree in test_everything()
628 b'e', // in test_everything()
631 b'f', // in test_everything()
632 b'i', // in test_everything()
635 b'g', // in test_everything()
636 b'h', // in test_everything()
642 b'k', // in test_everything()
643 b'l', // in test_everything()
651 let zhm: zerovec::ZeroMap<[u8], u32> = litemap.iter().map(|(a, b)| (*a, *b as u32)).collect(); in test_everything()
655 let zhm: zerovec::ZeroMap<[u8], u8> = litemap.iter().map(|(a, b)| (*a, *b as u8)).collect(); in test_everything()
660 litemap.iter().map(|(a, b)| (*a, *b as u32)).collect(); in test_everything()
664 let zhm: zerovec::ZeroHashMap<[u8], u8> = litemap.iter().map(|(a, b)| (*a, *b as u8)).collect(); in test_everything()
700 b'a', // in test_non_ascii()
701 b'b', // in test_non_ascii()
704 b'x', // in test_non_ascii()
705 b'y', // in test_non_ascii()
706 b'z', // in test_non_ascii()
709 b'b', // in test_non_ascii()
712 b'c', // in test_non_ascii()
714 b'd', // in test_non_ascii()
716 b'x', // start of 'b' subtree in test_non_ascii()
717 b'e', // in test_non_ascii()
720 b'f', // in test_non_ascii()
721 b'i', // in test_non_ascii()
724 b'g', // in test_non_ascii()
725 b'h', // in test_non_ascii()
731 b'k', // in test_non_ascii()
732 b'l', // in test_non_ascii()
734 b'm', // in test_non_ascii()
764 b'n', in test_non_ascii()
768 b'o', in test_non_ascii()
783 let all_bytes_prefixed: Vec<[u8; 2]> = (u8::MIN..=u8::MAX).map(|x| [b'\0', x]).collect(); in test_max_branch()
784 for b in all_bytes.iter() { in test_max_branch()
785 litemap.insert(core::slice::from_ref(b), *b as usize); in test_max_branch()
808 let zhm: zerovec::ZeroMap<[u8], u32> = litemap.iter().map(|(a, b)| (*a, *b as u32)).collect(); in test_short_subtags_10pct()
812 let zhm: zerovec::ZeroMap<[u8], u8> = litemap.iter().map(|(a, b)| (*a, *b as u8)).collect(); in test_short_subtags_10pct()
817 litemap.iter().map(|(a, b)| (*a, *b as u32)).collect(); in test_short_subtags_10pct()
821 let zhm: zerovec::ZeroHashMap<[u8], u8> = litemap.iter().map(|(a, b)| (*a, *b as u8)).collect(); in test_short_subtags_10pct()
839 let zm: zerovec::ZeroMap<[u8], u32> = litemap.iter().map(|(a, b)| (*a, *b as u32)).collect(); in test_short_subtags()
843 let zm: zerovec::ZeroMap<[u8], u8> = litemap.iter().map(|(a, b)| (*a, *b as u8)).collect(); in test_short_subtags()
848 litemap.iter().map(|(a, b)| (*a, *b as u32)).collect(); in test_short_subtags()
852 let zhm: zerovec::ZeroHashMap<[u8], u8> = litemap.iter().map(|(a, b)| (*a, *b as u8)).collect(); in test_short_subtags()