Home
last modified time | relevance | path

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

1234567

/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 …]
/tools/tradefederation/core/tests/src/com/android/tradefed/util/
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 …]
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 …]
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()
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()
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()
DShellOutputReceiverStreamTest.java64 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/
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/test/connectivity/acts/framework/tests/libs/logging/
Dlog_stream_test.py219 expected = mock.MagicMock()
220 with self.patch('MovableFileHandler', return_value=expected):
224 self.assertEqual(log.handlers[1], expected)
232 expected = mock.MagicMock()
233 with self.patch('MovableRotatingFileHandler', return_value=expected):
237 self.assertEqual(log.handlers[1], expected)
243 expected = mock.MagicMock()
245 with self.patch('MovableRotatingFileHandler', return_value=expected):
250 self.assertEqual(expected, fh,
258 expected = mock.MagicMock()
[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/tradefederation/core/tests/src/com/android/tradefed/config/
DConfigurationXmlParserTest.java86 } catch (ConfigurationException expected) { in testParse_interleaved()
91 expected.getMessage()); in testParse_interleaved()
296 } catch (ConfigurationException expected) { in testParse_deviceTagNoName()
297 assertEquals(expectedException, expected.getMessage()); in testParse_deviceTagNoName()
355 } catch(ConfigurationException expected) { in testParse_deviceTagAndObjectOutside()
356 assertEquals(expectedException, expected.getMessage()); in testParse_deviceTagAndObjectOutside()
379 } catch(ConfigurationException expected) { in testParse_withDeviceTag()
402 } catch(ConfigurationException expected) { in testParse_withDeviceInvalidName()
403 assertEquals(expectedException, expected.getMessage()); in testParse_withDeviceInvalidName()
425 } catch(ConfigurationException expected) { in testParse_withDeviceReservedName()
[all …]
DConfigurationFactoryTest.java484 } catch (ConfigurationException expected) { in testCreateConfigurationFromArgs_repeatedTemplate()
488 expected.getMessage()); in testCreateConfigurationFromArgs_repeatedTemplate()
506 } catch (ConfigurationException expected) { in testCreateConfigurationFromArgs_templateInclude_multiKey()
509 "More than one template specified for key 'target'", expected.getMessage()); in testCreateConfigurationFromArgs_templateInclude_multiKey()
866 Map<String, String> expected = new HashMap<String,String>(); in testCreateConfigurationFromArgs_templateName_notExist() local
867 expected.put(missingNameTemplate, targetName); in testCreateConfigurationFromArgs_templateName_notExist()
869 "Unused template:map parameters: %s", expected); in testCreateConfigurationFromArgs_templateName_notExist()
1314 } catch (ConfigurationException expected) { in testCreateConfiguration_includeInDevice_inDevice()
1316 "<device> tag cannot be included inside another device", expected.getMessage()); in testCreateConfiguration_includeInDevice_inDevice()
1449 } catch (ConfigurationException expected) { in testCreateConfigurationFromArgs_dryRun_keystore()
[all …]
/tools/test/connectivity/acts/framework/acts/controllers/buds_lib/test_actions/
Dbt_utils.py246 expected = WEARABLE_BT_PROTOCOLS
249 expected[device.dut_type][key] = profiles[key]
252 expected[device.dut_type]),
256 msg_fmt = self._get_formatted_output(expected[device.dut_type],
262 def _get_formatted_output(self, expected, actual): argument
279 for key in expected.keys():
280 if expected[key] != actual[key]:
281 msg += mismatch_format.format(key, expected[key], actual[key])
284 def _compare_profile(self, device, expected): argument
289 for key in expected.keys():
[all …]
/tools/asuite/aidegen/lib/
Dcommon_util_unittest.py51 expected = (uc.TEST_MODULE, os.path.join(uc.TEST_PATH, uc.TEST_MODULE))
53 expected, common_util.get_related_paths(mod_info, uc.TEST_MODULE))
57 expected, common_util.get_related_paths(mod_info, uc.TEST_MODULE))
80 expected = common_util.FAKE_MODULE_ERROR.format(uc.TEST_MODULE)
81 self.assertEqual(expected, str(ctx.exception))
86 expected = common_util.OUTSIDE_ROOT_ERROR.format(uc.TEST_MODULE)
87 self.assertEqual(expected, str(ctx.exception))
92 expected = common_util.PATH_NOT_EXISTS_ERROR.format(uc.TEST_MODULE)
93 self.assertEqual(expected, str(ctx.exception))
99 expected = common_util.NO_MODULE_DEFINED_ERROR.format(
[all …]
/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/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/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/tradefederation/core/atest/
Dcli_translator_unittest.py227 expected = set([TEST_1, TEST_2, TEST_5, TEST_7, TEST_9])
228 expected_all_tests = {'presubmit': expected,
232 self.assertEqual(expected, tests)
245 expected = set(
252 self.assertEqual(expected, tests)
264 expected = set([
271 self.assertEqual(expected, tests)
281 expected = set([TEST_1, TEST_2, TEST_5, TEST_7, TEST_9])
282 expected_all_tests = {'presubmit': expected,
286 self.assertEqual(expected, tests)
/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/device/cloud/
DGceManagerTest.java170 List<String> expected = in testBuildGceCommand() local
185 assertEquals(expected, result); in testBuildGceCommand()
208 List<String> expected = in testBuildGceCommand_withServiceAccountJsonKeyFile() local
225 assertEquals(expected, result); in testBuildGceCommand_withServiceAccountJsonKeyFile()
257 List<String> expected = in testBuildGceCommandWithEmulatorBuild() local
274 assertEquals(expected, result); in testBuildGceCommandWithEmulatorBuild()
298 List<String> expected = in testBuildGceCommandWithGceDriverParam() local
315 assertEquals(expected, result); in testBuildGceCommandWithGceDriverParam()
353 } catch (TargetSetupError expected) { in testStartGce_timeout()
354 assertEquals(expectedException, expected.getMessage()); in testStartGce_timeout()
[all …]
/tools/tradefederation/core/tests/src/com/android/tradefed/testtype/
DGTestXmlResultParserTest.java177 String expected = "Failed to get an xml output from tests, it probably crashed"; in testParseWithEmptyFile() local
184 mockRunListener.testRunFailed(expected); in testParseWithEmptyFile()
201 String expected = "Test run incomplete. Expected 7 tests, received 6"; in testParseUnexpectedNumberTest() local
214 mockRunListener.testRunFailed(expected); in testParseUnexpectedNumberTest()
234 String expected = "Test run incomplete. Expected 6 tests, received 3"; in testParseSimpleFile_badXmltag() local
247 mockRunListener.testRunFailed(expected); in testParseSimpleFile_badXmltag()
271 String expected = "Failed to get an xml output from tests, it probably crashed\nlogs:\n" in testParseWithEmptyFile_AdditionalOutput() local
279 mockRunListener.testRunFailed(expected); in testParseWithEmptyFile_AdditionalOutput()
/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/
DAsn1BerParserTest.java34 @Test(expected = NullPointerException.class)
39 @Test(expected = Asn1DecodingException.class)
117 } catch (Asn1DecodingException expected) {} in testOid()
196 } catch (Asn1DecodingException expected) {} in testChoiceWithDifferentTypedOptions()
203 } catch (Asn1DecodingException expected) {} in testChoiceWithDifferentTypedOptions()
232 } catch (Asn1DecodingException expected) {} in testChoiceWithSameTypedOptions()
235 @Test(expected = Asn1DecodingException.class)
294 @Test(expected = Asn1DecodingException.class)
/tools/apksig/src/test/java/com/android/apksig/
DSigningCertificateLineageTest.java124 @Test(expected = IllegalArgumentException.class)
130 @Test(expected = IllegalArgumentException.class)
231 @Test(expected = IllegalArgumentException.class)
286 @Test(expected = IllegalArgumentException.class)
349 @Test(expected = IllegalArgumentException.class)
375 @Test(expected = ApkFormatException.class)
397 } catch (IllegalArgumentException expected) {} in testLineageFromAPKWithNoLineageFails()
406 } catch (IllegalArgumentException expected) {} in testLineageFromAPKWithNoLineageFails()
416 } catch (IllegalArgumentException expected) {} in testLineageFromAPKWithNoLineageFails()

1234567