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

1234567

/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.java42 * Asserts that the class {@code expected} is assignable from the object
43 * {@code actual}. This verifies {@code expected} is a parent class or a
46 public static void assertAssignableFrom(Class<?> expected, Object actual) { argument
47 assertAssignableFrom(expected, actual.getClass());
51 * Asserts that class {@code expected} is assignable from the class
52 * {@code actual}. This verifies {@code expected} is a parent class or a
55 public static void assertAssignableFrom(Class<?> expected, Class<?> actual) { argument
57 "Expected " + expected.getCanonicalName() +
59 expected.isAssignableFrom(actual));
83 * those in array {@code expected}
86 assertEquals( String message, byte[] expected, byte[] actual) argument
103 assertEquals(byte[] expected, byte[] actual) argument
112 assertEquals( String message, int[] expected, int[] actual) argument
129 assertEquals(int[] expected, int[] actual) argument
138 assertEquals( String message, long[] expected, long[] actual) argument
155 assertEquals(long[] expected, long[] actual) argument
165 assertEquals( String message, double[] expected, double[] actual) argument
182 assertEquals(double[] expected, double[] actual) argument
193 assertEquals( String message, Object[] expected, Object[] actual) argument
214 assertEquals(Object[] expected, Object[] actual) argument
219 assertEquals( String message, Set<? extends Object> expected, Set<? extends Object> actual) argument
237 assertEquals(Set<? extends Object> expected, Set<? extends Object> actual) argument
347 assertContentsInOrder( String message, Iterable<?> actual, Object... expected) argument
360 assertContentsInOrder( Iterable<?> actual, Object... expected) argument
369 assertContentsInAnyOrder(String message, Iterable<?> actual, Object... expected) argument
391 assertContentsInAnyOrder(Iterable<?> actual, Object... expected) argument
527 failWrongLength( String message, int expected, int actual) argument
533 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/split-select/
H A DGrouper_test.cpp104 Vector<const char*> expected; local
105 expected.add(a);
106 expectHasGroupWithSplits(expected);
110 Vector<const char*> expected; local
111 expected.add(a);
112 expected.add(b);
113 expectHasGroupWithSplits(expected);
117 Vector<const char*> expected; local
118 expected.add(a);
119 expected
125 Vector<const char*> expected; local
[all...]
H A DRule_test.cpp42 std::string expected(
68 expected.erase(std::remove_if(expected.begin(), expected.end(), ::isspace), expected.end());
74 ASSERT_EQ(expected, result);
/frameworks/base/core/tests/coretests/src/android/net/
H A DStaticIpConfigurationTest.java148 LinkProperties expected = new LinkProperties();
149 expected.setInterfaceName(IFACE);
152 assertEquals(expected, s.toLinkProperties(IFACE));
156 expected.addLinkAddress(ADDR);
157 expected.addRoute(connectedRoute);
158 assertEquals(expected, s.toLinkProperties(IFACE));
162 expected.addRoute(defaultRoute);
163 assertEquals(expected, s.toLinkProperties(IFACE));
166 expected.removeRoute(defaultRoute);
168 expected
[all...]
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.java51 } catch(RuntimeException expected) {}
56 } catch(RuntimeException expected) {}
61 } catch(RuntimeException expected) {}
68 } catch(IllegalArgumentException expected) {}
73 } catch(IllegalArgumentException expected) {}
78 } catch(IllegalArgumentException expected) {}
83 } catch(IllegalArgumentException expected) {}
88 } catch(IllegalArgumentException expected) {}
93 } catch(IllegalArgumentException expected) {}
98 } catch(IllegalArgumentException expected) {}
[all...]
/frameworks/base/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/helpers/
H A DCameraErrorCollector.java141 * @param expected Expected value to be checked against.
145 * @throws IllegalArgumentException if {@code expected} was {@code null}
147 public <T> boolean expectEquals(String msg, T expected, T actual) { argument
148 if (expected == null) {
149 throw new IllegalArgumentException("expected value shouldn't be null");
152 if (!Objects.equals(expected, actual)) {
153 addMessage(String.format("%s (expected = %s, actual = %s) ", msg, expected,
165 * @param expected Expected value to be checked against.
169 public <T> boolean expectNotEquals(String msg, T expected, argument
189 expectEquals(String msg, T[] expected, T[] actual) argument
214 expectNotEquals(String msg, T[] expected, T[] actual) argument
236 expectGreater(String msg, T expected, T actual) argument
250 expectGreaterOrEqual(String msg, T expected, T actual) argument
264 expectLess(String msg, T expected, T actual) argument
278 expectLessOrEqual(String msg, T expected, T actual) argument
293 expectEquals(String msg, float expected, float actual, float tolerance) argument
316 expectEquals(String msg, double expected, double actual, double tolerance) argument
440 expectMeteringRegionsAreSimilar(String msg, MeteringRectangle[] expected, MeteringRectangle[] actual, float errorPercent) argument
494 expectRectsAreSimilar(String msg, Rect expected, Rect actual, float errorPercent) argument
541 expectSizesAreSimilar(String msg, Size expected, Size actual, float errorPercent) argument
723 expectKeyValueNotEquals( Builder request, CaptureRequest.Key<T> key, T expected) argument
745 expectKeyValueNotEquals( CaptureResult result, CaptureResult.Key<T> key, T expected) argument
767 expectKeyValueEquals(CaptureResult result, CaptureResult.Key<T> key, T expected) argument
792 expectKeyValueEquals(Builder request, CaptureRequest.Key<T> key, T expected) argument
814 expectKeyValueGreaterOrEqual( CaptureResult result, CaptureResult.Key<T> key, T expected) argument
831 expectKeyValueGreaterThan( CameraCharacteristics characteristics, CameraCharacteristics.Key<T> key, T expected) argument
865 expectKeyValueIsIn(CameraCharacteristics characteristics, CameraCharacteristics.Key<T> key, T... expected) argument
883 expectKeyValueIsIn(Builder request, CaptureRequest.Key<T> key, T... expected) argument
900 expectKeyValueContains(CameraCharacteristics characteristics, CameraCharacteristics.Key<T[]> key, T expected) argument
918 expectKeyValueContains(CameraCharacteristics characteristics, CameraCharacteristics.Key<int[]> key, int expected) argument
936 expectKeyValueContains(CameraCharacteristics characteristics, CameraCharacteristics.Key<boolean[]> key, boolean expected) argument
954 expectContains(String reason, T[] values, T expected) argument
961 expectContains(T[] values, T expected) argument
989 expectContains(String reason, int[] values, int expected) argument
997 expectContains(int[] values, int expected) argument
1025 expectContains(String reason, boolean[] values, boolean expected) argument
1041 expectContains(boolean[] values, boolean expected) argument
[all...]
/frameworks/support/v7/palette/src/androidTest/java/android/support/v7/graphics/
H A DTestUtils.java35 static void assertCloseColors(int expected, int actual) { argument
36 assertEquals(Color.red(expected), Color.red(actual), 2);
37 assertEquals(Color.green(expected), Color.green(actual), 2);
38 assertEquals(Color.blue(expected), Color.blue(actual), 2);
/frameworks/support/core-utils/tests/java/android/support/v4/graphics/
H A DColorUtilsTest.java182 private static void verifyMinAlpha(String title, int color, float expected, int actual) { argument
184 if (expected < 0) {
187 assertEquals(message, expected, actual / 255f, ALLOWED_OFFSET_MIN_ALPHA);
191 private static void verifyColorToHSL(int color, float[] expected) { argument
195 assertEquals("Hue not within offset", expected[0], actualHSL[0],
197 assertEquals("Saturation not within offset", expected[1], actualHSL[1],
199 assertEquals("Lightness not within offset", expected[2], actualHSL[2],
203 private static void verifyHSLToColor(float[] hsl, int expected) { argument
206 assertEquals("Red not within offset", Color.red(expected), Color.red(actualRgb),
208 assertEquals("Green not within offset", Color.green(expected), Colo
214 verifyColorToLAB(int color, double[] expected) argument
223 verifyColorToXYZ(int color, double[] expected) argument
232 verifyLABToXYZ(double[] lab, double[] expected) argument
241 verifyXYZToColor(double[] xyz, int expected) argument
246 verifyLABToColor(double[] lab, int expected) argument
251 verifyRGBComponentsClose(int expected, int actual) argument
[all...]
/frameworks/base/core/java/android/test/
H A DAndroidTestCase.java107 fail("expected security exception for " + permission);
108 } catch (SecurityException expected) {
109 assertNotNull("security exception's error message.", expected.getMessage());
111 expected.getMessage().contains(permission));
126 fail("expected SecurityException requiring " + permission);
127 } catch (SecurityException expected) {
128 assertNotNull("security exception's error message.", expected.getMessage());
130 expected.getMessage().contains(permission));
145 fail("expected SecurityException requiring " + permission);
146 } catch (SecurityException expected) {
[all...]
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/
H A DScanTestUtil.java167 * Compute the expected native scan settings that are expected for the given
188 * Compute the expected native scan settings that are expected for the given channels.
236 private static void assertScanResultsEquals(String prefix, ScanResult[] expected, argument
238 assertNotNull(prefix + "expected ScanResults was null", expected);
240 assertEquals(prefix + "results.length", expected.length, actual.length);
241 for (int j = 0; j < expected.length; ++j) {
242 ScanResult expectedResult = expected[
266 assertScanResultsEquals(ScanResult[] expected, ScanResult[] actual) argument
270 assertScanDataEquals(String prefix, ScanData expected, ScanData actual) argument
280 assertScanDataEquals(ScanData expected, ScanData actual) argument
284 assertScanDatasEquals(String prefix, ScanData[] expected, ScanData[] actual) argument
293 assertScanDatasEquals(ScanData[] expected, ScanData[] actual) argument
305 assertNativeScanSettingsEquals(WifiNative.ScanSettings expected, WifiNative.ScanSettings actual) argument
351 assertNativePnoSettingsEquals(WifiNative.PnoSettings expected, WifiNative.PnoSettings actual) argument
[all...]
/frameworks/support/documents-archive/src/android/support/provider/
H A DPreconditions.java46 static void checkArgumentEquals(String expected, @Nullable String actual, String message) { argument
47 if (!TextUtils.equals(expected, actual)) {
48 throw new IllegalArgumentException(String.format(message, String.valueOf(expected),
/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/data-binding/integration-tests/IndependentLibrary/app/src/androidTest/java/android/databinding/test/independentlibrary/
H A DLibraryActivityTest.java35 final String expected = LibraryActivity.FIELD_VALUE + " " +
37 assertEquals(expected, textView.getText().toString());
/frameworks/opt/setupwizard/library/test/src/com/android/setupwizardlib/test/
H A DGlifPatternDrawableTest.java85 Matrix expected = new Matrix(canvas.getMatrix());
93 expected.postScale(0.5f, 0.5f);
95 assertEquals("Matrices should match", expected, canvas.getMatrix());
101 final Matrix expected = new Matrix(canvas.getMatrix());
109 expected.postScale(1f, 1f);
110 expected.postTranslate(-99.718f, 0f);
112 assertEquals("Matrices should match", expected, canvas.getMatrix());
118 final Matrix expected = new Matrix(canvas.getMatrix());
126 expected.postScale(1f, 1f);
127 expected
165 assertSameColor(String message, int expected, int actual) argument
[all...]
/frameworks/native/cmds/bugreportz/
H A Dbugreportz_test.cpp59 int expected = data.length(); local
61 ASSERT_EQ(expected, actual) << "wrong number of bytes written to socket";
64 void AssertStdoutEquals(const std::string& expected) { argument
65 ASSERT_THAT(stdout_, StrEq(expected)) << "wrong stdout output";
/frameworks/support/fragment/tests/java/android/support/v4/app/
H A DStrictFragment.java60 public void checkState(String caller, int... expected) { argument
61 if (expected == null || expected.length == 0) {
62 throw new IllegalArgumentException("must supply at least one expected state");
64 for (int expect : expected) {
69 final StringBuilder expectString = new StringBuilder(stateToString(expected[0]));
70 for (int i = 1; i < expected.length; i++) {
71 expectString.append(" or ").append(stateToString(expected[i]));
74 + stateToString(mState) + "; expected " + expectString.toString());
80 + stateToString(mState) + "; expected a
[all...]
/frameworks/base/core/tests/utiltests/src/com/android/internal/util/
H A DMessageUtilsTest.java77 SparseArray<String> expected = makeSparseArray(
80 assertSparseArrayEquals(expected, MessageUtils.findMessageNames(CLASSES));
85 SparseArray<String> expected = makeSparseArray(
88 assertSparseArrayEquals(expected, MessageUtils.findMessageNames(CLASSES,
92 @Test(expected=MessageUtils.DuplicateConstantError.class)
/frameworks/support/v7/recyclerview/tests/src/android/support/v7/widget/
H A DGridLayoutManagerWrapContentTest.java100 Rect[] expected = new Rect[] {
103 layoutAndCheck(lp, adapter, expected, 30, 25);
120 Rect[] expected = new Rect[] {
123 layoutAndCheck(lp, adapter, expected, 75, 10);
138 Rect[] expected = new Rect[] {
144 layoutAndCheck(lp, adapter, expected, 30, 20);
157 Rect[] expected = new Rect[] {
163 layoutAndCheck(lp, adapter, expected, 60, 20);
177 Rect[] expected = new Rect[] {
183 layoutAndCheck(lp, adapter, expected, 6
[all...]
H A DStaggeredGridLayoutManagerWrapContentTest.java75 Rect[] expected = new Rect[] {
81 layoutAndCheck(lp, adapter, expected, 60, 20);
95 Rect[] expected = new Rect[] {
101 layoutAndCheck(lp, adapter, expected, 20, 60);
115 Rect[] expected = new Rect[] {
121 layoutAndCheck(lp, adapter, expected, 6000, 20);
135 Rect[] expected = new Rect[] {
141 layoutAndCheck(lp, adapter, expected, 60, 5500);
/frameworks/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/
H A DPhoneNumberWatcherTest.java229 String expected = "+1-650-123-4567"; // Different formatting than ours
230 testReplacement(init, expected, expected);
239 String expected = "Test User <650-123-4567>";
240 testReplacement(init, expected, expected);
249 String expected = "2nd Test User <650-123-4567>";
250 testReplacement(init, expected, expected);
259 String expected
286 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/support/percent/tests/java/android/support/percent/
H A DBaseInstrumentationTestCase.java41 protected static void assertFuzzyEquals(String description, float expected, float actual) { argument
47 assertEquals(description, expected, actual, 1.1f);

Completed in 839 milliseconds

1234567