Home
last modified time | relevance | path

Searched refs:from_u32 (Results 1 – 25 of 47) sorted by relevance

12

/external/rust/crates/serde_json/tests/lexical/
Dmath.rs22 pub(crate) fn from_u32(x: &[u32]) -> Vec<Limb> { in from_u32() function
27 pub(crate) fn from_u32(x: &[u32]) -> Vec<Limb> { in from_u32() function
44 data: from_u32(&[1]), in compare_test()
47 data: from_u32(&[2]), in compare_test()
55 data: from_u32(&[5, 1]), in compare_test()
58 data: from_u32(&[2]), in compare_test()
66 data: from_u32(&[5, 1, 9]), in compare_test()
69 data: from_u32(&[6, 2, 8]), in compare_test()
77 data: from_u32(&[0, 1, 9]), in compare_test()
80 data: from_u32(&[4294967295, 0, 9]), in compare_test()
[all …]
/external/rust/crates/openssl/src/
Ddsa.rs531 let p = BigNum::from_u32(283).unwrap(); in test_priv_key_from_parts()
532 let q = BigNum::from_u32(47).unwrap(); in test_priv_key_from_parts()
533 let g = BigNum::from_u32(60).unwrap(); in test_priv_key_from_parts()
534 let priv_key = BigNum::from_u32(15).unwrap(); in test_priv_key_from_parts()
535 let pub_key = BigNum::from_u32(207).unwrap(); in test_priv_key_from_parts()
538 assert_eq!(dsa.pub_key(), &BigNum::from_u32(207).unwrap()); in test_priv_key_from_parts()
539 assert_eq!(dsa.priv_key(), &BigNum::from_u32(15).unwrap()); in test_priv_key_from_parts()
540 assert_eq!(dsa.p(), &BigNum::from_u32(283).unwrap()); in test_priv_key_from_parts()
541 assert_eq!(dsa.q(), &BigNum::from_u32(47).unwrap()); in test_priv_key_from_parts()
542 assert_eq!(dsa.g(), &BigNum::from_u32(60).unwrap()); in test_priv_key_from_parts()
[all …]
Dbn.rs920 pub fn from_u32(n: u32) -> Result<BigNum, ErrorStack> { in from_u32() method
1373 let v0 = BigNum::from_u32(10_203_004).unwrap(); in test_to_from_slice()
1382 let a = BigNum::from_u32(909_829_283).unwrap(); in test_negation()
1390 let a = BigNum::from_u32(909_829_283).unwrap(); in test_shift()
1398 let range = BigNum::from_u32(909_829_283).unwrap(); in test_rand_range()
1401 assert!(result >= BigNum::from_u32(0).unwrap() && result < range); in test_rand_range()
1407 let range = BigNum::from_u32(909_829_283).unwrap(); in test_pseudo_rand_range()
1410 assert!(result >= BigNum::from_u32(0).unwrap() && result < range); in test_pseudo_rand_range()
1416 let a = BigNum::from_u32(19_029_017).unwrap(); in test_prime_numbers()
1429 let a = BigNum::from_u32(8).unwrap(); in test_secure_bn_ctx()
[all …]
Dasn1.rs681 roundtrip(BigNum::from_u32(1234).unwrap()); in bn_cvt()
682 roundtrip(-BigNum::from_u32(1234).unwrap()); in bn_cvt()
Drsa.rs528 let e = BigNum::from_u32(ffi::RSA_F4 as u32)?; in generate()
849 let e = BigNum::from_u32(0x10001).unwrap(); in generate_with_e()
/external/rust/crates/rayon/tests/
Dchars.rs6 let low = char::from_u32(0xD800 - 0x7).unwrap(); in half_open_correctness()
7 let high = char::from_u32(0xE000 + 0x7).unwrap(); in half_open_correctness()
24 let low = char::from_u32(0xD800 - 0x7).unwrap(); in closed_correctness()
25 let high = char::from_u32(0xE000 + 0x7).unwrap(); in closed_correctness()
/external/rust/crates/xml-rs/src/reader/parser/
Dinside_reference.rs35 … match u32::from_str_radix(num_str, 16).ok().map(|i| char::from_u32(i).unwrap_or('\u{fffd}')) { in inside_reference()
40 … match u32::from_str_radix(num_str, 16).ok().and_then(char::from_u32) { in inside_reference()
53 … match u32::from_str_radix(num_str, 10).ok().map(|i| char::from_u32(i).unwrap_or('\u{fffd}')) { in inside_reference()
59 … match u32::from_str_radix(num_str, 10).ok().and_then(char::from_u32) { in inside_reference()
/external/rust/crates/regex/src/
Dutf8.rs68 0x80..=0x7FF => char::from_u32(cp).map(|cp| (cp, 2)), in decode_utf8()
88 0x800..=0xFFFF => char::from_u32(cp).map(|cp| (cp, 3)), in decode_utf8()
111 0x10000..=0x0010_FFFF => char::from_u32(cp).map(|cp| (cp, 4)), in decode_utf8()
Dinput.rs350 match char::from_u32(self.0) { in fmt()
369 char::from_u32(self.0).map_or(1, |c| c.len_utf8()) in len_utf8()
380 char::from_u32(self.0).map_or(false, regex_syntax::is_word_character) in is_word_char()
387 match char::from_u32(self.0) { in is_word_byte()
/external/rust/crates/num-bigint/tests/
Dbiguint.rs1724 FromPrimitive::from_u32(1000000).unwrap(), in test_iter_sum()
1725 FromPrimitive::from_u32(200000).unwrap(), in test_iter_sum()
1726 FromPrimitive::from_u32(30000).unwrap(), in test_iter_sum()
1727 FromPrimitive::from_u32(4000).unwrap(), in test_iter_sum()
1728 FromPrimitive::from_u32(500).unwrap(), in test_iter_sum()
1729 FromPrimitive::from_u32(60).unwrap(), in test_iter_sum()
1730 FromPrimitive::from_u32(7).unwrap(), in test_iter_sum()
1740 FromPrimitive::from_u32(1001).unwrap(), in test_iter_product()
1741 FromPrimitive::from_u32(1002).unwrap(), in test_iter_product()
1742 FromPrimitive::from_u32(1003).unwrap(), in test_iter_product()
[all …]
/external/rust/crates/chrono/src/
Dlib.rs1097 Self::from_u32(n as u32) in from_u64()
1102 Self::from_u32(n as u32) in from_i64()
1106 fn from_u32(n: u32) -> Option<Month> { in from_u32() method
1459 let jan_opt = Month::from_u32(1); in test_month_enum_primitive_parse()
1462 let no_month = Month::from_u32(13); in test_month_enum_primitive_parse()
1469 assert_eq!(Month::from_u32(date.month()), Some(Month::October)); in test_month_enum_primitive_parse()
/external/rust/crates/regex-syntax/src/
Dutf8.rs437 let cs = char::from_u32(self.start).unwrap(); in encode()
438 let ce = char::from_u32(self.end).unwrap(); in encode()
496 let c = match char::from_u32(i) { in single_codepoint_one_sequence()
/external/rust/crates/zip/src/
Dcp437.rs170 ::std::char::from_u32(output).unwrap() in to_char()
/external/rust/crates/unicode-normalization/src/
Dtest.rs116 assert!(!is_combining_mark(char::from_u32(cp).unwrap())); in test_is_combining_mark_ascii()
Dstream_safe.rs146 let ch = match char::from_u32(ch) { in test_classify_nonstarters()
/external/rust/crates/unicode-xid/benches/
Dxid.rs56 range.filter_map(|i| std::char::from_u32(i)).collect() in chars()
/external/rust/crates/num-derive/tests/
Dnewtype.rs34 assert_eq!(MyFloat::from_u32(25), Some(MyFloat(25.0))); in test_from_primitive()
/external/rust/crates/cexpr/tests/
Dclang.rs71 write!(s, "{}", char::from_u32(chr).unwrap()).unwrap(); in test_definition()
93 .and_then(char::from_u32) in test_definition()
/external/rust/crates/num-traits/src/
Dcast.rs481 fn from_u32(n: u32) -> Option<Self> { in from_u32() method
567 fn from_u32(n: u32) -> Option<$T> {
665 fn from_u32(u32);
/external/rust/crates/regex-syntax/src/hir/
Dinterval.rs508 c => char::from_u32((c as u32).checked_add(1).unwrap()).unwrap(), in increment()
515 c => char::from_u32((c as u32).checked_sub(1).unwrap()).unwrap(), in decrement()
/external/rust/crates/idna/tests/
Duts46.rs161 match char::from_u32(((c1 * 16 + c2) * 16 + c3) * 16 + c4) { in unescape()
/external/rust/crates/rustc-demangle/src/
Dlegacy.rs164 .and_then(char::from_u32); in fmt()
/external/rust/crates/nom/tests/
Djson.rs56 std::char::from_u32, in unicode_escape()
/external/rust/crates/syn/src/
Dlit.rs1105 char::from_u32(u32::from(byte)).unwrap() in parse_lit_str_cooked()
1212 let ch = char::from_u32(u32::from(byte)).unwrap(); in parse_lit_byte_str_cooked()
1299 char::from_u32(u32::from(byte)).unwrap() in parse_lit_char()
1383 if let Some(ch) = char::from_u32(ch) { in backslash_u()
/external/rust/crates/litrs/src/
Descape.rs71 let c = std::char::from_u32(v) in unescape()

12