Lines Matching refs:assert_eq

25     assert_eq!(  in test_layout()
30 assert_eq!( in test_layout()
36 assert_eq!( in test_layout()
42 assert_eq!( in test_layout()
52 assert_eq!(a, b"abcdefgh"[..]); in from_slice()
53 assert_eq!(a, &b"abcdefgh"[..]); in from_slice()
54 assert_eq!(a, Vec::from(&b"abcdefgh"[..])); in from_slice()
55 assert_eq!(b"abcdefgh"[..], a); in from_slice()
56 assert_eq!(&b"abcdefgh"[..], a); in from_slice()
57 assert_eq!(Vec::from(&b"abcdefgh"[..]), a); in from_slice()
60 assert_eq!(a, b"abcdefgh"[..]); in from_slice()
61 assert_eq!(a, &b"abcdefgh"[..]); in from_slice()
62 assert_eq!(a, Vec::from(&b"abcdefgh"[..])); in from_slice()
63 assert_eq!(b"abcdefgh"[..], a); in from_slice()
64 assert_eq!(&b"abcdefgh"[..], a); in from_slice()
65 assert_eq!(Vec::from(&b"abcdefgh"[..]), a); in from_slice()
73 assert_eq!(a, b); in fmt()
76 assert_eq!(a, b); in fmt()
87 assert_eq!(a, s[..64].as_bytes()); in fmt_write()
92 assert_eq!(b, s[..64].as_bytes()); in fmt_write()
96 assert_eq!(c, s[..].as_bytes()); in fmt_write()
102 assert_eq!(a.len(), 7); in len()
105 assert_eq!(a.len(), 7); in len()
117 assert_eq!(a[0..5], *b"hello"); in index()
125 assert_eq!(b, b"lo"[..]); in slice()
128 assert_eq!(b, b""[..]); in slice()
131 assert_eq!(b, b""[..]); in slice()
134 assert_eq!(b, b""[..]); in slice()
137 assert_eq!(b, b"hello"[..]); in slice()
140 assert_eq!(b, b"lo world"[..]); in slice()
162 assert_eq!(hello, &b"hello"[..]); in split_off()
163 assert_eq!(world, &b"world"[..]); in split_off()
168 assert_eq!(hello, &b"hello"[..]); in split_off()
169 assert_eq!(world, &b"world"[..]); in split_off()
184 assert_eq!(bytes.len(), 0); in split_off_uninitialized()
185 assert_eq!(bytes.capacity(), 128); in split_off_uninitialized()
187 assert_eq!(other.len(), 0); in split_off_uninitialized()
188 assert_eq!(other.capacity(), 896); in split_off_uninitialized()
199 assert_eq!(i, bytes.len()); in split_off_to_loop()
203 assert_eq!(&s[..], &sum[..]); in split_off_to_loop()
208 assert_eq!(i, bytes.len()); in split_off_to_loop()
212 assert_eq!(&s[..], &sum[..]); in split_off_to_loop()
217 assert_eq!(i, off.len()); in split_off_to_loop()
221 assert_eq!(&s[..], &sum[..]); in split_off_to_loop()
226 assert_eq!(i, off.len()); in split_off_to_loop()
230 assert_eq!(&s[..], &sum[..]); in split_off_to_loop()
241 assert_eq!(SHORT[4..], a); in split_to_1()
242 assert_eq!(SHORT[..4], b); in split_to_1()
248 assert_eq!(LONG[4..], a); in split_to_1()
249 assert_eq!(LONG[..4], b); in split_to_1()
254 assert_eq!(LONG[30..], a); in split_to_1()
255 assert_eq!(LONG[..30], b); in split_to_1()
261 assert_eq!(LONG, a); in split_to_2()
265 assert_eq!(LONG[1..], a); in split_to_2()
319 assert_eq!(hello, s); in truncate()
321 assert_eq!(hello, s); in truncate()
323 assert_eq!(hello, "hello"); in truncate()
330 assert_eq!(b, s); in freeze_clone_shared()
332 assert_eq!(c, s); in freeze_clone_shared()
339 assert_eq!(b, s); in freeze_clone_unique()
341 assert_eq!(c, s); in freeze_clone_unique()
349 assert_eq!(b, s[1..]); in freeze_after_advance()
353 assert_eq!(b, s[1..]); in freeze_after_advance()
363 assert_eq!(b, s[1..]); in freeze_after_advance_arc()
365 assert_eq!(b, s[1..]); in freeze_after_advance_arc()
373 assert_eq!(b, s[1..]); in freeze_after_split_to()
375 assert_eq!(b, s[1..]); in freeze_after_split_to()
383 assert_eq!(b, s[..7]); in freeze_after_truncate()
385 assert_eq!(b, s[..7]); in freeze_after_truncate()
395 assert_eq!(b, s[..7]); in freeze_after_truncate_arc()
397 assert_eq!(b, s[..7]); in freeze_after_truncate_arc()
405 assert_eq!(b, s[..7]); in freeze_after_split_off()
407 assert_eq!(b, s[..7]); in freeze_after_split_off()
419 assert_eq!(&v[..], bytes); in fns_defined_for_bytes_mut()
427 assert_eq!(bytes.capacity(), LONG.len() + 64); in reserve_convert()
446 assert_eq!(bytes.capacity(), 128); in reserve_growth()
460 assert_eq!(bytes.capacity(), 1024); in reserve_allocates_at_least_original_capacity()
477 assert_eq!(bytes.capacity(), 64 * 1024); in reserve_max_original_capacity_value()
483 assert_eq!(bytes.capacity(), 16); in reserve_vec_recycling()
486 assert_eq!(bytes.as_ptr() as usize, addr); in reserve_vec_recycling()
488 assert_eq!(bytes.capacity(), 6); in reserve_vec_recycling()
490 assert_eq!(bytes.capacity(), 16); in reserve_vec_recycling()
491 assert_eq!(bytes.as_ptr() as usize, addr); in reserve_vec_recycling()
501 assert_eq!(1000, bytes.capacity()); in reserve_in_arc_unique_does_not_overallocate()
503 assert_eq!(2001, bytes.capacity()); in reserve_in_arc_unique_does_not_overallocate()
513 assert_eq!(1000, bytes.capacity()); in reserve_in_arc_unique_doubles()
515 assert_eq!(2000, bytes.capacity()); in reserve_in_arc_unique_doubles()
525 assert_eq!(1000, bytes.capacity()); in reserve_in_arc_nonunique_does_not_overallocate()
527 assert_eq!(2001, bytes.capacity()); in reserve_in_arc_nonunique_does_not_overallocate()
534 assert_eq!(*bytes, LONG[..]); in extend_mut()
543 assert_eq!(LONG[..], *bytes); in extend_from_slice_mut()
554 assert_eq!(*bytes, LONG[..]); in extend_mut_without_size_hint()
562 assert_eq!(a, b"a"[..]); in from_static()
563 assert_eq!(b, b"b"[..]); in from_static()
570 assert_eq!(a, &b"world"[..]); in advance_static()
577 assert_eq!(a, b"o yah world zomg wat wat"[..]); in advance_vec()
580 assert_eq!(a, b"h world zomg wat wat"[..]); in advance_vec()
583 assert_eq!(a, b"d zomg wat wat"[..]); in advance_vec()
590 assert_eq!(a, b"o yah world zomg wat wat"[..]); in advance_bytes_mut()
593 assert_eq!(a, b"h world zomg wat wat"[..]); in advance_bytes_mut()
597 assert_eq!(a, b"h world zomg wat wat"[..]); in advance_bytes_mut()
600 assert_eq!(a, b"d zomg wat wat"[..]); in advance_bytes_mut()
644 assert_eq!(*buf, data[..]); in stress()
756 assert_eq!(b"aaabbb", &buf[..]); in bytes_mut_unsplit_basic()
757 assert_eq!(b"cccddd", &splitted[..]); in bytes_mut_unsplit_basic()
760 assert_eq!(b"aaabbbcccddd", &buf[..]); in bytes_mut_unsplit_basic()
772 assert_eq!(b"aaabbbcccddd", &buf[..]); in bytes_mut_unsplit_empty_other()
784 assert_eq!(b"aaabbbcccddd", &buf[..]); in bytes_mut_unsplit_empty_self()
800 assert_eq!(b"aaaabbbbccccdddd", &buf[..]); in bytes_mut_unsplit_arc_different()
813 assert_eq!(b"aaaabbbbccccdddd", &buf[..]); in bytes_mut_unsplit_arc_non_contiguous()
826 assert_eq!(b"aaaabbbbccccdddd", &buf[..]); in bytes_mut_unsplit_two_split_offs()
847 assert_eq!(&actual[..], &expect[..]); in from_iter_no_size_hint()
853 assert_eq!(&sub[..], expected); in test_slice_ref()
873 assert_eq!(&sub[..], b""); in slice_ref_empty()
883 assert_eq!(Bytes::new(), bytes.slice_ref(slice)); in slice_ref_empty_subslice()
900 assert_eq!(Bytes::new(), bytes.slice_ref(slice)); in slice_ref_not_an_empty_subset()
908 assert_eq!(Bytes::new(), bytes.slice_ref(slice)); in empty_slice_ref_not_an_empty_subset()
917 assert_eq!(1024, bytes.chunk_mut().len()); in bytes_buf_mut_advance()
922 assert_eq!(1024 - 10, bytes.chunk_mut().len()); in bytes_buf_mut_advance()
923 assert_eq!(ptr.offset(10), next); in bytes_buf_mut_advance()
929 assert_eq!(1024, bytes.chunk_mut().len()); in bytes_buf_mut_advance()
946 assert_eq!(&buf[0] as *const u8, p); in bytes_buf_mut_reuse_when_fully_consumed()