/system/bt/bta/gatt/ |
D | bta_gatts_utils.cc | 41 uint8_t i; in bta_gatts_alloc_srvc_cb() local 43 for (i = 0; i < BTA_GATTS_MAX_SRVC_NUM; i++) { in bta_gatts_alloc_srvc_cb() 44 if (!p_cb->srvc_cb[i].in_use) { in bta_gatts_alloc_srvc_cb() 45 p_cb->srvc_cb[i].in_use = true; in bta_gatts_alloc_srvc_cb() 46 p_cb->srvc_cb[i].rcb_idx = rcb_idx; in bta_gatts_alloc_srvc_cb() 47 return i; in bta_gatts_alloc_srvc_cb() 63 uint8_t i; in bta_gatts_find_app_rcb_by_app_if() local 66 for (i = 0, p_reg = bta_gatts_cb.rcb; i < BTA_GATTS_MAX_APP_NUM; in bta_gatts_find_app_rcb_by_app_if() 67 i++, p_reg++) { in bta_gatts_find_app_rcb_by_app_if() 86 uint8_t i; in bta_gatts_find_app_rcb_idx_by_app_if() local [all …]
|
/system/unwinding/libunwindstack/tests/ |
D | MemoryThreadCacheTest.cpp | 47 for (size_t i = 1; i <= kMaxCachedSize; i++) { in TEST_F() local 48 std::vector<uint8_t> buffer(i); in TEST_F() 49 ASSERT_TRUE(memory_cache_->ReadFully(0x8000 + i, buffer.data(), i)) in TEST_F() 50 << "Read failed at size " << i; in TEST_F() 51 ASSERT_EQ(std::vector<uint8_t>(i, 0xab), buffer) << "Failed at size " << i; in TEST_F() 56 for (size_t i = 1; i <= kMaxCachedSize; i++) { in TEST_F() local 57 std::vector<uint8_t> buffer(i); in TEST_F() 58 ASSERT_TRUE(memory_cache_->ReadFully(0x8000 + i, buffer.data(), i)) in TEST_F() 59 << "Read failed at size " << i; in TEST_F() 60 ASSERT_EQ(std::vector<uint8_t>(i, 0xab), buffer) << "Failed at size " << i; in TEST_F() [all …]
|
D | MemoryCacheTest.cpp | 46 for (size_t i = 1; i <= kMaxCachedSize; i++) { in TEST_F() local 47 std::vector<uint8_t> buffer(i); in TEST_F() 48 ASSERT_TRUE(memory_cache_->ReadFully(0x8000 + i, buffer.data(), i)) in TEST_F() 49 << "Read failed at size " << i; in TEST_F() 50 ASSERT_EQ(std::vector<uint8_t>(i, 0xab), buffer) << "Failed at size " << i; in TEST_F() 55 for (size_t i = 1; i <= kMaxCachedSize; i++) { in TEST_F() local 56 std::vector<uint8_t> buffer(i); in TEST_F() 57 ASSERT_TRUE(memory_cache_->ReadFully(0x8000 + i, buffer.data(), i)) in TEST_F() 58 << "Read failed at size " << i; in TEST_F() 59 ASSERT_EQ(std::vector<uint8_t>(i, 0xab), buffer) << "Failed at size " << i; in TEST_F() [all …]
|
D | MemoryFileTest.cpp | 70 for (size_t i = 0; i < pagesize; i++) { in TEST_F() local 86 for (size_t i = 0; i < 2 * pagesize; i++) { in TEST_F() local 87 data += static_cast<char>((i / pagesize) + '0'); in TEST_F() 88 data += static_cast<char>((i % 10) + '0'); in TEST_F() 97 for (size_t i = 0; i < 5; i++) { in TEST_F() local 99 expected_str += static_cast<char>(((i + pagesize) % 10) + '0'); in TEST_F() 107 for (size_t i = 0; i < 2 * pagesize; i++) { in TEST_F() local 108 data += static_cast<char>((i / pagesize) + '0'); in TEST_F() 109 data += static_cast<char>((i % 10) + '0'); in TEST_F() 118 for (size_t i = 0; i < 5; i++) { in TEST_F() local [all …]
|
D | RegsInfoTest.cpp | 67 for (uint32_t i = 0; i < 64; i++) { in TEST() local 68 regs[i] = i * 0x100; in TEST() 69 ASSERT_EQ(i * 0x100, info.Get(i)) << "Reg " + std::to_string(i) + " failed."; in TEST() 72 for (uint32_t i = 0; i < 64; i++) { in TEST() local 73 ASSERT_FALSE(info.IsSaved(i)) << "Reg " + std::to_string(i) + " failed."; in TEST() 74 uint64_t* reg = info.Save(i); in TEST() 75 ASSERT_EQ(reg, ®s[i]) << "Reg " + std::to_string(i) + " failed."; in TEST() 76 *reg = i * 0x1000 + 0x100; in TEST() 77 ASSERT_EQ(i * 0x1000 + 0x100, regs[i]) << "Reg " + std::to_string(i) + " failed."; in TEST() 80 for (uint32_t i = 0; i < 64; i++) { in TEST() local [all …]
|
/system/bt/osi/test/ |
D | array_test.cc | 31 for (int i = 0; i < 100; ++i) { in TEST_F() local 32 array_append_value(array, i * i); in TEST_F() 34 for (int i = 0; i < 100; ++i) { in TEST_F() local 35 EXPECT_EQ(*(int*)array_at(array, i), i * i); in TEST_F() 43 for (int i = 0; i < 100; ++i) { in TEST_F() local 44 items[i] = i * i; in TEST_F() 45 array_append_ptr(array, &items[i]); in TEST_F() 47 for (int i = 0; i < 100; ++i) { in TEST_F() local 48 EXPECT_EQ(*(int*)array_at(array, i), i * i); in TEST_F() 60 for (int i = 0; i < 100; ++i) { in TEST_F() local [all …]
|
/system/bt/vendor_libs/test_vendor_lib/test/ |
D | iterator_test.cc | 88 for (size_t i = 0; i < complete_l2cap_packet.size(); i += 2) { in TEST_F() local 89 ASSERT_EQ(complete_l2cap_packet[i], *plus_eq) in TEST_F() 90 << "+= test: Dereferenced iterator does not equal expected at index " << i; in TEST_F() 97 for (size_t i = 0; i < complete_l2cap_packet.size() - 1; i++) { in TEST_F() local 98 ASSERT_EQ(complete_l2cap_packet[i + 1], *(++plus_plus)) in TEST_F() 100 << "at index " << i; in TEST_F() 106 for (size_t i = 0; i < complete_l2cap_packet.size(); i++) { in TEST_F() local 107 ASSERT_EQ(complete_l2cap_packet[i], *(plus_plus++)) in TEST_F() 109 << "at index " << i; in TEST_F() 115 for (size_t i = 0; i < complete_l2cap_packet.size(); i++) { in TEST_F() local [all …]
|
/system/extras/cpustats/ |
D | cpustats.c | 76 int i, freq_count; in main() local 83 for (i = 0; i < argc; i++) { in main() 84 if (!strcmp(argv[i], "-n")) { in main() 85 if (i + 1 >= argc) { in main() 90 iterations = atoi(argv[++i]); in main() 93 if (!strcmp(argv[i], "-d")) { in main() 94 if (i + 1 >= argc) { in main() 99 delay = atoi(argv[++i]); in main() 102 if (!strcmp(argv[i], "-m")) { in main() 105 if (!strcmp(argv[i], "-h")) { in main() [all …]
|
/system/bt/gd/l2cap/ |
D | signal_id_test.cc | 27 uint8_t i = 0; in TEST() local 28 while (++i != 0) { in TEST() 29 SignalId signal_id(i); in TEST() 46 for (uint8_t i = 0; i != 0xff; ++i, ++signal_id) { in TEST() local 47 ASSERT_TRUE(i == signal_id.Value()); in TEST() 55 for (uint8_t i = 0; i != 0xff; i++, signal_id++) { in TEST() local 56 ASSERT_TRUE(i == signal_id.Value()); in TEST() 64 for (int i = 0; i < 255; i++) { in TEST() local 74 for (int i = 0; i < 256; i++) { in TEST() local 84 for (uint8_t i = 0; i != 0xff; --i, --signal_id) { in TEST() local [all …]
|
/system/libbase/ |
D | parseint_test.cpp | 25 int i = 0; in TEST() local 26 ASSERT_FALSE(android::base::ParseInt("x", &i)); in TEST() 29 ASSERT_FALSE(android::base::ParseInt("123x", &i)); in TEST() 32 ASSERT_TRUE(android::base::ParseInt("123", &i)); in TEST() 33 ASSERT_EQ(123, i); in TEST() 35 i = 0; in TEST() 36 EXPECT_TRUE(android::base::ParseInt(" 123", &i)); in TEST() 37 EXPECT_EQ(123, i); in TEST() 38 ASSERT_TRUE(android::base::ParseInt("-123", &i)); in TEST() 39 ASSERT_EQ(-123, i); in TEST() [all …]
|
/system/chre/apps/wifi_offload/test/ |
D | channelhistogram_test.cc | 45 for (size_t i = 0; i < kNumFrequencies_Test; i++) { in TEST_F() local 46 ASSERT_EQ(0, channel_histo_.GetChannelScanCount(kAllChannels_Test[i])); in TEST_F() 56 for (size_t i = 0; i < kNumFrequencies_Test; i++) { in TEST_F() local 58 histo.IncrementScanCountForFrequency(kAllFrequencies_Test[i]); in TEST_F() 62 EXPECT_EQ(kAllChannels_Test[i] == kAllChannels_Test[j] ? 255 : 0, in TEST_F() 70 for (size_t i = 0; i < 12; i++) { in TEST_F() local 73 kAllFrequencies_Test[i], increase); in TEST_F() 77 for (size_t i = 0; i < 12; i++) { in TEST_F() local 79 channel_histo_.GetChannelScanCount(kAllChannels_Test[i]); in TEST_F() 85 for (size_t i = 12; i < 14; i++) { in TEST_F() local [all …]
|
D | randomgenerator_test.cc | 38 for (size_t i = 0; i < num_values; i++) { in AllRandomGeneratorsGenerateTheSameSequence() local 39 rand_values[i] = random_gen_.get<TestType>(); in AllRandomGeneratorsGenerateTheSameSequence() 43 for (size_t i = 0; i < num_values; i++) { in AllRandomGeneratorsGenerateTheSameSequence() local 44 ASSERT_EQ(rand_values[i], another_random_gen_.get<TestType>()); in AllRandomGeneratorsGenerateTheSameSequence() 52 for (size_t i = 0; i < num_values; i++) { in AfterResetGeneratesTheSameSequence() local 53 rand_values[i] = random_gen_.get<TestType>(); in AfterResetGeneratesTheSameSequence() 57 for (size_t i = 0; i < num_values; i++) { in AfterResetGeneratesTheSameSequence() local 58 ASSERT_EQ(rand_values[i], random_gen_.get<TestType>()); in AfterResetGeneratesTheSameSequence() 71 for (size_t i = 0; i < num_values; i++) { in GeneratesDifferentNumbersIn8Bytes() local 72 rand_values[i] = 0; in GeneratesDifferentNumbersIn8Bytes() [all …]
|
/system/bt/stack/pan/ |
D | pan_utils.cc | 147 uint16_t i; in pan_allocate_pcb() local 149 for (i = 0; i < MAX_PAN_CONNS; i++) { in pan_allocate_pcb() 150 if (pan_cb.pcb[i].con_state != PAN_STATE_IDLE && in pan_allocate_pcb() 151 pan_cb.pcb[i].handle == handle) in pan_allocate_pcb() 155 for (i = 0; i < MAX_PAN_CONNS; i++) { in pan_allocate_pcb() 156 if (pan_cb.pcb[i].con_state != PAN_STATE_IDLE && in pan_allocate_pcb() 157 pan_cb.pcb[i].rem_bda == p_bda) in pan_allocate_pcb() 161 for (i = 0; i < MAX_PAN_CONNS; i++) { in pan_allocate_pcb() 162 if (pan_cb.pcb[i].con_state == PAN_STATE_IDLE) { in pan_allocate_pcb() 163 memset(&(pan_cb.pcb[i]), 0, sizeof(tPAN_CONN)); in pan_allocate_pcb() [all …]
|
/system/media/audio_utils/ |
D | fixedfft.cpp | 109 int scale = LOG_FFT_SIZE, i, p, r; in fixed_fft() local 111 for (r = 0, i = 1; i < n; ++i) { in fixed_fft() 113 if (i < r) { in fixed_fft() 114 int32_t t = v[i]; in fixed_fft() 115 v[i] = v[r]; in fixed_fft() 123 for (i = 0; i < n; i += p << 1) { in fixed_fft() 124 int32_t x = half(v[i]); in fixed_fft() 125 int32_t y = half(v[i + p]); in fixed_fft() 126 v[i] = x + y; in fixed_fft() 127 v[i + p] = x - y; in fixed_fft() [all …]
|
/system/bt/packet/tests/base/ |
D | iterator_test.cc | 84 for (size_t i = 0; i < GetTestPacketLength(); i++) { in TEST_P() local 85 ASSERT_EQ(test_l2cap_data[i + GetLowerBound()], *it++); in TEST_P() 127 for (size_t i = 0; i < GetTestPacketLength(); i += 2) { in TEST_P() local 128 ASSERT_EQ(test_l2cap_data[i + GetLowerBound()], *plus_eq) in TEST_P() 130 << i; in TEST_P() 140 for (size_t i = 0; i < GetTestPacketLength() - 1; i++) { in TEST_P() local 141 ASSERT_EQ(test_l2cap_data[i + GetLowerBound() + 1], *(++plus_plus)) in TEST_P() 143 << "at index " << i; in TEST_P() 150 for (size_t i = 0; i < GetTestPacketLength(); i++) { in TEST_P() local 151 ASSERT_EQ(test_l2cap_data[i + GetLowerBound()], *(plus_plus++)) in TEST_P() [all …]
|
/system/memory/libmemunreachable/tests/ |
D | Allocator_test.cpp | 67 for (int i = 0; i < num; i++) { in TEST_F() local 68 ptr[i] = allocator.allocate(); in TEST_F() 69 memset(ptr[i], 0xaa, size); in TEST_F() 70 *(reinterpret_cast<unsigned char*>(ptr[i])) = i; in TEST_F() 73 for (int i = 0; i < num; i++) { in TEST_F() local 75 if (i != j) { in TEST_F() 76 ASSERT_NE(ptr[i], ptr[j]); in TEST_F() 81 for (int i = 0; i < num; i++) { in TEST_F() local 82 ASSERT_EQ(*(reinterpret_cast<unsigned char*>(ptr[i])), i & 0xFF); in TEST_F() 83 allocator.deallocate(ptr[i]); in TEST_F() [all …]
|
/system/chre/apps/test/chqts/src/shared/ |
D | nano_string.cc | 35 for (size_t i = 0; i < count; i++) { in memset() local 36 bytes[i] = static_cast<uint8_t>(val); in memset() 43 for (size_t i = 0; i < bytes; i++) { in memcpy() local 44 dst[i] = src[i]; in memcpy() 56 size_t i; in strncpy() local 57 for (i = 0; (i < len) && (src[i] != '\0'); i++) { in strncpy() 58 dest[i] = src[i]; in strncpy() 60 for (; i < len; i++) { in strncpy() 61 dest[i] = '\0'; in strncpy() 78 for (size_t i = 0, shift = 28; i < 8; i++, shift -= 4) { in uint32ToHexAscii() local [all …]
|
/system/chre/util/tests/ |
D | heap_test.cc | 31 for (size_t i = 0; i < MaxSize; ++i) { in TEST() local 32 array[i] = std::rand(); in TEST() 33 array_sorted[i] = array[i]; in TEST() 38 for (size_t i = 0; i < s; ++i) { in TEST() local 39 v.push_back(array[i]); in TEST() 46 for (size_t i = 0; i < s; ++i) { in TEST() local 48 EXPECT_EQ(array_sorted[i], v[v.size() - 1]); in TEST() 72 for (size_t i = 0; i < MaxSize; ++i) { in TEST() local 73 array[i] = std::rand(); in TEST() 74 array_sorted[i] = array[i]; in TEST() [all …]
|
/system/extras/tests/pagingtest/ |
D | thrashing_test.c | 36 for (size_t i = 0; i < ARRAY_SIZE(fds); i++) { in thrashing_test() local 37 fds[i] = create_tmp_file(tmpnames[i], filesize); in thrashing_test() 38 if (fds[i] < 0) { in thrashing_test() 43 for (size_t i = 0; i < ARRAY_SIZE(fds); i++) { in thrashing_test() local 44 bufs[i] = mmap(NULL, filesize, PROT_READ, MAP_PRIVATE, fds[i], 0); in thrashing_test() 45 if (bufs[i] == ((void *)-1)) { in thrashing_test() 51 ret = madvise((void *)bufs[i], filesize, MADV_RANDOM) || in thrashing_test() 52 posix_fadvise(fds[i], 0, filesize, POSIX_FADV_RANDOM); in thrashing_test() 59 for (int i = 0; i < test_runs; i++) { in thrashing_test() local 79 for (size_t i = 0; i < ARRAY_SIZE(bufs) && bufs[i] != NULL; i++) { in thrashing_test() local [all …]
|
/system/keymaster/ng/ |
D | KeyMintAidlUtils.cpp | 59 for (size_t i = 0; i < set.length; ++i) { in kmParamSet2Aidl() local 60 auto tag = params[i].tag; in kmParamSet2Aidl() 61 result[i].tag = legacy_enum_conversion(tag); in kmParamSet2Aidl() 65 result[i].integer = params[i].enumerated; in kmParamSet2Aidl() 69 result[i].integer = params[i].integer; in kmParamSet2Aidl() 73 result[i].longInteger = params[i].long_integer; in kmParamSet2Aidl() 76 result[i].longInteger = params[i].date_time; in kmParamSet2Aidl() 79 result[i].boolValue = params[i].boolean; in kmParamSet2Aidl() 83 result[i].blob.assign(params[i].blob.data, in kmParamSet2Aidl() 84 params[i].blob.data + params[i].blob.data_length); in kmParamSet2Aidl() [all …]
|
/system/bt/gd/packet/ |
D | bit_inserter_unittest.cc | 34 for (size_t i = 0; i < 9; i++) { in TEST() local 35 it.insert_bits(static_cast<uint8_t>(i), i); in TEST() 42 for (size_t i = 0; i < bytes.size(); i++) { in TEST() local 43 ASSERT_EQ(result[i], bytes[i]); in TEST() 55 for (size_t i = 0; i < 9; i++) { in TEST() local 56 it.insert_bits(static_cast<uint8_t>(i), i); in TEST() 63 for (size_t i = 0; i < bytes.size(); i++) { in TEST() local 64 ASSERT_EQ(result[i], bytes[i]); in TEST() 68 for (size_t i = 0; i < copy.size(); i++) { in TEST() local 69 ASSERT_EQ(result[i], copy[i]); in TEST()
|
/system/tools/aidl/build/ |
D | aidl_interface_backends.go | 29 func addLibrary(mctx android.LoadHookContext, i *aidlInterface, version string, lang string) string… 31 return addJavaLibrary(mctx, i, version) 33 return addRustLibrary(mctx, i, version) 35 return addCppLibrary(mctx, i, version, lang) 38 func addCppLibrary(mctx android.LoadHookContext, i *aidlInterface, version string, lang string) str… 39 cppSourceGen := i.versionedName(version) + "-" + lang + "-source" 40 cppModuleGen := i.versionedName(version) + "-" + lang 42 srcs, aidlRoot := i.srcsForVersion(mctx, version) 52 if !i.isModuleForVndk(version) { 65 commonProperties = &i.properties.Backend.Cpp.CommonNativeBackendProperties [all …]
|
/system/core/libmodprobe/ |
D | libmodprobe_test.cpp | 157 for (auto i = test_modules.begin(); i != test_modules.end(); ++i) { in TEST() local 158 *i = dir.path + *i; in TEST() 165 for (auto i = expected_modules_loaded.begin(); i != expected_modules_loaded.end(); ++i) { in TEST() local 166 *i = dir.path + *i; in TEST() 167 GTEST_LOG_(INFO) << "\"" << *i << "\""; in TEST() 170 for (auto i = modules_loaded.begin(); i != modules_loaded.end(); ++i) { in TEST() local 171 GTEST_LOG_(INFO) << "\"" << *i << "\""; in TEST() 180 for (auto i = expected_after_remove.begin(); i != expected_after_remove.end(); ++i) { in TEST() local 181 *i = dir.path + *i; in TEST() 182 GTEST_LOG_(INFO) << "\"" << *i << "\""; in TEST() [all …]
|
/system/tools/aidl/tests/java/src/android/aidl/service/ |
D | TestServiceServer.java | 157 for (int i = 0; i < input.length; i++) { in ReverseBoolean() 158 repeated[i] = input[i]; in ReverseBoolean() 159 reversed[i] = input[input.length - i - 1]; in ReverseBoolean() 166 for (int i = 0; i < input.length; i++) { in ReverseByte() 167 repeated[i] = input[i]; in ReverseByte() 168 reversed[i] = input[input.length - i - 1]; in ReverseByte() 175 for (int i = 0; i < input.length; i++) { in ReverseChar() 176 repeated[i] = input[i]; in ReverseChar() 177 reversed[i] = input[input.length - i - 1]; in ReverseChar() 184 for (int i = 0; i < input.length; i++) { in ReverseInt() [all …]
|
/system/keymaster/android_keymaster/ |
D | operation_table.cpp | 28 for (size_t i = 0; i < table_size_; ++i) { in Add() local 29 if (!table_[i]) { in Add() 30 table_[i] = move(operation); in Add() 42 for (size_t i = 0; i < table_size_; ++i) { in Find() local 43 if (table_[i] && table_[i]->operation_handle() == op_handle) return table_[i].get(); in Find() 51 for (size_t i = 0; i < table_size_; ++i) { in Delete() local 52 if (table_[i] && table_[i]->operation_handle() == op_handle) { in Delete() 53 table_[i].reset(); in Delete()
|