Home
last modified time | relevance | path

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

123456

/frameworks/base/core/tests/coretests/src/android/os/
DRedactingFileDescriptorTest.java23 import static org.junit.Assert.assertArrayEquals;
94 assertArrayEquals(new byte[] { 64, 64, 64, 64, 64, 64, 64, 64, 64, 64 }, buf); in testRanges()
97 assertArrayEquals(new byte[] { 64, 64, 64, 64, 64, 0, 0, 0, 0, 0 }, buf); in testRanges()
100 assertArrayEquals(new byte[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }, buf); in testRanges()
103 assertArrayEquals(new byte[] { 0, 0, 0, 0, 0, 64, 64, 64, 64, 64 }, buf); in testRanges()
106 assertArrayEquals(new byte[] { 0, 0, 0, 0, 0, 64, 64, 64, 64, 64 }, buf); in testRanges()
130 assertArrayEquals(new byte[] { 64, 64, 64, 64, 64, 0, 0, 0, 0, 0 }, buf); in testReadWrite()
135 assertArrayEquals(new byte[] { 64, 64, 64, 64, 64, 0, 0, 32, 32, 0 }, buf); in testReadWrite()
141 assertArrayEquals(new long[] { 100, 200, 300, 400 }, in testRemoveRange()
143 assertArrayEquals(new long[] { 100, 200, 300, 400 }, in testRemoveRange()
[all …]
/frameworks/base/core/tests/utiltests/src/com/android/internal/util/
DArrayUtilsTest.java19 import static org.junit.Assert.assertArrayEquals;
113 assertArrayEquals(new int[] { 1 }, in testAppendInt()
115 assertArrayEquals(new int[] { 1 }, in testAppendInt()
117 assertArrayEquals(new int[] { 1, 2 }, in testAppendInt()
119 assertArrayEquals(new int[] { 1, 2 }, in testAppendInt()
126 assertArrayEquals(new int[] { }, in testRemoveInt()
128 assertArrayEquals(new int[] { 1, 2, 3, }, in testRemoveInt()
130 assertArrayEquals(new int[] { 2, 3, }, in testRemoveInt()
132 assertArrayEquals(new int[] { 1, 3, }, in testRemoveInt()
134 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.java32 import static org.junit.Assert.assertArrayEquals;
125 assertArrayEquals(new int[] {}, path(PRE_ON_CREATE)); in testLifecycleFromPreOnCreate()
126 assertArrayEquals(new int[] {ON_CREATE}, path(ON_CREATE)); in testLifecycleFromPreOnCreate()
127 assertArrayEquals(new int[] {ON_CREATE, ON_START}, path(ON_START)); in testLifecycleFromPreOnCreate()
128 assertArrayEquals(new int[] {ON_CREATE, ON_START, ON_RESUME}, path(ON_RESUME)); in testLifecycleFromPreOnCreate()
129 assertArrayEquals(new int[] {ON_CREATE, ON_START, ON_RESUME, ON_PAUSE}, path(ON_PAUSE)); in testLifecycleFromPreOnCreate()
130 assertArrayEquals(new int[] {ON_CREATE, ON_START, ON_RESUME, ON_PAUSE, ON_STOP}, in testLifecycleFromPreOnCreate()
132 assertArrayEquals(new int[] {ON_CREATE, ON_START, ON_RESUME, ON_PAUSE, ON_STOP, ON_DESTROY}, in testLifecycleFromPreOnCreate()
139 assertArrayEquals(new int[] {}, path(ON_CREATE)); in testLifecycleFromOnCreate()
140 assertArrayEquals(new int[] {ON_START}, path(ON_START)); in testLifecycleFromOnCreate()
[all …]
/frameworks/base/core/tests/coretests/src/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 …]
DGrowingArrayUtilsTest.java22 import static org.junit.Assert.assertArrayEquals;
126 assertArrayEquals(expected, Arrays.copyOf(actual, expected.length)); in assertArrayEqualsPrefix()
130 assertArrayEquals(expected, Arrays.copyOf(actual, expected.length)); in assertArrayEqualsPrefix()
134 assertArrayEquals(expected, Arrays.copyOf(actual, expected.length)); in assertArrayEqualsPrefix()
138 assertArrayEquals(expected, Arrays.copyOf(actual, expected.length)); in assertArrayEqualsPrefix()
/frameworks/base/services/tests/powerstatstests/src/com/android/server/power/stats/
DLongSamplingCounterArrayTest.java24 import static org.junit.Assert.assertArrayEquals;
73 assertArrayEquals(COUNTS, mCounterArray.mCounts); in testReadWriteParcel()
87 assertArrayEquals(COUNTS, mCounterArray.mCounts); in testReadWriteSummaryParcel()
95 assertArrayEquals(COUNTS, mCounterArray.mCounts); in testOnTimeStarted()
102 assertArrayEquals(COUNTS, mCounterArray.mCounts); in testOnTimeStopped()
110 assertArrayEquals(COUNTS, mCounterArray.getCountsLocked(STATS_SINCE_CHARGED)); in testGetCountsLocked()
113 assertArrayEquals(COUNTS, mCounterArray.getCountsLocked(STATS_SINCE_CHARGED)); in testGetCountsLocked()
132 assertArrayEquals(deltas, mCounterArray.mCounts); in testAddCountLocked()
136 assertArrayEquals(null, mCounterArray.mCounts); in testAddCountLocked()
138 assertArrayEquals(deltas, mCounterArray.mCounts); in testAddCountLocked()
[all …]
/frameworks/base/core/tests/coretests/src/android/view/
DViewDebugTest.java22 import static org.junit.Assert.assertArrayEquals;
48 assertArrayEquals(SERIALIZED_BOOLEAN_TRUE, serializeReturnValue(boolean.class, true)); in serializeReturnValue_booleanTrue()
61 assertArrayEquals(SERIALIZED_BOOLEAN_FALSE, serializeReturnValue(boolean.class, false)); in serializeReturnValue_booleanFalse()
74 assertArrayEquals(SERIALIZED_BYTE, serializeReturnValue(byte.class, (byte) 42)); in serializeReturnValue_byte()
87 assertArrayEquals(SERIALIZED_CHAR, serializeReturnValue(char.class, '\u1122')); in serializeReturnValue_char()
100 assertArrayEquals(SERIALIZED_SHORT, in serializeReturnValue_short()
114 assertArrayEquals(SERIALIZED_INT, in serializeReturnValue_int()
129 assertArrayEquals(SERIALIZED_LONG, in serializeReturnValue_long()
145 assertArrayEquals( in serializeReturnValue_double()
161 assertArrayEquals(SERIALIZED_FLOAT, in serializeReturnValue_float()
[all …]
/frameworks/base/core/tests/coretests/src/android/text/
DTextLineTest.java19 import static org.junit.Assert.assertArrayEquals;
137 assertArrayEquals(expected, allMeasurements, 0.0f); in assertMeasurements()
369 assertArrayEquals(new float[] {0.0f, 10.0f, 10.0f, 20.0f, 20.0f, 30.0f, 30.0f, 40.0f, in testMeasureAllBounds_LTR()
371 assertArrayEquals(new float[] {10.0f, 10.0f, 10.0f, 10.0f, 10.0f, 50.0f}, advances, 0.0f); in testMeasureAllBounds_LTR()
386 assertArrayEquals(new float[] {0.0f, 10.0f, 10.0f, 15.0f, 15.0f, 20.0f, 20.0f, 30.0f, in testMeasureAllBounds_LTR_StyledText()
388 assertArrayEquals(new float[] {10.0f, 5.0f, 5.0f, 10.0f, 10.0f, 50.0f}, advances, 0.0f); in testMeasureAllBounds_LTR_StyledText()
401 assertArrayEquals(new float[] {-10.0f, 0.0f, -20.0f, -10.0f, -30.0f, -20.0f, -40.0f, -30.0f, in testMeasureAllBounds_RTL()
403 assertArrayEquals(new float[] {10.0f, 10.0f, 10.0f, 10.0f, 10.0f, 50.0f}, advances, 0.0f); in testMeasureAllBounds_RTL()
419 assertArrayEquals(new float[] {-10.0f, 0.0f, -15.0f, -10.0f, -20.0f, -15.0f, in testMeasureAllBounds_RTL_StyledText()
421 assertArrayEquals(new float[] {10.0f, 5.0f, 5.0f, 10.0f, 10.0f, 50.0f}, advances, 0.0f); in testMeasureAllBounds_RTL_StyledText()
[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/base/core/tests/coretests/src/com/android/internal/os/
DKernelCpuThreadReaderTest.java19 import static org.junit.Assert.assertArrayEquals;
184 assertArrayEquals( in testBucketSetup_simple()
187 assertArrayEquals( in testBucketSetup_simple()
198 assertArrayEquals( in testBucketSetup_noBig()
201 assertArrayEquals( in testBucketSetup_noBig()
212 assertArrayEquals( in testBucketSetup_moreLittle()
215 assertArrayEquals( in testBucketSetup_moreLittle()
226 assertArrayEquals( in testBucketSetup_moreBig()
229 assertArrayEquals( in testBucketSetup_moreBig()
240 assertArrayEquals( in testBucketSetup_equalBuckets()
[all …]
DBinderfsStatsReaderTest.java19 import static org.junit.Assert.assertArrayEquals;
138 assertArrayEquals(mStatsPids.toArray(), new int[]{14461}); in testTwoProc()
139 assertArrayEquals(mStatsFree.toArray(), new int[]{62}); in testTwoProc()
147 assertArrayEquals(mStatsPids.toArray(), new int[]{14461}); in testThreeProc()
148 assertArrayEquals(mStatsFree.toArray(), new int[]{62}); in testThreeProc()
156 assertArrayEquals(mStatsPids.toArray(), new int[]{14461, 540}); in testFourProc()
157 assertArrayEquals(mStatsFree.toArray(), new int[]{62, 44}); in testFourProc()
DProcTimeInStateReaderTest.java19 import static org.junit.Assert.assertArrayEquals;
66 assertArrayEquals( in testSimple()
70 assertArrayEquals( in testSimple()
83 assertArrayEquals( in testHeaderFormat()
87 assertArrayEquals( in testHeaderFormat()
101 assertArrayEquals( in testDifferentFile()
/frameworks/base/core/tests/coretests/src/com/android/internal/net/
DConnectivityBlobStoreTest.java19 import static org.junit.Assert.assertArrayEquals;
78 assertArrayEquals(TEST_BLOB, connectivityBlobStore.get(TEST_NAME)); in testPutAndGet()
83 assertArrayEquals(newBlob, connectivityBlobStore.get(TEST_NAME)); in testPutAndGet()
93 assertArrayEquals(TEST_BLOB, connectivityBlobStore.get(TEST_NAME)); in testRemove()
115 assertArrayEquals(TEST_BLOB, connectivityBlobStore.get(name1)); in testMultipleNames()
116 assertArrayEquals(TEST_BLOB, connectivityBlobStore.get(name2)); in testMultipleNames()
121 assertArrayEquals(newBlob, connectivityBlobStore.get(name1)); in testMultipleNames()
125 assertArrayEquals(TEST_BLOB, connectivityBlobStore.get(name2)); in testMultipleNames()
154 assertArrayEquals(expected, actual); in testList()
172 assertArrayEquals(expected, actual); in testList_underscoreInPrefix()
[all …]
/frameworks/layoutlib/create/tests/src/com/android/tools/layoutlib/create/
DAsmAnalyzerTest.java36 import static org.junit.Assert.assertArrayEquals;
70 assertArrayEquals(new String[] { in testParseZip()
101 assertArrayEquals(new String[] {"mock_android/data/dataFile"}, in testParseZip()
118 assertArrayEquals(new String[] { "mock_android.view.ViewGroup$LayoutParams" }, in testFindClass()
120 assertArrayEquals(new ClassReader[] { cr }, found.values().toArray()); in testFindClass()
135 assertArrayEquals(new String[] { in testInclude()
166 assertArrayEquals(new String[] { in testFindClassesDerivingFrom()
198 assertArrayEquals(new String[] { in testDependencyVisitor()
213 assertArrayEquals(new String[] { in testDependencyVisitor()
229 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/base/core/tests/GameManagerTests/src/android/app/
DGameModeInfoTest.java19 import static org.junit.Assert.assertArrayEquals;
61 assertArrayEquals(availableGameModes, gameModeInfo.getAvailableGameModes()); in testParcelable()
62 assertArrayEquals(overriddenGameModes, gameModeInfo.getOverriddenGameModes()); in testParcelable()
76 assertArrayEquals(gameModeInfo.getAvailableGameModes(), in testParcelable()
78 assertArrayEquals(gameModeInfo.getOverriddenGameModes(), in testParcelable()
/frameworks/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/
DTelephonyHistogramTest.java76 assertArrayEquals(new int[]{23, 36}, mHistogram.getBucketEndPoints()); in testAddTimeTaken()
77 assertArrayEquals(new int[]{2, 1, 2}, mHistogram.getBucketCounters()); in testAddTimeTaken()
91 assertArrayEquals(new int[]{40, 70}, mHistogram.getBucketEndPoints()); in testAddTimeTaken()
92 assertArrayEquals(new int[]{5, 3, 4}, mHistogram.getBucketCounters()); in testAddTimeTaken()
/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/base/services/tests/servicestests/src/com/android/server/policy/
DDeviceStateProviderImplTest.java29 import static org.junit.Assert.assertArrayEquals;
142 assertArrayEquals(new DeviceState[]{DEFAULT_DEVICE_STATE}, in assertDefaultProviderValues()
173 assertArrayEquals(expectedStates, mDeviceStateArrayCaptor.getValue()); in create_multipleMatchingStatesDefaultsToLowestIdentifier()
208 assertArrayEquals(expectedStates, mDeviceStateArrayCaptor.getValue()); in create_stateWithCancelOverrideRequestProperty()
238 assertArrayEquals(expectedStates, mDeviceStateArrayCaptor.getValue()); in create_stateWithInvalidProperty()
274 assertArrayEquals(expectedStates, mDeviceStateArrayCaptor.getValue()); in create_lidSwitch()
365 assertArrayEquals( in create_sensor()
429 assertArrayEquals( in test_propertyDisableWhenThermalStatusCritical()
448 assertArrayEquals( in test_propertyDisableWhenThermalStatusCritical()
460 assertArrayEquals( in test_propertyDisableWhenThermalStatusCritical()
[all …]
/frameworks/base/services/tests/displayservicetests/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()

123456