Home
last modified time | relevance | path

Searched refs:i (Results 1 – 25 of 1408) sorted by relevance

12345678910>>...57

/system/unwinding/libunwindstack/tests/
DMemoryThreadCacheTest.cpp47 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 …]
DMemoryCacheTest.cpp46 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 …]
DMemoryFileTest.cpp70 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 …]
DRegsInfoTest.cpp67 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, &regs[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/chre/host/test/hal_generic/aidl/
Devent_logger_test.cc62 for (int i = 0; i < EventLogger::kMaxNanoappEvents + 10; ++i) { in TEST() local
63 log.logNanoappLoad(/* appId= */ i, /* appSize= */ 0, /* appVersion= */ 0, in TEST()
69 for (int i = 0; i < EventLogger::kMaxNanoappEvents; ++i) { in TEST() local
70 EXPECT_EQ(log.nanoappLoads()[i].id, i + 10); in TEST()
76 for (int i = 0; i < EventLogger::kMaxNanoappEvents + 10; ++i) { in TEST() local
77 log.logNanoappUnload(i, true); in TEST()
82 for (int i = 0; i < EventLogger::kMaxNanoappEvents; ++i) { in TEST() local
83 EXPECT_EQ(log.nanoappUnloads()[i].id, i + 10); in TEST()
89 for (int i = 0; i < EventLogger::kMaxRestartEvents + 10; ++i) { in TEST() local
90 log.setNowMs(i); in TEST()
[all …]
/system/extras/cpustats/
Dcpustats.c76 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/keymaster/ng/
DKeyMintAidlUtils.cpp35 for (size_t i = 0; i < set.length; ++i) { in kmParamSet2Aidl() local
36 auto tag = params[i].tag; in kmParamSet2Aidl()
37 result[i].tag = legacy_enum_conversion(tag); in kmParamSet2Aidl()
41 result[i].integer = params[i].enumerated; in kmParamSet2Aidl()
45 result[i].integer = params[i].integer; in kmParamSet2Aidl()
49 result[i].longInteger = params[i].long_integer; in kmParamSet2Aidl()
52 result[i].longInteger = params[i].date_time; in kmParamSet2Aidl()
55 result[i].boolValue = params[i].boolean; in kmParamSet2Aidl()
59 result[i].blob.assign(params[i].blob.data, in kmParamSet2Aidl()
60 params[i].blob.data + params[i].blob.data_length); in kmParamSet2Aidl()
[all …]
/system/libbase/
Dparseint_test.cpp25 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/tools/aidl/build/
Daidl_interface.go145 for i, name := range notFrozen {
146 reason := requireFrozenReason[i]
462 func (i *aidlInterface) shouldGenerateJavaBackend() bool {
464 return proptools.BoolDefault(i.properties.Backend.Java.Enabled, true)
467 func (i *aidlInterface) shouldGenerateCppBackend() bool {
469 return proptools.BoolDefault(i.properties.Backend.Cpp.Enabled, true)
472 func (i *aidlInterface) shouldGenerateNdkBackend() bool {
474 return proptools.BoolDefault(i.properties.Backend.Ndk.Enabled, true)
482 func (i *aidlInterface) shouldGenerateAppNdkBackend() bool {
483 return i.shouldGenerateNdkBackend() &&
[all …]
Daidl_interface_backends.go30 func addLibrary(mctx android.DefaultableHookContext, i *aidlInterface, version string, lang string,…
32 return addJavaLibrary(mctx, i, version, notFrozen, requireFrozenReason)
34 return addRustLibrary(mctx, i, version, notFrozen, requireFrozenReason)
36 return addCppAnalyzerLibrary(mctx, i, version, notFrozen, requireFrozenReason)
38 return addCppLibrary(mctx, i, version, lang, notFrozen, requireFrozenReason)
44 func addCppLibrary(mctx android.DefaultableHookContext, i *aidlInterface, version string, lang stri…
45 cppSourceGen := i.versionedName(version) + "-" + lang + "-source"
46 cppModuleGen := i.versionedName(version) + "-" + lang
48 srcs, aidlRoot := i.srcsForVersion(mctx, version)
58 commonProperties = &i.properties.Backend.Cpp.CommonNativeBackendProperties
[all …]
/system/chre/util/tests/
Dstring_test.cc39 for (size_t i = 0; i < destinationLength; ++i) { in TEST() local
40 ASSERT_EQ(destination[i], fillValue); in TEST()
53 for (size_t i = 0; i < destinationLength; ++i) { in TEST() local
54 ASSERT_EQ(destination[i], 0); in TEST()
69 for (size_t i = 2; i < destinationLength; ++i) { in TEST() local
70 ASSERT_EQ(destination[i], fillValue); in TEST()
84 size_t i = 0; in TEST() local
85 for (; i < sourceLength; ++i) { in TEST()
86 ASSERT_EQ(destination[i], source[i]); in TEST()
89 ASSERT_EQ(destination[i], 0); in TEST()
[all …]
Dheap_test.cc47 for (size_t i = 0; i < MaxSize; ++i) { in TEST() local
48 array[i] = std::rand(); in TEST()
49 array_sorted[i] = array[i]; in TEST()
54 for (size_t i = 0; i < s; ++i) { in TEST() local
55 v.push_back(array[i]); in TEST()
62 for (size_t i = 0; i < s; ++i) { in TEST() local
64 EXPECT_EQ(array_sorted[i], v[v.size() - 1]); in TEST()
88 for (size_t i = 0; i < MaxSize; ++i) { in TEST() local
89 array[i] = std::rand(); in TEST()
90 array_sorted[i] = array[i]; in TEST()
[all …]
Datomic_spsc_queue_test.cc41 FakeElement(int i) { in FakeElement() argument
42 val_ = i; in FakeElement()
51 void setValue(int i) { in setValue() argument
52 val_ = i; in setValue()
108 for (size_t i = 0; i < kMaxTestCapacity; ++i) { in TEST() local
109 destructor_count[i] = 0; in TEST()
127 for (size_t i = 0; i < kMaxTestCapacity; ++i) { in TEST() local
128 destructor_count[i] = 0; in TEST()
134 for (size_t i = 0; i < 3; ++i) { in TEST() local
135 q.producer().emplace(i); in TEST()
[all …]
Darray_queue_test.cc40 FakeElement(int i) { in FakeElement() argument
41 val_ = i; in FakeElement()
50 void setValue(int i) { in setValue() argument
51 val_ = i; in setValue()
254 for (size_t i = 0; i < q.size(); ++i) { in TEST() local
255 EXPECT_EQ(sampleArray[i], q.front()); in TEST()
261 for (size_t i = 0; i < kMaxTestCapacity; ++i) { in TEST() local
262 destructor_count[i] = 0; in TEST()
280 for (size_t i = 0; i < kMaxTestCapacity; ++i) { in TEST() local
281 destructor_count[i] = 0; in TEST()
[all …]
/system/chre/apps/wifi_offload/test/
Dchannelhistogram_test.cc45 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 …]
Drandomgenerator_test.cc38 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/media/audio_utils/
Dfixedfft.cpp109 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/memory/libmemunreachable/tests/
DAllocator_test.cpp67 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/tools/aidl/tests/java/src/android/aidl/service/
DTestServiceServer.java208 for (int i = 0; i < input.length; i++) { in ReverseBoolean()
209 repeated[i] = input[i]; in ReverseBoolean()
210 reversed[i] = input[input.length - i - 1]; in ReverseBoolean()
217 for (int i = 0; i < input.length; i++) { in ReverseByte()
218 repeated[i] = input[i]; in ReverseByte()
219 reversed[i] = input[input.length - i - 1]; in ReverseByte()
226 for (int i = 0; i < input.length; i++) { in ReverseChar()
227 repeated[i] = input[i]; in ReverseChar()
228 reversed[i] = input[input.length - i - 1]; in ReverseChar()
235 for (int i = 0; i < input.length; i++) { in ReverseInt()
[all …]
/system/chre/apps/test/chqts/src/shared/
Dnano_string.cc35 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/extras/tests/pagingtest/
Dthrashing_test.c36 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/core/libmodprobe/
Dlibmodprobe_test.cpp157 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/libhwbinder/vts/performance/
DBenchmark_throughput.cpp125 for (uint32_t i = 0; i < num_buckets; i++) { in combine() local
126 ret.m_buckets[i] = a.m_buckets[i] + b.m_buckets[i]; in combine()
149 for (uint32_t i = 0; i < num_buckets; i++) { in dump() local
150 float cur_time = time_per_bucket_ms * i + 0.5f * time_per_bucket_ms; in dump()
152 && (cur_total + m_buckets[i] >= 0.5f * m_transactions)) { in dump()
156 && (cur_total + m_buckets[i] >= 0.9f * m_transactions)) { in dump()
160 && (cur_total + m_buckets[i] >= 0.95f * m_transactions)) { in dump()
164 && (cur_total + m_buckets[i] >= 0.99f * m_transactions)) { in dump()
167 cur_total += m_buckets[i]; in dump()
210 for (int i = 0; i < service_count; i++) { in worker_fx() local
[all …]
/system/media/audio_utils/tests/
Dchannels_tests.cpp29 for (size_t i = 1; i < size; ++i) { in checkMonotone() local
30 EXPECT_LT(ary[i-1], ary[i]); in checkMonotone()
40 for (size_t i = 1; i < size; ++i) { in checkUnsignedMonotoneOrZero() local
41 if (ary[i]) { in checkUnsignedMonotoneOrZero()
42 EXPECT_LT(least, ary[i]); in checkUnsignedMonotoneOrZero()
43 least = ary[i]; in checkUnsignedMonotoneOrZero()
71 for (size_t i = 0; i < FCC_26 + 2 /* sic */; ++i) { in TEST() local
72 const AUDIO_GEOMETRY_SIDE side = sideFromChannelIdx(i); in TEST()
73 const AUDIO_GEOMETRY_HEIGHT height = heightFromChannelIdx(i); in TEST()
74 const AUDIO_GEOMETRY_DEPTH depth = depthFromChannelIdx(i); in TEST()
[all …]
/system/media/audio_route/
Daudio_route.c143 unsigned int i;
147 for (i = 0; i < path->length; i++) {
148 struct mixer_ctl *ctl = index_to_ctl(ar, path->setting[i].ctl_index);
150 ALOGE(" id=%d: ctl=%s", i, mixer_ctl_get_name(ctl));
152 for (j = 0; j < path->setting[i].num_values; j++)
153 ALOGE(" id=%d value=0x%02x", j, path->setting[i].value.bytes[j]);
155 for (j = 0; j < path->setting[i].num_values; j++)
156 ALOGE(" id=%d value=%d", j, path->setting[i].value.enumerated[j]);
158 for (j = 0; j < path->setting[i].num_values; j++)
159 ALOGE(" id=%d value=%ld", j, path->setting[i].value.integer[j]);
[all …]

12345678910>>...57