Home
last modified time | relevance | path

Searched refs:from_bytes (Results 1 – 25 of 106) sorted by relevance

12345

/external/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.string/
Dfrom_bytes.pass.cpp40 std::wstring ws = myconv.from_bytes('a'); in test()
42 ws = myconv.from_bytes(bs.c_str()); in test()
44 ws = myconv.from_bytes(bs); in test()
46 ws = myconv.from_bytes(bs.data(), bs.data() + bs.size()); in test()
48 ws = myconv.from_bytes(""); in test()
59 std::wstring ws = myconv.from_bytes('a'); in test()
61 ws = myconv.from_bytes(bs.c_str()); in test()
63 ws = myconv.from_bytes(bs); in test()
65 ws = myconv.from_bytes(bs.data(), bs.data() + bs.size()); in test()
67 ws = myconv.from_bytes(""); in test()
Dctor_err_string.pass.cpp44 TEST_IGNORE_NODISCARD myconv.from_bytes('\xA5'); in main()
59 TEST_IGNORE_NODISCARD myconv.from_bytes('\xA5'); in main()
71 std::wstring ws = myconv.from_bytes('\xA5'); in main()
/external/llvm-project/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.string/
Dfrom_bytes.pass.cpp41 std::wstring ws = myconv.from_bytes('a'); in test()
43 ws = myconv.from_bytes(bs.c_str()); in test()
45 ws = myconv.from_bytes(bs); in test()
47 ws = myconv.from_bytes(bs.data(), bs.data() + bs.size()); in test()
49 ws = myconv.from_bytes(""); in test()
60 std::wstring ws = myconv.from_bytes('a'); in test()
62 ws = myconv.from_bytes(bs.c_str()); in test()
64 ws = myconv.from_bytes(bs); in test()
66 ws = myconv.from_bytes(bs.data(), bs.data() + bs.size()); in test()
68 ws = myconv.from_bytes(""); in test()
Dctor_err_string.pass.cpp43 TEST_IGNORE_NODISCARD myconv.from_bytes('\xA5'); in main()
58 TEST_IGNORE_NODISCARD myconv.from_bytes('\xA5'); in main()
70 std::wstring ws = myconv.from_bytes('\xA5'); in main()
Dconverted.pass.cpp44 std::wstring ws = myconv.from_bytes("\xE1\x80\x85"); in test()
61 std::wstring ws = myconv.from_bytes("\xF1\x80\x80\x83"); in test()
/external/rust/crates/quiche/src/
Dframe.rs149 pub fn from_bytes( in from_bytes() method
1117 assert_eq!(Frame::from_bytes(&mut b, packet::Type::Short), Ok(frame)); in padding()
1120 assert!(Frame::from_bytes(&mut b, packet::Type::Initial).is_ok()); in padding()
1123 assert!(Frame::from_bytes(&mut b, packet::Type::ZeroRTT).is_ok()); in padding()
1126 assert!(Frame::from_bytes(&mut b, packet::Type::Handshake).is_ok()); in padding()
1144 assert_eq!(Frame::from_bytes(&mut b, packet::Type::Short), Ok(frame)); in ping()
1147 assert!(Frame::from_bytes(&mut b, packet::Type::ZeroRTT).is_ok()); in ping()
1150 assert!(Frame::from_bytes(&mut b, packet::Type::Initial).is_ok()); in ping()
1153 assert!(Frame::from_bytes(&mut b, packet::Type::Handshake).is_ok()); in ping()
1179 assert_eq!(Frame::from_bytes(&mut b, packet::Type::Short), Ok(frame)); in ack()
[all …]
/external/python/pyasn1/tests/compat/
Dtest_integer.py24 assert 0 == integer.from_bytes(bytes([0]), signed=False)
27 assert -66051 == integer.from_bytes(bytes([254, 253, 253]), signed=True)
30 assert 66051 == integer.from_bytes(bytes([0, 1, 2, 3]), signed=False)
33 assert 0 == integer.from_bytes(bytes([]))
38 assert 0 == integer.from_bytes('\x00', signed=False)
41 assert -66051 == integer.from_bytes('\xfe\xfd\xfd', signed=True)
44 assert 66051 == integer.from_bytes('\x01\x02\x03', signed=False)
47 assert 0 == integer.from_bytes('')
/external/rust/crates/uuid/src/builder/
Dmod.rs44 Uuid::from_bytes([0; 16]) in nil()
84 Ok(Uuid::from_bytes([ in from_fields()
141 Ok(Uuid::from_bytes([ in from_fields_le()
163 Uuid::from_bytes([ in from_u128()
185 Uuid::from_bytes([ in from_u128_le()
251 Ok(Uuid::from_bytes(bytes)) in from_slice()
255 pub const fn from_bytes(bytes: Bytes) -> Uuid { in from_bytes() method
311 pub const fn from_bytes(b: Bytes) -> Self { in from_bytes() method
358 Ok(Self::from_bytes(bytes)) in from_slice()
402 crate::Builder::from_bytes(bytes) in from_fields()
[all …]
/external/rust/crates/clap/src/
Dosstringext.rs9 fn from_bytes(b: &[u8]) -> &Self; in from_bytes() method
92 fn from_bytes(b: &[u8]) -> &Self { in from_bytes() method
133 OsStr::from_bytes(&self.as_bytes()[..i]), in split_at_byte()
134 OsStr::from_bytes(&self.as_bytes()[i + 1..]), in split_at_byte()
140 OsStr::from_bytes(&self.as_bytes()[self.len()..self.len()]), in split_at_byte()
148 return OsStr::from_bytes(&self.as_bytes()[i..]); in trim_left_matches()
154 return OsStr::from_bytes(&self.as_bytes()[self.len()..]); in trim_left_matches()
161 OsStr::from_bytes(&self.as_bytes()[..i]), in split_at()
162 OsStr::from_bytes(&self.as_bytes()[i..]), in split_at()
195 return Some(OsStr::from_bytes(&self.val[start..self.pos - 1])); in next()
[all …]
/external/rust/crates/quiche/src/h3/
Dframe.rs81 pub fn from_bytes( in from_bytes() method
355 Frame::from_bytes( in data()
383 Frame::from_bytes( in headers()
410 Frame::from_bytes( in cancel_push()
442 Frame::from_bytes( in settings_all_no_grease()
482 Frame::from_bytes( in settings_all_grease()
514 Frame::from_bytes( in settings_h3_only()
546 Frame::from_bytes( in settings_qpack_only()
577 Frame::from_bytes( in push_promise()
604 Frame::from_bytes( in goaway()
[all …]
/external/rust/crates/protobuf/benches/
Dcoded_input_stream.rs27 let mut is = CodedInputStream::from_bytes(test::black_box(&v)); in read_byte()
38 let mut is = CodedInputStream::from_bytes(test::black_box(&v)); in read_byte_no_eof()
74 let mut is = CodedInputStream::from_bytes(test::black_box(&v)); in read_varint_12()
96 let mut is = CodedInputStream::from_bytes(test::black_box(&v)); in read_varint_1()
/external/python/cpython3/Lib/test/
Dtest_long.py1197 int.from_bytes(test, byteorder, signed=signed),
1291 self.assertIs(type(myint.from_bytes(b'\x00', 'big')), myint)
1292 self.assertEqual(myint.from_bytes(b'\x01', 'big'), 1)
1294 type(myint.from_bytes(b'\x00', 'big', signed=False)), myint)
1295 self.assertEqual(myint.from_bytes(b'\x01', 'big', signed=False), 1)
1296 self.assertIs(type(myint.from_bytes(b'\x00', 'little')), myint)
1297 self.assertEqual(myint.from_bytes(b'\x01', 'little'), 1)
1298 self.assertIs(type(myint.from_bytes(
1300 self.assertEqual(myint.from_bytes(b'\x01', 'little', signed=False), 1)
1302 int.from_bytes([255, 0, 0], 'big', signed=True), -65536)
[all …]
/external/rust/crates/uuid/src/
Dtest_util.rs15 Uuid::from_bytes([ in new()
22 Uuid::from_bytes([ in new2()
/external/python/pyasn1/pyasn1/compat/
Dinteger.py25 def from_bytes(octets, signed=False): function
98 def from_bytes(octets, signed=False): function
99 return int.from_bytes(bytes(octets), 'big', signed=signed)
/external/python/httplib2/tests/
Dtest_http.py100 reflected = tests.HttpRequest.from_bytes(content)
110 reflected = tests.HttpRequest.from_bytes(content)
122 reflected = tests.HttpRequest.from_bytes(content)
152 reflected = tests.HttpRequest.from_bytes(content)
162 reflected = tests.HttpRequest.from_bytes(content)
419 reflected = tests.HttpRequest.from_bytes(content)
437 reflected = tests.HttpRequest.from_bytes(content)
507 reflected = tests.HttpRequest.from_bytes(content)
517 reflected = tests.HttpRequest.from_bytes(content)
536 reflected = tests.HttpRequest.from_bytes(content)
[all …]
/external/python/cpython3/Lib/
Dhashlib.py229 from_bytes = int.from_bytes
233 rkey = int.from_bytes(prev, 'big')
237 rkey ^= from_bytes(prev, 'big')
/external/rust/crates/bstr/src/unicode/fsm/
Dwhitespace_anchored_fwd.rs21 unsafe { ::regex_automata::DenseDFA::from_bytes(&ALIGNED.bytes) }
39 unsafe { ::regex_automata::DenseDFA::from_bytes(&ALIGNED.bytes) }
Dregional_indicator_rev.rs21 unsafe { ::regex_automata::DenseDFA::from_bytes(&ALIGNED.bytes) }
39 unsafe { ::regex_automata::DenseDFA::from_bytes(&ALIGNED.bytes) }
Dgrapheme_break_fwd.rs21 unsafe { ::regex_automata::SparseDFA::from_bytes(&ALIGNED.bytes) }
39 unsafe { ::regex_automata::SparseDFA::from_bytes(&ALIGNED.bytes) }
Dsimple_word_fwd.rs21 unsafe { ::regex_automata::SparseDFA::from_bytes(&ALIGNED.bytes) }
39 unsafe { ::regex_automata::SparseDFA::from_bytes(&ALIGNED.bytes) }
Dwhitespace_anchored_rev.rs21 unsafe { ::regex_automata::DenseDFA::from_bytes(&ALIGNED.bytes) }
39 unsafe { ::regex_automata::DenseDFA::from_bytes(&ALIGNED.bytes) }
Dword_break_fwd.rs21 unsafe { ::regex_automata::SparseDFA::from_bytes(&ALIGNED.bytes) }
39 unsafe { ::regex_automata::SparseDFA::from_bytes(&ALIGNED.bytes) }
Dsentence_break_fwd.rs21 unsafe { ::regex_automata::SparseDFA::from_bytes(&ALIGNED.bytes) }
39 unsafe { ::regex_automata::SparseDFA::from_bytes(&ALIGNED.bytes) }
Dgrapheme_break_rev.rs21 unsafe { ::regex_automata::SparseDFA::from_bytes(&ALIGNED.bytes) }
39 unsafe { ::regex_automata::SparseDFA::from_bytes(&ALIGNED.bytes) }
/external/rust/crates/bstr/src/
Dbstr.rs38 BStr::from_bytes(bytes.as_ref()) in new()
49 pub(crate) fn from_bytes(slice: &[u8]) -> &BStr { in from_bytes() method

12345