Home
last modified time | relevance | path

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

1234567

/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 …]
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()
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/lite/
DSampleTests.java34 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/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/test/connectivity/acts/framework/tests/libs/logging/
Dlog_stream_test.py218 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/acloud/public/
Dreport_test.py31 expected = {
38 self.assertEqual(test_report.data, expected)
67 expected = {
75 self.assertEqual(test_report.data, expected)
82 expected = {
90 self.assertEqual(test_report.data, expected)
/tools/tradefederation/core/tests/src/com/android/tradefed/testtype/suite/
DValidateSuiteConfigHelperTest.java66 } catch (RuntimeException expected) { in testNotRunningAsSuite_buildProvider()
67 assertTrue(expected.getMessage().contains(Configuration.BUILD_PROVIDER_TYPE_NAME)); in testNotRunningAsSuite_buildProvider()
86 } catch (RuntimeException expected) { in testNotRunningAsSuite_MultiDevice_buildProvider()
87 assertTrue(expected.getMessage().contains(Configuration.BUILD_PROVIDER_TYPE_NAME)); in testNotRunningAsSuite_MultiDevice_buildProvider()
120 } catch (RuntimeException expected) { in testNotRunningAsSuite_resultReporter()
121 assertTrue(expected.getMessage().contains(Configuration.RESULT_REPORTER_TYPE_NAME)); in testNotRunningAsSuite_resultReporter()
136 } catch (RuntimeException expected) { in testNotRunningAsSuite_multi_resultReporter()
137 assertTrue(expected.getMessage().contains(Configuration.RESULT_REPORTER_TYPE_NAME)); in testNotRunningAsSuite_multi_resultReporter()
160 } catch (RuntimeException expected) { in testMetricCollectors()
162 expected.getMessage() in testMetricCollectors()
[all …]
/tools/asuite/aidegen/lib/
Dclion_project_file_gen_unittest.py106 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 …]
Dnative_util_unittest.py73 expected = abs_path
75 self.assertEqual(result, expected)
78 self.assertEqual(result, expected)
80 expected = current_parent
82 self.assertEqual(result, expected)
84 expected = 'a/b'
86 self.assertEqual(result, expected)
99 expected = (parent, targets)
106 self.assertEqual(result, expected)
123 expected = (parent, result_targets)
[all …]
Dcommon_util_unittest.py67 expected = (unittest_constants.TEST_MODULE, os.path.join(
70 expected, common_util.get_related_paths(
74 self.assertEqual(expected, common_util.get_related_paths(
114 expected = (rel_path, abs_path)
116 self.assertEqual(expected, result)
122 expected = ('', '/a')
124 self.assertEqual(expected, result)
130 expected = ('b', '/a/b')
132 self.assertEqual(expected, result)
134 self.assertEqual(expected, result)
[all …]
/tools/test/connectivity/acts/framework/acts/controllers/buds_lib/test_actions/
Dbt_utils.py248 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/platform-compat/javatest/android/processor/compat/changeid/
DXmlWriterTest.java39 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()
99 String expected = HEADER + "<config>" in testSomeChanges() local
109 assertThat(mOutputStream.toString(), startsWith(expected)); in testSomeChanges()
/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/tradefederation/core/tests/src/com/android/tradefed/cluster/
DClusterDeviceMonitorTest.java134 Map<String, String> expected = new HashMap<>(); in testGetAdditionalHostInfo() local
135 expected.put(PRODCERTSTATUS_KEY, prodcertstatusOutput); in testGetAdditionalHostInfo()
136 expected.put(KRBSTATUS_KEY, krbstatusOutput); in testGetAdditionalHostInfo()
138 Assert.assertEquals(expected, mClusterDeviceMonitor.getAdditionalHostInfo()); in testGetAdditionalHostInfo()
145 Map<String, String> expected = new HashMap<>(); in testGetAdditionalHostInfo_noCommands() local
146 Assert.assertEquals(expected, mClusterDeviceMonitor.getAdditionalHostInfo()); in testGetAdditionalHostInfo_noCommands()
174 Map<String, String> expected = new HashMap<>(); in testGetAdditionalHostInfo_commandFailed() local
175 expected.put(PRODCERTSTATUS_KEY, prodcertstatusOutput); in testGetAdditionalHostInfo_commandFailed()
176 expected.put(KRBSTATUS_KEY, krbstatusError); in testGetAdditionalHostInfo_commandFailed()
178 Assert.assertEquals(expected, mClusterDeviceMonitor.getAdditionalHostInfo()); in testGetAdditionalHostInfo_commandFailed()
/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.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()
351 } catch(ConfigurationException expected) { in testParse_deviceTagAndObjectOutside()
352 assertEquals(expectedException, expected.getMessage()); in testParse_deviceTagAndObjectOutside()
375 } catch(ConfigurationException expected) { in testParse_withDeviceTag()
398 } catch(ConfigurationException expected) { in testParse_withDeviceInvalidName()
399 assertEquals(expectedException, expected.getMessage()); in testParse_withDeviceInvalidName()
421 } catch(ConfigurationException expected) { in testParse_withDeviceReservedName()
[all …]
/tools/metalava/src/test/java/com/android/tools/metalava/model/
DAnnotationItemTest.kt24 fun checkShortenAnnotation(expected: String, source: String) { in checkShortenAnnotation()
25 Assert.assertEquals(expected, AnnotationItem.shortenAnnotation(source)) in checkShortenAnnotation()
26 Assert.assertEquals(source, AnnotationItem.unshortenAnnotation(expected)) in checkShortenAnnotation()
/tools/asuite/aidegen/vscode/
Dvscode_workspace_file_gen_unittest.py63 expected = 'to.project'
66 self.assertEqual(result, expected)
68 expected = 'b'
71 self.assertEqual(result, expected)
/tools/test/connectivity/acts/framework/tests/test_utils/power/tel/lab/
Dconsume_parameter_test.py48 expected = ['param2', 3]
53 result == expected,
63 expected = []
68 result == expected,
/tools/trebuchet/core/common/src/test/kotlin/trebuchet/extractors/
DZlibExtractorTest.kt56 val expected = "# tracer: nop\n#\n# ent" in testExtractInitial() constant
61 assertTrue(first.length > expected.length) in testExtractInitial()
62 assertEquals(expected, first.slice(0, expected.length).toString()) in testExtractInitial()
/tools/tradefederation/core/tests/src/com/android/tradefed/sandbox/
DSandboxConfigUtilTest.java96 } catch (ConfigurationException expected) { in testDumpVersion_failed()
98 "Error when dumping the config. stderr: Ouch I failed", expected.getMessage()); in testDumpVersion_failed()
109 } catch (SandboxConfigurationException expected) { in testDumpVersion_badClasspath()
112 expected.getMessage()); in testDumpVersion_badClasspath()

1234567