Home
last modified time | relevance | path

Searched refs:Assert (Results 1 – 25 of 1592) sorted by relevance

12345678910>>...64

/aosp14/frameworks/base/tools/locked_region_code_injection/test/lockedregioncodeinjection/
H A DTestMain.java16 import org.junit.Assert;
62 Assert.assertEquals(TestTarget.boostCount, 0); in testSimpleSynchronizedBlock()
64 Assert.assertEquals(TestTarget.invokeCount, 0); in testSimpleSynchronizedBlock()
74 Assert.assertEquals(TestTarget.boostCount, 1); in testSimpleSynchronizedBlock()
86 Assert.assertEquals(TestTarget.boostCount, 0); in testSimpleSynchronizedMethod()
161 Assert.assertTrue(caughtException); in testCaughtException()
259 Assert.assertEquals(asserted, true); in testUnboostThatThrows()
303 Assert.assertEquals(true, handled); in testScopedExceptionHandling()
314 Assert.assertEquals(0, 1); in testScopedExceptionHandling()
321 Assert.assertEquals(true, handled); in testScopedExceptionHandling()
[all …]
/aosp14/frameworks/base/services/tests/servicestests/src/com/android/server/power/stats/
H A DBatteryStatsServTest.java24 import junit.framework.Assert;
123 Assert.assertTrue(serv.getRunning()); in testParceling()
127 Assert.assertTrue(serv.getLaunched()); in testParceling()
189 Assert.assertTrue(serv.getRunning()); in testStartLaunchedLockedWhileLaunched()
193 Assert.assertTrue(serv.getLaunched()); in testStartLaunchedLockedWhileLaunched()
216 Assert.assertTrue(serv.getRunning()); in testStartLaunchedLockedWhileNotLaunched()
245 Assert.assertTrue(serv.getRunning()); in testStopLaunchedLockedWhileNotLaunched()
274 Assert.assertTrue(serv.getRunning()); in testStopLaunchedLockedWhileLaunchedNormal()
298 Assert.assertTrue(serv.getRunning()); in testStopLaunchedLockedWhileLaunchedTooQuick()
461 Assert.assertEquals(startTimeToNow, in testGetStartTimeRunning()
[all …]
H A DBatteryStatsTimeBaseTest.java25 import junit.framework.Assert;
58 Assert.assertEquals(uptime, mUptimeUs); in verify()
60 Assert.assertEquals(running, mRunning); in verify()
93 Assert.assertTrue(tb.hasObserver(observer1)); in testRunning()
94 Assert.assertTrue(tb.hasObserver(observer2)); in testRunning()
107 Assert.assertTrue(tb.isRunning()); in testRunning()
119 Assert.assertEquals(100, tb.getUptime(250)); in testRunning()
134 Assert.assertEquals(400, tb.getUptime(550)); in testRunning()
141 Assert.assertFalse(tb.isRunning()); in testRunning()
283 Assert.assertEquals(100+300+666-400, in testComputeUptime()
[all …]
H A DBatteryStatsTimerTest.java29 import junit.framework.Assert;
105 Assert.assertEquals(17, timer.getTotalTime()); in testRunning()
106 Assert.assertEquals(3000, timer.getCount()); in testRunning()
149 Assert.assertEquals(0, parcel.readInt()); in testParcelingNull()
169 Assert.assertEquals(0, timer.getCount()); in testResetNoDetach()
170 Assert.assertEquals(0, timer.getTotalTime()); in testResetNoDetach()
171 Assert.assertEquals(0, timer.getTimeBeforeMark()); in testResetNoDetach()
192 Assert.assertEquals(0, timer.getCount()); in testResetDetach()
193 Assert.assertEquals(0, timer.getTotalTime()); in testResetDetach()
236 Assert.assertEquals(1, timer2.getCount()); in testSummaryParceling()
[all …]
/aosp14/frameworks/base/tools/powermodel/test/com/android/powermodel/
H A DPowerProfileTest.java31 import org.junit.Assert;
58 Assert.assertEquals(12.0f, audio.onMa, EPSILON); in testReadGood()
69 Assert.assertEquals(941.0f, camera.onMa, EPSILON); in testReadGood()
73 Assert.assertEquals(1.3f, cpu.suspendMa, EPSILON); in testReadGood()
74 Assert.assertEquals(3.9f, cpu.idleMa, EPSILON); in testReadGood()
76 Assert.assertEquals(2, cpu.clusters.length); in testReadGood()
78 Assert.assertEquals(4, cpu.clusters[0].coreCount); in testReadGood()
125 Assert.assertEquals(1.0f, gps.onMa, EPSILON); in testReadGood()
135 Assert.assertEquals(11.0f, modem.rxMa, EPSILON); in testReadGood()
136 Assert.assertEquals(5, modem.txMa.length); in testReadGood()
[all …]
H A DRawBatteryStatsTest.java24 import org.junit.Assert;
55 Assert.assertEquals(true, line.complete); in testVersion()
57 Assert.assertEquals(9, line.lineVersion); in testVersion()
58 Assert.assertEquals(0, line.uid); in testVersion()
75 Assert.assertEquals(1000, line.uidKey); in testUid()
87 Assert.assertEquals(1, line.idleMs); in testVarargs()
88 Assert.assertEquals(2, line.rxTimeMs); in testVarargs()
89 Assert.assertEquals(3, line.powerMaMs); in testVarargs()
91 Assert.assertEquals(4, line.txTimeMs[0]); in testVarargs()
92 Assert.assertEquals(5, line.txTimeMs[1]); in testVarargs()
[all …]
H A DBatteryStatsReaderTest.java24 import org.junit.Assert;
42 Assert.assertNotNull(global); in testModemGlobal()
46 Assert.assertNotNull(modem); in testModemGlobal()
47 Assert.assertEquals(97840, modem.rxPacketCount); in testModemGlobal()
48 Assert.assertEquals(72941, modem.txPacketCount); in testModemGlobal()
56 Assert.assertEquals(1, gmailList.size()); in testModemApp()
61 Assert.assertNotNull(modem); in testModemApp()
62 Assert.assertEquals(9925, modem.rxPacketCount); in testModemApp()
63 Assert.assertEquals(5577, modem.txPacketCount); in testModemApp()
70 Assert.assertNotNull(remainder); in testModemRemainder()
[all …]
H A DPowerReportTest.java24 import org.junit.Assert;
72 Assert.assertEquals(1, gmailList.size()); in testModemApp()
76 Assert.assertNotNull(modem); in testModemApp()
77 Assert.assertEquals(GMAIL_MODEM_MAH, modem.powerMah, EPSILON); in testModemApp()
84 Assert.assertNotNull(remainder); in testModemRemainder()
88 Assert.assertNotNull(modem); in testModemRemainder()
90 Assert.assertArrayEquals(new double[] { in testModemRemainder()
100 Assert.assertEquals(REMAINDER_MODEM_MAH, modem.powerMah, EPSILON); in testModemRemainder()
107 Assert.assertEquals(1, gmailList.size()); in testAppTotal()
110 Assert.assertEquals(GMAIL_MAH, gmail.getAppPowerMah(), EPSILON); in testAppTotal()
[all …]
/aosp14/frameworks/base/media/tests/MtpTests/src/android/mtp/
H A DMtpStorageManagerTest.java27 import org.junit.Assert;
83 Assert.fail(); in vWriteNewFile()
312 Assert.fail(); in testMtpObjectGetSize()
362 Assert.assertNotNull(obj); in testGetByPath()
374 Assert.assertNull(obj); in testGetByPathError()
384 Assert.assertNotNull(obj); in testGetObject()
608 Assert.assertEquals(id, 1); in testSendObjectSuccess()
627 Assert.assertEquals(id, 1); in testSendObjectSuccessDir()
655 Assert.assertEquals(id, 1); in testSendObjectSuccessDelayed()
674 Assert.assertEquals(id, 1); in testSendObjectSuccessDirDelayed()
[all …]
/aosp14/frameworks/base/services/tests/PackageManagerServiceTests/server/src/com/android/server/pm/
H A DPackageManagerServiceTest.java23 import static org.junit.Assert.assertThrows;
24 import static org.junit.Assert.fail;
52 import org.junit.Assert;
124 Assert.assertNull(pri.mRemovedUsers); in testPackageRemoval()
125 Assert.assertNull(pri.mBroadcastUsers); in testPackageRemoval()
129 Assert.assertNull(pri.mBroadcastUsers); in testPackageRemoval()
145 Assert.assertNotNull(pri.mBroadcastUsers); in testPackageRemoval()
147 Assert.assertNotNull(pri.mInstantUserIds); in testPackageRemoval()
157 Assert.assertNotNull(pri.mBroadcastUsers); in testPackageRemoval()
159 Assert.assertNotNull(pri.mInstantUserIds); in testPackageRemoval()
[all …]
/aosp14/frameworks/base/core/tests/coretests/src/android/view/
H A DMenuTest.java26 import junit.framework.Assert;
42 Assert.assertEquals(id, item.getItemId()); in testItemId()
43 Assert.assertEquals(item, mMenu.findItem(id)); in testItemId()
44 Assert.assertEquals(0, mMenu.findItemIndex(id)); in testItemId()
58 Assert.assertEquals(groupId, item.getGroupId()); in testGroupId()
177 Assert.assertNull(mMenu.findItem(1)); in testRemove()
181 Assert.assertNull(mMenu.findItem(2)); in testRemove()
187 Assert.assertNull(mMenu.findItem(3)); in testRemove()
188 Assert.assertNull(mMenu.findItem(4)); in testRemove()
189 Assert.assertNull(mMenu.findItem(5)); in testRemove()
[all …]
/aosp14/frameworks/base/core/tests/hosttests/test-apps/MultiDexLegacyAndException/src/com/android/multidexlegacyandexception/tests/
H A DNoActivityJUnit3Test.java31 import junit.framework.Assert;
46 Assert.assertEquals(10, TestApplication.get(true)); in testExceptionInMainDex()
51 Assert.assertEquals(11, IntermediateClass.get3(true)); in testExceptionInIntermediate()
52 Assert.assertEquals(11, MiniIntermediateClass.get3(true)); in testExceptionInIntermediate()
53 Assert.assertEquals(11, IntermediateClass.get4(true)); in testExceptionInIntermediate()
54 Assert.assertEquals(1, IntermediateClass.get5(null)); in testExceptionInIntermediate()
55 Assert.assertEquals(10, IntermediateClass.get5(new ExceptionInMainDex())); in testExceptionInIntermediate()
57 Assert.assertEquals(12, IntermediateClass.get5(new ExceptionInMainDex2())); in testExceptionInIntermediate()
59 Assert.assertEquals(14, IntermediateClass.get5(new OutOfMemoryError())); in testExceptionInIntermediate()
60 Assert.assertEquals(17, IntermediateClass.get5(new CaughtOnlyException())); in testExceptionInIntermediate()
[all …]
/aosp14/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/stack/
H A DNotificationChildrenContainerTest.java33 import org.junit.Assert;
63 Assert.assertEquals(mChildrenContainer.getMaxAllowedVisibleChildren(), in testGetMaxAllowedVisibleChildren_lowPriority()
114 Assert.assertTrue(mChildrenContainer.showingAsLowPriority()); in testShowingAsLowPriority_lowPriority()
119 Assert.assertFalse(mChildrenContainer.showingAsLowPriority()); in testShowingAsLowPriority_notLowPriority()
127 Assert.assertFalse(mChildrenContainer.showingAsLowPriority()); in testShowingAsLowPriority_lowPriority_expanded()
148 Assert.assertNull(lowPriorityHeaderView.getParent()); in testLowPriorityHeaderCleared()
149 Assert.assertNull(mChildrenContainer.getLowPriorityViewWrapper()); in testLowPriorityHeaderCleared()
175 Assert.assertEquals(0f, header.getTopRoundness(), 0.001f); in applyRoundnessAndInvalidate_should_be_immediately_applied_on_header()
179 Assert.assertEquals(1f, header.getTopRoundness(), 0.001f); in applyRoundnessAndInvalidate_should_be_immediately_applied_on_header()
187 Assert.assertEquals(0f, header.getTopRoundness(), 0.001f); in applyRoundnessAndInvalidate_should_be_immediately_applied_on_headerLowPriority()
[all …]
H A DViewStateTest.kt26 import org.junit.Assert
56 Assert.assertEquals(viewState.alpha, 0.1f)
60 Assert.assertEquals(viewState.xTranslation, 0f)
64 Assert.assertEquals(viewState.yTranslation, 10f)
68 Assert.assertEquals(viewState.zTranslation, 20f)
72 Assert.assertEquals(viewState.scaleX, 0.5f)
76 Assert.assertEquals(viewState.scaleY, 0.25f)
89 Assert.assertNotNull(wtfHandler)
90 Assert.assertEquals(expectedWtfCount, wtfCount)
/aosp14/frameworks/base/startop/view_compiler/dex_builder_test/src/android/startop/test/
H A DDexBuilderTest.java22 import org.junit.Assert;
49 Assert.assertEquals(5, method.invoke(null)); in return5()
57 Assert.assertEquals(5, method.invoke(null)); in returnInteger5()
65 Assert.assertEquals(5, method.invoke(null, 5)); in returnParam()
82 Assert.assertEquals(5, method.invoke(null, 0)); in returnIfZero()
91 Assert.assertEquals(3, method.invoke(null, 0)); in returnIfNotZero()
100 Assert.assertEquals(2, method.invoke(null)); in backwardsBranch()
108 Assert.assertEquals(null, method.invoke(null)); in returnNull()
171 Assert.assertTrue(castFailed); in castObjectToString()
180 Assert.assertEquals(5, method.invoke(null)); in readStaticField()
[all …]
/aosp14/frameworks/base/services/tests/mockingservicestests/src/com/android/server/am/
H A DSettingsToPropertiesMapperTest.java32 import org.junit.Assert;
118 Assert.fail("globalSetting " in validateRegisteredGlobalSettings()
139 Assert.fail("deviceConfigScope " in validateRegisteredDeviceConfigScopes()
164 Assert.assertEquals("testValue", propValue); in testUpdatePropertiesFromSettings()
171 Assert.assertEquals("testValue2", propValue); in testUpdatePropertiesFromSettings()
178 Assert.assertEquals("", propValue); in testUpdatePropertiesFromSettings()
191 Assert.assertEquals(null, in testMakePropertyName()
198 Assert.assertEquals(null, in testMakePropertyName()
237 Assert.assertEquals(3, categories.size()); in testGetResetNativeCategories()
238 Assert.assertTrue(categories.contains("category1")); in testGetResetNativeCategories()
[all …]
/aosp14/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/decor/
H A DCutoutDecorProviderFactoryTest.kt33 import org.junit.Assert
110 Assert.assertFalse(factory.hasProviders)
111 Assert.assertEquals(0, factory.providers.size)
124 Assert.assertTrue(factory.hasProviders)
127 Assert.assertEquals(1, providers.size)
144 Assert.assertTrue(factory.hasProviders)
147 Assert.assertEquals(1, providers.size)
164 Assert.assertTrue(factory.hasProviders)
167 Assert.assertEquals(1, providers.size)
189 Assert.assertTrue(factory.hasProviders)
[all …]
H A DOverlayWindowTest.kt28 import org.junit.Assert
96 Assert.assertNotNull(view1FoundFromRootView)
99 Assert.assertNotNull(view2FoundFromRootView)
110 Assert.assertNull(viewFoundFromRootView)
111 Assert.assertNull(overlay.getView(TEST_DECOR_VIEW_ID_1))
160 Assert.assertNull(overlay.getView(TEST_DECOR_VIEW_ID_1))
162 Assert.assertNull(overlay.getView(TEST_DECOR_VIEW_ID_2))
180 Assert.assertNull(overlay.getView(TEST_DECOR_VIEW_ID_2))
186 Assert.assertTrue(overlay.hasSameProviders(emptyList()))
192 Assert.assertFalse(overlay.hasSameProviders(emptyList()))
[all …]
H A DRoundedCornerDecorProviderFactoryTest.kt25 import org.junit.Assert
68 Assert.assertEquals(2, providers.size)
69 Assert.assertEquals(1, providers.count {
74 Assert.assertEquals(1, providers.count {
93 Assert.assertEquals(2, providers.size)
94 Assert.assertEquals(1, providers.count {
99 Assert.assertEquals(1, providers.count {
119 Assert.assertEquals(4, providers.size)
120 Assert.assertEquals(1, providers.count {
125 Assert.assertEquals(1, providers.count {
[all …]
/aosp14/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/qs/
H A DFgsManagerControllerTest.java60 import org.junit.Assert;
132 Assert.assertEquals(0, mFmc.getNumRunningPackages()); in testNumPackages()
134 Assert.assertEquals(1, mFmc.getNumRunningPackages()); in testNumPackages()
136 Assert.assertEquals(2, mFmc.getNumRunningPackages()); in testNumPackages()
138 Assert.assertEquals(1, mFmc.getNumRunningPackages()); in testNumPackages()
140 Assert.assertEquals(0, mFmc.getNumRunningPackages()); in testNumPackages()
153 Assert.assertEquals(0, mFmc.getNumRunningPackages()); in testNumPackages_jobs()
155 Assert.assertEquals(1, mFmc.getNumRunningPackages()); in testNumPackages_jobs()
300 Assert.assertEquals(1, mFmc.visibleButtonsCount()); in testButtonVisibilityOnShowAllowlistButtonFlagChange()
303 Assert.assertEquals(0, mFmc.visibleButtonsCount()); in testButtonVisibilityOnShowAllowlistButtonFlagChange()
[all …]
/aosp14/frameworks/base/packages/DynamicSystemInstallationService/tests/src/com/android/dynsystem/
H A DKeyRevocationListTest.java29 import org.junit.Assert;
64 Assert.assertNotNull(blocklist); in testFromJsonString()
65 Assert.assertFalse(blocklist.mEntries.isEmpty()); in testFromJsonString()
67 Assert.assertNotNull(blocklist); in testFromJsonString()
68 Assert.assertTrue(blocklist.mEntries.isEmpty()); in testFromJsonString()
101 Assert.assertNotNull(blocklist); in testFromUrl()
112 Assert.assertNull(blocklist); in testFromUrl()
123 Assert.assertNotNull(revocationStatus); in testIsRevoked()
127 Assert.assertNull(revocationStatus); in testIsRevoked()
129 Assert.assertTrue(blocklist.isRevoked("key1")); in testIsRevoked()
[all …]
/aosp14/frameworks/base/tests/Internal/src/android/app/
H A DWallpaperColorsTest.java28 import org.junit.Assert;
41 Assert.assertTrue("Default behavior is not to support dark text.", in supportsDarkTextOverrideTest()
46 Assert.assertFalse("Forcing dark text support doesn't work.", in supportsDarkTextOverrideTest()
62 Assert.assertTrue("White surface should support dark text.", supportsDarkText); in whiteSurfaceColorHintsTest()
71 Assert.assertFalse("Light surface shouldn't support dark text " in whiteSurfaceColorHintsTest()
87 Assert.assertTrue("X-small white surface should support dark text.", in xSmallWhiteSurfaceColorHintsTest()
89 Assert.assertFalse("X-small white surface shouldn't support dark theme.", in xSmallWhiteSurfaceColorHintsTest()
106 Assert.assertTrue("Black surface should support dark theme.", supportsDarkTheme); in blackSurfaceColorHintsTest()
122 Assert.assertTrue("From bitmap should be true if object was created " in bitmapHintsTest()
127 Assert.assertFalse("Object created from public constructor should not contain " in bitmapHintsTest()
[all …]
/aosp14/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/collection/render/
H A DGroupExpansionManagerTest.kt26 import org.junit.Assert
58 Assert.assertEquals(0, listenerCalledCount)
60 Assert.assertEquals(1, listenerCalledCount)
62 Assert.assertEquals(2, listenerCalledCount)
64 Assert.assertEquals(2, listenerCalledCount)
66 Assert.assertEquals(3, listenerCalledCount)
77 Assert.assertEquals(1, listenerCalledCount)
79 Assert.assertEquals(2, listenerCalledCount)
81 Assert.assertEquals(3, listenerCalledCount)
83 Assert.assertEquals(4, listenerCalledCount)
[all …]
/aosp14/frameworks/base/core/tests/coretests/src/com/android/internal/app/procstats/
H A DSparseMappingTableTest.java24 import junit.framework.Assert;
56 Assert.assertEquals(0, dataParcel.dataAvail()); in testParcelingEmpty()
62 Assert.assertEquals(0, tableParcel.dataAvail()); in testParcelingEmpty()
90 Assert.assertEquals(0, dataParcel.dataAvail()); in testParceling()
96 Assert.assertEquals(0, tableParcel.dataAvail()); in testParceling()
100 Assert.assertEquals(VALUE1, table1.getValue(key)); in testParceling()
103 Assert.assertEquals(VALUE2, table1.getValue(key)); in testParceling()
137 Assert.assertEquals(0, dataParcel.dataAvail()); in testParcelingWithReset()
143 Assert.assertEquals(0, tableParcel.dataAvail()); in testParcelingWithReset()
171 Assert.assertEquals(VALUE1, table.getValue(key)); in testResetDataOnlyFails()
[all …]
/aosp14/frameworks/base/core/tests/coretests/src/android/database/
H A DDatabaseGeneralTest.java39 import junit.framework.Assert;
559 Assert.assertEquals( in checkNum()
570 Assert.assertTrue(ok); in assertThrowsIllegalState()
641 Assert.assertEquals("i", in testTableInfoPragma()
643 Assert.assertEquals("1234", in testTableInfoPragma()
647 Assert.assertEquals("j", in testTableInfoPragma()
652 Assert.assertEquals("s", in testTableInfoPragma()
658 Assert.assertEquals("t", in testTableInfoPragma()
663 Assert.assertEquals("select", in testTableInfoPragma()
721 Assert.assertEquals(-1, row); in testInsertHelper()
[all …]

12345678910>>...64