Home
last modified time | relevance | path

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

12

/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()
Dconverted.pass.cpp43 std::wstring ws = myconv.from_bytes("\xE1\x80\x85"); in test()
60 std::wstring ws = myconv.from_bytes("\xF1\x80\x80\x83"); in test()
/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/python/cpython3/Lib/test/
Dtest_long.py1189 int.from_bytes(test, byteorder, signed=signed),
1283 self.assertIs(type(myint.from_bytes(b'\x00', 'big')), myint)
1284 self.assertEqual(myint.from_bytes(b'\x01', 'big'), 1)
1286 type(myint.from_bytes(b'\x00', 'big', signed=False)), myint)
1287 self.assertEqual(myint.from_bytes(b'\x01', 'big', signed=False), 1)
1288 self.assertIs(type(myint.from_bytes(b'\x00', 'little')), myint)
1289 self.assertEqual(myint.from_bytes(b'\x01', 'little'), 1)
1290 self.assertIs(type(myint.from_bytes(
1292 self.assertEqual(myint.from_bytes(b'\x01', 'little', signed=False), 1)
1294 int.from_bytes([255, 0, 0], 'big', signed=True), -65536)
[all …]
Dtest_call.py161 self.assertRaisesRegex(TypeError, msg, int.from_bytes, b'a', 'little', False)
340 (int.from_bytes, (b'\x01\x00', 'little'), 1),
363 (int.from_bytes, (b'\x01\x00',), {'byteorder': 'little'}, 1),
364 (int.from_bytes, (), {'bytes': b'\x01\x00', 'byteorder': 'little'}, 1),
Dtest_bool.py329 self.assertIs(bool.from_bytes(b'\x00'*8, 'big'), False)
330 self.assertIs(bool.from_bytes(b'abcd', 'little'), True)
Dtest_compileall.py552 self.assertEqual(int.from_bytes(data[4:8], 'little'), 0b11)
556 self.assertEqual(int.from_bytes(data[4:8], 'little'), 0b01)
Dtest_audioop.py9 return [int.from_bytes(data[i: i + width], sys.byteorder, signed=True)
/external/python/httplib2/tests/
Dtest_http.py102 reflected = tests.HttpRequest.from_bytes(content)
112 reflected = tests.HttpRequest.from_bytes(content)
124 reflected = tests.HttpRequest.from_bytes(content)
154 reflected = tests.HttpRequest.from_bytes(content)
164 reflected = tests.HttpRequest.from_bytes(content)
421 reflected = tests.HttpRequest.from_bytes(content)
439 reflected = tests.HttpRequest.from_bytes(content)
509 reflected = tests.HttpRequest.from_bytes(content)
519 reflected = tests.HttpRequest.from_bytes(content)
538 reflected = tests.HttpRequest.from_bytes(content)
[all …]
D__init__.py154 def from_bytes(cls, bs): member in HttpMessage
488 response = HttpResponse.from_bytes(response_bytes)
/external/python/cpython3/Lib/
Dhashlib.py219 from_bytes = int.from_bytes
223 rkey = int.from_bytes(prev, 'big')
227 rkey ^= from_bytes(prev, 'big')
Dbase64.py160 from_bytes = int.from_bytes
163 c = from_bytes(s[i: i + 5], 'big')
Drandom.py124 a = int.from_bytes(a, 'big')
679 return (int.from_bytes(_urandom(7), 'big') >> 3) * RECIP_BPF
688 x = int.from_bytes(_urandom(numbytes), 'big')
Duuid.py171 int = int_.from_bytes(bytes, byteorder='big')
544 mac = int.from_bytes(bytes, 'big')
Dipaddress.py1138 return int.from_bytes(map(cls._parse_octet, octets), 'big')
1293 self._ip = int.from_bytes(address, 'big')
1909 self._ip = int.from_bytes(address, 'big')
Dplistlib.py584 return tuple(int.from_bytes(data[i: i + size], 'big')
621 result = int.from_bytes(self._fp.read(1 << tokenL),
/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/libcxx/test/libcxx/localization/locales/locale.convenience/conversions/conversions.string/
Dctor_move.pass.cpp32 myconv.from_bytes("\xF1\x80\x80\x83"); in main()
/external/libcxx/test/support/
Dplatform_support.h107 return std::wstring_convert<std::codecvt_utf8_utf16<wchar_t> >().from_bytes( in get_wide_temp_file_name()
/external/python/cpython3/Lib/test/test_importlib/source/
Dtest_file_loader.py266 self.assertEqual(int.from_bytes(data[4:8], 'little'), 0b11)
321 self.assertEqual(int.from_bytes(data[4:8], 'little'), 0b1)
352 self.assertEqual(int.from_bytes(data[4:8], 'little'), 0b1)
/external/libcxx/include/
Dlocale104 wide_string from_bytes(char byte);
105 wide_string from_bytes(const char* ptr);
106 wide_string from_bytes(const byte_string& str);
107 wide_string from_bytes(const char* first, const char* last);
3671 wide_string from_bytes(char __byte)
3672 {return from_bytes(&__byte, &__byte+1);}
3674 wide_string from_bytes(const char* __ptr)
3675 {return from_bytes(__ptr, __ptr + char_traits<char>::length(__ptr));}
3677 wide_string from_bytes(const byte_string& __str)
3678 {return from_bytes(__str.data(), __str.data() + __str.size());}
[all …]
/external/python/cpython3/Lib/importlib/
D_bootstrap_external.py53 return int.from_bytes(int_bytes, 'little')
260 _RAW_MAGIC_NUMBER = int.from_bytes(MAGIC_NUMBER, 'little') # For import.c
/external/python/pyasn1/pyasn1/codec/ber/
Ddecoder.py10 from pyasn1.compat.integer import from_bytes
114 value = from_bytes(head, signed=True)
/external/python/cpython3/Lib/test/test_importlib/
Dtest_util.py793 actual = int.from_bytes(importlib.util.MAGIC_NUMBER[:2], 'little')

12