Home
last modified time | relevance | path

Searched refs:assert_eq (Results 1 – 25 of 1139) sorted by relevance

12345678910>>...46

/external/rust/crates/fnv/
Dlib.rs163 assert_eq!(fnv1a(b""), 0xcbf29ce484222325); in basic_tests()
164 assert_eq!(fnv1a(b"a"), 0xaf63dc4c8601ec8c); in basic_tests()
165 assert_eq!(fnv1a(b"b"), 0xaf63df4c8601f1a5); in basic_tests()
166 assert_eq!(fnv1a(b"c"), 0xaf63de4c8601eff2); in basic_tests()
167 assert_eq!(fnv1a(b"d"), 0xaf63d94c8601e773); in basic_tests()
168 assert_eq!(fnv1a(b"e"), 0xaf63d84c8601e5c0); in basic_tests()
169 assert_eq!(fnv1a(b"f"), 0xaf63db4c8601ead9); in basic_tests()
170 assert_eq!(fnv1a(b"fo"), 0x08985907b541d342); in basic_tests()
171 assert_eq!(fnv1a(b"foo"), 0xdcb27518fed9d577); in basic_tests()
172 assert_eq!(fnv1a(b"foob"), 0xdd120e790c2512af); in basic_tests()
[all …]
/external/crosvm/usb_util/src/
Ddescriptor.rs202 assert_eq!(u16::from(d.bcdUSB), 0x03_00); in parse_descriptors_mass_storage()
203 assert_eq!(d.bDeviceClass, 0x00); in parse_descriptors_mass_storage()
204 assert_eq!(d.bDeviceSubClass, 0x00); in parse_descriptors_mass_storage()
205 assert_eq!(d.bDeviceProtocol, 0x00); in parse_descriptors_mass_storage()
206 assert_eq!(d.bMaxPacketSize0, 9); in parse_descriptors_mass_storage()
207 assert_eq!(u16::from(d.idVendor), 0x0781); in parse_descriptors_mass_storage()
208 assert_eq!(u16::from(d.idProduct), 0x5580); in parse_descriptors_mass_storage()
209 assert_eq!(u16::from(d.bcdDevice), 0x00_10); in parse_descriptors_mass_storage()
210 assert_eq!(d.iManufacturer, 1); in parse_descriptors_mass_storage()
211 assert_eq!(d.iProduct, 2); in parse_descriptors_mass_storage()
[all …]
/external/rust/crates/unicode-bidi/src/char_data/
Dmod.rs58 assert_eq!(bidi_class('\u{0000}'), BN); in test_ascii()
59 assert_eq!(bidi_class('\u{0040}'), ON); in test_ascii()
60 assert_eq!(bidi_class('\u{0041}'), L); in test_ascii()
61 assert_eq!(bidi_class('\u{0062}'), L); in test_ascii()
62 assert_eq!(bidi_class('\u{007F}'), BN); in test_ascii()
68 assert_eq!(bidi_class('\u{0590}'), R); in test_bmp()
69 assert_eq!(bidi_class('\u{05D0}'), R); in test_bmp()
70 assert_eq!(bidi_class('\u{05D1}'), R); in test_bmp()
71 assert_eq!(bidi_class('\u{05FF}'), R); in test_bmp()
74 assert_eq!(bidi_class('\u{0600}'), AN); in test_bmp()
[all …]
/external/rust/crates/tinyvec/tests/
Darrayvec.rs17 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()
[all …]
Dtinyvec.rs17 assert_eq!(tv.swap_remove(3), 4); in TinyVec_swap_remove()
18 assert_eq!(&tv[..], &[1, 2, 3][..]); in TinyVec_swap_remove()
19 assert_eq!(tv.swap_remove(0), 1); in TinyVec_swap_remove()
20 assert_eq!(&tv[..], &[3, 2][..]); in TinyVec_swap_remove()
21 assert_eq!(tv.swap_remove(0), 3); in TinyVec_swap_remove()
22 assert_eq!(&tv[..], &[2][..]); in TinyVec_swap_remove()
23 assert_eq!(tv.swap_remove(0), 2); in TinyVec_swap_remove()
24 assert_eq!(&tv[..], &[][..]); in TinyVec_swap_remove()
30 assert_eq!(tv.capacity(), 1); in TinyVec_capacity()
33 assert_eq!(tv.capacity(), 4); in TinyVec_capacity()
[all …]
/external/rust/crates/quiche/src/
Dstream.rs1252 assert_eq!(recv.len, 0); in empty_read()
1256 assert_eq!(recv.pop(&mut buf), Err(Error::Done)); in empty_read()
1262 assert_eq!(recv.len, 0); in empty_stream_frame()
1266 assert_eq!(recv.len, 5); in empty_stream_frame()
1267 assert_eq!(recv.off, 0); in empty_stream_frame()
1268 assert_eq!(recv.data.len(), 1); in empty_stream_frame()
1271 assert_eq!(recv.pop(&mut buf), Ok((5, false))); in empty_stream_frame()
1276 assert_eq!(recv.len, 5); in empty_stream_frame()
1277 assert_eq!(recv.off, 5); in empty_stream_frame()
1278 assert_eq!(recv.data.len(), 0); in empty_stream_frame()
[all …]
Doctets.rs682 assert_eq!(b.cap(), 18); in get_u()
683 assert_eq!(b.off(), 0); in get_u()
685 assert_eq!(b.get_u8().unwrap(), 1); in get_u()
686 assert_eq!(b.cap(), 17); in get_u()
687 assert_eq!(b.off(), 1); in get_u()
689 assert_eq!(b.get_u16().unwrap(), 0x203); in get_u()
690 assert_eq!(b.cap(), 15); in get_u()
691 assert_eq!(b.off(), 3); in get_u()
693 assert_eq!(b.get_u24().unwrap(), 0x40506); in get_u()
694 assert_eq!(b.cap(), 12); in get_u()
[all …]
Dranges.rs275 assert_eq!(r.inner.len(), 0); in insert_non_overlapping()
277 assert_eq!(&r.flatten().collect::<Vec<u64>>(), &empty); in insert_non_overlapping()
280 assert_eq!(r.inner.len(), 1); in insert_non_overlapping()
281 assert_eq!(&r.flatten().collect::<Vec<u64>>(), &[4, 5, 6]); in insert_non_overlapping()
284 assert_eq!(r.inner.len(), 2); in insert_non_overlapping()
285 assert_eq!(&r.flatten().collect::<Vec<u64>>(), &[4, 5, 6, 9, 10, 11]); in insert_non_overlapping()
294 assert_eq!(&r.flatten().collect::<Vec<u64>>(), &[4, 5, 6, 9, 10, 11]); in insert_contained()
297 assert_eq!(r.inner.len(), 2); in insert_contained()
298 assert_eq!(&r.flatten().collect::<Vec<u64>>(), &[4, 5, 6, 9, 10, 11]); in insert_contained()
301 assert_eq!(r.inner.len(), 2); in insert_contained()
[all …]
/external/rust/crates/async-task/tests/
Dwaker_pending.rs108 assert_eq!(POLL.load(Ordering::SeqCst), 2); in wake_during_run()
109 assert_eq!(SCHEDULE.load(Ordering::SeqCst), 2); in wake_during_run()
110 assert_eq!(DROP_F.load(Ordering::SeqCst), 0); in wake_during_run()
111 assert_eq!(DROP_S.load(Ordering::SeqCst), 0); in wake_during_run()
112 assert_eq!(chan.len(), 1); in wake_during_run()
118 assert_eq!(POLL.load(Ordering::SeqCst), 2); in wake_during_run()
119 assert_eq!(SCHEDULE.load(Ordering::SeqCst), 1); in wake_during_run()
120 assert_eq!(DROP_F.load(Ordering::SeqCst), 0); in wake_during_run()
121 assert_eq!(DROP_S.load(Ordering::SeqCst), 0); in wake_during_run()
122 assert_eq!(chan.len(), 0); in wake_during_run()
[all …]
Dwaker_ready.rs110 assert_eq!(POLL.load(Ordering::SeqCst), 1); in wake()
111 assert_eq!(SCHEDULE.load(Ordering::SeqCst), 0); in wake()
112 assert_eq!(DROP_F.load(Ordering::SeqCst), 0); in wake()
113 assert_eq!(DROP_S.load(Ordering::SeqCst), 0); in wake()
114 assert_eq!(chan.len(), 0); in wake()
118 assert_eq!(POLL.load(Ordering::SeqCst), 1); in wake()
119 assert_eq!(SCHEDULE.load(Ordering::SeqCst), 1); in wake()
120 assert_eq!(DROP_F.load(Ordering::SeqCst), 0); in wake()
121 assert_eq!(DROP_S.load(Ordering::SeqCst), 0); in wake()
122 assert_eq!(chan.len(), 0); in wake()
[all …]
Dwaker_panic.rs122 assert_eq!(POLL.load(Ordering::SeqCst), 2); in wake_during_run()
123 assert_eq!(SCHEDULE.load(Ordering::SeqCst), 1); in wake_during_run()
124 assert_eq!(DROP_F.load(Ordering::SeqCst), 1); in wake_during_run()
125 assert_eq!(DROP_S.load(Ordering::SeqCst), 1); in wake_during_run()
126 assert_eq!(chan.len(), 0); in wake_during_run()
133 assert_eq!(POLL.load(Ordering::SeqCst), 2); in wake_during_run()
134 assert_eq!(SCHEDULE.load(Ordering::SeqCst), 1); in wake_during_run()
135 assert_eq!(DROP_F.load(Ordering::SeqCst), 0); in wake_during_run()
136 assert_eq!(DROP_S.load(Ordering::SeqCst), 0); in wake_during_run()
137 assert_eq!(chan.len(), 0); in wake_during_run()
[all …]
Djoin.rs103 assert_eq!(DROP_T.load(Ordering::SeqCst), 0); in drop_and_join()
106 assert_eq!(DROP_T.load(Ordering::SeqCst), 0); in drop_and_join()
109 assert_eq!(POLL.load(Ordering::SeqCst), 0); in drop_and_join()
110 assert_eq!(SCHEDULE.load(Ordering::SeqCst), 0); in drop_and_join()
111 assert_eq!(DROP_F.load(Ordering::SeqCst), 1); in drop_and_join()
112 assert_eq!(DROP_S.load(Ordering::SeqCst), 1); in drop_and_join()
113 assert_eq!(DROP_T.load(Ordering::SeqCst), 0); in drop_and_join()
122 assert_eq!(DROP_T.load(Ordering::SeqCst), 0); in run_and_join()
125 assert_eq!(DROP_T.load(Ordering::SeqCst), 0); in run_and_join()
128 assert_eq!(POLL.load(Ordering::SeqCst), 1); in run_and_join()
[all …]
/external/rust/crates/ryu/tests/
Dcommon_test.rs30 assert_eq!(1, decimal_length9(0)); in test_decimal_length9()
31 assert_eq!(1, decimal_length9(1)); in test_decimal_length9()
32 assert_eq!(1, decimal_length9(9)); in test_decimal_length9()
33 assert_eq!(2, decimal_length9(10)); in test_decimal_length9()
34 assert_eq!(2, decimal_length9(99)); in test_decimal_length9()
35 assert_eq!(3, decimal_length9(100)); in test_decimal_length9()
36 assert_eq!(3, decimal_length9(999)); in test_decimal_length9()
37 assert_eq!(9, decimal_length9(999999999)); in test_decimal_length9()
42 assert_eq!(1, ceil_log2_pow5(0)); in test_ceil_log2_pow5()
43 assert_eq!(3, ceil_log2_pow5(1)); in test_ceil_log2_pow5()
[all …]
Ds2d_test.rs53 assert_eq!(Error::MalformedInput, s2d(b"x").unwrap_err()); in test_bad_input()
54 assert_eq!(Error::MalformedInput, s2d(b"1..1").unwrap_err()); in test_bad_input()
55 assert_eq!(Error::MalformedInput, s2d(b"..").unwrap_err()); in test_bad_input()
56 assert_eq!(Error::MalformedInput, s2d(b"1..1").unwrap_err()); in test_bad_input()
57 assert_eq!(Error::MalformedInput, s2d(b"1ee1").unwrap_err()); in test_bad_input()
58 assert_eq!(Error::MalformedInput, s2d(b"1e.1").unwrap_err()); in test_bad_input()
59 assert_eq!(Error::InputTooShort, s2d(b"").unwrap_err()); in test_bad_input()
60 assert_eq!(Error::InputTooLong, s2d(b"123456789012345678").unwrap_err()); in test_bad_input()
61 assert_eq!(Error::InputTooLong, s2d(b"1e12345").unwrap_err()); in test_bad_input()
66 assert_eq!(0.0, s2d(b"0").unwrap()); in test_basic()
[all …]
/external/crosvm/sys_util/src/
Dseek_hole.rs70 assert_eq!(file.seek_data(0).unwrap(), None); in seek_data()
71 assert_eq!(seek_cur(&mut file), 0); in seek_data()
75 assert_eq!(file.seek_data(0).unwrap(), None); in seek_data()
76 assert_eq!(seek_cur(&mut file), 0); in seek_data()
79 assert_eq!(file.seek_data(0x10000).unwrap(), None); in seek_data()
80 assert_eq!(seek_cur(&mut file), 0); in seek_data()
81 assert_eq!(file.seek_data(0x10001).unwrap(), None); in seek_data()
82 assert_eq!(seek_cur(&mut file), 0); in seek_data()
88 assert_eq!(file.seek_data(0).unwrap(), Some(0x10000)); in seek_data()
89 assert_eq!(seek_cur(&mut file), 0x10000); in seek_data()
[all …]
/external/rust/crates/bstr/src/
Dutf8.rs882 assert_eq!(Ok(()), utf8::validate(s.as_bytes())); in validate_all_codepoints()
888 assert_eq!(Ok(()), utf8::validate(b"abc")); in validate_multiple_codepoints()
889 assert_eq!(Ok(()), utf8::validate(b"a\xE2\x98\x83a")); in validate_multiple_codepoints()
890 assert_eq!(Ok(()), utf8::validate(b"a\xF0\x9D\x9C\xB7a")); in validate_multiple_codepoints()
891 assert_eq!(Ok(()), utf8::validate(b"\xE2\x98\x83\xF0\x9D\x9C\xB7",)); in validate_multiple_codepoints()
892 assert_eq!( in validate_multiple_codepoints()
896 assert_eq!( in validate_multiple_codepoints()
905 assert_eq!(Err(utf8e2(0, 1)), utf8::validate(b"\xFF")); in validate_errors()
907 assert_eq!(Err(utf8e2(1, 1)), utf8::validate(b"a\xFF")); in validate_errors()
909 assert_eq!(Err(utf8e2(2, 1)), utf8::validate(b"\xCE\xB2\xFF")); in validate_errors()
[all …]
/external/rust/crates/linked-hash-map/tests/
Dtest.rs17 assert_eq!(map.len(), 2); in test_insert_and_get()
25 assert_eq!(10, map[&1]); in test_index()
27 assert_eq!(22, map[&2]); in test_index()
36 assert_eq!(map.len(), 1); in test_insert_update()
44 assert_eq!(*e.insert(vec![10, 10]), vec![10, 10]); in test_entry_insert_vacant()
49 assert_eq!(map["1"], vec![10, 10]); in test_entry_insert_vacant()
53 assert_eq!(*e.get(), vec![10, 10]); in test_entry_insert_vacant()
54 assert_eq!(e.insert(vec![10, 16]), vec![10, 10]); in test_entry_insert_vacant()
60 assert_eq!(map["1"], vec![10, 16]); in test_entry_insert_vacant()
64 assert_eq!(e.remove(), vec![10, 16]); in test_entry_insert_vacant()
[all …]
/external/rust/crates/glob/tests/
Dglob-std.rs82 assert_eq!( in main()
95 assert_eq!( in main()
107 assert_eq!( in main()
127 assert_eq!( in main()
141 assert_eq!( in main()
151 assert_eq!( in main()
160 assert_eq!( in main()
168 assert_eq!(glob_vec(""), Vec::<PathBuf>::new()); in main()
169 assert_eq!(glob_vec("."), vec!(PathBuf::from("."))); in main()
170 assert_eq!(glob_vec(".."), vec!(PathBuf::from(".."))); in main()
[all …]
/external/rust/crates/chrono/src/format/
Dstrftime.rs497 assert_eq!(parse_and_collect(""), []); in test_strftime_items()
498 assert_eq!(parse_and_collect(" \t\n\r "), [sp!(" \t\n\r ")]); in test_strftime_items()
499 assert_eq!(parse_and_collect("hello?"), [lit!("hello?")]); in test_strftime_items()
500 assert_eq!( in test_strftime_items()
504 assert_eq!(parse_and_collect("100%%"), [lit!("100"), lit!("%")]); in test_strftime_items()
505 assert_eq!(parse_and_collect("100%% ok"), [lit!("100"), lit!("%"), sp!(" "), lit!("ok")]); in test_strftime_items()
506 assert_eq!(parse_and_collect("%%PDF-1.0"), [lit!("%"), lit!("PDF-1.0")]); in test_strftime_items()
507 assert_eq!( in test_strftime_items()
511 assert_eq!(parse_and_collect("[%F]"), parse_and_collect("[%Y-%m-%d]")); in test_strftime_items()
512 assert_eq!(parse_and_collect("%m %d"), [num0!(Month), sp!(" "), num0!(Day)]); in test_strftime_items()
[all …]
/external/rust/crates/managed/src/
Dmap.rs518 assert_eq!(map.len(), 0); in test_clear()
519 assert_eq!(unwrap(&map), all_pairs_empty()); in test_clear()
526 assert_eq!(map.len(), 4); in test_get_some()
527 assert_eq!(map.get("a"), Some(&1)); in test_get_some()
528 assert_eq!(map.get("b"), Some(&2)); in test_get_some()
529 assert_eq!(map.get("c"), Some(&3)); in test_get_some()
530 assert_eq!(map.get("d"), Some(&4)); in test_get_some()
537 assert_eq!(map.len(), 1); in test_get_some_one_pair()
538 assert_eq!(map.get("a"), Some(&1)); in test_get_some_one_pair()
545 assert_eq!(map.len(), 4); in test_get_none_full()
[all …]
/external/rust/crates/bytes/tests/
Dtest_bytes.rs25 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()
[all …]
/external/rust/crates/itertools/tests/
Dtuples.rs7 assert_eq!(Some((1,)), iter.next()); in tuples()
8 assert_eq!(Some((2,)), iter.next()); in tuples()
9 assert_eq!(Some((3,)), iter.next()); in tuples()
10 assert_eq!(Some((4,)), iter.next()); in tuples()
11 assert_eq!(Some((5,)), iter.next()); in tuples()
12 assert_eq!(None, iter.next()); in tuples()
13 assert_eq!(None, iter.into_buffer().next()); in tuples()
16 assert_eq!(Some((1, 2)), iter.next()); in tuples()
17 assert_eq!(Some((3, 4)), iter.next()); in tuples()
18 assert_eq!(None, iter.next()); in tuples()
[all …]
/external/rust/crates/chrono/src/
Dround.rs279 assert_eq!(dt.round_subsecs(10), dt); in test_round_subsecs()
280 assert_eq!(dt.round_subsecs(9), dt); in test_round_subsecs()
281 assert_eq!(dt.round_subsecs(8).nanosecond(), 084_660_680); in test_round_subsecs()
282 assert_eq!(dt.round_subsecs(7).nanosecond(), 084_660_700); in test_round_subsecs()
283 assert_eq!(dt.round_subsecs(6).nanosecond(), 084_661_000); in test_round_subsecs()
284 assert_eq!(dt.round_subsecs(5).nanosecond(), 084_660_000); in test_round_subsecs()
285 assert_eq!(dt.round_subsecs(4).nanosecond(), 084_700_000); in test_round_subsecs()
286 assert_eq!(dt.round_subsecs(3).nanosecond(), 085_000_000); in test_round_subsecs()
287 assert_eq!(dt.round_subsecs(2).nanosecond(), 080_000_000); in test_round_subsecs()
288 assert_eq!(dt.round_subsecs(1).nanosecond(), 100_000_000); in test_round_subsecs()
[all …]
/external/rust/crates/hashlink/tests/
Dlinked_hash_map.rs45 assert_eq!(10, map[&1]); in test_index()
47 assert_eq!(22, map[&2]); in test_index()
55 assert_eq!(map.get(&1), Some(&10)); in test_insert_and_get()
56 assert_eq!(map.get(&2), Some(&20)); in test_insert_and_get()
57 assert_eq!(map.len(), 2); in test_insert_and_get()
65 assert_eq!(map.get(&"1".to_string()), Some(&vec![10, 19])); in test_insert_update()
66 assert_eq!(map.len(), 1); in test_insert_update()
74 assert_eq!(*e.insert(vec![10, 10]), vec![10, 10]); in test_entry_insert_vacant()
79 assert_eq!(map["1"], vec![10, 10]); in test_entry_insert_vacant()
83 assert_eq!(*e.get(), vec![10, 10]); in test_entry_insert_vacant()
[all …]
/external/rust/crates/crossbeam-deque/tests/
Dsteal.rs12 assert_eq!(s.steal(), Success(1)); in steal_fifo()
13 assert_eq!(s.steal(), Success(2)); in steal_fifo()
14 assert_eq!(s.steal(), Success(3)); in steal_fifo()
25 assert_eq!(s.steal(), Success(1)); in steal_lifo()
26 assert_eq!(s.steal(), Success(2)); in steal_lifo()
27 assert_eq!(s.steal(), Success(3)); in steal_lifo()
37 assert_eq!(q.steal(), Success(1)); in steal_injector()
38 assert_eq!(q.steal(), Success(2)); in steal_injector()
39 assert_eq!(q.steal(), Success(3)); in steal_injector()
52 assert_eq!(s.steal_batch(&w2), Success(())); in steal_batch_fifo_fifo()
[all …]

12345678910>>...46