Home
last modified time | relevance | path

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

12345

/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/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/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;
96 assertArrayEquals(new int[] {}, path(PRE_ON_CREATE)); in testLifecycleFromPreOnCreate()
97 assertArrayEquals(new int[] {ON_CREATE}, path(ON_CREATE)); in testLifecycleFromPreOnCreate()
98 assertArrayEquals(new int[] {ON_CREATE, ON_START}, path(ON_START)); in testLifecycleFromPreOnCreate()
99 assertArrayEquals(new int[] {ON_CREATE, ON_START, ON_RESUME}, path(ON_RESUME)); in testLifecycleFromPreOnCreate()
100 assertArrayEquals(new int[] {ON_CREATE, ON_START, ON_RESUME, ON_PAUSE}, path(ON_PAUSE)); in testLifecycleFromPreOnCreate()
101 assertArrayEquals(new int[] {ON_CREATE, ON_START, ON_RESUME, ON_PAUSE, ON_STOP}, in testLifecycleFromPreOnCreate()
103 assertArrayEquals(new int[] {ON_CREATE, ON_START, ON_RESUME, ON_PAUSE, ON_STOP, ON_DESTROY}, in testLifecycleFromPreOnCreate()
110 assertArrayEquals(new int[] {}, path(ON_CREATE)); in testLifecycleFromOnCreate()
111 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;
112 assertArrayEquals("Uid=" + testUids[i], cpuTimes[i], in testUpdateProcStateCpuTimes()
143 assertArrayEquals("Uid=" + testUids[i], expectedCpuTimes, in testUpdateProcStateCpuTimes()
175 assertArrayEquals("Uid=" + testUids[i], expectedCpuTimes, in testUpdateProcStateCpuTimes()
177 assertArrayEquals("Uid=" + testUids[i], delta2[i], in testUpdateProcStateCpuTimes()
215 assertArrayEquals("Uid=" + testUids[i], expectedCpuTimes, in testUpdateProcStateCpuTimes()
222 assertArrayEquals("Uid=" + testUids[i], expectedScreenOffTimes, in testUpdateProcStateCpuTimes()
278 assertArrayEquals("Uid=" + testUids[i], expectedCpuTimes[i], in testCopyFromAllUidsCpuTimes()
295 assertArrayEquals(timesA, mBatteryStatsImpl.addCpuTimes(timesA, timesB)); in testAddCpuTimes()
299 assertArrayEquals(timesB, mBatteryStatsImpl.addCpuTimes(timesA, timesB)); in testAddCpuTimes()
[all …]
/frameworks/base/tests/net/java/com/android/internal/util/
DRingBufferTest.java19 import static org.junit.Assert.assertArrayEquals;
37 assertArrayEquals(new String[0], buffer.toArray()); in testEmptyRingBuffer()
66 assertArrayEquals(expected, buffer.toArray()); in testRingBufferWithNoWrapping()
74 assertArrayEquals(new String[]{"a"}, buffer.toArray()); in testRingBufferWithCapacity1()
77 assertArrayEquals(new String[]{"b"}, buffer.toArray()); in testRingBufferWithCapacity1()
80 assertArrayEquals(new String[]{"c"}, buffer.toArray()); in testRingBufferWithCapacity1()
83 assertArrayEquals(new String[]{"d"}, buffer.toArray()); in testRingBufferWithCapacity1()
86 assertArrayEquals(new String[]{"e"}, buffer.toArray()); in testRingBufferWithCapacity1()
101 assertArrayEquals(expected1, buffer.toArray()); in testRingBufferWithWrapping()
112 assertArrayEquals(expected2, buffer.toArray()); in testRingBufferWithWrapping()
[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/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/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/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/util/
DNativeUtilTest.java38 assertArrayEquals(new byte[]{0x61, 0x52, 0x43, 0x34, 0x25, 0x16}, in testMacAddressToByteArray()
47 assertArrayEquals(new byte[]{0, 0, 0, 0, 0, 0}, in testEmptyMacAddressToByteArray()
49 assertArrayEquals(new byte[]{0, 0, 0, 0, 0, 0}, in testEmptyMacAddressToByteArray()
68 assertArrayEquals(new byte[]{0x61, 0x52, 0x43}, in testMacAddressOuiToByteArray()
77 assertArrayEquals(new byte[]{0x45, 0x12, 0x23, 0x34}, in testHexStringToByteArray()
/frameworks/base/tests/net/common/java/android/net/
DDependenciesTest.java19 import static org.junit.Assert.assertArrayEquals;
76 assertArrayEquals(expected, copy); in testArrays()
77 assertArrayEquals(new byte[0], Arrays.copyOfRange(src, size, size)); in testArrays()
85 assertArrayEquals(src, copy); in testCopyOf()
88 assertArrayEquals(new byte[0], Arrays.copyOf(src, 0)); in testCopyOf()
/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()
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/wificond/
DNativeScanResultTest.java19 import static org.junit.Assert.assertArrayEquals;
78 assertArrayEquals(scanResult.ssid, scanResultDeserialized.ssid); in canSerializeAndDeserialize()
79 assertArrayEquals(scanResult.bssid, scanResultDeserialized.bssid); in canSerializeAndDeserialize()
80 assertArrayEquals(scanResult.infoElement, scanResultDeserialized.infoElement); in canSerializeAndDeserialize()
/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()
/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 …]
/frameworks/base/wifi/tests/src/android/net/wifi/
DParcelUtilTest.java19 import static org.junit.Assert.assertArrayEquals;
64 assertArrayEquals(writeKey.getEncoded(), readKey.getEncoded()); in readWriteValidPrivateKey()
84 assertArrayEquals(writeCert.getEncoded(), readCert.getEncoded()); in readWriteValidCertificate()
109 assertArrayEquals(writeCerts[i].getEncoded(), readCerts[i].getEncoded()); in readWriteValidCertificates()
/frameworks/base/core/tests/bluetoothtests/src/android/bluetooth/le/
DScanRecordTest.java57 assertArrayEquals(new byte[] { in testParser()
61 assertArrayEquals(new byte[] { in testParser()
66 private static void assertArrayEquals(byte[] expected, byte[] actual) { in assertArrayEquals() method in ScanRecordTest
/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 …]

12345