/frameworks/base/test-runner/src/android/test/ |
D | MoreAsserts.java | 43 public static void assertAssignableFrom(Class<?> expected, Object actual) { in assertAssignableFrom() argument 44 assertAssignableFrom(expected, actual.getClass()); in assertAssignableFrom() 52 public static void assertAssignableFrom(Class<?> expected, Class<?> actual) { in assertAssignableFrom() argument 55 " to be assignable from actual class " + actual.getCanonicalName(), in assertAssignableFrom() 56 expected.isAssignableFrom(actual)); in assertAssignableFrom() 64 String message, Object unexpected, Object actual) { in assertNotEqual() argument 65 if (equal(unexpected, actual)) { in assertNotEqual() 74 public static void assertNotEqual(Object unexpected, Object actual) { in assertNotEqual() argument 75 assertNotEqual(null, unexpected, actual); in assertNotEqual() 84 String message, byte[] expected, byte[] actual) { in assertEquals() argument [all …]
|
D | ComparisonFailure.java | 27 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/util/ |
D | Base64Test.java | 58 private void assertEquals(byte[] expected, int len, byte[] actual) { in assertEquals() argument 59 assertEquals(len, actual.length); in assertEquals() 61 assertEquals(expected[i], actual[i]); in assertEquals() 66 private void assertEquals(byte[] expected, int len, byte[] actual, int alen) { in assertEquals() argument 69 assertEquals(expected[i], actual[i]); in assertEquals() 74 private void assertEquals(byte[] expected, byte[] actual) { in assertEquals() argument 75 assertEquals(expected.length, actual.length); in assertEquals() 77 assertEquals(expected[i], actual[i]); in assertEquals() 326 byte[] actual = new byte[plain.length * 2]; in testInputStream() 336 while ((b = b64is.read(actual, ap, actual.length-ap)) != -1) { in testInputStream() [all …]
|
/frameworks/av/media/libnbaio/ |
D | LibsndfileSource.cpp | 54 sf_count_t actual = sf_readf_short(mSndfile, (short *) buffer, (sf_count_t) count); in read() local 56 if (actual == 0) { in read() 69 mFramesRead += actual; in read() 70 if (actual >= mEstimatedFramesUntilEOF) { in read() 73 mEstimatedFramesUntilEOF -= actual; in read() 77 return actual; in read()
|
D | SourceAudioBufferProvider.cpp | 68 ssize_t actual = mSource->read(mAllocated, buffer->frameCount, pts); in getNextBuffer() local 69 if (actual > 0) { in getNextBuffer() 70 ALOG_ASSERT((size_t) actual <= buffer->frameCount); in getNextBuffer() 72 mRemaining = actual; in getNextBuffer() 74 buffer->frameCount = actual; in getNextBuffer() 75 mGetCount = actual; in getNextBuffer()
|
D | LibsndfileSink.cpp | 45 sf_count_t actual = sf_writef_short(mSndfile, (short *) buffer, (sf_count_t) count); in write() local 46 mFramesWritten += actual; in write() 47 return actual; in write()
|
/frameworks/base/core/tests/overlaytests/OverlayTest/src/com/android/overlaytest/ |
D | OverlayBaseTest.java | 104 boolean actual = mResources.getBoolean(resId); in assertResource() 105 assertEquals(expected, actual); in assertResource() 110 int actual = mResources.getInteger(resId); in assertResource() local 111 assertEquals(expected, actual); in assertResource() 116 String actual = mResources.getString(resId); in assertResource() local 117 assertEquals(expected, actual); in assertResource() 122 int[] actual = mResources.getIntArray(resId); in assertResource() local 123 assertEquals("length:", expected.length, actual.length); in assertResource() 124 for (int i = 0; i < actual.length; ++i) { in assertResource() 125 assertEquals("index " + i + ":", actual[i], expected[i]); in assertResource() [all …]
|
/frameworks/base/core/tests/coretests/src/android/content/pm/ |
D | LimitedLengthInputStreamTest.java | 84 byte[] actual = new byte[length]; in checkReadBytesWithOffsetAndLength_WithString1() 91 System.arraycopy(temp, 0, actual, 0, length); in checkReadBytesWithOffsetAndLength_WithString1() 92 assertTrue(Arrays.equals(expected, actual)); in checkReadBytesWithOffsetAndLength_WithString1() 126 byte[] actual = new byte[TEST_STRING1.length]; in testReadBytesWithOffsetAndLength_ZeroOffset_PastEnd_Success() 127 System.arraycopy(temp, 0, actual, 0, actual.length); in testReadBytesWithOffsetAndLength_ZeroOffset_PastEnd_Success() 128 assertTrue(Arrays.equals(TEST_STRING1, actual)); in testReadBytesWithOffsetAndLength_ZeroOffset_PastEnd_Success() 134 byte[] actual = new byte[length]; in checkReadBytes_WithString1() 141 System.arraycopy(temp, 0, actual, 0, length); in checkReadBytes_WithString1() 142 assertTrue(Arrays.equals(expected, actual)); in checkReadBytes_WithString1()
|
D | ContainerEncryptionParamsTest.java | 62 ContainerEncryptionParams actual = ContainerEncryptionParams.CREATOR in testParcel() local 65 assertEquals(ENC_ALGORITHM, actual.getEncryptionAlgorithm()); in testParcel() 67 if (!(actual.getEncryptionSpec() instanceof IvParameterSpec)) { in testParcel() 70 IvParameterSpec actualParams = (IvParameterSpec) actual.getEncryptionSpec(); in testParcel() 74 assertEquals(ENC_KEY, actual.getEncryptionKey()); in testParcel() 76 assertEquals(MAC_ALGORITHM, actual.getMacAlgorithm()); in testParcel() 78 assertNull(actual.getMacSpec()); in testParcel() 80 assertEquals(MAC_KEY, actual.getMacKey()); in testParcel() 82 assertTrue(Arrays.equals(MAC_TAG, actual.getMacTag())); in testParcel() 84 assertEquals(AUTHENTICATED_START, actual.getAuthenticatedDataStart()); in testParcel() [all …]
|
D | ManifestDigestTest.java | 55 ManifestDigest actual = ManifestDigest.fromInputStream(is); in testManifestDigest_Equals() local 56 assertEquals(expected, actual); in testManifestDigest_Equals() 59 assertFalse(unexpected.equals(actual)); in testManifestDigest_Equals()
|
/frameworks/opt/vcard/tests/src/com/android/vcard/tests/ |
D | VCardBuilderTest.java | 44 final String actual = builder.toString(); in testVCardNameFieldFromDisplayName() local 52 assertTrue("Actual value:\n" + actual + " expected to contain\n" + expectedName + in testVCardNameFieldFromDisplayName() 53 "\nbut does not.", actual.contains(expectedName)); in testVCardNameFieldFromDisplayName() 54 assertTrue("Actual value:\n" + actual + " expected to contain\n" + expectedFullName + in testVCardNameFieldFromDisplayName() 55 "\nbut does not.", actual.contains(expectedFullName)); in testVCardNameFieldFromDisplayName()
|
/frameworks/support/tests/java/android/support/v4/content/ |
D | FileProviderTest.java | 292 Uri actual; in testMetaDataTargets() local 294 actual = FileProvider.getUriForFile(mContext, TEST_AUTHORITY, in testMetaDataTargets() 296 assertEquals("content://moocow/test_root/proc/version", actual.toString()); in testMetaDataTargets() 298 actual = FileProvider.getUriForFile(mContext, TEST_AUTHORITY, in testMetaDataTargets() 300 assertEquals("content://moocow/test_init/mountinfo", actual.toString()); in testMetaDataTargets() 302 actual = FileProvider.getUriForFile(mContext, TEST_AUTHORITY, in testMetaDataTargets() 304 assertEquals("content://moocow/test_files/meow", actual.toString()); in testMetaDataTargets() 306 actual = FileProvider.getUriForFile(mContext, TEST_AUTHORITY, in testMetaDataTargets() 308 assertEquals("content://moocow/test_thumbs/rawr", actual.toString()); in testMetaDataTargets() 310 actual = FileProvider.getUriForFile(mContext, TEST_AUTHORITY, in testMetaDataTargets() [all …]
|
/frameworks/rs/java/tests/RsTest/src/com/android/rs/test/ |
D | math_agree.rs | 58 static void fail_f1(float v1, float v2, float actual, float expected, char *op_name) { 59 int dist = float_dist(actual, expected); 64 rsDebug("Renderscript result", actual); 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); 79 rsDebug("Renderscript result .x", actual.x); 80 rsDebug("Renderscript result .y", actual.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_CompatLib/src/com/android/rs/test/ |
D | math_agree.rs | 58 static void fail_f1(float v1, float v2, float actual, float expected, char *op_name) { 59 int dist = float_dist(actual, expected); 64 rsDebug("Renderscript result", actual); 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); 79 rsDebug("Renderscript result .x", actual.x); 80 rsDebug("Renderscript result .y", actual.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/libs/androidfw/tests/ |
D | TestHelpers.cpp | 41 const String8 actual = pool->string8ObjectAt(val.data); in IsStringEqual() local 42 if (String8(expectedStr) != actual) { in IsStringEqual() 43 return ::testing::AssertionFailure() << actual.string(); in IsStringEqual() 45 return ::testing::AssertionSuccess() << actual.string(); in IsStringEqual()
|
/frameworks/wilhelm/src/itf/ |
D | IOutputMixExt.c | 229 unsigned actual = desired; in IOutputMixExt_FillBuffer() local 230 if (track->mAvail < actual) { in IOutputMixExt_FillBuffer() 231 actual = track->mAvail; in IOutputMixExt_FillBuffer() 234 if (actual > 0) { in IOutputMixExt_FillBuffer() 243 for (j = 0; j < actual; j += sizeof(stereo), ++mixBuffer, ++source) { in IOutputMixExt_FillBuffer() 249 for (j = 0; j < actual; j += sizeof(stereo), ++mixBuffer, ++source) { in IOutputMixExt_FillBuffer() 257 for (j = 0; j < actual; j += sizeof(stereo), ++mixBuffer, ++source) { in IOutputMixExt_FillBuffer() 263 memcpy(dstWriter, track->mReader, actual); in IOutputMixExt_FillBuffer() 268 dstWriter = (char *) dstWriter + actual; in IOutputMixExt_FillBuffer() 269 desired -= actual; in IOutputMixExt_FillBuffer() [all …]
|
/frameworks/base/core/tests/coretests/src/android/view/ |
D | VelocityTest.java | 268 private void assertEqualFuzzy(float expected, float actual, float threshold) { in assertEqualFuzzy() argument 269 boolean fuzzyEqual = actual >= expected - threshold && actual <= expected + threshold; in assertEqualFuzzy() 270 Assert.assertTrue("Expected: <"+expected+"> but was: <"+actual+ in assertEqualFuzzy() 274 private void assertGreater(float minExpected, float actual) { in assertGreater() argument 275 Assert.assertTrue("Expected: minimum <"+minExpected+"> but was: <"+actual+">", in assertGreater() 276 actual > minExpected); in assertGreater() 279 private void assertLower(float maxExpected, float actual) { in assertLower() argument 280 Assert.assertTrue("Expected: maximum <"+maxExpected+"> but was: <"+actual+">", in assertLower() 281 actual < maxExpected); in assertLower()
|
/frameworks/av/media/libcpustats/ |
D | ThreadCpuUsage.cpp | 178 ssize_t actual = read(fd, kernelMax, sizeof(kernelMax)); in init() local 179 if (actual >= 2 && kernelMax[actual-1] == '\n') { in init() 236 ssize_t actual = pread(fd, kHz, sizeof(kHz), (off_t) 0); in getCpukHz() local 238 if (actual >= 2 && kHz[actual-1] == '\n') { in getCpukHz()
|
/frameworks/base/keystore/tests/src/android/security/ |
D | AndroidKeyStoreTest.java | 1278 Certificate actual = f.generateCertificate(new ByteArrayInputStream(FAKE_RSA_CA_1)); in testKeyStore_GetCertificate_Single_Encrypted_Success() local 1280 assertEquals("Actual and retrieved certificates should be the same", actual, retrieved); in testKeyStore_GetCertificate_Single_Encrypted_Success() 1301 Certificate actual = f.generateCertificate(new ByteArrayInputStream(FAKE_RSA_CA_1)); in testKeyStore_GetCertificateAlias_CAEntry_Encrypted_Success() local 1304 mKeyStore.getCertificateAlias(actual)); in testKeyStore_GetCertificateAlias_CAEntry_Encrypted_Success() 1321 Certificate actual = f.generateCertificate(new ByteArrayInputStream(FAKE_RSA_USER_1)); in testKeyStore_GetCertificateAlias_PrivateKeyEntry_Encrypted_Success() local 1324 mKeyStore.getCertificateAlias(actual)); in testKeyStore_GetCertificateAlias_PrivateKeyEntry_Encrypted_Success() 1346 Certificate actual = f.generateCertificate(new ByteArrayInputStream(FAKE_RSA_CA_1)); in testKeyStore_GetCertificateAlias_CAEntry_WithPrivateKeyUsingCA_Encrypted_Success() local 1349 mKeyStore.getCertificateAlias(actual)); in testKeyStore_GetCertificateAlias_CAEntry_WithPrivateKeyUsingCA_Encrypted_Success() 1359 Certificate actual = f.generateCertificate(new ByteArrayInputStream(FAKE_RSA_CA_1)); in testKeyStore_GetCertificateAlias_NonExist_Empty_Encrypted_Failure() local 1362 mKeyStore.getCertificateAlias(actual)); in testKeyStore_GetCertificateAlias_NonExist_Empty_Encrypted_Failure() [all …]
|
/frameworks/base/core/tests/bluetoothtests/src/android/bluetooth/le/ |
D | ScanRecordTest.java | 66 private static void assertArrayEquals(byte[] expected, byte[] actual) { in assertArrayEquals() argument 67 if (!Arrays.equals(expected, actual)) { in assertArrayEquals() 69 "> but was:<" + Arrays.toString(actual) + ">"); in assertArrayEquals()
|
/frameworks/base/tools/split-select/ |
D | TestRules.h | 58 const android::sp<Rule>& actual, const Rule& expected); 60 #define EXPECT_RULES_EQ(actual, expected) \ argument 61 EXPECT_PRED_FORMAT2(::split::test::RulePredFormat, actual, expected)
|
/frameworks/base/libs/androidfw/ |
D | Asset.cpp | 439 size_t actual; in read() local 466 actual = count; in read() 471 actual = count; in read() 488 actual = fread(buf, 1, count, mFp); in read() 489 if (actual == 0) // something failed -- I/O error? in read() 492 assert(actual == count); in read() 495 mOffset += actual; in read() 496 return actual; in read() 763 size_t actual; in read() local 769 actual = mZipInflater->read(buf, count); in read() [all …]
|
/frameworks/base/core/tests/coretests/src/android/app/ |
D | DownloadManagerBaseTest.java | 348 protected void verifyFileContents(ParcelFileDescriptor actual, byte[] expected) in verifyFileContents() argument 350 AutoCloseInputStream input = new ParcelFileDescriptor.AutoCloseInputStream(actual); in verifyFileContents() 351 long fileSize = actual.getStatSize(); in verifyFileContents() 367 protected void compareByteArrays(byte[] actual, byte[] expected) { in compareByteArrays() argument 368 assertEquals(actual.length, expected.length); in compareByteArrays() 369 int length = actual.length; in compareByteArrays() 372 if (actual[i] != expected[i]) { in compareByteArrays() 386 byte[] actual = new byte[FILE_BLOCK_READ_SIZE]; in verifyFileContents() 397 while (((actualRead = input.read(actual)) != -1) && in verifyFileContents() 400 compareByteArrays(actual, expected); in verifyFileContents() [all …]
|
/frameworks/opt/vcard/tests/src/com/android/vcard/tests/testutils/ |
D | ImportTestProvider.java | 211 final ContentValues expected, final ContentValues actual) { in equalsForContentValues() argument 212 if (expected == actual) { in equalsForContentValues() 214 } else if (expected == null || actual == null || expected.size() != actual.size()) { in equalsForContentValues() 221 if (!actual.containsKey(key)) { in equalsForContentValues() 227 final Object actualValue = actual.get(key); in equalsForContentValues()
|
/frameworks/base/docs/html-intl/intl/es/training/monitoring-device-state/ |
D | battery-monitoring.jd | 16 <li><a href="#DetermineChargeState">Cómo determinar el estado de carga actual</a></li> 18 <li><a href="#CurrentLevel">Cómo determinar el nivel de batería actual</a></li> 30 …te recomendamos que comiences por comprobar el estado de carga y el nivel actual de la batería.</p> 37 <h2 id="DetermineChargeState">Cómo determinar el estado de carga actual</h2> 39 <p>En primer lugar, te recomendamos que determines el estado de carga actual. {@link android.os.Bat… 41 …l siguiente fragmento). A continuación, se devuelve el intento de estado actual de la batería. Pue… 46 <p>Puedes extraer el estado de carga actual y, si el dispositivo está cargando, puedes saber tambié… 74 …oadcastReceiver} asociada, puedes extraer el método y el estado de carga actual como se describe e… 90 <h2 id="CurrentLevel">Cómo determinar el nivel de batería actual</h2> 92 <p>En algunos casos, también es útil determinar el nivel de batería actual. Puedes disminuir la fre… [all …]
|