Home
last modified time | relevance | path

Searched refs:expected (Results 1 – 25 of 114) sorted by relevance

12345

/tools/tradefederation/core/tests/src/com/android/tradefed/result/
DConsoleResultReporterTest.java84 StringBuilder expected = new StringBuilder(); in testGetInvocationSummary_test_metrics() local
85 expected.append("Test results:\n"); in testGetInvocationSummary_test_metrics()
86 expected.append("Test Run: 1 Test, 1 Passed, 0 Failed, 0 Ignored\n"); in testGetInvocationSummary_test_metrics()
87 expected.append(" class#method: PASSED " + RUN_TIME_MS_REGEX + "\n"); in testGetInvocationSummary_test_metrics()
88 expected.append(" key1: value1\n"); in testGetInvocationSummary_test_metrics()
89 expected.append(" key2: value2\n"); in testGetInvocationSummary_test_metrics()
91 assertTrue(reporter.getInvocationSummary().matches(expected.toString())); in testGetInvocationSummary_test_metrics()
194 StringBuilder expected = new StringBuilder(); in testGetInvocationSummary_all() local
195 expected.append("Test results:\n"); in testGetInvocationSummary_all()
196 expected.append("Test Run 1: 4 Tests, 1 Passed, 1 Failed, 1 Ignored\n"); in testGetInvocationSummary_all()
[all …]
DFileMetadataCollectorTest.java53 FileMetadata expected = FileMetadata.newBuilder().build(); in testNoElements() local
55 Assert.assertEquals(actual, expected); in testNoElements()
69 FileMetadata expected = FileMetadata.newBuilder().addLogFiles(log).build(); in testSingleTypeSingleElement() local
71 Assert.assertEquals(actual, expected); in testSingleTypeSingleElement()
87 FileMetadata expected = FileMetadata.newBuilder() in testSingleTypeMultipleElements() local
90 Assert.assertEquals(actual, expected); in testSingleTypeMultipleElements()
110 FileMetadata expected = FileMetadata.newBuilder() in testMultipleTypesMultipleElements() local
113 Assert.assertEquals(actual, expected); in testMultipleTypesMultipleElements()
/tools/tradefederation/core/tests/src/com/android/tradefed/util/
DStringEscapeUtilsTest.java48 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 …]
DQuotationAwareTokenizerTest.java28 private static void verify(String input, String[] expected, String delimiter) in verify() argument
32 if (expected.length != observed.length) { in verify()
34 "but observed %s.", Arrays.toString(expected), Arrays.toString(observed))); in verify()
37 for (int i = 0; i < expected.length; ++i) { in verify()
41 i, expected[i], observed[i]), in verify()
42 expected[i], in verify()
47 private static void verify(String input, String[] expected) throws IllegalArgumentException { in verify() argument
48 verify(input, expected, " "); in verify()
56 String[] expected = new String[] {"one", "two", "three"}; in testTokenizeLine_simple() local
57 verify(input, expected); in testTokenizeLine_simple()
[all …]
DEmmaXmlReporterParserTest.java80 Map<String, String> expected = parser.getSummaryMetrics(); in testNormalParsing() local
81 assertMapHasValue(expected, EmmaXmlConstants.CLASS_TAG, "10"); in testNormalParsing()
82 assertMapHasValue(expected, EmmaXmlConstants.METHOD_TAG, "7"); in testNormalParsing()
83 assertMapHasValue(expected, EmmaXmlConstants.BLOCK_TAG, "2"); in testNormalParsing()
84 assertMapHasValue(expected, EmmaXmlConstants.LINE_TAG, "4"); in testNormalParsing()
94 Map<String, String[]> expected = parser.getDataMetrics(); in testNormalParsingData() local
95 assertMapHasValueArray(expected, EmmaXmlConstants.CLASS_TAG, in testNormalParsingData()
97 assertMapHasValueArray(expected, EmmaXmlConstants.METHOD_TAG, in testNormalParsingData()
99 assertMapHasValueArray(expected, EmmaXmlConstants.BLOCK_TAG, in testNormalParsingData()
101 assertMapHasValueArray(expected, EmmaXmlConstants.LINE_TAG, in testNormalParsingData()
DFixedByteArrayOutputStreamTest.java80 String expected = text.substring(1); in testBufferPlusOne() local
81 assertEquals(expected, writeTextIntoStreamAndReturn(text)); in testBufferPlusOne()
88 String expected = TEXT.substring(TEXT.length() - BUF_SIZE); in testBufferPlusPlus() local
89 assertEquals(expected, writeTextIntoStreamAndReturn(TEXT)); in testBufferPlusPlus()
102 String expected = full.substring(full.length() - BUF_SIZE); in testWriteWithWrap() local
104 assertEquals(expected, writeTextIntoStreamAndReturn(followup)); in testWriteWithWrap()
114 String expected = text.substring(offset); in testLessThanBufferWithOffset() local
119 assertEquals(expected, baos.toString()); in testLessThanBufferWithOffset()
132 String expected = full.substring(full.length() - BUF_SIZE); in testWriteWithOffsetAndWrap() local
138 assertEquals(expected, baos.toString()); in testWriteWithOffsetAndWrap()
DArrayUtilTest.java45 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()
DAbiUtilsTest.java107 } catch (IllegalArgumentException expected) { in getArchForAbi_emptyNull()
108 Assert.assertEquals("Abi cannot be null or empty", expected.getMessage()); in getArchForAbi_emptyNull()
113 } catch (IllegalArgumentException expected) { in getArchForAbi_emptyNull()
114 Assert.assertEquals("Abi cannot be null or empty", expected.getMessage()); in getArchForAbi_emptyNull()
129 } catch (IllegalArgumentException expected) { in getBaseArchForAbi_emptyNull()
130 Assert.assertEquals("Abi cannot be null or empty", expected.getMessage()); in getBaseArchForAbi_emptyNull()
135 } catch (IllegalArgumentException expected) { in getBaseArchForAbi_emptyNull()
136 Assert.assertEquals("Abi cannot be null or empty", expected.getMessage()); in getBaseArchForAbi_emptyNull()
DListInstrumentationParserTest.java127 private static boolean areTargetsEqual(InstrumentationTarget expected, in areTargetsEqual() argument
130 return Objects.equals(expected.packageName, actual.packageName) && in areTargetsEqual()
131 Objects.equals(expected.runnerName, actual.runnerName) && in areTargetsEqual()
132 Objects.equals(expected.targetName, actual.targetName); in areTargetsEqual()
/tools/apkzlib/src/main/java/com/android/tools/build/apkzlib/zip/
DZipField.java77 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/tradefederation/core/tests/src/com/android/tradefed/testtype/suite/
DValidateSuiteConfigHelperTest.java74 } catch (RuntimeException expected) { in testNotRunningAsSuite_buildProvider()
75 assertTrue(expected.getMessage().contains(Configuration.BUILD_PROVIDER_TYPE_NAME)); in testNotRunningAsSuite_buildProvider()
94 } catch (RuntimeException expected) { in testNotRunningAsSuite_MultiDevice_buildProvider()
95 assertTrue(expected.getMessage().contains(Configuration.BUILD_PROVIDER_TYPE_NAME)); in testNotRunningAsSuite_MultiDevice_buildProvider()
128 } catch (RuntimeException expected) { in testNotRunningAsSuite_resultReporter()
129 assertTrue(expected.getMessage().contains(Configuration.RESULT_REPORTER_TYPE_NAME)); in testNotRunningAsSuite_resultReporter()
144 } catch (RuntimeException expected) { in testNotRunningAsSuite_multi_resultReporter()
145 assertTrue(expected.getMessage().contains(Configuration.RESULT_REPORTER_TYPE_NAME)); in testNotRunningAsSuite_multi_resultReporter()
169 } catch (RuntimeException expected) { in testTargetPrep_badPreparer()
170 assertTrue(expected.getMessage().contains(Configuration.TARGET_PREPARER_TYPE_NAME)); in testTargetPrep_badPreparer()
[all …]
/tools/loganalysis/tests/src/com/android/loganalysis/util/
DArrayUtilTest.java45 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/apksig/src/test/java/com/android/apksig/internal/test/
DMoreAsserts.java30 public static void assertByteBufferEquals(byte[] expected, ByteBuffer actual) { in assertByteBufferEquals() argument
31 assertByteBufferEquals(null, expected, actual); in assertByteBufferEquals()
38 public static void assertByteBufferEquals(String message, byte[] expected, ByteBuffer actual) { in assertByteBufferEquals() argument
49 assertArrayEquals(message, expected, actualArr); in assertByteBufferEquals()
/tools/apksig/src/test/java/com/android/apksig/internal/asn1/ber/
DBerDataValueReaderTestBase.java97 @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/tests/src/com/android/tradefed/config/
DConfigurationXmlParserTest.java265 } catch (ConfigurationException expected) { in testParse_deviceTagNoName()
266 assertEquals(expectedException, expected.getMessage()); in testParse_deviceTagNoName()
324 } catch(ConfigurationException expected) { in testParse_deviceTagAndObjectOutside()
325 assertEquals(expectedException, expected.getMessage()); in testParse_deviceTagAndObjectOutside()
348 } catch(ConfigurationException expected) { in testParse_withDeviceTag()
371 } catch(ConfigurationException expected) { in testParse_withDeviceInvalidName()
372 assertEquals(expectedException, expected.getMessage()); in testParse_withDeviceInvalidName()
394 } catch(ConfigurationException expected) { in testParse_withDeviceReservedName()
395 assertEquals(expectedException, expected.getMessage()); in testParse_withDeviceReservedName()
417 } catch (ConfigurationException expected) { in testParse_includeWithExtraAttributes()
[all …]
DConfigurationDescriptorTest.java58 } catch (OptionNotAllowedException expected) { in testRejectCommandLine()
62 expected.getMessage()); in testRejectCommandLine()
/tools/test/connectivity/acts/framework/acts/
Dasserts.py305 def __init__(self, expected, expected_regexp=None, extras=None): argument
306 self.expected = expected
317 exc_name = self.expected.__name__
319 exc_name = str(self.expected)
322 if not issubclass(exc_type, self.expected):
/tools/tradefederation/core/tests/src/com/android/tradefed/device/
DFastbootHelperTest.java85 } catch (IllegalArgumentException expected) { in testConstructor_noRunUtil()
86 assertEquals("runUtil cannot be null", expected.getMessage()); in testConstructor_noRunUtil()
97 } catch (IllegalArgumentException expected) { in testConstructor_badPath()
98 assertEquals("fastboot cannot be null or empty", expected.getMessage()); in testConstructor_badPath()
103 } catch (IllegalArgumentException expected) { in testConstructor_badPath()
104 assertEquals("fastboot cannot be null or empty", expected.getMessage()); in testConstructor_badPath()
/tools/tradefederation/core/tests/src/com/android/tradefed/targetprep/
DAppSetupTest.java87 } catch (IllegalArgumentException expected) { in testSetup_notIAppBuildInfo()
88 assertEquals("Provided buildInfo is not a AppBuildInfo", expected.getMessage()); in testSetup_notIAppBuildInfo()
109 } catch (BuildError expected) { in testSetup_failToInstall()
111 tmpFile.getName(), SERIAL), expected.getMessage()); in testSetup_failToInstall()
134 } catch (TargetSetupError expected) { in testSetup_aaptCannotParse()
136 tmpFile.getAbsolutePath()), expected.getMessage()); in testSetup_aaptCannotParse()
166 } catch (TargetSetupError expected) { in testSetup_noPackageName()
168 tmpFile.getAbsolutePath()), expected.getMessage()); in testSetup_noPackageName()
198 } catch (TargetSetupError expected) { in testSetup_checkMinSdk_failParsing()
200 tmpFile.getName()), expected.getMessage()); in testSetup_checkMinSdk_failParsing()
[all …]
DTestFilePushSetupTest.java128 } catch (IllegalArgumentException expected) { in testSetup_notDeviceBuildInfo()
130 expected.getMessage()); in testSetup_notDeviceBuildInfo()
157 } catch (TargetSetupError expected) { in testAltDirOverride_null()
158 assertEquals("Missing handler for alt-dir-behavior: null null", expected.getMessage()); in testAltDirOverride_null()
172 } catch (TargetSetupError expected) { in testAltDirOverride_empty()
174 + "alternative directories were provided null", expected.getMessage()); in testAltDirOverride_empty()
217 } catch (TargetSetupError expected) { in testThrowIfNotFound()
221 expected.getMessage()); in testThrowIfNotFound()
/tools/tradefederation/core/tests/src/com/android/tradefed/sandbox/
DSandboxConfigUtilTest.java96 } catch (ConfigurationException expected) { in testDumpVersion_failed()
97 assertEquals("Ouch I failed", expected.getMessage()); in testDumpVersion_failed()
108 } catch (SandboxConfigurationException expected) { in testDumpVersion_badClasspath()
111 expected.getMessage()); in testDumpVersion_badClasspath()
/tools/tradefederation/core/tests/src/com/android/tradefed/testtype/
DGTestXmlResultParserTest.java174 String expected = "Failed to get an xml output from tests, it probably crashed"; in testParseWithEmptyFile() local
181 mockRunListener.testRunFailed(expected); in testParseWithEmptyFile()
199 String expected = "Test run incomplete. Expected 7 tests, received 6"; in testParseUnexpectedNumberTest() local
212 mockRunListener.testRunFailed(expected); in testParseUnexpectedNumberTest()
231 String expected = "Test run incomplete. Expected 6 tests, received 3"; in testParseSimpleFile_badXmltag() local
244 mockRunListener.testRunFailed(expected); in testParseSimpleFile_badXmltag()
269 String expected = "Failed to get an xml output from tests, it probably crashed\nlogs:\n" in testParseWithEmptyFile_AdditionalOutput() local
277 mockRunListener.testRunFailed(expected); in testParseWithEmptyFile_AdditionalOutput()
/tools/tradefederation/core/atest/
Dcli_translator_unittest.py147 expected = set(['test2', 'test1'])
148 expected_all_tests = {'presubmit': expected,
150 self.assertEqual(expected, tests)
156 expected = set(['test1', 'test2', 'test3'])
157 self.assertEqual(expected, tests)
/tools/tradefederation/core/tests/src/com/android/tradefed/util/keystore/
DJSONFileKeyStoreClientTest.java54 } catch(KeyStoreException expected) { in testKeyStoreFetchUnreadableFile()
56 expected.getMessage()); in testKeyStoreFetchUnreadableFile()
67 } catch(KeyStoreException expected) { in testKeyStoreFetchEmptyFile()
/tools/apksig/src/test/java/com/android/apksig/internal/asn1/
DAsn1BerParserTest.java34 @Test(expected = NullPointerException.class)
39 @Test(expected = Asn1DecodingException.class)
84 } catch (Asn1DecodingException expected) {} in testOid()
154 } catch (Asn1DecodingException expected) {} in testChoiceWithDifferentTypedOptions()
161 } catch (Asn1DecodingException expected) {} in testChoiceWithDifferentTypedOptions()
190 } catch (Asn1DecodingException expected) {} in testChoiceWithSameTypedOptions()
193 @Test(expected = Asn1DecodingException.class)
252 @Test(expected = Asn1DecodingException.class)

12345