/third_party/rust/crates/minimal-lexical/tests/ |
D | lemire_tests.rs | 41 assert_eq!(compute_error32(0, 16777216), (111 + f32::INVALID_FP, 9223372036854775808)); in compute_error32_test() 42 assert_eq!(compute_error32(0, 16777217), (111 + f32::INVALID_FP, 9223372586610589696)); in compute_error32_test() 43 assert_eq!(compute_error32(0, 16777218), (111 + f32::INVALID_FP, 9223373136366403584)); in compute_error32_test() 44 assert_eq!(compute_error32(0, 16777219), (111 + f32::INVALID_FP, 9223373686122217472)); in compute_error32_test() 45 assert_eq!(compute_error32(0, 16777220), (111 + f32::INVALID_FP, 9223374235878031360)); in compute_error32_test() 49 assert_eq!( in compute_error32_test() 53 assert_eq!( in compute_error32_test() 57 assert_eq!( in compute_error32_test() 62 assert_eq!( in compute_error32_test() 66 assert_eq!( in compute_error32_test() [all …]
|
D | vec_tests.rs | 19 assert_eq!(x.len(), 1); in simple_test() 20 assert_eq!(x.is_empty(), false); in simple_test() 21 assert_eq!(x.capacity(), bigint::BIGINT_LIMBS); in simple_test() 23 assert_eq!(x.len(), 2); in simple_test() 24 assert_eq!(x.pop(), Some(5)); in simple_test() 25 assert_eq!(x.len(), 1); in simple_test() 26 assert_eq!(&*x, &[1]); in simple_test() 28 assert_eq!(x.len(), 4); in simple_test() 29 assert_eq!(&*x, &[1, 2, 3, 4]); in simple_test() 31 assert_eq!(x.len(), 6); in simple_test() [all …]
|
D | slow_tests.rs | 22 assert_eq!(b(1e-45_f32), (1, -149)); in b_test() 23 assert_eq!(b(5e-324_f64), (1, -1074)); in b_test() 24 assert_eq!(b(1e-323_f64), (2, -1074)); in b_test() 25 assert_eq!(b(2e-323_f64), (4, -1074)); in b_test() 26 assert_eq!(b(3e-323_f64), (6, -1074)); in b_test() 27 assert_eq!(b(4e-323_f64), (8, -1074)); in b_test() 28 assert_eq!(b(5e-323_f64), (10, -1074)); in b_test() 29 assert_eq!(b(6e-323_f64), (12, -1074)); in b_test() 30 assert_eq!(b(7e-323_f64), (14, -1074)); in b_test() 31 assert_eq!(b(8e-323_f64), (16, -1074)); in b_test() [all …]
|
D | number_tests.rs | 10 assert_eq!(number.is_fast_path::<f32>(), true); in is_fast_path_test() 11 assert_eq!(number.is_fast_path::<f64>(), true); in is_fast_path_test() 14 assert_eq!(number.is_fast_path::<f32>(), false); in is_fast_path_test() 15 assert_eq!(number.is_fast_path::<f64>(), true); in is_fast_path_test() 18 assert_eq!(number.is_fast_path::<f32>(), false); in is_fast_path_test() 19 assert_eq!(number.is_fast_path::<f64>(), false); in is_fast_path_test() 22 assert_eq!(number.is_fast_path::<f32>(), false); in is_fast_path_test() 23 assert_eq!(number.is_fast_path::<f64>(), true); in is_fast_path_test() 26 assert_eq!(number.is_fast_path::<f32>(), false); in is_fast_path_test() 27 assert_eq!(number.is_fast_path::<f64>(), true); in is_fast_path_test() [all …]
|
D | bellerophon_tests.rs | 176 assert_eq!(compute_float32(0, 16777216), (151, 0)); in compute_float_f32_test() 177 assert_eq!(compute_float32(0, 16777217), (111 + f32::INVALID_FP, 9223372586610589696)); in compute_float_f32_test() 178 assert_eq!(compute_float32(0, 16777218), (151, 1)); in compute_float_f32_test() 179 assert_eq!(compute_float32(0, 16777219), (111 + f32::INVALID_FP, 9223373686122217472)); in compute_float_f32_test() 180 assert_eq!(compute_float32(0, 16777220), (151, 2)); in compute_float_f32_test() 184 assert_eq!(compute_float32(-10, 167772160000000000), (151, 0)); in compute_float_f32_test() 185 assert_eq!( in compute_float_f32_test() 189 assert_eq!(compute_float32(-10, 167772180000000000), (151, 1)); in compute_float_f32_test() 191 assert_eq!( in compute_float_f32_test() 195 assert_eq!(compute_float32(-10, 167772200000000000), (151, 2)); in compute_float_f32_test() [all …]
|
/third_party/rust/crates/rustix/tests/path/ |
D | arg.rs | 16 assert_eq!("hello", t.as_str().unwrap()); in test_arg() 17 assert_eq!("hello".to_owned(), Arg::to_string_lossy(&t)); in test_arg() 18 assert_eq!(cstr!("hello"), Borrow::borrow(&t.as_cow_c_str().unwrap())); in test_arg() 19 assert_eq!(cstr!("hello"), Borrow::borrow(&t.into_c_str().unwrap())); in test_arg() 22 assert_eq!("hello", Arg::as_str(&t).unwrap()); in test_arg() 23 assert_eq!("hello".to_owned(), Arg::to_string_lossy(&t)); in test_arg() 24 assert_eq!(cstr!("hello"), Borrow::borrow(&t.as_cow_c_str().unwrap())); in test_arg() 25 assert_eq!(cstr!("hello"), Borrow::borrow(&t.into_c_str().unwrap())); in test_arg() 28 assert_eq!("hello", t.as_str().unwrap()); in test_arg() 29 assert_eq!("hello".to_owned(), Arg::to_string_lossy(&t)); in test_arg() [all …]
|
/third_party/rust/crates/clap/tests/builder/ |
D | action.rs | 14 assert_eq!(matches.get_one::<String>("mammal"), None); in set() 15 assert_eq!(matches.contains_id("mammal"), false); in set() 16 assert_eq!(matches.index_of("mammal"), None); in set() 22 assert_eq!(matches.get_one::<String>("mammal").unwrap(), "dog"); in set() 23 assert_eq!(matches.contains_id("mammal"), true); in set() 24 assert_eq!(matches.index_of("mammal"), Some(2)); in set() 30 assert_eq!(err.kind(), ErrorKind::ArgumentConflict); in set() 37 assert_eq!(matches.get_one::<String>("mammal").unwrap(), "cat"); in set() 38 assert_eq!(matches.contains_id("mammal"), true); in set() 39 assert_eq!(matches.index_of("mammal"), Some(4)); in set() [all …]
|
/third_party/rust/crates/nom/src/bytes/ |
D | tests.rs | 26 assert_eq!(a_or_b(a), Ok((&b"cd"[..], &b"ab"[..]))); in is_a() 29 assert_eq!(a_or_b(b), Ok((&b"cde"[..], &b"b"[..]))); in is_a() 32 assert_eq!( in is_a() 38 assert_eq!(a_or_b(d), Ok((&b"cdef"[..], &b"ba"[..]))); in is_a() 50 assert_eq!(a_or_b(a), Ok((&b"ab"[..], &b"cd"[..]))); in is_not() 53 assert_eq!(a_or_b(b), Ok((&b"bde"[..], &b"c"[..]))); in is_not() 56 assert_eq!( in is_not() 62 assert_eq!(a_or_b(d), Ok((&b"ba"[..], &b"cdef"[..]))); in is_not() 65 assert_eq!(a_or_b(e), Err(Err::Incomplete(Needed::new(1)))); in is_not() 77 assert_eq!(esc(&b"abcd;"[..]), Ok((&b";"[..], &b"abcd"[..]))); in escaping() [all …]
|
/third_party/rust/crates/glob/tests/ |
D | glob-std.rs | 82 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 …]
|
/third_party/rust/crates/proc-macro2/tests/ |
D | test.rs | 14 assert_eq!( in idents() 18 assert_eq!(Ident::new("fn", Span::call_site()).to_string(), "fn"); in idents() 19 assert_eq!(Ident::new("_", Span::call_site()).to_string(), "_"); in idents() 24 assert_eq!( in raw_idents() 28 assert_eq!(Ident::new_raw("fn", Span::call_site()).to_string(), "r#fn"); in raw_idents() 99 assert_eq!(Literal::string("foo").to_string(), "\"foo\""); in literal_string() 100 assert_eq!(Literal::string("\"").to_string(), "\"\\\"\""); in literal_string() 101 assert_eq!(Literal::string("didn't").to_string(), "\"didn't\""); in literal_string() 102 assert_eq!( in literal_string() 137 assert_eq!(Literal::byte_string(b"").to_string(), "b\"\""); in literal_byte_string() [all …]
|
/third_party/rust/crates/clap/tests/ |
D | macros.rs | 5 assert_eq!(arg.get_id(), "foo"); in name_explicit() 6 assert_eq!(arg.get_long(), Some("bar")); in name_explicit() 7 assert_eq!(arg.get_value_names(), Some(vec!["NUM".into()].as_slice())); in name_explicit() 14 assert_eq!(arg.get_id(), "bar"); in name_from_long() 15 assert_eq!(arg.get_long(), Some("bar")); in name_from_long() 16 assert_eq!(arg.get_value_names(), Some(vec!["NUM".into()].as_slice())); in name_from_long() 23 assert_eq!(arg.get_id(), "NUM"); in name_from_value() 24 assert_eq!(arg.get_long(), None); in name_from_value() 25 assert_eq!(arg.get_value_names(), Some(vec!["NUM".into()].as_slice())); in name_from_value() 44 assert_eq!(arg.get_id(), "foo"); in short() [all …]
|
/third_party/rust/crates/bitflags/src/ |
D | lib.rs | 984 assert_eq!(Flags::empty().bits(), 0b00000000); in test_bits() 985 assert_eq!(Flags::A.bits(), 0b00000001); in test_bits() 986 assert_eq!(Flags::ABC.bits(), 0b00000111); in test_bits() 988 assert_eq!(AnotherSetOfFlags::empty().bits(), 0b00); in test_bits() 989 assert_eq!(AnotherSetOfFlags::ANOTHER_FLAG.bits(), !0_i8); in test_bits() 991 assert_eq!(EmptyFlags::empty().bits(), 0b00000000); in test_bits() 996 assert_eq!(Flags::from_bits(0), Some(Flags::empty())); in test_from_bits() 997 assert_eq!(Flags::from_bits(0b1), Some(Flags::A)); in test_from_bits() 998 assert_eq!(Flags::from_bits(0b10), Some(Flags::B)); in test_from_bits() 999 assert_eq!(Flags::from_bits(0b11), Some(Flags::A | Flags::B)); in test_from_bits() [all …]
|
/third_party/rust/crates/nom/src/multi/ |
D | tests.rs | 47 assert_eq!(multi(a), Ok((&b"ef"[..], res1))); in separated_list0_test() 49 assert_eq!(multi(b), Ok((&b"ef"[..], res2))); in separated_list0_test() 50 assert_eq!(multi(c), Ok((&b"azerty"[..], Vec::new()))); in separated_list0_test() 52 assert_eq!(multi_empty(d), Ok((&b"abc"[..], res3))); in separated_list0_test() 54 assert_eq!( in separated_list0_test() 62 assert_eq!(multi(e), Ok((&b",ef"[..], res4))); in separated_list0_test() 64 assert_eq!(multi(f), Err(Err::Incomplete(Needed::new(1)))); in separated_list0_test() 65 assert_eq!(multi_longsep(g), Err(Err::Incomplete(Needed::new(1)))); in separated_list0_test() 66 assert_eq!(multi(h), Err(Err::Incomplete(Needed::new(1)))); in separated_list0_test() 89 assert_eq!(multi(a), Ok((&b"ef"[..], res1))); in separated_list1_test() [all …]
|
/third_party/rust/crates/cxx/tests/ |
D | test.rs | 41 assert_eq!(2020, ffi::c_return_primitive()); in test_c_return() 42 assert_eq!(2020, ffi::c_return_shared().z); in test_c_return() 43 assert_eq!(2020, ffi::c_return_box().0); in test_c_return() 46 assert_eq!(2020, *ffi::c_return_ref(&shared)); in test_c_return() 47 assert_eq!(2020, *ffi::c_return_ns_ref(&ns_shared)); in test_c_return() 48 assert_eq!(2020, *ffi::c_return_nested_ns_ref(&nested_ns_shared)); in test_c_return() 49 assert_eq!("2020", ffi::c_return_str(&shared)); in test_c_return() 50 assert_eq!( in test_c_return() 54 assert_eq!("2020", ffi::c_return_rust_string()); in test_c_return() 55 assert_eq!("Hello \u{fffd}World", ffi::c_return_rust_string_lossy()); in test_c_return() [all …]
|
/third_party/rust/crates/nom/src/sequence/ |
D | tests.rs | 13 assert_eq!(parser("abc123def"), Ok(("123def", ("abc",)))); in single_element_tuples() 14 assert_eq!( in single_element_tuples() 81 assert_eq!( in complete() 93 assert_eq!( in pair_test() 97 assert_eq!( in pair_test() 101 assert_eq!( in pair_test() 105 assert_eq!( in pair_test() 109 assert_eq!( in pair_test() 113 assert_eq!( in pair_test() 125 assert_eq!( in separated_pair_test() [all …]
|
/third_party/rust/crates/regex/regex-syntax/src/hir/ |
D | translate.rs | 240 assert_eq!(self.trans().stack.borrow().len(), 1); in finish() 1376 assert_eq!(t(""), Hir::empty()); in empty() 1377 assert_eq!(t("(?i)"), Hir::empty()); in empty() 1378 assert_eq!(t("()"), hir_group(1, Hir::empty())); in empty() 1379 assert_eq!(t("(?:)"), hir_group_nocap(Hir::empty())); in empty() 1380 assert_eq!(t("(?P<wat>)"), hir_group_name(1, "wat", Hir::empty())); in empty() 1381 assert_eq!(t("|"), hir_alt(vec![Hir::empty(), Hir::empty()])); in empty() 1382 assert_eq!( in empty() 1389 assert_eq!( in empty() 1393 assert_eq!( in empty() [all …]
|
/third_party/rust/crates/unicode-width/src/ |
D | tests.rs | 117 assert_eq!(UnicodeWidthStr::width("hello"), 10); in test_str() 118 assert_eq!("hello".width_cjk(), 10); in test_str() 119 assert_eq!(UnicodeWidthStr::width("\0\0\0\x01\x01"), 0); in test_str() 120 assert_eq!("\0\0\0\x01\x01".width_cjk(), 0); in test_str() 121 assert_eq!(UnicodeWidthStr::width(""), 0); in test_str() 122 assert_eq!("".width_cjk(), 0); in test_str() 123 assert_eq!(UnicodeWidthStr::width("\u{2081}\u{2082}\u{2083}\u{2084}"), 4); in test_str() 124 assert_eq!("\u{2081}\u{2082}\u{2083}\u{2084}".width_cjk(), 8); in test_str() 132 assert_eq!(UnicodeWidthStr::width(""), 2); // Woman in test_emoji() 133 assert_eq!(UnicodeWidthStr::width(""), 2); // Microscope in test_emoji() [all …]
|
/third_party/rust/crates/strsim-rs/src/ |
D | lib.rs | 489 assert_eq!(Some(('a', 'b')), bi.next()); in bigrams_iterator() 490 assert_eq!(Some(('b', 'c')), bi.next()); in bigrams_iterator() 491 assert_eq!(Some(('c', 'd')), bi.next()); in bigrams_iterator() 492 assert_eq!(Some(('d', 'e')), bi.next()); in bigrams_iterator() 493 assert_eq!(None, bi.next()); in bigrams_iterator() 497 assert_eq!(Ok(dist), hamming(str1, str2)); in assert_hamming_dist() 512 assert_eq!(Ok(1), generic_hamming(&[1, 2, 4], &[1, 2, 3])); in hamming_numbers() 527 assert_eq!( in hamming_unequal_length() 540 assert_eq!(1.0, jaro("", "")); in jaro_both_empty() 545 assert_eq!(0.0, jaro("", "jaro")); in jaro_first_empty() [all …]
|
/third_party/rust/crates/once_cell/tests/ |
D | it.rs | 14 assert_eq!(c.get(), Some(&92)); in once_cell() 17 assert_eq!(c.get(), Some(&92)); in once_cell() 24 assert_eq!(cell.get(), Some(&12)); in once_cell_with_value() 33 assert_eq!(c.get_mut(), Some(&mut 92)); in once_cell_get_mut() 48 assert_eq!(DROP_CNT.load(SeqCst), 0); in once_cell_drop() 50 assert_eq!(DROP_CNT.load(SeqCst), 1); in once_cell_drop() 67 assert_eq!(c.get().map(String::as_str), Some("hello")); in clone() 72 assert_eq!(OnceCell::from("value").get(), Some(&"value")); in from_impl() 88 assert_eq!(cell.into_inner(), None); in into_inner() 91 assert_eq!(cell.into_inner(), Some("hello".to_string())); in into_inner() [all …]
|
/third_party/rust/crates/rustix/tests/process/ |
D | id.rs | 5 assert_eq!(process::getuid(), process::getuid()); in test_getuid() 7 assert_eq!(process::getuid().as_raw(), libc::getuid()); in test_getuid() 8 assert_eq!(process::getuid().is_root(), libc::getuid() == 0); in test_getuid() 14 assert_eq!(process::getgid(), process::getgid()); in test_getgid() 16 assert_eq!(process::getgid().as_raw(), libc::getgid()); in test_getgid() 17 assert_eq!(process::getgid().is_root(), libc::getgid() == 0); in test_getgid() 23 assert_eq!(process::geteuid(), process::geteuid()); in test_geteuid() 25 assert_eq!(process::geteuid().as_raw(), libc::geteuid()); in test_geteuid() 26 assert_eq!(process::geteuid().is_root(), libc::geteuid() == 0); in test_geteuid() 32 assert_eq!(process::getegid(), process::getegid()); in test_getegid() [all …]
|
/third_party/rust/crates/humantime/src/ |
D | duration.rs | 345 assert_eq!(parse_duration("17nsec"), Ok(Duration::new(0, 17))); in test_units() 346 assert_eq!(parse_duration("17nanos"), Ok(Duration::new(0, 17))); in test_units() 347 assert_eq!(parse_duration("33ns"), Ok(Duration::new(0, 33))); in test_units() 348 assert_eq!(parse_duration("3usec"), Ok(Duration::new(0, 3000))); in test_units() 349 assert_eq!(parse_duration("78us"), Ok(Duration::new(0, 78000))); in test_units() 350 assert_eq!(parse_duration("31msec"), Ok(Duration::new(0, 31_000_000))); in test_units() 351 assert_eq!(parse_duration("31millis"), Ok(Duration::new(0, 31_000_000))); in test_units() 352 assert_eq!(parse_duration("6ms"), Ok(Duration::new(0, 6_000_000))); in test_units() 353 assert_eq!(parse_duration("3000s"), Ok(Duration::new(3000, 0))); in test_units() 354 assert_eq!(parse_duration("300sec"), Ok(Duration::new(300, 0))); in test_units() [all …]
|
/third_party/rust/crates/lazycell/src/ |
D | lib.rs | 358 assert_eq!(value, None); in test_borrow_from_empty() 361 assert_eq!(value, None); in test_borrow_from_empty() 373 assert_eq!(value, Some(&1)); in test_fill_and_borrow() 376 assert_eq!(value, Some(1)); in test_fill_and_borrow() 385 assert_eq!(lazycell.borrow_mut(), Some(&mut 1)); in test_borrow_mut() 388 assert_eq!(lazycell.borrow_mut(), Some(&mut 2)); in test_borrow_mut() 400 assert_eq!(lazycell.fill(1), Err(1)); in test_already_filled_error() 408 assert_eq!(&1, value); in test_borrow_with() 417 assert_eq!(&1, value); in test_borrow_with_already_filled() 427 assert_eq!(&1, value); in test_borrow_with_not_called_when_filled() [all …]
|
/third_party/rust/crates/regex/tests/ |
D | api.rs | 4 assert_eq!(vec![(0, 0)], findall!(re, "")); in empty_regex_empty_match() 10 assert_eq!(vec![(0, 0), (1, 1), (2, 2), (3, 3)], findall!(re, "abc")); in empty_regex_nonempty_match() 16 assert_eq!(vec![(0, 0), (1, 2), (3, 4)], findall!(re, "a1b2")); in one_zero_length_match() 22 assert_eq!( in many_zero_length_match() 31 assert_eq!( in many_sequential_zero_length_match() 40 assert_eq!(vec![(0, 1), (1, 2)], findall!(re, "[]")); in quoted_bracket_set() 42 assert_eq!(vec![(0, 1), (1, 2)], findall!(re, "[]")); in quoted_bracket_set() 48 assert_eq!(vec![(0, 1), (1, 2)], findall!(re, "[]")); in first_range_starts_with_left_bracket() 54 assert_eq!(vec![(0, 1), (1, 2)], findall!(re, "[]")); in range_ends_with_escape() 60 assert_eq!(vec![(0, 0), (1, 1), (2, 2), (3, 3)], findall!(re, "abc")); in empty_match_find_iter() [all …]
|
/third_party/rust/crates/clap/tests/derive/ |
D | options.rs | 29 assert_eq!( in required_option() 33 assert_eq!( in required_option() 37 assert_eq!( in required_option() 41 assert_eq!( in required_option() 56 assert_eq!( in option_with_default() 60 assert_eq!( in option_with_default() 64 assert_eq!(Opt { arg: 42 }, Opt::try_parse_from(["test"]).unwrap()); in option_with_default() 75 assert_eq!( in option_with_raw_default() 79 assert_eq!( in option_with_raw_default() 83 assert_eq!(Opt { arg: 42 }, Opt::try_parse_from(["test"]).unwrap()); in option_with_raw_default() [all …]
|
/third_party/rust/crates/quote/tests/ |
D | test.rs | 43 assert_eq!(expected, tokens.to_string()); in test_quote_impl() 65 assert_eq!(expected, tokens.to_string()); in test_quote_spanned_impl() 75 assert_eq!(expected, tokens.to_string()); in test_substitution() 82 assert_eq!("X X X X", quote!(#(#primes)*).to_string()); in test_iter() 84 assert_eq!("X , X , X , X ,", quote!(#(#primes,)*).to_string()); in test_iter() 86 assert_eq!("X , X , X , X", quote!(#(#primes),*).to_string()); in test_iter() 162 assert_eq!(expected, tokens.to_string()); in test_advanced() 187 assert_eq!(expected, tokens.to_string()); in test_integer() 201 assert_eq!(expected, tokens.to_string()); in test_floating() 217 assert_eq!(expected, tokens.to_string()); in test_char() [all …]
|