/packages/modules/Bluetooth/system/rust/src/gatt/server/transactions/helpers/ |
D | att_filter_by_size_type.rs | 33 let mut out = vec![]; in filter_read_attributes_by_size_type() 80 let db = TestAttDatabase::new(vec![( in test_single_matching_attr() 86 vec![4, 5], in test_single_matching_attr() 101 vec![AttributeWithValue { in test_single_matching_attr() 103 value: vec![4, 5], in test_single_matching_attr() 111 let db = TestAttDatabase::new(vec![ in test_skip_mismatching_attrs() 118 vec![4, 5], in test_skip_mismatching_attrs() 126 vec![5, 6], in test_skip_mismatching_attrs() 134 vec![6, 7], in test_skip_mismatching_attrs() 150 vec![ in test_skip_mismatching_attrs() [all …]
|
D | payload_accumulator.rs | 9 Self { curr: 0, lim: size, elems: vec![] } in new() 50 .push(att::Att { opcode: att::AttOpcode::WriteResponse, payload: vec![1, 2] }); in test_nonempty() 61 .push(att::Att { opcode: att::AttOpcode::WriteResponse, payload: vec![1, 2] }); in test_push_serialize() 66 [att::Att { opcode: att::AttOpcode::WriteResponse, payload: vec![1, 2] }] in test_push_serialize() 76 .push(att::Att { opcode: att::AttOpcode::WriteResponse, payload: vec![1, 2] }); in test_push_past_capacity() 78 .push(att::Att { opcode: att::AttOpcode::WriteResponse, payload: vec![3, 4] }); in test_push_past_capacity() 86 [att::Att { opcode: att::AttOpcode::WriteResponse, payload: vec![1, 2] }] in test_push_past_capacity() 96 .push(att::Att { opcode: att::AttOpcode::WriteResponse, payload: vec![1, 2] }); in test_push_to_capacity() 98 accumulator.push(att::Att { opcode: att::AttOpcode::WriteResponse, payload: vec![3] }); in test_push_to_capacity() 106 att::Att { opcode: att::AttOpcode::WriteResponse, payload: vec![1, 2] }, in test_push_to_capacity() [all …]
|
/packages/modules/Bluetooth/system/gd/rust/linux/dbus_projection/tests/ |
D | conversions.rs | 75 .flat_map(|(k, v)| vec![k as &dyn RefArg, v as &dyn RefArg].into_iter()), in as_iter() 109 items: vec![ in test_dbus_propmap_success() 115 items: vec![( in test_dbus_propmap_success() 121 (String::from("bytes"), wrap_variant(vec![1 as u8, 2, 3])), in test_dbus_propmap_success() 125 (String::from("key-0"), Box::new(vec![5, 6, 7, 8])), in test_dbus_propmap_success() 126 (String::from("key-1"), Box::new(vec![-5, -6, -7, -8])), in test_dbus_propmap_success() 131 wrap_variant(vec![ in test_dbus_propmap_success() 132 vec![ in test_dbus_propmap_success() 137 vec![String::from("string 1"), String::from("string 2")], in test_dbus_propmap_success() 142 wrap_variant(vec![FakeDictionary { in test_dbus_propmap_success() [all …]
|
/packages/modules/StatsD/statsd/benchmark/ |
D | data_structures_benchmark.cpp | 33 void benchmarkFunctionForVector(std::vector<ContainerType>& vec, int capacity) { in benchmarkFunctionForVector() argument 36 vec[i] = !result; in benchmarkFunctionForVector() 42 resultInt += vec[i]; in benchmarkFunctionForVector() 46 benchmark::DoNotOptimize(vec); in benchmarkFunctionForVector() 51 void benchmarkStdFillForVector(std::vector<ContainerType>& vec, int capacity) { in benchmarkStdFillForVector() argument 52 std::fill(vec.begin(), vec.end(), true); in benchmarkStdFillForVector() 55 resultInt += vec[i]; in benchmarkStdFillForVector() 59 benchmark::DoNotOptimize(vec); in benchmarkStdFillForVector() 91 std::vector<bool> vec(capacity); in BM_BasicVectorBoolUsage() local 94 benchmarkFunctionForVector<bool>(vec, capacity); in BM_BasicVectorBoolUsage() [all …]
|
/packages/modules/Bluetooth/system/rust/src/gatt/server/transactions/ |
D | read_by_group_type_request.rs | 104 let db = TestAttDatabase::new(vec![ in test_simple_grouping() 111 vec![4, 5], in test_simple_grouping() 119 vec![5, 6], in test_simple_grouping() 127 vec![6, 7], in test_simple_grouping() 143 data: vec![ in test_simple_grouping() 147 value: vec![4, 5], in test_simple_grouping() 152 value: vec![6, 7], in test_simple_grouping() 163 let db = TestAttDatabase::new(vec![]); in test_invalid_group_type() 188 let db = TestAttDatabase::new(vec![]); in test_range_validation() 213 let db = TestAttDatabase::new(vec![( in test_attribute_truncation() [all …]
|
D | read_by_type_request.rs | 88 let db = TestAttDatabase::new(vec![( in test_single_matching_attr() 94 vec![4, 5], in test_single_matching_attr() 109 data: vec![att::AttReadByTypeDataElement { in test_single_matching_attr() 111 value: vec![4, 5], in test_single_matching_attr() 121 let db = TestAttDatabase::new(vec![ in test_type_filtering() 128 vec![4, 5], in test_type_filtering() 136 vec![5, 6], in test_type_filtering() 144 vec![6, 7], in test_type_filtering() 161 data: vec![ in test_type_filtering() 164 value: vec![4, 5], in test_type_filtering() [all …]
|
D | find_information_request.rs | 102 let db = TestAttDatabase::new(vec![ in test_long_uuids() 109 vec![4, 5], in test_long_uuids() 117 vec![4, 5], in test_long_uuids() 125 vec![4, 5], in test_long_uuids() 140 data: vec![ in test_long_uuids() 158 let db = TestAttDatabase::new(vec![ in test_short_uuids() 165 vec![4, 5], in test_short_uuids() 173 vec![4, 5], in test_short_uuids() 181 vec![4, 5], in test_short_uuids() 196 data: vec![ in test_short_uuids() [all …]
|
D | read_request.rs | 38 TestAttDatabase::new(vec![( in make_db_with_handle_and_value() 59 let db = make_db_with_handle_and_value(3, vec![4, 5]); in test_simple_read() 63 assert_eq!(response, att::AttReadResponse { value: vec![4, 5] }.try_into()); in test_simple_read() 68 let db = make_db_with_handle_and_value(3, vec![4, 5]); in test_truncated_read() 74 assert_eq!(response, att::AttReadResponse { value: vec![4] }.try_into()); in test_truncated_read() 79 let db = make_db_with_handle_and_value(3, vec![4, 5]); in test_missed_read() 97 TestAttDatabase::new(vec![( in make_db_with_unreadable_handle() 103 vec![], in make_db_with_unreadable_handle()
|
/packages/modules/Bluetooth/system/gd/common/ |
D | circular_buffer_test.cc | 39 auto vec = buffer.Pull(); in TEST() local 41 ASSERT_STREQ("One", vec[0].entry.c_str()); in TEST() 42 ASSERT_STREQ("Two", vec[1].entry.c_str()); in TEST() 43 ASSERT_STREQ("Three", vec[2].entry.c_str()); in TEST() 57 auto vec = buffer.Drain(); in TEST() local 59 ASSERT_STREQ("One", vec[0].entry.c_str()); in TEST() 60 ASSERT_STREQ("Two", vec[1].entry.c_str()); in TEST() 61 ASSERT_STREQ("Three", vec[2].entry.c_str()); in TEST() 77 auto vec = buffer.Pull(); in TEST() local 79 for (auto v : vec) { in TEST() [all …]
|
D | sync_map_count.h | 37 std::vector<Item> vec; in Vectorize() local 39 vec.push_back(Item{it.first, it.second}); in Vectorize() 41 return vec; in Vectorize() 45 std::vector<Item> vec = Vectorize(); in GetSorted() local 46 sort(vec.begin(), vec.end(), in GetSorted() 48 return vec; in GetSorted()
|
/packages/modules/UprobeStats/rust/src/ |
D | guardrail.rs | 70 let config = setup_config(vec![setup_probe_config( in everything_allowed_on_userdebug() 73 vec![], in everything_allowed_on_userdebug() 82 let config = setup_config(vec![ in oom_adjuster_allowed() 86 vec!["int".to_string(), "boolean".to_string()], in oom_adjuster_allowed() 91 vec!["java.lang.String".to_string()], in oom_adjuster_allowed() 103 let config = setup_config(vec![setup_probe_config( in update_device_idle_temp_allowlist_allowed() 106 vec![], in update_device_idle_temp_allowlist_allowed() 123 let config = setup_config(vec![setup_probe_config( in oom_adjuster_with_suffix_disallowed() 126 vec![], in oom_adjuster_with_suffix_disallowed() 135 let config = setup_config(vec![ in disallowed_method_in_second_task_disallowed() [all …]
|
/packages/modules/Bluetooth/system/gd/rust/linux/utils/src/ |
D | adv_parser.rs | 136 let payload: Vec<u8> = vec![ in test_extract_flags() 165 let payload: Vec<u8> = vec![2, FLAGS, 3]; in test_extract_service_uuids() 169 let payload: Vec<u8> = vec![ in test_extract_service_uuids() 220 let payload: Vec<u8> = vec![ in test_extract_service_uuids() 274 let payload: Vec<u8> = vec![2, FLAGS, 3]; in test_extract_name() 278 let payload: Vec<u8> = vec![2, FLAGS, 3, 5, COMPLETE_LOCAL_NAME, 116, 101, 115, 116]; in test_extract_name() 282 let payload: Vec<u8> = vec![2, FLAGS, 3, 5, SHORTENED_LOCAL_NAME, 116, 101, 115, 116]; in test_extract_name() 289 let payload: Vec<u8> = vec![2, FLAGS, 3]; in test_extract_service_data() 293 let payload: Vec<u8> = vec![ in test_extract_service_data() 350 assert_eq!(service_data.get(&expected_uuid), Some(&vec![0xFF])); in test_extract_service_data() [all …]
|
/packages/modules/Virtualization/android/virtualizationservice/src/ |
D | maintenance.rs | 324 Ok(vec![]) in processSecretManagementRequest() 396 vec![ in test_sk_state_batching() 397 SkOp::DeleteIds(vec![VM_ID1, VM_ID2]), in test_sk_state_batching() 398 SkOp::DeleteIds(vec![VM_ID3, VM_ID4]), in test_sk_state_batching() 399 SkOp::DeleteIds(vec![VM_ID5]), in test_sk_state_batching() 410 assert_eq!(got, vec![SkOp::DeleteIds(vec![VM_ID1, VM_ID2, VM_ID3, VM_ID4, VM_ID5])]); in test_sk_state_no_batching() 423 assert_eq!((*history.lock().unwrap()).clone(), vec![]); in test_sk_state() 426 assert_eq!((*history.lock().unwrap()).clone(), vec![SkOp::DeleteIds(vec![VM_ID3])]); in test_sk_state() 431 vec![SkOp::DeleteIds(vec![VM_ID3]), SkOp::DeleteIds(vec![VM_ID4, VM_ID5]),] in test_sk_state() 434 assert_eq!(vec![VM_ID1, VM_ID2], get_db(&mut sk_state).vm_ids_for_user(USER1).unwrap()); in test_sk_state() [all …]
|
/packages/modules/Uwb/service/fusion_lib/tests/com/android/uwb/fusion/math/ |
D | AoaVectorTest.java | 37 AoaVector vec = AoaVector.fromDegrees(90, 90, 1); in testCtorScaleDown() local 38 assertClose(vec.elevation, Math.PI / 4); in testCtorScaleDown() 39 assertClose(vec.azimuth, Math.PI / 4); in testCtorScaleDown() 41 vec = AoaVector.fromDegrees(180 - 45, 90, 1); in testCtorScaleDown() 42 assertClose(vec.azimuth, Math.PI * 5 / 6); in testCtorScaleDown() 43 assertClose(vec.elevation, Math.PI / 3); in testCtorScaleDown() 48 AoaVector vec = AoaVector.fromDegrees(185, 10, 10); in testCtorNormalization() local 49 assertClose(toDegrees(vec.azimuth), -175); in testCtorNormalization() 50 assertClose(toDegrees(vec.elevation), 10); in testCtorNormalization() 54 vec = AoaVector.fromRadians((float) toRadians(5), (float) toRadians(110), 10); in testCtorNormalization() [all …]
|
D | SphericalVectorTest.java | 35 SphericalVector vec = SphericalVector.fromDegrees(185, 10, 10); in testCtorNormalization() local 36 assertClose(toDegrees(vec.azimuth), -175); in testCtorNormalization() 37 assertClose(toDegrees(vec.elevation), 10); in testCtorNormalization() 41 vec = SphericalVector.fromRadians((float) toRadians(5), (float) toRadians(110), 10); in testCtorNormalization() 42 assertClose(vec.azimuth, toRadians(-175)); // +5deg from "behind". in testCtorNormalization() 45 assertClose(vec.elevation, toRadians(70)); in testCtorNormalization() 126 SphericalVector vec = SphericalVector.fromDegrees(10, 15, 20); in annotated() local 127 SphericalVector.Annotated sparse = vec.toAnnotated(); in annotated() 129 assertClose(sparse, vec); in annotated() 133 sparse = vec.toAnnotated(true, false, false); in annotated() [all …]
|
/packages/modules/Bluetooth/system/rust/src/gatt/server/ |
D | gatt_database.rs | 171 let mut characteristics = vec![]; in add_service_with_handles() 551 characteristics: vec![], in test_single_service() 563 vec![AttAttribute { in test_single_service() 589 characteristics: vec![GattCharacteristicWithHandle { in test_service_removal() 593 descriptors: vec![], in test_service_removal() 604 characteristics: vec![GattCharacteristicWithHandle { in test_service_removal() 608 descriptors: vec![], in test_service_removal() 619 characteristics: vec![GattCharacteristicWithHandle { in test_service_removal() 623 descriptors: vec![], in test_service_removal() 667 characteristics: vec![GattCharacteristicWithHandle { in test_single_characteristic_declaration() [all …]
|
D | att_server_bearer.rs | 234 let db = TestAttDatabase::new(vec![ in open_connection() 241 vec![5, 6], in open_connection() 249 vec![5, 6], in open_connection() 302 characteristics: vec![ in test_concurrent_transaction_failure() 307 descriptors: vec![], in test_concurrent_transaction_failure() 313 descriptors: vec![], in test_concurrent_transaction_failure() 367 spawn_local(conn.as_ref().send_indication(VALID_HANDLE, vec![1, 2, 3])); in test_indication_confirmation() 386 spawn_local(conn.as_ref().send_indication(VALID_HANDLE, vec![1, 2, 3])); in test_sequential_indications() 393 spawn_local(conn.as_ref().send_indication(VALID_HANDLE, vec![1, 2, 3])); in test_sequential_indications() 417 spawn_local(conn.as_ref().send_indication(VALID_HANDLE, vec![1, 2, 3])); in test_queued_indications_only_one_sent() [all …]
|
/packages/modules/adb/ |
D | types_test.cpp | 139 IOVector vec; in TEST() local 141 vec.append(create_block('x', 2)); in TEST() 142 vec.append(create_block('y', 1000)); in TEST() 143 ASSERT_EQ(2U, vec.front_size()); in TEST() 144 ASSERT_EQ(1002U, vec.size()); in TEST() 146 vec.drop_front(1); in TEST() 147 ASSERT_EQ(1U, vec.front_size()); in TEST() 148 ASSERT_EQ(1001U, vec.size()); in TEST() 150 vec.drop_front(1); in TEST() 151 ASSERT_EQ(1000U, vec.front_size()); in TEST() [all …]
|
/packages/modules/Nfc/libnfc-nci/tools/casimir/src/ |
D | controller.rs | 268 nci::ConfigParameterId::PowerState => Ok(vec![self.power_state]), in get() 269 nci::ConfigParameterId::PaBailOut => Ok(vec![self.pa_bail_out]), in get() 270 nci::ConfigParameterId::PaDevicesLimit => Ok(vec![self.pa_devices_limit]), in get() 271 nci::ConfigParameterId::PbAfi => Ok(vec![self.pb_afi]), in get() 272 nci::ConfigParameterId::PbBailOut => Ok(vec![self.pb_bail_out]), in get() 273 nci::ConfigParameterId::PbAttribParam1 => Ok(vec![self.pb_attrib_param1]), in get() 274 nci::ConfigParameterId::PbSensbReqParam => Ok(vec![self.pb_sensb_req_param]), in get() 275 nci::ConfigParameterId::PbDevicesLimit => Ok(vec![self.pb_devices_limit]), in get() 276 nci::ConfigParameterId::PfBitRate => Ok(vec![self.pf_bit_rate]), in get() 277 nci::ConfigParameterId::PfBailOut => Ok(vec![self.pf_bail_out]), in get() [all …]
|
/packages/modules/Bluetooth/offload/leaudio/hci/ |
D | tests.rs | 104 cis: vec![ in cig() 135 connection_handles: vec![0x123, 0x456], in cig() 175 codec_configuration: vec![], in cig() 201 handles: vec![hci::NumberOfCompletedPacketsHandle { in cig() 239 handles: vec![hci::NumberOfCompletedPacketsHandle { in cig() 338 bis_handles: vec![0x123, 0x456], in big() 354 codec_configuration: vec![], in big() 381 codec_configuration: vec![], in big() 407 handles: vec![hci::NumberOfCompletedPacketsHandle { in big() 425 handles: vec![ in big() [all …]
|
/packages/modules/Uwb/service/fusion_lib/src/com/android/uwb/fusion/math/ |
D | AoaVector.java | 205 public static AoaVector fromSphericalVector(SphericalVector vec) { in fromSphericalVector() argument 206 float azimuth = vec.azimuth; in fromSphericalVector() 212 double se = sin(vec.elevation); in fromSphericalVector() 213 double ce = cos(vec.elevation); in fromSphericalVector() 215 * signum(vec.azimuth); in fromSphericalVector() 217 return new AoaVector(F_PI - (float) az, vec.elevation, vec.distance); in fromSphericalVector() 219 return new AoaVector((float) az, vec.elevation, vec.distance); in fromSphericalVector()
|
/packages/modules/StatsD/lib/libstatssocket/ |
D | stats_buffer_writer.cpp | 35 static int __write_to_statsd_init(struct iovec* vec, size_t nr); 36 static int (*__write_to_statsd)(struct iovec* vec, size_t nr) = __write_to_statsd_init; 114 static int __write_to_stats_daemon(struct iovec* vec, size_t nr) { in __write_to_stats_daemon() argument 120 len += vec[i].iov_len; in __write_to_stats_daemon() 136 int ret = (int)(*statsdLoggerWrite.write)(&ts, vec, nr); in __write_to_stats_daemon() 151 static int __write_to_statsd_init(struct iovec* vec, size_t nr) { in __write_to_statsd_init() argument 169 ret = __write_to_statsd(vec, nr); in __write_to_statsd_init()
|
/packages/modules/UprobeStats/src/ |
D | Bpf.cpp | 84 std::vector<T> vec; in pollRingBuf() local 86 return vec; in pollRingBuf() 88 auto callback = [&](const T &value) { vec.push_back(value); }; in pollRingBuf() 90 return vec; in pollRingBuf() 109 std::vector<int32_t> vec; in consumeRingBuf() local 110 auto callback = [&](const uint64_t &value) { vec.push_back(value); }; in consumeRingBuf() 112 return vec; in consumeRingBuf()
|
/packages/modules/Bluetooth/offload/hci/ |
D | writer.rs | 22 vec: Vec<u8>, field 26 pub(crate) fn new(vec: Vec<u8>) -> Self { in new() 27 Self { vec } in new() 31 self.vec in into_vec() 35 self.vec.extend_from_slice(slice); in put() 52 self.vec.push((v & 0xff) as u8); in write_u32()
|
/packages/modules/Virtualization/android/virtualizationservice/src/maintenance/ |
D | vmdb.rs | 443 assert_eq!(vec![VM_ID1], db.vm_ids_for_user(USER1).unwrap()); in test_schema_upgrade_v0_v1() 462 assert_eq!(vec![VM_ID1], db.vm_ids_for_user(USER1).unwrap()); in test_corrupt_database_file() 509 vec![(USER1, APP_A), (USER2, APP_B), (USER3, APP_C)], in test_add_remove() 515 assert_eq!(vec![VM_ID1, VM_ID2, VM_ID3], db.vm_ids_for_user(USER1).unwrap()); in test_add_remove() 516 assert_eq!(vec![VM_ID1, VM_ID2, VM_ID3], db.vm_ids_for_app(USER1, APP_A).unwrap()); in test_add_remove() 518 assert_eq!(vec![VM_ID4], db.vm_ids_for_app(USER2, APP_B).unwrap()); in test_add_remove() 520 assert_eq!(vec![VM_ID5], db.vm_ids_for_user(USER3).unwrap()); in test_add_remove() 534 assert_eq!(vec![VM_ID1], db.vm_ids_for_user(USER1).unwrap()); in test_add_remove() 535 assert_eq!(vec![VM_ID1], db.vm_ids_for_app(USER1, APP_A).unwrap()); in test_add_remove() 541 assert_eq!(vec![VM_ID1], db.vm_ids_for_user(USER1).unwrap()); in test_add_remove() [all …]
|