Home
last modified time | relevance | path

Searched refs:assertEquals (Results 1 – 25 of 1630) sorted by relevance

12345678910>>...66

/frameworks/base/services/tests/servicestests/src/com/android/server/power/batterysaver/
DBatterySaverStateMachineTest.java18 import static org.junit.Assert.assertEquals;
182 assertEquals(0, mDevice.getLowPowerModeTriggerLevel()); in testNoAutoBatterySaver()
184 assertEquals(false, mDevice.batterySaverEnabled); in testNoAutoBatterySaver()
185 assertEquals(100, mPersistedState.batteryLevel); in testNoAutoBatterySaver()
186 assertEquals(false, mPersistedState.batteryLow); in testNoAutoBatterySaver()
190 assertEquals(false, mDevice.batterySaverEnabled); in testNoAutoBatterySaver()
191 assertEquals(90, mPersistedState.batteryLevel); in testNoAutoBatterySaver()
192 assertEquals(false, mPersistedState.batteryLow); in testNoAutoBatterySaver()
196 assertEquals(false, mDevice.batterySaverEnabled); in testNoAutoBatterySaver()
197 assertEquals(50, mPersistedState.batteryLevel); in testNoAutoBatterySaver()
[all …]
/frameworks/base/core/tests/coretests/src/com/android/internal/os/
DBatteryStatsServTest.java159 Assert.assertEquals(18989, serv.getUnpluggedStartTime()); in testOnTimeStarted()
160 Assert.assertEquals(4042, serv.getUnpluggedStarts()); in testOnTimeStarted()
161 Assert.assertEquals(8085, serv.getUnpluggedLaunches()); in testOnTimeStarted()
166 Assert.assertEquals(1010, serv.getUnpluggedStartTime()); in testOnTimeStarted()
167 Assert.assertEquals(4042, serv.getUnpluggedStarts()); in testOnTimeStarted()
168 Assert.assertEquals(8085, serv.getUnpluggedLaunches()); in testOnTimeStarted()
188 Assert.assertEquals(1010, serv.getStartTime()); in testParceling()
189 Assert.assertEquals(2021, serv.getRunningSince()); in testParceling()
191 Assert.assertEquals(4042, serv.getStarts()); in testParceling()
192 Assert.assertEquals(5053, serv.getLaunchedTime()); in testParceling()
[all …]
/frameworks/support/core/ktx/src/androidTest/java/androidx/core/graphics/
DRectTest.kt24 import org.junit.Assert.assertEquals
32 assertEquals(4, l) in destructuringInt()
33 assertEquals(8, t) in destructuringInt()
34 assertEquals(16, r) in destructuringInt()
35 assertEquals(24, b) in destructuringInt()
40 assertEquals(4.0f, l) in destructuringFloat()
41 assertEquals(8.0f, t) in destructuringFloat()
42 assertEquals(16.0f, r) in destructuringFloat()
43 assertEquals(24.0f, b) in destructuringFloat()
48 assertEquals(-1, l) in unionInt()
[all …]
DPointTest.kt21 import org.junit.Assert.assertEquals
27 assertEquals(2, x) in destructuringInt()
28 assertEquals(3, y) in destructuringInt()
33 assertEquals(2.0f, x) in destructuringFloat()
34 assertEquals(3.0f, y) in destructuringFloat()
39 assertEquals(4, x) in offsetInt()
40 assertEquals(5, y) in offsetInt()
45 assertEquals(4.0f, x) in offsetFloat()
46 assertEquals(5.0f, y) in offsetFloat()
51 assertEquals(3, x) in offsetPoint()
[all …]
/frameworks/base/core/tests/coretests/src/com/android/internal/util/
DParseUtilsTest.java26 assertEquals(1, ParseUtils.parseInt(null, 1)); in testParseInt()
27 assertEquals(1, ParseUtils.parseInt("", 1)); in testParseInt()
28 assertEquals(1, ParseUtils.parseInt("1x", 1)); in testParseInt()
29 assertEquals(2, ParseUtils.parseInt("2", 1)); in testParseInt()
31 assertEquals(2, ParseUtils.parseInt("+2", 1)); in testParseInt()
32 assertEquals(-2, ParseUtils.parseInt("-2", 1)); in testParseInt()
36 assertEquals(1, ParseUtils.parseIntWithBase(null, 10, 1)); in testParseIntWithBase()
37 assertEquals(1, ParseUtils.parseIntWithBase("", 10, 1)); in testParseIntWithBase()
38 assertEquals(1, ParseUtils.parseIntWithBase("1x", 10, 1)); in testParseIntWithBase()
39 assertEquals(2, ParseUtils.parseIntWithBase("2", 10, 1)); in testParseIntWithBase()
[all …]
/frameworks/base/core/tests/coretests/src/android/text/method/
DBackspaceTest.java80 state.assertEquals("|"); in testCombiningEnclosingKeycaps()
85 state.assertEquals("'1' U+20E3 |"); in testCombiningEnclosingKeycaps()
87 state.assertEquals("|"); in testCombiningEnclosingKeycaps()
92 state.assertEquals("|"); in testCombiningEnclosingKeycaps()
97 state.assertEquals("U+20E3 |"); in testCombiningEnclosingKeycaps()
99 state.assertEquals("|"); in testCombiningEnclosingKeycaps()
109 state.assertEquals("|"); in testVariationSelector()
113 state.assertEquals("|"); in testVariationSelector()
118 state.assertEquals("U+FE0F |"); in testVariationSelector()
120 state.assertEquals("|"); in testVariationSelector()
[all …]
DForwardDeleteTest.java79 state.assertEquals("|"); in testCombiningEnclosingKeycaps()
84 state.assertEquals("|"); in testCombiningEnclosingKeycaps()
89 state.assertEquals("|"); in testCombiningEnclosingKeycaps()
99 state.assertEquals("|"); in testVariationSelector()
103 state.assertEquals("|"); in testVariationSelector()
108 state.assertEquals("|"); in testVariationSelector()
112 state.assertEquals("|"); in testVariationSelector()
116 state.assertEquals("|"); in testVariationSelector()
120 state.assertEquals("|"); in testVariationSelector()
125 state.assertEquals("|"); in testVariationSelector()
[all …]
/frameworks/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/
DPhoneNumberUtilsTest.java19 import static junit.framework.Assert.assertEquals;
39 assertEquals( in testExtractNetworkPortion()
44 assertEquals( in testExtractNetworkPortion()
49 assertEquals( in testExtractNetworkPortion()
55 assertEquals( in testExtractNetworkPortion()
60 assertEquals( in testExtractNetworkPortion()
65 assertEquals( in testExtractNetworkPortion()
70 assertEquals( in testExtractNetworkPortion()
77 assertEquals( in testExtractNetworkPortion()
85 assertEquals("", PhoneNumberUtils.extractNetworkPortion("")); in testExtractNetworkPortion()
[all …]
DMccTableTest.java29 assertEquals("Europe/Paris", MccTable.defaultTimeZoneForMcc(208)); in testTimeZone()
30 assertEquals("Europe/Vienna", MccTable.defaultTimeZoneForMcc(232)); in testTimeZone()
31 assertEquals("Africa/Johannesburg", MccTable.defaultTimeZoneForMcc(655)); in testTimeZone()
32 assertEquals("Asia/Tokyo", MccTable.defaultTimeZoneForMcc(440)); in testTimeZone()
33 assertEquals("Asia/Tokyo", MccTable.defaultTimeZoneForMcc(441)); in testTimeZone()
34 assertEquals("Asia/Singapore", MccTable.defaultTimeZoneForMcc(525)); in testTimeZone()
35 assertEquals("Europe/Stockholm", MccTable.defaultTimeZoneForMcc(240)); in testTimeZone()
38 assertEquals("Australia/Sydney", MccTable.defaultTimeZoneForMcc(505)); in testTimeZone()
39 assertEquals(null, MccTable.defaultTimeZoneForMcc(0)); // mcc not defined, hence default in testTimeZone()
40 assertEquals(null, MccTable.defaultTimeZoneForMcc(2000)); // mcc not defined, hence default in testTimeZone()
[all …]
DIntRangeManagerTest.java104 assertEquals("expecting empty configlist", 0, testManager.mConfigList.size()); in testEmptyRangeManager()
109 assertEquals("fromServiceId", fromServiceId, info.getFromServiceId()); in checkConfigInfo()
110 assertEquals("toServiceId", toServiceId, info.getToServiceId()); in checkConfigInfo()
111 assertEquals("fromCodeScheme", fromCodeScheme, info.getFromCodeScheme()); in checkConfigInfo()
112 assertEquals("toCodeScheme", toCodeScheme, info.getToCodeScheme()); in checkConfigInfo()
113 assertEquals("selected", selected, info.isSelected()); in checkConfigInfo()
119 assertEquals("flags before test", 0, testManager.flags); in testAddSingleChannel()
121 assertEquals("flags after test", ALL_FLAGS_SET, testManager.flags); in testAddSingleChannel()
122 assertEquals("configlist size", 1, testManager.mConfigList.size()); in testAddSingleChannel()
127 assertEquals("flags after test", ALL_FLAGS_SET, testManager.flags); in testAddSingleChannel()
[all …]
DGsmSmsTest.java34 assertEquals("+14155551212", sms.getServiceCenterAddress()); in testAddressing()
35 assertEquals("+16505551111", sms.getOriginatingAddress()); in testAddressing()
36 assertEquals("Test", sms.getMessageBody()); in testAddressing()
41 assertEquals("+14155551212", sms.getServiceCenterAddress()); in testAddressing()
42 assertEquals("+16505551111", sms.getOriginatingAddress()); in testAddressing()
43 assertEquals("(Subject)Test", sms.getMessageBody()); in testAddressing()
47 assertEquals("*#abc#*51", sms.getOriginatingAddress()); in testAddressing()
62 assertEquals(header.concatRef.refNumber, 42); in testUdh()
63 assertEquals(header.concatRef.msgCount, 2); in testUdh()
64 assertEquals(header.concatRef.seqNumber, 1); in testUdh()
[all …]
/frameworks/base/core/tests/coretests/src/android/util/
DDayOfMonthCursorTest.java47 assertEquals(Calendar.SEPTEMBER, mc.getMonth()); in testMoveLeft()
48 assertEquals(3, mc.getSelectedDayOfMonth()); in testMoveLeft()
49 assertEquals(1, mc.getSelectedRow()); in testMoveLeft()
50 assertEquals(1, mc.getSelectedColumn()); in testMoveLeft()
54 assertEquals(2, mc.getSelectedDayOfMonth()); in testMoveLeft()
55 assertEquals(1, mc.getSelectedRow()); in testMoveLeft()
56 assertEquals(0, mc.getSelectedColumn()); in testMoveLeft()
60 assertEquals(1, mc.getSelectedDayOfMonth()); in testMoveLeft()
61 assertEquals(0, mc.getSelectedRow()); in testMoveLeft()
62 assertEquals(6, mc.getSelectedColumn()); in testMoveLeft()
[all …]
DBase64Test.java46 assertEquals(in, dec); in encodeToString()
60 private void assertEquals(byte[] expected, int len, byte[] actual) { in assertEquals() method in Base64Test
61 assertEquals(len, actual.length); in assertEquals()
63 assertEquals(expected[i], actual[i]); in assertEquals()
68 private void assertEquals(byte[] expected, int len, byte[] actual, int alen) { in assertEquals() method in Base64Test
69 assertEquals(len, alen); in assertEquals()
71 assertEquals(expected[i], actual[i]); in assertEquals()
76 private void assertEquals(byte[] expected, byte[] actual) { in assertEquals() method in Base64Test
77 assertEquals(expected.length, actual.length); in assertEquals()
79 assertEquals(expected[i], actual[i]); in assertEquals()
[all …]
/frameworks/base/tools/locked_region_code_injection/test/lockedregioncodeinjection/
DTestMain.java65 Assert.assertEquals(TestTarget.boostCount, 0); in testSimpleSynchronizedBlock()
66 Assert.assertEquals(TestTarget.unboostCount, 0); in testSimpleSynchronizedBlock()
67 Assert.assertEquals(TestTarget.unboostCount, 0); in testSimpleSynchronizedBlock()
70 Assert.assertEquals(TestTarget.boostCount, 1); in testSimpleSynchronizedBlock()
71 Assert.assertEquals(TestTarget.unboostCount, 0); in testSimpleSynchronizedBlock()
75 Assert.assertEquals(TestTarget.boostCount, 1); in testSimpleSynchronizedBlock()
76 Assert.assertEquals(TestTarget.unboostCount, 1); in testSimpleSynchronizedBlock()
77 Assert.assertEquals(TestTarget.invokeCount, 1); in testSimpleSynchronizedBlock()
85 Assert.assertEquals(TestTarget.boostCount, 0); in testSimpleSynchronizedMethod()
86 Assert.assertEquals(TestTarget.unboostCount, 0); in testSimpleSynchronizedMethod()
[all …]
/frameworks/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/cdma/sms/
DCdmaSmsTest.java49 assertEquals(addr.ton, CdmaSmsAddress.TON_UNKNOWN); in testCdmaSmsAddrParsing()
50 assertEquals(addr.digitMode, CdmaSmsAddress.DIGIT_MODE_4BIT_DTMF); in testCdmaSmsAddrParsing()
51 assertEquals(addr.numberMode, CdmaSmsAddress.NUMBER_MODE_NOT_DATA_NETWORK); in testCdmaSmsAddrParsing()
52 assertEquals(addr.numberOfDigits, 10); in testCdmaSmsAddrParsing()
53 assertEquals(addr.origBytes.length, 10); in testCdmaSmsAddrParsing()
56 assertEquals(addr.origBytes[i], data[i]); in testCdmaSmsAddrParsing()
59 assertEquals(addr.ton, CdmaSmsAddress.TON_UNKNOWN); in testCdmaSmsAddrParsing()
60 assertEquals(addr.digitMode, CdmaSmsAddress.DIGIT_MODE_4BIT_DTMF); in testCdmaSmsAddrParsing()
61 assertEquals(addr.numberMode, CdmaSmsAddress.NUMBER_MODE_NOT_DATA_NETWORK); in testCdmaSmsAddrParsing()
62 assertEquals(addr.numberOfDigits, 10); in testCdmaSmsAddrParsing()
[all …]
/frameworks/base/tests/net/java/com/android/internal/util/
DBitUtilsTest.java25 import static org.junit.Assert.assertEquals;
37 assertEquals(0, uint8(b0)); in testUnsignedByteWideningConversions()
38 assertEquals(1, uint8(b1)); in testUnsignedByteWideningConversions()
39 assertEquals(127, uint8(Byte.MAX_VALUE)); in testUnsignedByteWideningConversions()
40 assertEquals(128, uint8(Byte.MIN_VALUE)); in testUnsignedByteWideningConversions()
41 assertEquals(255, uint8(bm1)); in testUnsignedByteWideningConversions()
42 assertEquals(255, uint8((byte)255)); in testUnsignedByteWideningConversions()
50 assertEquals(0, uint16(s0)); in testUnsignedShortWideningConversions()
51 assertEquals(1, uint16(s1)); in testUnsignedShortWideningConversions()
52 assertEquals(32767, uint16(Short.MAX_VALUE)); in testUnsignedShortWideningConversions()
[all …]
/frameworks/base/services/tests/servicestests/src/com/android/server/pm/
DShortcutManagerTest2.java233 assertEquals(mClientContext.getPackageName(), si.getPackage()); in testShortcutInfoParcel()
234 assertEquals(USER_10, si.getUserId()); in testShortcutInfoParcel()
235 assertEquals(HANDLE_USER_10, si.getUserHandle()); in testShortcutInfoParcel()
236 assertEquals("id", si.getId()); in testShortcutInfoParcel()
237 assertEquals("title", si.getTitle()); in testShortcutInfoParcel()
238 assertEquals("action", si.getIntent().getAction()); in testShortcutInfoParcel()
261 assertEquals(getTestContext().getPackageName(), si.getPackage()); in testShortcutInfoParcel()
262 assertEquals("id", si.getId()); in testShortcutInfoParcel()
263 assertEquals(new ComponentName("a", "b"), si.getActivity()); in testShortcutInfoParcel()
264 assertEquals(123, si.getIcon().getResId()); in testShortcutInfoParcel()
[all …]
/frameworks/base/services/tests/servicestests/src/com/android/server/pm/dex/
DDexoptUtilsTest.java22 import static org.junit.Assert.assertEquals;
118 assertEquals(9, contexts.length); in testSplitChain()
119 assertEquals("PCL[a.dex:b.dex]", contexts[0]); in testSplitChain()
120 assertEquals("DLC[];DLC[base-2.dex];PCL[base-4.dex];PCL[a.dex:b.dex:base.dex]", in testSplitChain()
122 assertEquals("DLC[];PCL[base-4.dex];PCL[a.dex:b.dex:base.dex]", contexts[2]); in testSplitChain()
123 assertEquals("PCL[];PCL[base-4.dex];PCL[a.dex:b.dex:base.dex]", contexts[3]); in testSplitChain()
124 assertEquals("PCL[];PCL[a.dex:b.dex:base.dex]", contexts[4]); in testSplitChain()
125 assertEquals("PCL[];PCL[a.dex:b.dex:base.dex]", contexts[5]); in testSplitChain()
126 assertEquals("PCL[];PCL[base-5.dex];PCL[a.dex:b.dex:base.dex]", contexts[6]); in testSplitChain()
127 assertEquals(null, contexts[7]); // config split in testSplitChain()
[all …]
/frameworks/support/core/ktx/src/androidTest/java/androidx/core/text/
DSpannableStringBuilderTest.kt33 import org.junit.Assert.assertEquals
43 assertEquals("Hello, World", result.toString()) in builder()
54 assertEquals("Hello, World", result.toString()) in builderInSpan()
57 assertEquals(1, spans.size) in builderInSpan()
61 assertEquals(7, result.getSpanStart(bold)) in builderInSpan()
62 assertEquals(12, result.getSpanEnd(bold)) in builderInSpan()
72 assertEquals("Hello, World", result.toString()) in builderBold()
75 assertEquals(1, spans.size) in builderBold()
78 assertEquals(BOLD, bold.style) in builderBold()
79 assertEquals(7, result.getSpanStart(bold)) in builderBold()
[all …]
/frameworks/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/uicc/euicc/asn1/
DIccUtilsTest.java20 import static org.junit.Assert.assertEquals;
34 assertEquals(0, IccUtils.bytesToInt(new byte[] {}, 0, 0)); in testBytesToInt()
35 assertEquals(0, IccUtils.bytesToInt(new byte[] {0}, 0, 0)); in testBytesToInt()
36 assertEquals(0x1234, IccUtils.bytesToInt(new byte[] {0x12, 0x34}, 0, 2)); in testBytesToInt()
37 assertEquals(0x34, IccUtils.bytesToInt(new byte[] {0x12, 0x34}, 1, 1)); in testBytesToInt()
38 assertEquals(0xFF, IccUtils.bytesToInt(new byte[] {-2, 0, -1, -3, -4}, 1, 2)); in testBytesToInt()
39 assertEquals(0x7FFFFFFF, IccUtils.bytesToInt(new byte[] {0x7F, -1, -1, -1}, 0, 4)); in testBytesToInt()
40 assertEquals(0x80, IccUtils.bytesToInt(new byte[] {0x00, -128}, 0, 2)); in testBytesToInt()
64 assertEquals(0, IccUtils.bytesToRawLong(new byte[] {}, 0, 0)); in testBytesToLong()
65 assertEquals(0, IccUtils.bytesToRawLong(new byte[] {0}, 0, 0)); in testBytesToLong()
[all …]
/frameworks/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/metrics/
DTelephonyMetricsTest.java33 import static org.junit.Assert.assertEquals;
147 assertEquals(1000, log.events.length); in testEventDropped()
148 assertEquals(0, log.callSessions.length); in testEventDropped()
149 assertEquals(0, log.smsSessions.length); in testEventDropped()
151 assertEquals(1, log.events[0].dataStallAction); in testEventDropped()
161 assertEquals(1, log.events.length); in testWriteDataStallEvent()
162 assertEquals(0, log.callSessions.length); in testWriteDataStallEvent()
163 assertEquals(0, log.smsSessions.length); in testWriteDataStallEvent()
164 assertEquals(mPhone.getPhoneId(), log.events[0].phoneId); in testWriteDataStallEvent()
165 assertEquals(3, log.events[0].dataStallAction); in testWriteDataStallEvent()
[all …]
/frameworks/base/core/tests/coretests/src/android/text/
DMeasuredParagraphTest.java19 import static org.junit.Assert.assertEquals;
68 assertEquals("XXX", charsToString(mt.getChars())); in buildForBidi()
69 assertEquals(Layout.DIR_LEFT_TO_RIGHT, mt.getParagraphDir()); in buildForBidi()
71 assertEquals(0, mt.getWholeWidth(), 0); in buildForBidi()
72 assertEquals(0, mt.getWidths().size()); in buildForBidi()
73 assertEquals(0, mt.getSpanEndCache().size()); in buildForBidi()
74 assertEquals(0, mt.getFontMetrics().size()); in buildForBidi()
75 assertEquals(0, mt.getNativePtr()); in buildForBidi()
79 assertEquals(mt2, mt); in buildForBidi()
81 assertEquals("VVV", charsToString(mt.getChars())); in buildForBidi()
[all …]
/frameworks/base/core/tests/coretests/src/android/net/
DUriTest.java40 assertEquals("//foo", uri.toString()); in testToStringWithPathOnly()
61 assertEquals(u, Uri.CREATOR.createFromParcel(p)); in parcelAndUnparcel()
67 assertEquals(u, Uri.CREATOR.createFromParcel(p)); in parcelAndUnparcel()
77 assertEquals("robert", u.getScheme()); in testBuildUponOpaqueStringUri()
78 assertEquals("lee", u.getEncodedSchemeSpecificPart()); in testBuildUponOpaqueStringUri()
79 assertEquals("lee", u.getSchemeSpecificPart()); in testBuildUponOpaqueStringUri()
88 assertEquals("bob lee", in testStringUri()
90 assertEquals("bob%20lee", in testStringUri()
92 assertEquals("/bob%20lee", in testStringUri()
95 assertEquals("bob%20lee", in testStringUri()
[all …]
/frameworks/base/core/tests/coretests/src/android/app/admin/
DPasswordMetricsTest.java19 import static org.junit.Assert.assertEquals;
37 assertEquals(DevicePolicyManager.PASSWORD_QUALITY_UNSPECIFIED, metrics.quality); in testIsDefault()
38 assertEquals(0, metrics.length); in testIsDefault()
39 assertEquals(0, metrics.letters); in testIsDefault()
40 assertEquals(0, metrics.upperCase); in testIsDefault()
41 assertEquals(0, metrics.lowerCase); in testIsDefault()
42 assertEquals(0, metrics.numeric); in testIsDefault()
43 assertEquals(0, metrics.symbols); in testIsDefault()
44 assertEquals(0, metrics.nonLetter); in testIsDefault()
70 assertEquals(quality, metrics.quality); in testParceling()
[all …]
/frameworks/support/compat/src/androidTest/java/androidx/core/content/res/
DFontResourcesParserCompatTest.java24 import static org.junit.Assert.assertEquals;
74 assertEquals(4, fileEntries.length); in testParse()
76 assertEquals(400, font1.getWeight()); in testParse()
77 assertEquals(false, font1.isItalic()); in testParse()
78 assertEquals("'wdth' 0.8", font1.getVariationSettings()); in testParse()
79 assertEquals(0, font1.getTtcIndex()); in testParse()
80 assertEquals(R.font.samplefont, font1.getResourceId()); in testParse()
82 assertEquals(400, font2.getWeight()); in testParse()
83 assertEquals(true, font2.isItalic()); in testParse()
84 assertEquals("'contrast' 0.5", font2.getVariationSettings()); in testParse()
[all …]

12345678910>>...66