Home
last modified time | relevance | path

Searched refs:assertArrayEquals (Results 1 – 25 of 100) sorted by relevance

1234

/frameworks/base/core/tests/coretests/src/android/os/
DRedactingFileDescriptorTest.java23 import static org.junit.Assert.assertArrayEquals;
87 assertArrayEquals(new byte[] { 64, 64, 64, 64, 64, 64, 64, 64, 64, 64 }, buf); in testRanges()
90 assertArrayEquals(new byte[] { 64, 64, 64, 64, 64, 0, 0, 0, 0, 0 }, buf); in testRanges()
93 assertArrayEquals(new byte[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }, buf); in testRanges()
96 assertArrayEquals(new byte[] { 0, 0, 0, 0, 0, 64, 64, 64, 64, 64 }, buf); in testRanges()
99 assertArrayEquals(new byte[] { 0, 0, 0, 0, 0, 64, 64, 64, 64, 64 }, buf); in testRanges()
123 assertArrayEquals(new byte[] { 64, 64, 64, 64, 64, 0, 0, 0, 0, 0 }, buf); in testReadWrite()
128 assertArrayEquals(new byte[] { 64, 64, 64, 64, 64, 0, 0, 32, 32, 0 }, buf); in testReadWrite()
134 assertArrayEquals(new long[] { 100, 200, 300, 400 }, in testRemoveRange()
136 assertArrayEquals(new long[] { 100, 200, 300, 400 }, in testRemoveRange()
[all …]
/frameworks/base/core/tests/utiltests/src/com/android/internal/util/
DArrayUtilsTest.java21 import static org.junit.Assert.assertArrayEquals;
96 assertArrayEquals(new int[] { 1 }, in testAppendInt()
98 assertArrayEquals(new int[] { 1 }, in testAppendInt()
100 assertArrayEquals(new int[] { 1, 2 }, in testAppendInt()
102 assertArrayEquals(new int[] { 1, 2 }, in testAppendInt()
108 assertArrayEquals(new int[] { }, in testRemoveInt()
110 assertArrayEquals(new int[] { 1, 2, 3, }, in testRemoveInt()
112 assertArrayEquals(new int[] { 2, 3, }, in testRemoveInt()
114 assertArrayEquals(new int[] { 1, 3, }, in testRemoveInt()
116 assertArrayEquals(new int[] { 1, 2, }, in testRemoveInt()
[all …]
/frameworks/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/uicc/euicc/asn1/
DIccUtilsTest.java19 import static org.junit.Assert.assertArrayEquals;
92 assertArrayEquals(new byte[] {0}, IccUtils.unsignedIntToBytes(0)); in testUnsignedToBytes()
93 assertArrayEquals(new byte[] {0x12, 0x34}, IccUtils.unsignedIntToBytes(0x1234)); in testUnsignedToBytes()
94 assertArrayEquals( in testUnsignedToBytes()
96 assertArrayEquals(new byte[] {-128}, IccUtils.unsignedIntToBytes(0x80)); in testUnsignedToBytes()
97 assertArrayEquals(new byte[] {-128, 0x05}, IccUtils.unsignedIntToBytes(0x8005)); in testUnsignedToBytes()
101 assertArrayEquals(new byte[] {0, 0, 0x7F, 0x12, -2, 0x34}, bs); in testUnsignedToBytes()
107 assertArrayEquals(new byte[] {0}, IccUtils.signedIntToBytes(0)); in testSignedToBytes()
108 assertArrayEquals(new byte[] {0x12, 0x34}, IccUtils.signedIntToBytes(0x1234)); in testSignedToBytes()
109 assertArrayEquals( in testSignedToBytes()
[all …]
DAsn1DecoderTest.java19 import static org.junit.Assert.assertArrayEquals;
61 assertArrayEquals( in testNormalOperation()
103 assertArrayEquals( in testNodeList()
116 assertArrayEquals( in testNodeList()
140 assertArrayEquals( in testMissingData()
169 assertArrayEquals(new byte[] {}, childOfFirst.asBytes()); in testEmptyData()
181 assertArrayEquals(new byte[] {}, childOfSecond.asBytes()); in testEmptyData()
202 assertArrayEquals(new byte[] {1, 2, 3}, node.asBytes()); in testLongFormLength()
/frameworks/base/core/tests/coretests/src/android/app/servertransaction/
DTransactionExecutorTests.java29 import static org.junit.Assert.assertArrayEquals;
98 assertArrayEquals(new int[] {}, path(PRE_ON_CREATE)); in testLifecycleFromPreOnCreate()
99 assertArrayEquals(new int[] {ON_CREATE}, path(ON_CREATE)); in testLifecycleFromPreOnCreate()
100 assertArrayEquals(new int[] {ON_CREATE, ON_START}, path(ON_START)); in testLifecycleFromPreOnCreate()
101 assertArrayEquals(new int[] {ON_CREATE, ON_START, ON_RESUME}, path(ON_RESUME)); in testLifecycleFromPreOnCreate()
102 assertArrayEquals(new int[] {ON_CREATE, ON_START, ON_RESUME, ON_PAUSE}, path(ON_PAUSE)); in testLifecycleFromPreOnCreate()
103 assertArrayEquals(new int[] {ON_CREATE, ON_START, ON_RESUME, ON_PAUSE, ON_STOP}, in testLifecycleFromPreOnCreate()
105 assertArrayEquals(new int[] {ON_CREATE, ON_START, ON_RESUME, ON_PAUSE, ON_STOP, ON_DESTROY}, in testLifecycleFromPreOnCreate()
112 assertArrayEquals(new int[] {}, path(ON_CREATE)); in testLifecycleFromOnCreate()
113 assertArrayEquals(new int[] {ON_START}, path(ON_START)); in testLifecycleFromOnCreate()
[all …]
/frameworks/base/core/tests/coretests/src/com/android/internal/os/
DLongSamplingCounterArrayTest.java24 import static org.junit.Assert.assertArrayEquals;
87 assertArrayEquals(COUNTS, mCounterArray.mCounts); in testReadWriteParcel()
101 assertArrayEquals(COUNTS, mCounterArray.mCounts); in testReadWriteSummaryParcel()
109 assertArrayEquals(COUNTS, mCounterArray.mCounts); in testOnTimeStarted()
116 assertArrayEquals(COUNTS, mCounterArray.mCounts); in testOnTimeStopped()
124 assertArrayEquals(COUNTS, mCounterArray.getCountsLocked(STATS_SINCE_CHARGED)); in testGetCountsLocked()
127 assertArrayEquals(COUNTS, mCounterArray.getCountsLocked(STATS_SINCE_CHARGED)); in testGetCountsLocked()
146 assertArrayEquals(deltas, mCounterArray.mCounts); in testAddCountLocked()
150 assertArrayEquals(null, mCounterArray.mCounts); in testAddCountLocked()
152 assertArrayEquals(deltas, mCounterArray.mCounts); in testAddCountLocked()
[all …]
DKernelCpuThreadReaderTest.java19 import static org.junit.Assert.assertArrayEquals;
177 assertArrayEquals( in testBucketSetup_simple()
180 assertArrayEquals( in testBucketSetup_simple()
191 assertArrayEquals( in testBucketSetup_noBig()
194 assertArrayEquals( in testBucketSetup_noBig()
205 assertArrayEquals( in testBucketSetup_moreLittle()
208 assertArrayEquals( in testBucketSetup_moreLittle()
219 assertArrayEquals( in testBucketSetup_moreBig()
222 assertArrayEquals( in testBucketSetup_moreBig()
233 assertArrayEquals( in testBucketSetup_equalBuckets()
[all …]
DProcTimeInStateReaderTest.java19 import static org.junit.Assert.assertArrayEquals;
63 assertArrayEquals( in testSimple()
67 assertArrayEquals( in testSimple()
80 assertArrayEquals( in testHeaderFormat()
84 assertArrayEquals( in testHeaderFormat()
98 assertArrayEquals( in testDifferentFile()
DBatteryStatsImplTest.java26 import static org.junit.Assert.assertArrayEquals;
113 assertArrayEquals("Uid=" + testUids[i], cpuTimes[i], in testUpdateProcStateCpuTimes()
144 assertArrayEquals("Uid=" + testUids[i], expectedCpuTimes, in testUpdateProcStateCpuTimes()
176 assertArrayEquals("Uid=" + testUids[i], expectedCpuTimes, in testUpdateProcStateCpuTimes()
178 assertArrayEquals("Uid=" + testUids[i], delta2[i], in testUpdateProcStateCpuTimes()
216 assertArrayEquals("Uid=" + testUids[i], expectedCpuTimes, in testUpdateProcStateCpuTimes()
223 assertArrayEquals("Uid=" + testUids[i], expectedScreenOffTimes, in testUpdateProcStateCpuTimes()
279 assertArrayEquals("Uid=" + testUids[i], expectedCpuTimes[i], in testCopyFromAllUidsCpuTimes()
296 assertArrayEquals(timesA, mBatteryStatsImpl.addCpuTimes(timesA, timesB)); in testAddCpuTimes()
300 assertArrayEquals(timesB, mBatteryStatsImpl.addCpuTimes(timesA, timesB)); in testAddCpuTimes()
[all …]
/frameworks/base/core/tests/coretests/src/android/security/keystore/recovery/
DWrappedApplicationKeyTest.java19 import static org.junit.Assert.assertArrayEquals;
59 assertArrayEquals(KEY_MATERIAL, buildTestKey().getEncryptedKeyMaterial()); in build_setsEncryptedKeyMaterial()
64 assertArrayEquals(METADATA, buildTestKeyWithMetadata(METADATA).getMetadata()); in build_setsMetadata_nonNull()
69 assertArrayEquals(null, buildTestKeyWithMetadata(null).getMetadata()); in build_setsMetadata_null()
89 assertArrayEquals(KEY_MATERIAL, readFromParcel.getEncryptedKeyMaterial()); in writeToParcel_writesKeyMaterial()
99 assertArrayEquals(METADATA, readFromParcel.getMetadata()); in writeToParcel_writesMetadata_nonNull()
109 assertArrayEquals(null, readFromParcel.getMetadata()); in writeToParcel_writesMetadata_null()
119 assertArrayEquals(null, readFromParcel.getMetadata()); in writeToParcel_writesMetadata_absent()
DKeyChainSnapshotTest.java19 import static org.junit.Assert.assertArrayEquals;
68 assertArrayEquals(SERVER_PARAMS, createKeyChainSnapshot().getServerParams()); in build_setsServerParams()
73 assertArrayEquals(RECOVERY_KEY_BLOB, in build_setsRecoveryKeyBlob()
93 assertArrayEquals(SALT, keyDerivationParams.getSalt()); in build_setsKeyChainProtectionParams()
103 assertArrayEquals(KEY_MATERIAL, wrappedApplicationKey.getEncryptedKeyMaterial()); in build_setsWrappedApplicationKeys()
104 assertArrayEquals(KEY_METADATA, wrappedApplicationKey.getMetadata()); in build_setsWrappedApplicationKeys()
132 assertArrayEquals(SERVER_PARAMS, snapshot.getServerParams()); in writeToParcel_writesServerParams()
139 assertArrayEquals(RECOVERY_KEY_BLOB, snapshot.getEncryptedRecoveryKeyBlob()); in writeToParcel_writesKeyRecoveryBlob()
160 assertArrayEquals(SALT, keyDerivationParams.getSalt()); in writeToParcel_writesKeyChainProtectionParams()
170 assertArrayEquals(KEY_MATERIAL, wrappedApplicationKey.getEncryptedKeyMaterial()); in writeToParcel_writesWrappedApplicationKeys()
[all …]
DKeyChainProtectionParamsTest.java19 import static org.junit.Assert.assertArrayEquals;
41 assertArrayEquals(SECRET, createTestParams().getSecret()); in build_setsSecret()
60 assertArrayEquals(SALT, keyDerivationParams.getSalt()); in build_setsKeyDerivationParams()
67 assertArrayEquals(SECRET, protParams.getSecret()); in writeToParcel_writesSecret()
90 assertArrayEquals(SALT, keyDerivationParams.getSalt()); in writeToParcel_writesKeyDerivationParams()
DKeyDerivationParamsTest.java19 import static org.junit.Assert.assertArrayEquals;
47 assertArrayEquals(SALT, keyDerivationParams.getSalt()); in createSha256Params_setsSalt()
63 assertArrayEquals(SALT, keyDerivationParams.getSalt()); in writeToParcel_writesSalt()
/frameworks/layoutlib/create/tests/src/com/android/tools/layoutlib/create/
DAsmAnalyzerTest.java35 import static org.junit.Assert.assertArrayEquals;
68 assertArrayEquals(new String[] { in testParseZip()
98 assertArrayEquals(new String[] {"mock_android/data/dataFile"}, in testParseZip()
115 assertArrayEquals(new String[] { "mock_android.view.ViewGroup$LayoutParams" }, in testFindClass()
117 assertArrayEquals(new ClassReader[] { cr }, found.values().toArray()); in testFindClass()
131 assertArrayEquals(new String[] { in testInclude()
162 assertArrayEquals(new String[] { in testFindClassesDerivingFrom()
194 assertArrayEquals(new String[] { in testDependencyVisitor()
209 assertArrayEquals(new String[] { in testDependencyVisitor()
225 assertArrayEquals(new String[] { }, out_deps.keySet().toArray()); in testDependencyVisitor()
[all …]
/frameworks/libs/net/common/tests/unit/src/com/android/net/module/util/
DHexDumpTest.java19 import static org.junit.Assert.assertArrayEquals;
46 assertArrayEquals(new byte[]{(byte) 0xab, (byte) 0xcd, (byte) 0xef}, in testHexStringToByteArray()
48 assertArrayEquals(new byte[]{(byte) 0xAB, (byte) 0xCD, (byte) 0xEF}, in testHexStringToByteArray()
54 assertArrayEquals(new byte[]{(byte) 0xff, (byte) 0x00, (byte) 0x00, (byte) 0x04}, in testIntegerToByteArray()
60 assertArrayEquals(new byte[]{(byte) 0x7f}, HexDump.toByteArray((byte) 0x7f)); in testByteToByteArray()
/frameworks/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/cdma/sms/
DCdmaSmsAddressTest.java19 import static org.junit.Assert.assertArrayEquals;
36 assertArrayEquals(CdmaSmsAddress.parseToDtmf(address), cdmaAddress.origBytes); in testNumberAddress()
46 assertArrayEquals(CdmaSmsAddress.parseToDtmf("3141592653"), cdmaAddress.origBytes); in testNumberWithSugar()
58 assertArrayEquals(UserData.stringToAscii("10068"), cdmaAddress.origBytes); in testInternationalAddress()
69 assertArrayEquals(UserData.stringToAscii(address), cdmaAddress.origBytes); in testEmailAddress()
/frameworks/base/wifi/tests/src/android/net/wifi/nl80211/
DNativeScanResultTest.java19 import static org.junit.Assert.assertArrayEquals;
77 assertArrayEquals(scanResult.ssid, scanResultDeserialized.ssid); in canSerializeAndDeserialize()
78 assertArrayEquals(scanResult.bssid, scanResultDeserialized.bssid); in canSerializeAndDeserialize()
79 assertArrayEquals(scanResult.infoElement, scanResultDeserialized.infoElement); in canSerializeAndDeserialize()
/frameworks/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/
DTelephonyHistogramTest.java75 assertArrayEquals(new int[]{23, 36}, mHistogram.getBucketEndPoints()); in testAddTimeTaken()
76 assertArrayEquals(new int[]{2, 1, 2}, mHistogram.getBucketCounters()); in testAddTimeTaken()
90 assertArrayEquals(new int[]{40, 70}, mHistogram.getBucketEndPoints()); in testAddTimeTaken()
91 assertArrayEquals(new int[]{5, 3, 4}, mHistogram.getBucketCounters()); in testAddTimeTaken()
DPhoneCapabilityTest.java19 import static org.junit.Assert.assertArrayEquals;
51 assertArrayEquals(deviceNrCapabilities, capability.getDeviceNrCapabilities()); in basicTests()
83 assertArrayEquals(deviceNrCapabilities, toCompare.getDeviceNrCapabilities()); in parcelReadWrite()
/frameworks/base/services/tests/servicestests/src/com/android/server/display/
DAmbientBrightnessStatsTrackerTest.java19 import static org.junit.Assert.assertArrayEquals;
74 assertArrayEquals(expectedStats, userStats.get(0).getStats(), 0); in testBrightnessStatsTrackerOverSingleDay()
91 assertArrayEquals(expectedStats, userStats.get(0).getStats(), 0); in testBrightnessStatsTrackerOverSingleDay()
124 assertArrayEquals(expectedStats, userStats.get(0).getStats(), 0); in testBrightnessStatsTrackerOverMultipleDays()
129 assertArrayEquals(expectedStats, userStats.get(1).getStats(), 0); in testBrightnessStatsTrackerOverMultipleDays()
162 assertArrayEquals(expectedStats, userStats.get(0).getStats(), 0); in testBrightnessStatsTrackerOverMultipleUsers()
169 assertArrayEquals(expectedStats, userStats.get(0).getStats(), 0); in testBrightnessStatsTrackerOverMultipleUsers()
348 assertArrayEquals(expectedStats, userStats.get(0).getStats(), 0); in testWriteThenReadAmbientBrightnessStats()
354 assertArrayEquals(expectedStats, userStats.get(1).getStats(), 0); in testWriteThenReadAmbientBrightnessStats()
362 assertArrayEquals(expectedStats, userStats.get(0).getStats(), 0); in testWriteThenReadAmbientBrightnessStats()
DPersistentDataStoreTest.java83 assertArrayEquals(expectedLux, curve.first, "lux"); in testLoadingBrightnessConfigurations()
84 assertArrayEquals(expectedNits, curve.second, "nits"); in testLoadingBrightnessConfigurations()
91 assertArrayEquals(expectedLux, curve.first, "lux"); in testLoadingBrightnessConfigurations()
92 assertArrayEquals(expectedNits, curve.second, "nits"); in testLoadingBrightnessConfigurations()
235 private static void assertArrayEquals(float[] expected, float[] actual, String name) { in assertArrayEquals() method in PersistentDataStoreTest
/frameworks/base/services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/
DKeySyncUtilsTest.java21 import static org.junit.Assert.assertArrayEquals;
79 assertArrayEquals(calculateSha256(utf8Bytes("THM_KF_hash012345678910")), thmKfHash); in calculateThmKfHash_isShaOfLockScreenHashWithPrefix()
121 assertArrayEquals( in concat_concatenatesArrays()
144 assertArrayEquals(applicationKey.getEncoded(), keyMaterial); in decryptApplicationKey_decryptsAnApplicationKey_nullMetadata()
161 assertArrayEquals(applicationKey.getEncoded(), keyMaterial); in decryptApplicationKey_decryptsAnApplicationKey_nonNullMetadata()
232 assertArrayEquals(recoveryKey.getEncoded(), keyMaterial); in decryptRecoveryKey_decryptsALocallyEncryptedKey()
262 assertArrayEquals(recoveryKey, decrypted); in decryptRecoveryClaimResponse_decryptsAValidResponse()
303 assertArrayEquals(KeySyncUtils.concat(LOCK_SCREEN_HASH_1, keyClaimant), decrypted); in encryptRecoveryClaim_encryptsLockScreenAndKeyClaimant()
433 assertArrayEquals( in packVaultParams_encodesPublicKeyInFirst65Bytes()
483 assertArrayEquals(TEST_VAULT_HANDLE, vaultHandle); in packVaultParams_encodesVaultHandleAsLastParam()
[all …]
DRecoverableKeyGeneratorTest.java21 import static org.junit.Assert.assertArrayEquals;
113 assertArrayEquals(NON_NULL_METADATA, wrappedKey.getKeyMetadata()); in generateAndStoreKey_storesWrappedKey_nonNullMetadata()
134 assertArrayEquals(rawMaterial, unwrappedMaterial); in generateAndStoreKey_storesTheWrappedVersionOfTheRawMaterial()
152 assertArrayEquals(NON_NULL_METADATA, in importKey_storesNonNullMetadata()
168 assertArrayEquals(rawMaterial, unwrappedMaterial); in importKey_storesTheWrappedVersionOfTheRawMaterial()
/frameworks/base/core/tests/coretests/src/android/text/
DAndroidCharacterTest.java19 import static org.junit.Assert.assertArrayEquals;
48 assertArrayEquals(java_lang_results, android_text_results); in testGetDirectionalities_nonSupplementaryCharacters()
70 assertArrayEquals(java_lang_results, android_text_results); in testGetDirectionalities_supplementaryCharacters()
/frameworks/base/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/unit/
DCameraMetadataTest.java233 assertArrayEquals(colorCorrectionGainsAsByteArray, in testReadWriteValues()
287 private static <T> void assertArrayEquals(T expected, T actual) { in assertArrayEquals() method in CameraMetadataTest
345 assertArrayEquals(expected, actual); in checkKeyGetAndSet()
384 assertArrayEquals(expectedNative, actualValues); in checkKeyMarshal()
390 assertArrayEquals(expected, actual); in checkKeyMarshal()
400 assertArrayEquals(expected, actual); in checkKeyMarshal()
588 assertArrayEquals(expectedValues, aeAntibandingModeValues); in testReadWriteEnumWithCustomValues()
918 assertArrayEquals(expectedInputs, map.getInputs()); in testReadWriteReprocessFormatsMap()
923 assertArrayEquals(expectedYuvOutputs, map.getOutputs(ImageFormat.YUV_420_888)); in testReadWriteReprocessFormatsMap()
928 assertArrayEquals(expectedRaw16Outputs, map.getOutputs(ImageFormat.RAW_SENSOR)); in testReadWriteReprocessFormatsMap()
[all …]

1234