Searched refs:expected (Results 1 - 25 of 94) sorted by relevance

1234

/frameworks/base/services/tests/servicestests/src/com/android/server/notification/
H A DValidateNotificationPeopleTest.java38 String[] expected = { "foobar" };
40 bundle.putString(Notification.EXTRA_PEOPLE, expected[0]);
42 assertStringArrayEquals("string should be in result[0]", expected, result);
47 String[] expected = { "foobar" };
49 bundle.putCharArray(Notification.EXTRA_PEOPLE, expected[0].toCharArray());
51 assertStringArrayEquals("char[] should be in result[0]", expected, result);
56 String[] expected = { "foobar" };
58 bundle.putCharSequence(Notification.EXTRA_PEOPLE, new SpannableString(expected[0]));
60 assertStringArrayEquals("charSequence should be in result[0]", expected, result);
66 String[] expected
147 assertStringArrayEquals(String message, String[] expected, String[] result) argument
[all...]
/frameworks/base/test-runner/src/android/test/
H A DMoreAsserts.java39 * Asserts that the class {@code expected} is assignable from the object
40 * {@code actual}. This verifies {@code expected} is a parent class or a
43 public static void assertAssignableFrom(Class<?> expected, Object actual) { argument
44 assertAssignableFrom(expected, actual.getClass());
48 * Asserts that class {@code expected} is assignable from the class
49 * {@code actual}. This verifies {@code expected} is a parent class or a
52 public static void assertAssignableFrom(Class<?> expected, Class<?> actual) { argument
54 "Expected " + expected.getCanonicalName() +
56 expected.isAssignableFrom(actual));
80 * those in array {@code expected}
83 assertEquals( String message, byte[] expected, byte[] actual) argument
100 assertEquals(byte[] expected, byte[] actual) argument
109 assertEquals( String message, int[] expected, int[] actual) argument
126 assertEquals(int[] expected, int[] actual) argument
135 assertEquals( String message, long[] expected, long[] actual) argument
152 assertEquals(long[] expected, long[] actual) argument
162 assertEquals( String message, double[] expected, double[] actual) argument
179 assertEquals(double[] expected, double[] actual) argument
190 assertEquals( String message, Object[] expected, Object[] actual) argument
211 assertEquals(Object[] expected, Object[] actual) argument
216 assertEquals( String message, Set<? extends Object> expected, Set<? extends Object> actual) argument
234 assertEquals(Set<? extends Object> expected, Set<? extends Object> actual) argument
344 assertContentsInOrder( String message, Iterable<?> actual, Object... expected) argument
357 assertContentsInOrder( Iterable<?> actual, Object... expected) argument
366 assertContentsInAnyOrder(String message, Iterable<?> actual, Object... expected) argument
388 assertContentsInAnyOrder(Iterable<?> actual, Object... expected) argument
524 failWrongLength( String message, int expected, int actual) argument
530 failWrongElement( String message, int index, Object expected, Object actual) argument
[all...]
H A DComparisonFailure.java27 public ComparisonFailure(String message, String expected, String actual) { argument
28 mComparison = new junit.framework.ComparisonFailure(message, expected, actual);
/frameworks/base/tools/aidl/
H A 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);
H A Doptions_test.cpp21 match_arrays(const char* const*expected, const vector<string> &got)
24 while (expected[count] != NULL) {
31 if (got[i] != expected[i]) {
39 print_array(const char* prefix, const char* const*expected)
41 while (*expected) {
42 cout << prefix << *expected << endl;
43 expected++;
71 cout << "mismatch: result: got " << result << " expected " <<
85 cout << " expected" << endl;
94 cout << " expected" << end
[all...]
/frameworks/base/core/java/android/test/
H A DAndroidTestCase.java99 fail("expected security exception for " + permission);
100 } catch (SecurityException expected) {
101 assertNotNull("security exception's error message.", expected.getMessage());
103 expected.getMessage().contains(permission));
118 fail("expected SecurityException requiring " + permission);
119 } catch (SecurityException expected) {
120 assertNotNull("security exception's error message.", expected.getMessage());
122 expected.getMessage().contains(permission));
137 fail("expected SecurityException requiring " + permission);
138 } catch (SecurityException expected) {
[all...]
/frameworks/base/core/tests/coretests/src/android/net/
H A DSSLTest.java53 byte[] expected = {
57 assertTrue(Arrays.equals(expected, SSLCertificateSocketFactory.toLengthPrefixedList(
66 } catch (IllegalArgumentException expected) {
74 } catch (IllegalArgumentException expected) {
82 } catch (IllegalArgumentException expected) {
H A DIpPrefixTest.java47 } catch(RuntimeException expected) {}
52 } catch(RuntimeException expected) {}
57 } catch(RuntimeException expected) {}
64 } catch(IllegalArgumentException expected) {}
69 } catch(IllegalArgumentException expected) {}
74 } catch(IllegalArgumentException expected) {}
79 } catch(IllegalArgumentException expected) {}
84 } catch(IllegalArgumentException expected) {}
89 } catch(IllegalArgumentException expected) {}
94 } catch(IllegalArgumentException expected) {}
[all...]
/frameworks/base/core/tests/coretests/src/android/text/
H A DStaticLayoutDirectionsTest.java74 private static Directions[] expected = { field in class:StaticLayoutDirectionsTest
117 checkDirections(b.build(), i, b.text, expected, f);
132 throw new RuntimeException("expected 2 lines, got: " + l.getLineCount());
135 Directions expected = dirs(0, LVL1_1, 1, LVL2_1, 2, 3 | (1 << Layout.RUN_LEVEL_SHIFT));
136 expectDirections("split line", expected, result);
149 int[] expected = { 0, 1, 4, 3, 2, 5 };
152 for (int i = 1; i < expected.length; ++i) {
154 if (t != expected[i]) {
155 fail("offset[" + i + "] to right of: " + n + " expected: " +
156 expected[
237 expectDirections(String msg, Directions expected, Directions result) argument
[all...]
/frameworks/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/
H A DPhoneNumberWatcherTest.java219 String expected = "+1-650-123-4567"; // Different formatting than ours
220 testReplacement(init, expected, expected);
228 String expected = "Test User <650-123-4567>";
229 testReplacement(init, expected, expected);
237 String expected = "2nd Test User <650-123-4567>";
238 testReplacement(init, expected, expected);
246 String expected
272 testReplacement(String init, String replacement, String expected) argument
[all...]
/frameworks/base/core/tests/coretests/src/android/widget/
H A DAutoCompleteTextViewPopup.java34 // number of times to poll when checking expected UI state
43 /** Test that we can move the selection and it responds as expected */
90 // check for selection position as expected
117 // check for selection position as expected
150 // check for selection position as expected
225 boolean expected) throws InterruptedException {
227 if (textView.isPopupShowing() == expected) {
232 assertEquals(message, expected, textView.isPopupShowing());
235 private void waitAssertListSelection(AutoCompleteTextView textView, int expected) argument
237 waitAssertListSelection("getListSelection()", textView, expected);
224 waitAssertPopupShowState(String message, AutoCompleteTextView textView, boolean expected) argument
240 waitAssertListSelection(String message, AutoCompleteTextView textView, int expected) argument
[all...]
/frameworks/base/tests/TtsTests/src/com/android/speech/tts/
H A DTtsEnginesTests.java71 private void assertArraysEqual(String[] expected, String[] actual) { argument
72 assertEquals("array length", expected.length, actual.length);
73 for (int i = 0; i < expected.length; i++) {
74 assertEquals("index " + i, expected[i], actual[i]);
/frameworks/base/tools/aapt/tests/
H A DCrunchCache_test.cpp18 void expectEqual(int got, int expected, const char* desc) { argument
20 cout << "Got " << got << ", expected " << expected << "..."; local
21 cout << ( (got == expected) ? "PASSED" : "FAILED") << endl;
22 errno += ((got == expected) ? 0 : 1);
/frameworks/base/core/tests/coretests/src/com/android/internal/os/
H A DLoggingPrintStreamTest.java134 String expected = builder.toString();
136 out.write(expected.getBytes("UTF-8"));
138 assertEquals(Arrays.asList(expected), out.lines);
142 String expected = " \u20AC \u20AC \u20AC \u20AC ";
143 for (byte b : expected.getBytes()) {
147 assertEquals(Arrays.asList(expected), out.lines);
151 String expected = " \u20AC \u20AC \u20AC \u20AC ";
152 out.write(expected.getBytes());
154 assertEquals(Arrays.asList(expected), out.lines);
158 String expected
[all...]
/frameworks/base/core/tests/overlaytests/OverlayTest/src/com/android/overlaytest/
H A DOverlayBaseTest.java103 boolean expected = getExpected(no, so, mo);
105 assertEquals(expected, actual);
109 int expected = getExpected(no, so, mo);
111 assertEquals(expected, actual);
115 String expected = getExpected(no, so, mo);
117 assertEquals(expected, actual);
121 int[] expected = getExpected(no, so, mo);
123 assertEquals("length:", expected.length, actual.length);
125 assertEquals("index " + i + ":", actual[i], expected[i]);
168 final int[] expected
[all...]
/frameworks/base/core/tests/coretests/src/android/content/pm/
H A DLimitedLengthInputStreamTest.java83 byte[] expected = new byte[length];
86 System.arraycopy(TEST_STRING1, offset, expected, 0, length);
92 assertTrue(Arrays.equals(expected, actual));
133 byte[] expected = new byte[length];
136 System.arraycopy(TEST_STRING1, offset, expected, 0, length);
142 assertTrue(Arrays.equals(expected, actual));
H A DManifestDigestTest.java52 ManifestDigest expected =
56 assertEquals(expected, actual);
/frameworks/base/core/tests/bluetoothtests/src/android/bluetooth/le/
H A DScanRecordTest.java66 private static void assertArrayEquals(byte[] expected, byte[] actual) { argument
67 if (!Arrays.equals(expected, actual)) {
68 fail("expected:<" + Arrays.toString(expected) +
/frameworks/base/core/tests/coretests/src/android/net/http/
H A DDefaultHttpClientTest.java109 } catch (AuthenticationException expected) {
113 } catch (AuthenticationException expected) {
117 } catch (AuthenticationException expected) {
121 } catch (AuthenticationException expected) {
/frameworks/base/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/unit/
H A DRangeTest.java148 private static <T extends Comparable<? super T>> void assertUpper(Range<T> object, T expected) { argument
149 assertAction("upper", object, expected, object.getUpper());
152 private static <T extends Comparable<? super T>> void assertLower(Range<T> object, T expected) { argument
153 assertAction("lower", object, expected, object.getLower());
156 private static <T, T2> void assertAction(String action, T object, T2 expected, argument
159 expected, actual);
162 private static <T, T2> void assertAction(String action, T object, T2 needle, boolean expected, argument
164 String expectedMessage = expected ? action : ("not " + action);
166 expected, actual);
172 " expected t
[all...]
H A DRationalTest.java391 private static void assertValueEquals(Rational object, float expected) { argument
393 expected, object.floatValue());
396 private static void assertValueEquals(Rational object, double expected) { argument
398 expected, object.doubleValue());
401 private static void assertValueEquals(Rational object, long expected) { argument
403 expected, object.longValue());
406 private static void assertValueEquals(Rational object, int expected) { argument
408 expected, object.intValue());
411 private static void assertValueEquals(Rational object, short expected) { argument
413 expected, objec
416 assertFinite(Rational object, boolean expected) argument
420 assertInfinite(Rational object, boolean expected) argument
424 assertNaN(Rational object, boolean expected) argument
428 assertZero(Rational object, boolean expected) argument
432 assertAction(String action, T object, boolean expected, boolean actual) argument
[all...]
/frameworks/testing/espresso/espresso-lib-tests/src/androidTest/java/com/google/android/apps/common/testing/ui/espresso/assertion/
H A DViewAssertionsTest.java73 } catch (AssertionFailedError expected) {
91 } catch (NoMatchingViewException expected) {
101 } catch (NoMatchingViewException expected) {
136 } catch (AssertionFailedError expected) {
149 } catch (AssertionFailedError expected) {
/frameworks/base/core/tests/coretests/src/android/app/backup/
H A DBackupDataTest.java178 String[] expected = truth.readLine().split(":");
180 if (expected.length > 1) {
181 expectedBytes = Base64.decode(expected[1], Base64.DEFAULT);
186 assertEquals("wrong key", expected[0], key);
192 assertEquals("wrong data for key " + key, expected[1],
208 String[] expected = truth.readLine().split(":");
210 if (expected.length > 1) {
211 expectedBytes = Base64.decode(expected[1], Base64.DEFAULT);
216 assertEquals("wrong key", expected[0], key);
222 assertEquals("wrong data for key " + key, expected[
[all...]
/frameworks/testing/espresso/espresso-lib-tests/src/androidTest/java/com/google/android/apps/common/testing/ui/espresso/base/
H A DViewFinderImplTest.java92 } catch (NoMatchingViewException expected) {}
101 } catch (AmbiguousViewMatcherException expected) {}
109 } catch (IllegalStateException expected) {}
/frameworks/opt/calendar/tests/src/com/android/calendarcommon2/
H A DRecurrenceProcessorTest.java48 private static void printLists(String[] expected, String[] out) { argument
49 Log.i(TAG, " expected out");
51 for (i = 0; i < expected.length && i < out.length; i++) {
52 Log.i(TAG, " [" + i + "] " + expected[i]
55 for (; i < expected.length; i++) {
56 Log.i(TAG, " [" + i + "] " + expected[i]);
64 String exdate, String rangeStartStr, String rangeEndStr, String[] expected)
67 rangeEndStr, expected, expected[expected
63 verifyRecurrence(String dtstartStr, String rrule, String rdate, String exrule, String exdate, String rangeStartStr, String rangeEndStr, String[] expected) argument
70 verifyRecurrence(String dtstartStr, String rrule, String rdate, String exrule, String exdate, String rangeStartStr, String rangeEndStr, String[] expected, String last) argument
[all...]

Completed in 551 milliseconds

1234