/frameworks/base/services/tests/servicestests/src/com/android/server/notification/ |
H A D | ValidateNotificationPeopleTest.java | 38 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 D | MoreAsserts.java | 42 * 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 D | ComparisonFailure.java | 27 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 D | Grouper_test.cpp | 104 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 D | Rule_test.cpp | 42 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 D | StaticIpConfigurationTest.java | 148 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 D | SSLTest.java | 53 byte[] expected = { 57 assertTrue(Arrays.equals(expected, SSLCertificateSocketFactory.toLengthPrefixedList( 66 } catch (IllegalArgumentException expected) { 74 } catch (IllegalArgumentException expected) { 82 } catch (IllegalArgumentException expected) {
|
H A D | IpPrefixTest.java | 51 } 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 D | CameraErrorCollector.java | 141 * @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 D | TestUtils.java | 35 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/opt/setupwizard/library/test/src/com/android/setupwizardlib/test/ |
H A D | GlifPatternDrawableTest.java | 73 Matrix expected = new Matrix(canvas.getMatrix()); 79 expected.postScale(0.5f, 0.5f); 81 assertEquals("Matrices should match", expected, canvas.getMatrix()); 87 final Matrix expected = new Matrix(canvas.getMatrix()); 93 expected.postScale(1f, 1f); 94 expected.postTranslate(-100f, 0f); 96 assertEquals("Matrices should match", expected, canvas.getMatrix()); 102 final Matrix expected = new Matrix(canvas.getMatrix()); 108 expected.postScale(1f, 1f); 109 expected [all...] |
/frameworks/support/v4/tests/java/android/support/v4/graphics/ |
H A D | ColorUtilsTest.java | 181 private static void verifyMinAlpha(String title, int color, float expected, int actual) { argument 183 if (expected < 0) { 186 assertEquals(message, expected, actual / 255f, ALLOWED_OFFSET_MIN_ALPHA); 190 private static void verifyColorToHSL(int color, float[] expected) { argument 194 assertEquals("Hue not within offset", expected[0], actualHSL[0], 196 assertEquals("Saturation not within offset", expected[1], actualHSL[1], 198 assertEquals("Lightness not within offset", expected[2], actualHSL[2], 202 private static void verifyHSLToColor(float[] hsl, int expected) { argument 205 assertEquals("Red not within offset", Color.red(expected), Color.red(actualRgb), 207 assertEquals("Green not within offset", Color.green(expected), Colo 213 verifyColorToLAB(int color, double[] expected) argument 222 verifyColorToXYZ(int color, double[] expected) argument 231 verifyLABToXYZ(double[] lab, double[] expected) argument 240 verifyXYZToColor(double[] xyz, int expected) argument 245 verifyLABToColor(double[] lab, int expected) argument 250 verifyRGBComponentsClose(int expected, int actual) argument [all...] |
/frameworks/base/core/java/android/test/ |
H A D | AndroidTestCase.java | 107 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 D | ScanTestUtil.java | 167 * 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 278 assertScanDataEquals(ScanData expected, ScanData actual) argument 282 assertScanDatasEquals(String prefix, ScanData[] expected, ScanData[] actual) argument 291 assertScanDatasEquals(ScanData[] expected, ScanData[] actual) argument 303 assertNativeScanSettingsEquals(WifiNative.ScanSettings expected, WifiNative.ScanSettings actual) argument 349 assertNativePnoSettingsEquals(WifiNative.PnoSettings expected, WifiNative.PnoSettings actual) argument [all...] |
/frameworks/support/documents-archive/src/android/support/provider/ |
H A D | Preconditions.java | 42 static void checkArgumentEquals(String expected, @Nullable String actual, String message) { argument 43 if (!TextUtils.equals(expected, actual)) { 44 throw new IllegalArgumentException(String.format(message, String.valueOf(expected),
|
/frameworks/base/core/tests/coretests/src/android/text/ |
H A D | StaticLayoutDirectionsTest.java | 74 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 D | LibraryActivityTest.java | 35 final String expected = LibraryActivity.FIELD_VALUE + " " + 37 assertEquals(expected, textView.getText().toString());
|
/frameworks/support/v4/tests/java/android/support/v4/app/ |
H A D | StrictFragment.java | 60 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 D | MessageUtilsTest.java | 77 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/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/ |
H A D | PhoneNumberWatcherTest.java | 229 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 D | AutoCompleteTextViewPopup.java | 34 // 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 D | BaseInstrumentationTestCase.java | 41 protected static void assertFuzzyEquals(String description, float expected, float actual) { argument 47 assertEquals(description, expected, actual, 1.1f);
|
/frameworks/support/v7/recyclerview/tests/src/android/support/v7/widget/ |
H A D | StaggeredGridLayoutManagerWrapContentTest.java | 70 Rect[] expected = new Rect[] { 76 layoutAndCheck(lp, adapter, expected, 60, 20); 90 Rect[] expected = new Rect[] { 96 layoutAndCheck(lp, adapter, expected, 20, 60); 110 Rect[] expected = new Rect[] { 116 layoutAndCheck(lp, adapter, expected, 6000, 20); 130 Rect[] expected = new Rect[] { 136 layoutAndCheck(lp, adapter, expected, 60, 5500);
|
/frameworks/base/tests/TtsTests/src/com/android/speech/tts/ |
H A D | TtsEnginesTests.java | 71 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 D | CrunchCache_test.cpp | 18 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);
|