Home
last modified time | relevance | path

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

123456

/frameworks/base/test-runner/src/android/test/
DMoreAsserts.java44 public static void assertAssignableFrom(Class<?> expected, Object actual) { in assertAssignableFrom() argument
45 assertAssignableFrom(expected, actual.getClass()); in assertAssignableFrom()
53 public static void assertAssignableFrom(Class<?> expected, Class<?> actual) { in assertAssignableFrom() argument
55 "Expected " + expected.getCanonicalName() + in assertAssignableFrom()
57 expected.isAssignableFrom(actual)); in assertAssignableFrom()
85 String message, byte[] expected, byte[] actual) { in assertEquals() argument
86 if (expected.length != actual.length) { in assertEquals()
87 failWrongLength(message, expected.length, actual.length); in assertEquals()
89 for (int i = 0; i < expected.length; i++) { in assertEquals()
90 if (expected[i] != actual[i]) { in assertEquals()
[all …]
DComparisonFailure.java27 public ComparisonFailure(String message, String expected, String actual) { in ComparisonFailure() argument
28 mComparison = new junit.framework.ComparisonFailure(message, expected, actual); in ComparisonFailure()
/frameworks/base/core/tests/coretests/src/android/text/
DStaticLayoutDirectionsTest.java74 private static Directions[] expected = { field in StaticLayoutDirectionsTest
117 checkDirections(b.build(), i, b.text, expected, f); in testDirections() local
135 Directions expected = dirs(0, LVL1_1, 1, LVL2_1, 2, 3 | (1 << Layout.RUN_LEVEL_SHIFT)); in testTrailingWhitespace() local
136 expectDirections("split line", expected, result); in testTrailingWhitespace()
149 int[] expected = { 0, 1, 4, 3, 2, 5 }; in testNextToRightOf() local
152 for (int i = 1; i < expected.length; ++i) { in testNextToRightOf()
154 if (t != expected[i]) { in testNextToRightOf()
156 expected[i] + " got: " + t); in testNextToRightOf()
165 int[] expected = { 0, 1, 4, 3, 2, 5 }; in testNextToLeftOf() local
168 for (int i = expected.length - 1; --i >= 0;) { in testNextToLeftOf()
[all …]
/frameworks/base/core/tests/coretests/src/android/util/
DJsonReaderTest.java98 } catch (NullPointerException expected) { in testNulls()
105 } catch (IOException expected) { in testEmptyString()
109 } catch (IOException expected) { in testEmptyString()
116 } catch (IOException expected) { in testNoTopLevelObject()
227 } catch (NumberFormatException expected) { in testLenientDoubles()
234 } catch (NumberFormatException expected) { in testLenientDoubles()
321 } catch (NumberFormatException expected) { in testLongs()
327 } catch (NumberFormatException expected) { in testLongs()
381 } catch (IOException expected) { in testNonFiniteDouble()
392 } catch (IOException expected) { in testNumberWithHexPrefix()
[all …]
DJsonWriterTest.java33 } catch (IllegalStateException expected) { in testWrongTopLevelType()
45 } catch (IllegalStateException expected) { in testTwoNames()
57 } catch (IllegalStateException expected) { in testNameWithoutValue()
68 } catch (IllegalStateException expected) { in testValueWithoutName()
79 } catch (IllegalStateException expected) { in testMultipleTopLevelValues()
91 } catch (IllegalStateException expected) { in testBadNestingObject()
103 } catch (IllegalStateException expected) { in testBadNestingArray()
114 } catch (NullPointerException expected) { in testNullName()
135 } catch (IllegalArgumentException expected) { in testNonFiniteDoubles()
140 } catch (IllegalArgumentException expected) { in testNonFiniteDoubles()
[all …]
/frameworks/base/core/tests/overlaytests/OverlayTest/src/com/android/overlaytest/
DOverlayBaseTest.java40 boolean expected = mWithOverlay ? ew : ewo; in assertResource()
42 assertEquals(expected, actual); in assertResource()
46 String expected = mWithOverlay ? ew : ewo; in assertResource() local
48 assertEquals(expected, actual); in assertResource()
52 int[] expected = mWithOverlay ? ew : ewo; in assertResource() local
54 assertEquals("length:", expected.length, actual.length); in assertResource()
56 assertEquals("index " + i + ":", actual[i], expected[i]); in assertResource()
107 final int[] expected = {0, 10, 20, 30}; in testIntegerArray() local
108 assertResource(resId, expected, expected); in testIntegerArray()
115 int expected = mWithOverlay ? 0x000051da : 0x0014ebce; in testAsset() local
[all …]
/frameworks/base/core/java/android/test/
DAndroidTestCase.java100 } catch (SecurityException expected) { in assertActivityRequiresPermission()
101 assertNotNull("security exception's error message.", expected.getMessage()); in assertActivityRequiresPermission()
103 expected.getMessage().contains(permission)); in assertActivityRequiresPermission()
119 } catch (SecurityException expected) { in assertReadingContentUriRequiresPermission()
120 assertNotNull("security exception's error message.", expected.getMessage()); in assertReadingContentUriRequiresPermission()
122 expected.getMessage().contains(permission)); in assertReadingContentUriRequiresPermission()
138 } catch (SecurityException expected) { in assertWritingContentUriRequiresPermission()
139 assertNotNull("security exception's error message.", expected.getMessage()); in assertWritingContentUriRequiresPermission()
141 + expected.getMessage() + "\".", in assertWritingContentUriRequiresPermission()
142 expected.getMessage().contains(permission)); in assertWritingContentUriRequiresPermission()
/frameworks/base/core/tests/coretests/src/com/android/internal/os/
DLoggingPrintStreamTest.java134 String expected = builder.toString(); in testMultiByteCharactersSpanningBuffers() local
136 out.write(expected.getBytes("UTF-8")); in testMultiByteCharactersSpanningBuffers()
138 assertEquals(Arrays.asList(expected), out.lines); in testMultiByteCharactersSpanningBuffers()
142 String expected = " \u20AC \u20AC \u20AC \u20AC "; in testWriteOneByteAtATimeMultibyteCharacters() local
143 for (byte b : expected.getBytes()) { in testWriteOneByteAtATimeMultibyteCharacters()
147 assertEquals(Arrays.asList(expected), out.lines); in testWriteOneByteAtATimeMultibyteCharacters()
151 String expected = " \u20AC \u20AC \u20AC \u20AC "; in testWriteByteArrayAtATimeMultibyteCharacters() local
152 out.write(expected.getBytes()); in testWriteByteArrayAtATimeMultibyteCharacters()
154 assertEquals(Arrays.asList(expected), out.lines); in testWriteByteArrayAtATimeMultibyteCharacters()
158 String expected = " \u20AC \u20AC \u20AC \u20AC "; in testWriteWithOffsetsMultibyteCharacters() local
[all …]
/frameworks/base/tools/aidl/
Dsearch_path.cpp21 string expected = given; local
23 int N = expected.length();
25 char c = expected[i];
27 expected[i] = OS_PATH_SEPARATOR;
30 expected += ".aidl";
42 f.append(expected);
Doptions_test.cpp21 match_arrays(const char* const*expected, const vector<string> &got) in match_arrays() argument
24 while (expected[count] != NULL) { in match_arrays()
31 if (got[i] != expected[i]) { in match_arrays()
39 print_array(const char* prefix, const char* const*expected) in print_array() argument
41 while (*expected) { in print_array()
42 cout << prefix << *expected << endl; in print_array()
43 expected++; in print_array()
/frameworks/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/
DPhoneNumberWatcherTest.java219 String expected = "+1-650-123-4567"; // Different formatting than ours in testAutoCompleteWithFormattedNumber() local
220 testReplacement(init, expected, expected); in testAutoCompleteWithFormattedNumber()
228 String expected = "Test User <650-123-4567>"; in testAutoCompleteWithFormattedNameAndNumber() local
229 testReplacement(init, expected, expected); in testAutoCompleteWithFormattedNameAndNumber()
237 String expected = "2nd Test User <650-123-4567>"; in testAutoCompleteWithNumericNameAndNumber() local
238 testReplacement(init, expected, expected); in testAutoCompleteWithNumericNameAndNumber()
246 String expected = "6501234567"; in testAutoCompleteWithUnformattedNumber() local
247 testReplacement(init, expected, expected); in testAutoCompleteWithUnformattedNumber()
258 String expected = "(650) 123-4567"; in testAutoCompleteUnformattedWithUnformattedNumber() local
259 testReplacement(init, replacement, expected); in testAutoCompleteUnformattedWithUnformattedNumber()
[all …]
/frameworks/rs/java/tests/RSTest_CompatLib/src/com/android/rs/test/
Dstruct.rs9 static bool test_Point_2(int expected) {
13 _RS_ASSERT(point2[0].x == expected);
14 _RS_ASSERT(point2[0].y == expected);
26 void struct_test(int expected) {
28 failed |= test_Point_2(expected);
Dmath_agree.rs58 static void fail_f1(float v1, float v2, float actual, float expected, char *op_name) {
59 int dist = float_dist(actual, expected);
63 rsDebug("Dalvik result", expected);
68 static void fail_f2(float2 v1, float2 v2, float2 actual, float2 expected, char *op_name) {
70 dist.x = float_dist(actual.x, expected.x);
71 dist.y = float_dist(actual.y, expected.y);
77 rsDebug("Dalvik result .x", expected.x);
78 rsDebug("Dalvik result .y", expected.y);
85 static void fail_f3(float3 v1, float3 v2, float3 actual, float3 expected, char *op_name) {
87 dist.x = float_dist(actual.x, expected.x);
[all …]
/frameworks/rs/java/tests/RsTest/src/com/android/rs/test/
Dstruct.rs9 static bool test_Point_2(int expected) {
13 _RS_ASSERT(point2[0].x == expected);
14 _RS_ASSERT(point2[0].y == expected);
26 void struct_test(int expected) {
28 failed |= test_Point_2(expected);
Dmath_agree.rs58 static void fail_f1(float v1, float v2, float actual, float expected, char *op_name) {
59 int dist = float_dist(actual, expected);
63 rsDebug("Dalvik result", expected);
68 static void fail_f2(float2 v1, float2 v2, float2 actual, float2 expected, char *op_name) {
70 dist.x = float_dist(actual.x, expected.x);
71 dist.y = float_dist(actual.y, expected.y);
77 rsDebug("Dalvik result .x", expected.x);
78 rsDebug("Dalvik result .y", expected.y);
85 static void fail_f3(float3 v1, float3 v2, float3 actual, float3 expected, char *op_name) {
87 dist.x = float_dist(actual.x, expected.x);
[all …]
/frameworks/base/core/tests/coretests/src/android/net/
DSSLTest.java53 byte[] expected = { in testStringsToLengthPrefixedBytes()
57 assertTrue(Arrays.equals(expected, SSLCertificateSocketFactory.toLengthPrefixedList( in testStringsToLengthPrefixedBytes()
66 } catch (IllegalArgumentException expected) { in testStringsToLengthPrefixedBytesEmptyArray()
74 } catch (IllegalArgumentException expected) { in testStringsToLengthPrefixedBytesEmptyByteArray()
82 } catch (IllegalArgumentException expected) { in testStringsToLengthPrefixedBytesOversizedInput()
/frameworks/base/core/tests/coretests/src/android/widget/
DAutoCompleteTextViewPopup.java225 boolean expected) throws InterruptedException { in waitAssertPopupShowState() argument
227 if (textView.isPopupShowing() == expected) { in waitAssertPopupShowState()
232 assertEquals(message, expected, textView.isPopupShowing()); in waitAssertPopupShowState()
235 private void waitAssertListSelection(AutoCompleteTextView textView, int expected) in waitAssertListSelection() argument
237 waitAssertListSelection("getListSelection()", textView, expected); in waitAssertListSelection()
241 int expected) throws Exception { in waitAssertListSelection() argument
245 if (expected == currentSelection) { in waitAssertListSelection()
250 assertEquals(message, expected, textView.getListSelection()); in waitAssertListSelection()
/frameworks/opt/calendar/tests/src/com/android/calendarcommon2/
DRecurrenceProcessorTest.java48 private static void printLists(String[] expected, String[] out) { in printLists() argument
51 for (i = 0; i < expected.length && i < out.length; i++) { in printLists()
52 Log.i(TAG, " [" + i + "] " + expected[i] in printLists()
55 for (; i < expected.length; i++) { in printLists()
56 Log.i(TAG, " [" + i + "] " + expected[i]); in printLists()
64 String exdate, String rangeStartStr, String rangeEndStr, String[] expected) in verifyRecurrence() argument
67 rangeEndStr, expected, expected[expected.length - 1]); in verifyRecurrence()
71 String exdate, String rangeStartStr, String rangeEndStr, String[] expected, in verifyRecurrence() argument
119 if (count != expected.length) { in verifyRecurrence()
122 printLists(expected, actual); in verifyRecurrence()
[all …]
/frameworks/base/core/tests/coretests/src/android/content/pm/
DLimitedLengthInputStreamTest.java83 byte[] expected = new byte[length]; in checkReadBytesWithOffsetAndLength_WithString1()
86 System.arraycopy(TEST_STRING1, offset, expected, 0, length); in checkReadBytesWithOffsetAndLength_WithString1()
92 assertTrue(Arrays.equals(expected, actual)); in checkReadBytesWithOffsetAndLength_WithString1()
133 byte[] expected = new byte[length]; in checkReadBytes_WithString1()
136 System.arraycopy(TEST_STRING1, offset, expected, 0, length); in checkReadBytes_WithString1()
142 assertTrue(Arrays.equals(expected, actual)); in checkReadBytes_WithString1()
/frameworks/base/tools/aapt/tests/
DCrunchCache_test.cpp18 void expectEqual(int got, int expected, const char* desc) { in expectEqual() argument
20 cout << "Got " << got << ", expected " << expected << "..."; in expectEqual()
21 cout << ( (got == expected) ? "PASSED" : "FAILED") << endl; in expectEqual()
22 errno += ((got == expected) ? 0 : 1); in expectEqual()
/frameworks/base/core/tests/coretests/src/android/net/http/
DDefaultHttpClientTest.java109 } catch (AuthenticationException expected) { in testDigestSchemeAlgorithms()
113 } catch (AuthenticationException expected) { in testDigestSchemeAlgorithms()
117 } catch (AuthenticationException expected) { in testDigestSchemeAlgorithms()
121 } catch (AuthenticationException expected) { in testDigestSchemeAlgorithms()
/frameworks/base/core/tests/coretests/src/android/app/
DDownloadManagerBaseTest.java348 protected void verifyFileContents(ParcelFileDescriptor actual, byte[] expected) in verifyFileContents() argument
354 assertEquals(expected.length, fileSize); in verifyFileContents()
356 byte[] actualData = new byte[expected.length]; in verifyFileContents()
358 compareByteArrays(actualData, expected); in verifyFileContents()
367 protected void compareByteArrays(byte[] actual, byte[] expected) { in compareByteArrays() argument
368 assertEquals(actual.length, expected.length); in compareByteArrays()
372 if (actual[i] != expected[i]) { in compareByteArrays()
387 byte[] expected = new byte[FILE_BLOCK_READ_SIZE]; in verifyFileContents()
398 ((expectedRead = inFile.read(expected)) != -1)) { in verifyFileContents()
400 compareByteArrays(actual, expected); in verifyFileContents()
[all …]
/frameworks/compile/slang/tests/F_bad_pragmas/
Dstderr.txt.expect2 bad_pragmas.rs:8:18: error: expected value after '#pragma onlyLeft('
5 bad_pragmas.rs:10:18: error: expected identifier or '('
/frameworks/base/core/tests/coretests/src/android/app/activity/
DActivityTestsBase.java147 public int waitForResultOrThrow(int timeoutMs, String expected) { in waitForResultOrThrow() argument
148 int res = waitForResult(timeoutMs, expected); in waitForResultOrThrow()
163 public int waitForResult(int timeoutMs, String expected) { in waitForResult() argument
164 mExpecting = expected; in waitForResult()
/frameworks/support/tests/java/android/support/v4/content/
DFileProviderTest.java137 final String expected = "content://authority/t%2Fg/lol%22wat%3Ffoo%26bar/wat.txt"; in testStrategyEscaping() local
139 assertEquals(expected, in testStrategyEscaping()
142 strat.getFileForUri(Uri.parse(expected)).getPath()); in testStrategyEscaping()
161 final String expected = "content://authority/tag/foo/bar"; in testStrategyExtraSeparators() local
163 assertEquals(expected, in testStrategyExtraSeparators()
166 strat.getFileForUri(Uri.parse(expected)).getPath()); in testStrategyExtraSeparators()
317 private void assertContentsEquals(byte[] expected, Uri actual) throws Exception { in assertContentsEquals() argument
320 MoreAsserts.assertEquals(expected, Streams.readFully(in)); in assertContentsEquals()

123456