Home
last modified time | relevance | path

Searched refs:size (Results 1 – 25 of 574) sorted by relevance

12345678910>>...23

/tools/apksig/src/test/java/com/android/apksig/util/
DDataSourceTestBase.java51 assertEquals(10, ds.size()); in testSize()
66 assertSliceEquals("", ds, ds.size() - 2, 0); in testSlice()
67 assertSliceEquals("", ds, ds.size() - 1, 0); in testSlice()
68 assertSliceEquals("", ds, ds.size(), 0); in testSlice()
71 assertSliceEquals("", slice, slice.size() - 2, 0); in testSlice()
72 assertSliceEquals("", slice, slice.size() - 1, 0); in testSlice()
73 assertSliceEquals("", slice, slice.size(), 0); in testSlice()
84 assertSliceThrowsIOOB(ds, ds.size() + 1, 0); in testSlice()
85 assertSliceThrowsIOOB(slice, slice.size() + 1, 0); in testSlice()
86 assertSliceThrowsIOOB(ds, ds.size(), 1); in testSlice()
[all …]
/tools/dexter/slicer/
Dwriter.cc68 size_t size = dst - buff; in WriteIntValue() local
69 assert(size > 0 && size <= sizeof(T)); in WriteIntValue()
70 WriteEncodedValueHeader(type, size - 1, data); in WriteIntValue()
71 data.Push(buff, size); in WriteIntValue()
79 size_t size = sizeof(T); in WriteFloatValue() local
82 while (size > 1 && *src == 0) { in WriteFloatValue()
83 --size; in WriteFloatValue()
88 for (size_t i = 0; i < size; ++i) { in WriteFloatValue()
92 assert(size > 0 && size <= sizeof(T)); in WriteFloatValue()
93 WriteEncodedValueHeader(type, size - 1, data); in WriteFloatValue()
[all …]
Dbytecode_encoder.cc136 auto buff_offset = bytecode_.size(); in Visit()
142 SLICER_CHECK(bytecode->operands.size() == 0); in Visit()
148 SLICER_CHECK(bytecode->operands.size() == 2); in Visit()
156 SLICER_CHECK(bytecode->operands.size() == 2); in Visit()
165 SLICER_CHECK(bytecode->operands.size() == 2); in Visit()
175 SLICER_CHECK(bytecode->operands.size() == 2); in Visit()
183 SLICER_CHECK(bytecode->operands.size() == 2); in Visit()
192 SLICER_CHECK(bytecode->operands.size() == 1); in Visit()
199 SLICER_CHECK(bytecode->operands.size() == 2); in Visit()
209 SLICER_CHECK(bytecode->operands.size() == 1); in Visit()
[all …]
/tools/loganalysis/tests/src/com/android/loganalysis/parser/
DLogcatParserTest.java52 assertEquals(1, logcat.getEvents().size()); in testParse_anr()
53 assertEquals(1, logcat.getAnrs().size()); in testParse_anr()
76 assertEquals(1, logcat.getEvents().size()); in testParse_anr_pid()
77 assertEquals(1, logcat.getAnrs().size()); in testParse_anr_pid()
99 assertEquals(1, logcat.getEvents().size()); in testParse_java_crash()
100 assertEquals(1, logcat.getJavaCrashes().size()); in testParse_java_crash()
139 assertEquals(1, logcat.getEvents().size()); in testParse_test_exception()
140 assertEquals(1, logcat.getJavaCrashes().size()); in testParse_test_exception()
176 assertEquals(1, logcat.getEvents().size()); in testParse_test_exception_with_exras()
177 assertEquals(1, logcat.getJavaCrashes().size()); in testParse_test_exception_with_exras()
[all …]
DKernelLogParserTest.java47 assertEquals(1, kernelLog.getEvents().size()); in testParseLastKmsg()
48 assertEquals(1, kernelLog.getMiscEvents(KernelLogParser.KERNEL_RESET).size()); in testParseLastKmsg()
69 assertEquals(1, kernelLog.getEvents().size()); in testParseDmesg()
70 assertEquals(1, kernelLog.getMiscEvents(KernelLogParser.KERNEL_RESET).size()); in testParseDmesg()
91 assertEquals(1, kernelLog.getEvents().size()); in testParseLastMessage()
92 assertEquals(1, kernelLog.getMiscEvents(KernelLogParser.KERNEL_RESET).size()); in testParseLastMessage()
113 assertEquals(1, kernelLog.getEvents().size()); in testParseUnknownLastMessage()
114 assertEquals(1, kernelLog.getMiscEvents(KernelLogParser.KERNEL_RESET).size()); in testParseUnknownLastMessage()
132 assertEquals(0, kernelLog.getEvents().size()); in testParseKnownGoodLastMessage()
146 assertEquals(1, kernelLog.getEvents().size()); in testNoPreviousLogs()
[all …]
DBugreportParserTest.java169 assertEquals(5, bugreport.getMemInfo().size()); in testParse()
175 assertEquals(3, bugreport.getProcrank().getPids().size()); in testParse()
183 assertEquals(3, bugreport.getSystemLog().getEvents().size()); in testParse()
184 assertEquals(1, bugreport.getSystemLog().getAnrs().size()); in testParse()
191 assertEquals(4, bugreport.getSystemProps().size()); in testParse()
199 assertEquals(bugreport.getActivityService().getLocationDumps().getLocationClients().size(), in testParse()
234 assertEquals(1, bugreport.getCommandLine().size()); in testParse_command_line()
239 assertEquals(2, bugreport.getCommandLine().size()); in testParse_command_line()
246 assertEquals(2, bugreport.getCommandLine().size()); in testParse_command_line()
252 assertEquals(3, bugreport.getCommandLine().size()); in testParse_command_line()
[all …]
/tools/apksig/src/main/java/com/android/apksig/internal/util/
DByteArrayDataSink.java111 public long size() { in size() method in ByteArrayDataSink
116 public ByteBuffer getByteBuffer(long offset, int size) { in getByteBuffer() argument
117 checkChunkValid(offset, size); in getByteBuffer()
120 return ByteBuffer.wrap(mArray, (int) offset, size).slice(); in getByteBuffer()
124 public void feed(long offset, long size, DataSink sink) throws IOException { in feed() argument
125 checkChunkValid(offset, size); in feed()
128 sink.consume(mArray, (int) offset, (int) size); in feed()
132 public void copyTo(long offset, int size, ByteBuffer dest) throws IOException { in copyTo() argument
133 checkChunkValid(offset, size); in copyTo()
136 dest.put(mArray, (int) offset, size); in copyTo()
[all …]
DFileChannelDataSource.java56 public FileChannelDataSource(FileChannel channel, long offset, long size) { in FileChannelDataSource() argument
58 throw new IndexOutOfBoundsException("offset: " + size); in FileChannelDataSource()
60 if (size < 0) { in FileChannelDataSource()
61 throw new IndexOutOfBoundsException("size: " + size); in FileChannelDataSource()
65 mSize = size; in FileChannelDataSource()
69 public long size() { in size() method in FileChannelDataSource
72 return mChannel.size(); in size()
82 public FileChannelDataSource slice(long offset, long size) { in slice() argument
83 long sourceSize = size(); in slice()
84 checkChunkValid(offset, size, sourceSize); in slice()
[all …]
DChainedDataSource.java34 mTotalSize = Arrays.stream(sources).mapToLong(src -> src.size()).sum(); in ChainedDataSource()
38 public long size() { in size() method in ChainedDataSource
43 public void feed(long offset, long size, DataSink sink) throws IOException { in feed() argument
44 if (offset + size > mTotalSize) { in feed()
50 if (offset >= src.size()) { in feed()
51 offset -= src.size(); in feed()
56 long remaining = src.size() - offset; in feed()
57 if (remaining >= size) { in feed()
58 src.feed(offset, size, sink); in feed()
64 size -= remaining; in feed()
[all …]
DByteBufferDataSource.java50 public long size() { in size() method in ByteBufferDataSource
55 public ByteBuffer getByteBuffer(long offset, int size) { in getByteBuffer() argument
56 checkChunkValid(offset, size); in getByteBuffer()
60 int chunkLimit = chunkPosition + size; in getByteBuffer()
78 public void copyTo(long offset, int size, ByteBuffer dest) { in copyTo() argument
79 dest.put(getByteBuffer(offset, size)); in copyTo()
83 public void feed(long offset, long size, DataSink sink) throws IOException { in feed() argument
84 if ((size < 0) || (size > mSize)) { in feed()
85 throw new IndexOutOfBoundsException("size: " + size + ", source size: " + mSize); in feed()
87 sink.consume(getByteBuffer(offset, (int) size)); in feed()
[all …]
/tools/tradefederation/core/tests/src/com/android/tradefed/invoker/shard/
DStrictShardHelperTest.java120 assertEquals(1, mConfig.getTests().size()); in testShardConfig_internal()
129 assertEquals(1, argument.getTests().size()); in testShardConfig_internal()
151 assertEquals(1, mConfig.getTests().size()); in testShardConfig_internal_shardIndex()
156 assertEquals(1, mConfig.getTests().size()); in testShardConfig_internal_shardIndex()
182 assertEquals(1, mConfig.getTests().size()); in testShardConfig_internal_shardIndex_notShardable_shard0()
187 assertEquals(1, mConfig.getTests().size()); in testShardConfig_internal_shardIndex_notShardable_shard0()
213 assertEquals(1, mConfig.getTests().size()); in testShardConfig_internal_shardIndex_notShardable_shard1()
219 assertEquals(0, mConfig.getTests().size()); in testShardConfig_internal_shardIndex_notShardable_shard1()
292 assertEquals(3, res.size()); in testMergeSuite_shard0()
310 assertEquals(3, res.size()); in testMergeSuite_shard1()
[all …]
/tools/apkzlib/src/main/java/com/android/tools/build/apkzlib/zip/
DFileUseMap.java55 private long size; field in FileUseMap
83 FileUseMap(long size, int minFreeSize) { in FileUseMap() argument
84 Preconditions.checkArgument(size >= 0, "size < 0"); in FileUseMap()
87 this.size = size; in FileUseMap()
92 if (size > 0) { in FileUseMap()
93 internalAdd(FileUseMapEntry.makeFree(0, size)); in FileUseMap()
132 Preconditions.checkArgument(entry.getStart() < size, "entry.getStart() >= size"); in add()
133 Preconditions.checkArgument(entry.getEnd() <= size, "entry.getEnd() > size"); in add()
264 if (end < size) { in coalesce()
299 if (size == 0) { in truncate()
[all …]
DZipField.java71 private final int size; field in ZipField
93 ZipField(int offset, int size, @Nonnull String name, ZipFieldInvariant... invariants) { in ZipField() argument
95 Preconditions.checkArgument(size == 2 || size == 4, "size != 2 && size != 4"); in ZipField()
99 this.size = size; in ZipField()
112 ZipField(int offset, int size, long expected, @Nonnull String name) { in ZipField() argument
114 Preconditions.checkArgument(size == 2 || size == 4, "size != 2 && size != 4"); in ZipField()
118 this.size = size; in ZipField()
147 if (bytes.remaining() < size) { in skip()
152 bytes.position(bytes.position() + size); in skip()
164 if (bytes.remaining() < size) { in read()
[all …]
/tools/apkzlib/src/main/java/com/android/tools/build/apkzlib/sign/
DZFileDataSource.java48 private final long size; field in ZFileDataSource
58 size = -1; in ZFileDataSource()
66 public ZFileDataSource(@Nonnull ZFile file, long offset, long size) { in ZFileDataSource() argument
68 Preconditions.checkArgument(size >= 0, "size < 0"); in ZFileDataSource()
71 this.size = size; in ZFileDataSource()
75 public long size() { in size() method in ZFileDataSource
76 if (size == -1) { in size()
85 return size; in size()
90 public DataSource slice(long offset, long size) { in slice() argument
91 long sourceSize = size(); in slice()
[all …]
/tools/tradefederation/core/tests/src/com/android/tradefed/config/
DConfigurationFactoryTest.java100 assertTrue(spyFactory.getMapConfig().size() > 0); in testLoadAllConfigs()
145 assertTrue(spyFactory.getMapConfig().size() > 0); in testLoadAndPrintAllConfigs()
236 assertEquals(2, map.size()); in testConfigId_hashKey()
245 assertEquals(4, map.size()); in testConfigId_hashKey()
413 assertTrue(listConfigs.size() != 0); in testListAllConfigs()
427 assertTrue(listConfigs.size() != 0); in testListSubConfig()
460 assertEquals(2, config.getTests().size()); in testCreateConfigurationFromArgs_defaultTemplateInclude_default()
478 assertEquals(3, config.getTests().size()); in testCreateConfigurationFromArgs_includeTemplateIncludeWithDefault()
498 assertEquals(3, config.getTests().size()); in testCreateConfigurationFromArgs_defaultTemplateInclude_alternate()
944 assertTrue(tmp.getTests().size() == 2); in testCreateConfigurationFromArgs_templateName_notExistTest()
[all …]
DArgsOptionParserTest.java371 assertEquals(1, object.mMyOption.size()); in testParse_oneMapArg()
386 assertEquals(1, object.mMyOption.size()); in testParse_oneMapArg_emptyString()
597 assertEquals(0, leftovers.size()); in testParseBestEffort_oneArg()
612 assertEquals(0, leftovers.size()); in testParseBestEffort_oneArg_overwrite()
626 assertEquals(1, leftovers.size()); in testParseBestEffort_oneArg_oneLeftover()
643 assertEquals(3, leftovers.size()); in testParseBestEffort_oneLeftover_oneArg()
662 assertEquals(3, leftovers.size()); in testParseBestEffort_manualStop()
682 assertEquals(4, leftovers.size()); in testParseBestEffort_bareWord()
702 assertEquals(2, leftovers.size()); in testParseBestEffort_oneArg_manualStop()
721 assertEquals(3, leftovers.size()); in testParseBestEffort_oneArg_bareWord()
[all …]
/tools/dexter/dexter/
Ddexter.cc131 for (dex::u4 i = 0; i < dexMap.size; ++i) { in PrintDexMap()
191 dex::u4 sectionByteSize = (i == dexMap.size - 1) in PrintDexMap()
196 sectionByteSize, section.size); in PrintDexMap()
203 printf(" strings : %zu\n", dex_ir->strings.size()); in PrintDexIrStats()
204 printf(" types : %zu\n", dex_ir->types.size()); in PrintDexIrStats()
205 printf(" protos : %zu\n", dex_ir->protos.size()); in PrintDexIrStats()
206 printf(" fields : %zu\n", dex_ir->fields.size()); in PrintDexIrStats()
207 printf(" encoded_fields : %zu\n", dex_ir->encoded_fields.size()); in PrintDexIrStats()
208 printf(" methods : %zu\n", dex_ir->methods.size()); in PrintDexIrStats()
209 printf(" encoded_methods : %zu\n", dex_ir->encoded_methods.size()); in PrintDexIrStats()
[all …]
/tools/apksig/src/test/java/com/android/apksig/internal/util/
DChainedDataSourceTest.java47 assertEquals(10, mChain.size()); in setUp()
51 for (int begin = 0; begin < mChain.size(); begin++) { in feedAllPossibleRanges()
52 for (int end = begin + 1; end < mChain.size(); end++) { in feedAllPossibleRanges()
53 int size = end - begin; in feedAllPossibleRanges() local
54 ReadableDataSink sink = DataSinks.newInMemoryDataSink(size); in feedAllPossibleRanges()
55 mChain.feed(begin, size, sink); in feedAllPossibleRanges()
58 sink.getByteBuffer(0, size)); in feedAllPossibleRanges()
65 mChain.feed(0, mChain.size() + 1, DataSinks.newInMemoryDataSink(3)); in feedMoreThanAvailable()
69 for (int begin = 0; begin < mChain.size(); begin++) { in getByteBufferFromAllPossibleRanges()
70 for (int end = begin + 1; end < mChain.size(); end++) { in getByteBufferFromAllPossibleRanges()
[all …]
/tools/apksig/src/main/java/com/android/apksig/internal/apk/
DApkSigningBlockUtils.java183 ZipUtils.setZipEocdCentralDirectoryOffset(modifiedEocd, beforeApkSigningBlock.size()); in verifyIntegrity()
195 if ((beforeApkSigningBlock.size() % ANDROID_COMMON_PAGE_ALIGNMENT_BYTES != 0)) { in verifyIntegrity()
198 beforeApkSigningBlock.size()); in verifyIntegrity()
202 long signingBlockSize = centralDirOffset - beforeApkSigningBlock.size(); in verifyIntegrity()
351 private static ByteBuffer getByteBuffer(ByteBuffer source, int size) { in getByteBuffer() argument
352 if (size < 0) { in getByteBuffer()
353 throw new IllegalArgumentException("size: " + size); in getByteBuffer()
357 int limit = position + size; in getByteBuffer()
455 getChunkCount(input.size(), CONTENT_DIGESTED_CHUNK_MAX_SIZE_BYTES); in computeOneMbChunkContentDigests()
463 digestAlgorithms.toArray(new ContentDigestAlgorithm[digestAlgorithms.size()]); in computeOneMbChunkContentDigests()
[all …]
/tools/tradefederation/core/tests/src/com/android/tradefed/testtype/suite/
DGranularRetriableTestWrapperTest.java123 listener.testRunStarted(RUN_NAME, mTestCases.size()); in run()
224 mMaxTestCount = Math.max(mMaxTestCount, testCases.size()); in setTestCasesByRun()
237 if (idx >= testCases.size()) { in run()
244 listener.testRunStarted(runName, testCases.size()); in run()
363 assertEquals(1, granularTestWrapper.getTestRunResultCollected().size()); in testRun_withMultipleRun()
365 maxRunCount, granularTestWrapper.getTestRunResultCollected().get(RUN_NAME).size()); in testRun_withMultipleRun()
366 assertEquals(1, granularTestWrapper.getFinalTestRunResults().size()); in testRun_withMultipleRun()
422 assertEquals(1, granularTestWrapper.getTestRunResultCollected().size()); in testRun_withMultipleRun_becomePass()
424 maxRunCount, granularTestWrapper.getTestRunResultCollected().get(RUN_NAME).size()); in testRun_withMultipleRun_becomePass()
425 assertEquals(1, granularTestWrapper.getFinalTestRunResults().size()); in testRun_withMultipleRun_becomePass()
[all …]
DBaseTestSuiteTest.java133 assertEquals(1, mRunner.getIncludeFilter().size()); in testSetupFilters_match_parameterized()
164 assertEquals(2, mRunner.getIncludeFilter().size()); in testSetupFilters_parameterized_filter()
192 assertEquals(1, mRunner.getIncludeFilter().size()); in testSetupFilters_match()
216 assertEquals(1, mRunner.getIncludeFilter().size()); in testSetupFilters_oneMatch()
263 assertEquals(1, mRunner.getIncludeFilter().size()); in testSetupFilters_multiMatchOneExactMatch()
283 assertEquals(4, configMap.size()); in testLoadTests()
300 assertEquals(2, configMap.size()); in testLoadTests_suite2()
316 assertEquals(0, configMap.size()); in testLoadTests_emptyFilter()
349 assertEquals(4, tests.size()); in testSplit()
383 assertEquals(4, tests.size()); in testSplit_withFilters()
[all …]
DTestMappingSuiteRunnerTest.java272 assertEquals(4, configMap.size()); in testLoadTests_testMappingsZip()
289 .size()); in testLoadTests_testMappingsZip()
345 assertEquals(2, configMap.size()); in testLoadTests_testMappingsZipFoundTestsWithKeywords()
361 .size()); in testLoadTests_testMappingsZipFoundTestsWithKeywords()
465 assertEquals(1, mRunner.getIncludeFilter().size()); in testLoadTests_testMappingsZipHostTests()
511 assertEquals(4, tests.size()); in testLoadTests_shard()
558 assertEquals(2, mRunner.getIncludeFilter().size()); in testLoadTests_shardNoTest()
560 assertEquals(0, mRunner.getTestMappingPaths().size()); in testLoadTests_shardNoTest()
611 assertEquals(2, configMap.size()); in testLoadTestsForMultiAbi()
660 assertEquals(2, configMap.size()); in testLoadTestsWithModule()
[all …]
DSuiteModuleLoaderTest.java261 assertTrue(checker.testList.size() == 4); in testInjectConfigOptions_moduleArgs()
267 assertTrue(checker.testMap.size() == 2); in testInjectConfigOptions_moduleArgs()
335 assertTrue(checker.testList.size() == 4); in testInjectConfigOptions_testArgs()
341 assertTrue(checker.testMap.size() == 2); in testInjectConfigOptions_testArgs()
402 assertEquals(1, res.size()); in testFilterParameterized()
407 assertEquals(1, stubTest.getExcludeFilters().size()); in testFilterParameterized()
417 .size()); in testFilterParameterized()
452 assertEquals(1, res.size()); in testFilterParameterized_excludeFilter_parameter()
479 assertEquals(1, res.size()); in testFilterParameterized_includeFilter_base()
506 assertEquals(1, res.size()); in testFilterParameterized_includeFilter_param()
[all …]
/tools/tradefederation/core/tests/src/com/android/tradefed/util/testmapping/
DTestMappingTest.java72 assertEquals(1, tests.size()); in testparseTestMapping()
81 assertEquals(1, tests.size()); in testparseTestMapping()
90 assertEquals(2, tests.size()); in testparseTestMapping()
107 assertEquals(1, tests.size()); in testparseTestMapping()
117 assertEquals(1, testOptions.size()); in testparseTestMapping()
172 assertEquals(0, tests.size()); in testGetTests()
175 assertEquals(2, tests.size()); in testGetTests()
226 assertEquals(1, tests.size()); in testGetTests_matchKeywords()
257 assertEquals(2, paths.size()); in testGetAllTestMappingPaths_FromChildDirectory()
288 assertEquals(1, paths.size()); in testGetAllTestMappingPaths_FromParentDirectory()
[all …]
/tools/test/connectivity/acts_tests/tests/google/bt/pts/instructions/
DGATT_PTS_INSTRUCTIONS29 gattc_write_char_by_instance_id [handle] [size]
37 gattc_write_invalid_char_by_instance_id [handle] [size]
439 gattc_write_char_by_instance_id [handle] [size]
444 gattc_write_char_by_instance_id [handle] [size]
449 gattc_write_invalid_char_by_instance_id [handle] [size]
455 gattc_mod_write_char_by_instance_id [handle] [size]
461 gattc_mod_write_char_by_instance_id [handle] [size]
487 gattc_write_invalid_char_by_instance_id [handle] [size]
505 gattc_mod_write_char_by_instance_id [handle] [size]
519 gattc_mod_write_char_by_instance_id [handle] [size]
[all …]

12345678910>>...23