Lines Matching refs:assert_eq
17 assert_eq!(expected, actual); in test_a_vec()
19 assert_eq!(array_vec![0u8; 4], array_vec!(0u8, 0u8, 0u8, 0u8)); in test_a_vec()
20 assert_eq!(array_vec![0u8; 4], array_vec!([u8; 4] => 0, 0, 0, 0)); in test_a_vec()
21 assert_eq!(array_vec![0; 4], array_vec!(0, 0, 0, 0)); in test_a_vec()
22 assert_eq!(array_vec![0; 4], array_vec!([u8; 4] => 0, 0, 0, 0)); in test_a_vec()
26 assert_eq!(expected2, actual2); in test_a_vec()
32 assert_eq!(av.len(), 0); in ArrayVec_push_pop()
33 assert_eq!(av.pop(), None); in ArrayVec_push_pop()
36 assert_eq!(av.len(), 1); in ArrayVec_push_pop()
37 assert_eq!(av[0], 10); in ArrayVec_push_pop()
38 assert_eq!(av.pop(), Some(10)); in ArrayVec_push_pop()
39 assert_eq!(av.len(), 0); in ArrayVec_push_pop()
40 assert_eq!(av.pop(), None); in ArrayVec_push_pop()
46 assert_eq!(av[0], 10); in ArrayVec_push_pop()
47 assert_eq!(av[1], 11); in ArrayVec_push_pop()
48 assert_eq!(av[2], 12); in ArrayVec_push_pop()
49 assert_eq!(av[3], 13); in ArrayVec_push_pop()
50 assert_eq!(av.len(), 4); in ArrayVec_push_pop()
51 assert_eq!(av.pop(), Some(13)); in ArrayVec_push_pop()
52 assert_eq!(av.len(), 3); in ArrayVec_push_pop()
53 assert_eq!(av.pop(), Some(12)); in ArrayVec_push_pop()
54 assert_eq!(av.len(), 2); in ArrayVec_push_pop()
55 assert_eq!(av.pop(), Some(11)); in ArrayVec_push_pop()
56 assert_eq!(av.len(), 1); in ArrayVec_push_pop()
57 assert_eq!(av.pop(), Some(10)); in ArrayVec_push_pop()
58 assert_eq!(av.len(), 0); in ArrayVec_push_pop()
59 assert_eq!(av.pop(), None); in ArrayVec_push_pop()
74 assert_eq!(format!("{:?}", av), "[]"); in ArrayVec_formatting()
76 assert_eq!(format!("{:?}", av), "[10]"); in ArrayVec_formatting()
78 assert_eq!(format!("{:?}", av), "[10, 11]"); in ArrayVec_formatting()
80 assert_eq!(format!("{:?}", av), "[10, 11, 12]"); in ArrayVec_formatting()
86 assert_eq!(format!("{:b}", av), "[]"); in ArrayVec_formatting()
87 assert_eq!(format!("{:o}", av), "[]"); in ArrayVec_formatting()
88 assert_eq!(format!("{:x}", av), "[]"); in ArrayVec_formatting()
89 assert_eq!(format!("{:X}", av), "[]"); in ArrayVec_formatting()
90 assert_eq!(format!("{}", av), "[]"); in ArrayVec_formatting()
93 assert_eq!(format!("{:e}", av), "[]"); in ArrayVec_formatting()
94 assert_eq!(format!("{:E}", av), "[]"); in ArrayVec_formatting()
97 assert_eq!(format!("{:p}", av), "[]"); in ArrayVec_formatting()
105 assert_eq!(i.next(), Some(10)); in ArrayVec_iteration()
106 assert_eq!(i.next(), Some(11)); in ArrayVec_iteration()
107 assert_eq!(i.next(), Some(12)); in ArrayVec_iteration()
108 assert_eq!(i.next(), Some(13)); in ArrayVec_iteration()
109 assert_eq!(i.next(), None); in ArrayVec_iteration()
114 assert_eq!(av, av2); in ArrayVec_iteration()
131 assert_eq!(av.as_slice(), &[1_i32, 2, 3, 4, 5, 6]); in ArrayVec_append()
132 assert_eq!(av2.as_slice(), &[]); in ArrayVec_append()
141 assert_eq!(av.remove(1), 2); in ArrayVec_remove()
142 assert_eq!(&av[..], &[1, 3][..]); in ArrayVec_remove()
160 assert_eq!(av.swap_remove(3), 4); in ArrayVec_swap_remove()
161 assert_eq!(&av[..], &[1, 2, 3][..]); in ArrayVec_swap_remove()
162 assert_eq!(av.swap_remove(0), 1); in ArrayVec_swap_remove()
163 assert_eq!(&av[..], &[3, 2][..]); in ArrayVec_swap_remove()
164 assert_eq!(av.swap_remove(0), 3); in ArrayVec_swap_remove()
165 assert_eq!(&av[..], &[2][..]); in ArrayVec_swap_remove()
166 assert_eq!(av.swap_remove(0), 2); in ArrayVec_swap_remove()
167 assert_eq!(&av[..], &[][..]); in ArrayVec_swap_remove()
177 assert_eq!(Vec::from_iter(av.clone().drain(..)), vec![1, 2, 3]); in ArrayVec_drain()
179 assert_eq!(Vec::from_iter(av.clone().drain(..2)), vec![1, 2]); in ArrayVec_drain()
180 assert_eq!(Vec::from_iter(av.clone().drain(..3)), vec![1, 2, 3]); in ArrayVec_drain()
182 assert_eq!(Vec::from_iter(av.clone().drain(..=1)), vec![1, 2]); in ArrayVec_drain()
183 assert_eq!(Vec::from_iter(av.clone().drain(..=2)), vec![1, 2, 3]); in ArrayVec_drain()
185 assert_eq!(Vec::from_iter(av.clone().drain(0..)), vec![1, 2, 3]); in ArrayVec_drain()
186 assert_eq!(Vec::from_iter(av.clone().drain(1..)), vec![2, 3]); in ArrayVec_drain()
188 assert_eq!(Vec::from_iter(av.clone().drain(0..2)), vec![1, 2]); in ArrayVec_drain()
189 assert_eq!(Vec::from_iter(av.clone().drain(0..3)), vec![1, 2, 3]); in ArrayVec_drain()
190 assert_eq!(Vec::from_iter(av.clone().drain(1..2)), vec![2]); in ArrayVec_drain()
191 assert_eq!(Vec::from_iter(av.clone().drain(1..3)), vec![2, 3]); in ArrayVec_drain()
193 assert_eq!(Vec::from_iter(av.clone().drain(0..=1)), vec![1, 2]); in ArrayVec_drain()
194 assert_eq!(Vec::from_iter(av.clone().drain(0..=2)), vec![1, 2, 3]); in ArrayVec_drain()
195 assert_eq!(Vec::from_iter(av.clone().drain(1..=1)), vec![2]); in ArrayVec_drain()
196 assert_eq!(Vec::from_iter(av.clone().drain(1..=2)), vec![2, 3]); in ArrayVec_drain()
207 assert_eq!(Vec::from_iter(av.clone().splice(.., None)), vec![1, 2, 3]); in ArrayVec_splice()
209 assert_eq!(Vec::from_iter(av.clone().splice(..2, None)), vec![1, 2]); in ArrayVec_splice()
210 assert_eq!(Vec::from_iter(av.clone().splice(..3, None)), vec![1, 2, 3]); in ArrayVec_splice()
212 assert_eq!(Vec::from_iter(av.clone().splice(..=1, None)), vec![1, 2]); in ArrayVec_splice()
213 assert_eq!(Vec::from_iter(av.clone().splice(..=2, None)), vec![1, 2, 3]); in ArrayVec_splice()
215 assert_eq!(Vec::from_iter(av.clone().splice(0.., None)), vec![1, 2, 3]); in ArrayVec_splice()
216 assert_eq!(Vec::from_iter(av.clone().splice(1.., None)), vec![2, 3]); in ArrayVec_splice()
218 assert_eq!(Vec::from_iter(av.clone().splice(0..2, None)), vec![1, 2]); in ArrayVec_splice()
219 assert_eq!(Vec::from_iter(av.clone().splice(0..3, None)), vec![1, 2, 3]); in ArrayVec_splice()
220 assert_eq!(Vec::from_iter(av.clone().splice(1..2, None)), vec![2]); in ArrayVec_splice()
221 assert_eq!(Vec::from_iter(av.clone().splice(1..3, None)), vec![2, 3]); in ArrayVec_splice()
223 assert_eq!(Vec::from_iter(av.clone().splice(0..=1, None)), vec![1, 2]); in ArrayVec_splice()
224 assert_eq!(Vec::from_iter(av.clone().splice(0..=2, None)), vec![1, 2, 3]); in ArrayVec_splice()
225 assert_eq!(Vec::from_iter(av.clone().splice(1..=1, None)), vec![2]); in ArrayVec_splice()
226 assert_eq!(Vec::from_iter(av.clone().splice(1..=2, None)), vec![2, 3]); in ArrayVec_splice()
231 assert_eq!(av2, array_vec![]); in ArrayVec_splice()
235 assert_eq!(av2, array_vec![3]); in ArrayVec_splice()
239 assert_eq!(av2, array_vec![]); in ArrayVec_splice()
243 assert_eq!(av2, array_vec![3]); in ArrayVec_splice()
246 assert_eq!(av2, array_vec![]); in ArrayVec_splice()
250 assert_eq!(av2, array_vec![]); in ArrayVec_splice()
253 assert_eq!(av2, array_vec![1]); in ArrayVec_splice()
257 assert_eq!(av2, array_vec![3]); in ArrayVec_splice()
261 assert_eq!(av2, array_vec![]); in ArrayVec_splice()
264 assert_eq!(av2, array_vec![1, 3]); in ArrayVec_splice()
268 assert_eq!(av2, array_vec![1]); in ArrayVec_splice()
272 assert_eq!(av2, array_vec![3]); in ArrayVec_splice()
276 assert_eq!(av2, array_vec![]); in ArrayVec_splice()
280 assert_eq!(av2, array_vec![1, 3]); in ArrayVec_splice()
284 assert_eq!(av2, array_vec![1]); in ArrayVec_splice()
289 assert_eq!(av2, array_vec![4, 5, 6]); in ArrayVec_splice()
293 assert_eq!(av2, array_vec![4, 5, 6, 3]); in ArrayVec_splice()
297 assert_eq!(av2, array_vec![4, 5, 6]); in ArrayVec_splice()
301 assert_eq!(av2, array_vec![4, 5, 6, 3]); in ArrayVec_splice()
305 assert_eq!(av2, array_vec![4, 5, 6]); in ArrayVec_splice()
309 assert_eq!(av2, array_vec![4, 5, 6]); in ArrayVec_splice()
313 assert_eq!(av2, array_vec![1, 4, 5, 6]); in ArrayVec_splice()
317 assert_eq!(av2, array_vec![4, 5, 6, 3]); in ArrayVec_splice()
321 assert_eq!(av2, array_vec![4, 5, 6]); in ArrayVec_splice()
325 assert_eq!(av2, array_vec![1, 4, 5, 6, 3]); in ArrayVec_splice()
329 assert_eq!(av2, array_vec![1, 4, 5, 6]); in ArrayVec_splice()
333 assert_eq!(av2, array_vec![4, 5, 6, 3]); in ArrayVec_splice()
337 assert_eq!(av2, array_vec![4, 5, 6]); in ArrayVec_splice()
341 assert_eq!(av2, array_vec![1, 4, 5, 6, 3]); in ArrayVec_splice()
345 assert_eq!(av2, array_vec![1, 4, 5, 6]); in ArrayVec_splice()
350 assert_eq!(av2, array_vec![4]); in ArrayVec_splice()
354 assert_eq!(av2, array_vec![4, 3]); in ArrayVec_splice()
358 assert_eq!(av2, array_vec![1, 4]); in ArrayVec_splice()
362 assert_eq!(av2, array_vec![1, 4, 3]); in ArrayVec_splice()
372 assert_eq!(av.len(), 4); in iter_last_nth()
374 assert_eq!(iter.next(), Some(1)); in iter_last_nth()
375 assert_eq!(iter.next(), Some(2)); in iter_last_nth()
376 assert_eq!(iter.next(), Some(3)); in iter_last_nth()
377 assert_eq!(iter.next(), Some(4)); in iter_last_nth()
378 assert_eq!(iter.next(), None); in iter_last_nth()
379 assert_eq!(iter.last(), None); in iter_last_nth()
386 assert_eq!(av.into_iter().nth(0), Some(1)); in iter_last_nth()
400 assert_eq!(iter.next(), Some(1)); in reviter()
401 assert_eq!(iter.next_back(), Some(4)); in reviter()
402 assert_eq!(iter.next(), Some(2)); in reviter()
403 assert_eq!(iter.next_back(), Some(3)); in reviter()
404 assert_eq!(iter.next(), None); in reviter()
405 assert_eq!(iter.next_back(), None); in reviter()
412 assert_eq!(iter.nth_back(0), Some(31)); in reviter()
413 assert_eq!(iter.nth_back(2), Some(28)); in reviter()
414 assert_eq!(iter.nth_back(0), Some(27)); in reviter()
415 assert_eq!(iter.nth_back(99), None); in reviter()
416 assert_eq!(iter.nth_back(99), None); in reviter()