/tools/tradefederation/core/javatests/com/android/tradefed/util/ |
D | QuotationAwareTokenizerTest.java | 34 private static void verify(String input, String[] expected, String delimiter) in verify() argument 38 if (expected.length != observed.length) { in verify() 40 "but observed %s.", Arrays.toString(expected), Arrays.toString(observed))); in verify() 43 for (int i = 0; i < expected.length; ++i) { in verify() 47 i, expected[i], observed[i]), in verify() 48 expected[i], in verify() 53 private static void verify(String input, String[] expected) throws IllegalArgumentException { in verify() argument 54 verify(input, expected, " "); in verify() 61 String[] expected = new String[] {"one", "two", "three"}; in testTokenizeLine_simple() local 62 verify(input, expected); in testTokenizeLine_simple() [all …]
|
D | StringEscapeUtilsTest.java | 48 List<String> expected = new ArrayList<>(); in testParams_noQuotesNoSpaces() local 49 expected.add("foo"); in testParams_noQuotesNoSpaces() 50 expected.add("bar"); in testParams_noQuotesNoSpaces() 51 assertArrayEquals(expected.toArray(), in testParams_noQuotesNoSpaces() 52 StringEscapeUtils.paramsToArgs(expected).toArray()); in testParams_noQuotesNoSpaces() 61 List<String> expected = new ArrayList<>(); in testParams_noQuotesWithSpaces() local 62 expected.add("foo"); in testParams_noQuotesWithSpaces() 63 expected.add("bar bar"); in testParams_noQuotesWithSpaces() 65 StringEscapeUtils.paramsToArgs(expected).toArray()); in testParams_noQuotesWithSpaces() 73 List<String> expected = new ArrayList<>(); in testParams_plainQuotes() local [all …]
|
D | FixedByteArrayOutputStreamTest.java | 80 String expected = text.substring(1); in testBufferPlusOne() local 81 assertEquals(expected, writeTextIntoStreamAndReturn(text)); in testBufferPlusOne() 87 String expected = TEXT.substring(TEXT.length() - BUF_SIZE); in testBufferPlusPlus() local 88 assertEquals(expected, writeTextIntoStreamAndReturn(TEXT)); in testBufferPlusPlus() 103 String expected = full.substring(full.length() - BUF_SIZE); in testWriteWithWrap() local 105 assertEquals(expected, writeTextIntoStreamAndReturn(followup)); in testWriteWithWrap() 117 String expected = text.substring(offset); in testLessThanBufferWithOffset() local 122 assertEquals(expected, baos.toString()); in testLessThanBufferWithOffset() 137 String expected = full.substring(full.length() - BUF_SIZE); in testWriteWithOffsetAndWrap() local 143 assertEquals(expected, baos.toString()); in testWriteWithOffsetAndWrap()
|
D | ArrayUtilTest.java | 45 final String expected = "alpha, beta, gamma"; in testJoinCollection() local 47 assertEquals(expected, str); in testJoinCollection() 54 final String expected = "alpha, beta, gamma"; in testJoinArray() local 56 assertEquals(expected, str); in testJoinArray() 62 final String expected = "alpha, beta, gamma"; in testJoinNormal() local 64 assertEquals(expected, str); in testJoinNormal()
|
D | AbiUtilsTest.java | 108 } catch (IllegalArgumentException expected) { in getArchForAbi_emptyNull() 109 Assert.assertEquals("Abi cannot be null or empty", expected.getMessage()); in getArchForAbi_emptyNull() 114 } catch (IllegalArgumentException expected) { in getArchForAbi_emptyNull() 115 Assert.assertEquals("Abi cannot be null or empty", expected.getMessage()); in getArchForAbi_emptyNull() 130 } catch (IllegalArgumentException expected) { in getBaseArchForAbi_emptyNull() 131 Assert.assertEquals("Abi cannot be null or empty", expected.getMessage()); in getBaseArchForAbi_emptyNull() 136 } catch (IllegalArgumentException expected) { in getBaseArchForAbi_emptyNull() 137 Assert.assertEquals("Abi cannot be null or empty", expected.getMessage()); in getBaseArchForAbi_emptyNull()
|
D | ShellOutputReceiverStreamTest.java | 64 final byte[] expected = new byte[] {expectedByte}; in testUpperBitsIgnoredInSingleByteWrite() 65 assertArrayEquals(expected, mReceiver.getReceivedOutput()); in testUpperBitsIgnoredInSingleByteWrite() 74 final byte[] expected = new byte[] {(byte) mRandomTestByte, (byte) mRandomTestByte}; in testWriteSingleBytes() 75 assertArrayEquals(expected, mReceiver.getReceivedOutput()); in testWriteSingleBytes() 100 final byte[] expected = Arrays.copyOfRange(mRandomTestData, 0, len); in testWritePartialByteArray() 101 assertArrayEquals(expected, mReceiver.getReceivedOutput()); in testWritePartialByteArray()
|
/tools/apkzlib/src/main/java/com/android/tools/build/apkzlib/zip/ |
D | ZipField.java | 77 private final Long expected; field in ZipField 100 expected = null; in ZipField() 112 ZipField(int offset, int size, long expected, @Nonnull String name) { in ZipField() argument 119 this.expected = expected; in ZipField() 205 Preconditions.checkState(expected != null, "expected == null"); in verify() 206 verify(bytes, expected, verifyLog); in verify() 218 void verify(@Nonnull ByteBuffer bytes, long expected) throws IOException { in verify() argument 219 verify(bytes, expected, null); in verify() 235 long expected, in verify() argument 237 checkVerifiesInvariants(expected); in verify() [all …]
|
/tools/asuite/aidegen/lib/ |
D | clion_project_file_gen_unittest.py | 106 expected = templates.CMAKELISTS_HEADER.replace( 109 expected = expected.replace( 111 expected = expected.replace( 114 self.assertEqual(content, expected) 132 expected = clion_project_file_gen._SET_C_COMPILER.format( 135 self.assertEqual(content, expected) 149 expected = '' 150 self.assertEqual(content, expected) 169 expected = header + ''.join(src_heads) + srcs + '\n' + tail 170 self.assertEqual(content, expected) [all …]
|
D | common_util_unittest.py | 69 expected = (unittest_constants.TEST_MODULE, os.path.join( 72 expected, common_util.get_related_paths( 76 self.assertEqual(expected, common_util.get_related_paths( 115 expected = (rel_path, abs_path) 117 self.assertEqual(expected, result) 123 expected = ('', '/a') 125 self.assertEqual(expected, result) 131 expected = ('b', '/a/b') 133 self.assertEqual(expected, result) 135 self.assertEqual(expected, result) [all …]
|
D | native_util_unittest.py | 74 expected = abs_path 76 self.assertEqual(result, expected) 79 self.assertEqual(result, expected) 81 expected = current_parent 83 self.assertEqual(result, expected) 85 expected = 'a/b' 87 self.assertEqual(result, expected) 100 expected = (parent, targets) 107 self.assertEqual(result, expected) 124 expected = (parent, result_targets) [all …]
|
/tools/test/connectivity/acts/framework/tests/libs/logging/ |
D | log_stream_test.py | 218 expected = mock.MagicMock() 219 with self.patch('MovableFileHandler', return_value=expected): 223 self.assertEqual(log.handlers[1], expected) 231 expected = mock.MagicMock() 232 with self.patch('MovableRotatingFileHandler', return_value=expected): 236 self.assertEqual(log.handlers[1], expected) 242 expected = mock.MagicMock() 244 with self.patch('MovableRotatingFileHandler', return_value=expected): 249 self.assertEqual(expected, fh, 257 expected = mock.MagicMock() [all …]
|
/tools/tradefederation/core/javatests/com/android/tradefed/testtype/suite/ |
D | ValidateSuiteConfigHelperTest.java | 71 } catch (RuntimeException expected) { in testNotRunningAsSuite_buildProvider() 72 assertTrue(expected.getMessage().contains(Configuration.BUILD_PROVIDER_TYPE_NAME)); in testNotRunningAsSuite_buildProvider() 91 } catch (RuntimeException expected) { in testNotRunningAsSuite_MultiDevice_buildProvider() 92 assertTrue(expected.getMessage().contains(Configuration.BUILD_PROVIDER_TYPE_NAME)); in testNotRunningAsSuite_MultiDevice_buildProvider() 125 } catch (RuntimeException expected) { in testNotRunningAsSuite_resultReporter() 126 assertTrue(expected.getMessage().contains(Configuration.RESULT_REPORTER_TYPE_NAME)); in testNotRunningAsSuite_resultReporter() 141 } catch (RuntimeException expected) { in testNotRunningAsSuite_multi_resultReporter() 142 assertTrue(expected.getMessage().contains(Configuration.RESULT_REPORTER_TYPE_NAME)); in testNotRunningAsSuite_multi_resultReporter() 165 } catch (RuntimeException expected) { in testMetricCollectors() 167 expected.getMessage() in testMetricCollectors() [all …]
|
/tools/asuite/aidegen/project/ |
D | project_splitter_unittest.py | 298 expected = [ 305 expected, self.split_projs._get_rel_project_soong_paths()) 309 expected = ['a/b/c/d'] 310 self.assertEqual(expected, project_splitter._get_real_dependencies_jars( 311 [], expected)) 312 expected = ['a/b/c/d.jar'] 313 self.assertEqual(expected, project_splitter._get_real_dependencies_jars( 314 ['a/e'], expected)) 315 expected = ['a/b/c/d.jar'] 317 ['a/b'], expected)) [all …]
|
/tools/metalava/metalava/src/test/java/com/android/tools/metalava/cli/signature/ |
D | MergeSignaturesCommandTest.kt | 134 val expected = in Test merging API signature files() constant 159 expectedOutput = expected, in Test merging API signature files() 225 val expected = in Test merging API signature files with reverse dependency() constant 239 expectedOutput = expected, in Test merging API signature files with reverse dependency() 276 val expected = in Test merging 3 API signature files() constant 298 checkMergeSignatures(source1, source2, source3, expectedOutput = expected) in Test merging 3 API signature files() 319 val expected = in Test can merge API signature files with duplicate class() constant 327 checkMergeSignatures(source1, source2, expectedOutput = expected) in Test can merge API signature files with duplicate class() 379 val expected = in Test can merge API signature files with duplicate class and different annotations() constant 388 checkMergeSignatures(source1, source2, expectedOutput = expected) in Test can merge API signature files with duplicate class and different annotations()
|
/tools/test/connectivity/acts/framework/acts/controllers/buds_lib/test_actions/ |
D | bt_utils.py | 248 expected = WEARABLE_BT_PROTOCOLS 251 expected[device.dut_type][key] = profiles[key] 254 expected[device.dut_type]), 258 msg_fmt = self._get_formatted_output(expected[device.dut_type], 264 def _get_formatted_output(self, expected, actual): argument 281 for key in expected.keys(): 282 if expected[key] != actual[key]: 283 msg += mismatch_format.format(key, expected[key], actual[key]) 286 def _compare_profile(self, device, expected): argument 291 for key in expected.keys(): [all …]
|
/tools/tradefederation/core/javatests/com/android/tradefed/config/ |
D | ConfigurationXmlParserTest.java | 91 } catch (ConfigurationException expected) { in testParse_interleaved() 96 expected.getMessage()); in testParse_interleaved() 307 } catch (ConfigurationException expected) { in testParse_deviceTagNoName() 308 assertEquals(expectedException, expected.getMessage()); in testParse_deviceTagNoName() 362 } catch (ConfigurationException expected) { in testParse_deviceTagAndObjectOutside() 363 assertEquals(expectedException, expected.getMessage()); in testParse_deviceTagAndObjectOutside() 386 } catch (ConfigurationException expected) { in testParse_withDeviceTag() 409 } catch (ConfigurationException expected) { in testParse_withDeviceInvalidName() 410 assertEquals(expectedException, expected.getMessage()); in testParse_withDeviceInvalidName() 436 } catch (ConfigurationException expected) { in testParse_withDeviceReservedName() [all …]
|
/tools/acloud/public/ |
D | report_test.py | 31 expected = { 38 self.assertEqual(test_report.data, expected) 85 expected = { 98 self.assertEqual(test_report.data, expected) 107 expected = { 117 self.assertEqual(test_report.data, expected) 126 expected = { 140 self.assertEqual(test_report.data, expected)
|
/tools/tradefederation/core/javatests/com/android/tradefed/lite/ |
D | SampleTests.java | 34 int expected = 4; in testAddition() local 36 assertEquals(expected, res); in testAddition() 41 int expected = 4; in testMultiplication() local 43 assertEquals(expected, res); in testMultiplication() 48 int expected = 10; in testSubtraction() local 50 assertEquals(expected, res); in testSubtraction()
|
/tools/apksig/src/test/java/com/android/apksig/internal/asn1/ber/ |
D | BerDataValueReaderTestBase.java | 97 @Test(expected = BerDataValueFormatException.class) 107 @Test(expected = BerDataValueFormatException.class) 134 @Test(expected = BerDataValueFormatException.class) 139 @Test(expected = BerDataValueFormatException.class) 144 @Test(expected = BerDataValueFormatException.class) 196 @Test(expected = BerDataValueFormatException.class) 201 @Test(expected = BerDataValueFormatException.class) 206 @Test(expected = BerDataValueFormatException.class) 211 @Test(expected = BerDataValueFormatException.class) 249 @Test(expected = BerDataValueFormatException.class)
|
/tools/tradefederation/core/javatests/com/android/tradefed/device/cloud/ |
D | GceManagerTest.java | 182 List<String> expected = in testBuildGceCommand() local 199 assertEquals(expected, result); in testBuildGceCommand() 222 List<String> expected = in testBuildGceCommand_withServiceAccountJsonKeyFile() local 239 assertEquals(expected, result); in testBuildGceCommand_withServiceAccountJsonKeyFile() 264 List<String> expected = in testBuildGceCommandWithIpDevice() local 287 assertEquals(expected, result); in testBuildGceCommandWithIpDevice() 319 List<String> expected = in testBuildGceCommandWithEmulatorBuild() local 336 assertEquals(expected, result); in testBuildGceCommandWithEmulatorBuild() 374 List<String> expected = in testBuildGceCommandWithSpecifiedImages() local 387 assertEquals(expected, result); in testBuildGceCommandWithSpecifiedImages() [all …]
|
/tools/loganalysis/javatests/com/android/loganalysis/util/ |
D | ArrayUtilTest.java | 45 final String expected = "alpha, beta, gamma"; in testJoinCollection() local 47 assertEquals(expected, str); in testJoinCollection() 55 final String expected = "alpha, beta, gamma"; in testJoinArray() local 57 assertEquals(expected, str); in testJoinArray() 64 final String expected = "alpha, beta, gamma"; in testJoinNormal() local 66 assertEquals(expected, str); in testJoinNormal()
|
/tools/tradefederation/core/javatests/com/android/tradefed/device/internal/ |
D | DeviceSnapshotHandlerTest.java | 76 } catch (HarnessRuntimeException expected) { in testSnapshot_error() 78 assertTrue(expected.getMessage().contains("random error")); in testSnapshot_error() 93 } catch (DeviceNotAvailableException expected) { in testSnapshot_dnae() 109 } catch (HarnessRuntimeException expected) { in testSnapshot_runtime() 111 assertTrue(expected.getCause() instanceof RuntimeException); in testSnapshot_runtime() 151 } catch (HarnessRuntimeException expected) { in testRestoreSnapshot_error() 153 assertTrue(expected.getMessage().contains("random error")); in testRestoreSnapshot_error() 168 } catch (DeviceNotAvailableException expected) { in testRestoreSnapshot_dnae() 184 } catch (HarnessRuntimeException expected) { in testRestoreSnapshot_runtime() 186 assertTrue(expected.getCause() instanceof RuntimeException); in testRestoreSnapshot_runtime()
|
/tools/platform-compat/java/com/android/class2nonsdklist/ |
D | SignatureSyntaxError.java | 20 public final String expected; field in SignatureSyntaxError 23 public SignatureSyntaxError(String expected, StringCursor sc) { in SignatureSyntaxError() argument 24 super(expected + " at position " + sc.position() + " in " + sc.getOriginalString()); in SignatureSyntaxError() 25 this.expected = expected; in SignatureSyntaxError()
|
D | JavadocLinkSyntaxError.java | 20 public final String expected; field in JavadocLinkSyntaxError 24 public JavadocLinkSyntaxError(String expected, StringCursor sc) { in JavadocLinkSyntaxError() argument 25 super(expected + " at position " + sc.position() + " in " + sc.getOriginalString()); in JavadocLinkSyntaxError() 26 this.expected = expected; in JavadocLinkSyntaxError()
|
/tools/platform-compat/javatest/android/processor/compat/changeid/ |
D | XmlWriterTest.java | 39 String expected = HEADER + "<config/>"; in testNoChanges() local 41 assertThat(mOutputStream.toString(), startsWith(expected)); in testNoChanges() 55 String expected = HEADER + "<config>" in testOneChange() local 59 assertThat(mOutputStream.toString(), startsWith(expected)); in testOneChange() 106 String expected = HEADER + "<config>" in testSomeChanges() local 118 assertThat(mOutputStream.toString(), startsWith(expected)); in testSomeChanges()
|