Home
last modified time | relevance | path

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

1234

/platform_testing/libraries/compatibility-common-util/tests/src/com/android/compatibility/common/util/
DBusinessLogicTest.java23 import static org.junit.Assert.assertEquals;
135 assertEquals("Wrong number of business logic rule lists", 3, bl.mRules.size()); in testCorrectLogic()
137 assertEquals("Wrong or missing rule list description", "first test", description); in testCorrectLogic()
139 assertEquals("Wrong number of rules in first rule list", 1, rulesList1.size()); in testCorrectLogic()
142 assertEquals("Wrong number of conditions", 1, rule1Conditions.size()); in testCorrectLogic()
144 assertEquals("Wrong method name for business logic rule condition", in testCorrectLogic()
148 assertEquals("Wrong arg string count for business logic rule condition", 1, in testCorrectLogic()
150 assertEquals("Wrong arg for business logic rule condition", "arg1", in testCorrectLogic()
153 assertEquals("Wrong number of actions", 1, rule1Actions.size()); in testCorrectLogic()
155 assertEquals("Wrong method name for business logic rule action", in testCorrectLogic()
[all …]
DCaseResultTest.java46 assertEquals("Incorrect case name", CLASS, mResult.getName()); in testAccessors()
52 assertEquals("Expected one result", 1, mResult.getResults().size()); in testResultCreation()
56 assertEquals("Expected the same result", testResult, testResult2); in testResultCreation()
57 assertEquals("Expected one result", 1, mResult.getResults().size()); in testResultCreation()
63 assertEquals("Expected status to be set", TestStatus.FAIL, testResult.getResultStatus()); in testResultReporting()
64 assertEquals("Expected message to be set", MESSAGE, testResult.getMessage()); in testResultReporting()
65 assertEquals("Expected stack to be set", STACK_TRACE, testResult.getStackTrace()); in testResultReporting()
68 assertEquals("Expected status to be set", TestStatus.PASS, testResult.getResultStatus()); in testResultReporting()
69 assertEquals("Expected two results", 2, mResult.getResults().size()); in testResultReporting()
76 assertEquals("Expected two failures", 2, mResult.countResults(TestStatus.FAIL)); in testCountResults()
[all …]
DStatTest.java35 assertEquals(95, (int) Stat.get95PercentileValue(values)); in testGet95PercentileValue()
41 assertEquals(950, (int) Stat.get95PercentileValue(values)); in testGet95PercentileValue()
47 assertEquals(95 * 95, (int) Stat.get95PercentileValue(values)); in testGet95PercentileValue()
56 assertEquals(2.0, average, 0.00001); in testGetAverage()
60 assertEquals(3.0, average, 0.00001); in testGetAverage()
64 assertEquals(6.0, average, 0.00001); in testGetAverage()
73 assertEquals(Math.sqrt(2.5), stddev, 0.00001); in testGetStandardDeviation()
77 assertEquals(Math.sqrt(2.5), stddev, 0.00001); in testGetStandardDeviation()
81 assertEquals(Math.sqrt(10.0), stddev, 0.00001); in testGetStandardDeviation()
DResultHandlerTest.java420 assertEquals("Expected one result", 1, lightResults.size()); in testGetLightResults()
497 assertEquals("Expected 3 passes", 3, lightResult.countResults(TestStatus.PASS)); in checkLightResult()
498 assertEquals("Expected 1 failure", 1, lightResult.countResults(TestStatus.FAIL)); in checkLightResult()
501 assertEquals("Incorrect Build ID", EXAMPLE_BUILD_ID, buildInfo.get(BUILD_ID)); in checkLightResult()
502 assertEquals("Incorrect Build Product", in checkLightResult()
508 assertEquals("Expected 2 devices", 2, serials.size()); in checkLightResult()
510 assertEquals("Incorrect start time", START_MS, lightResult.getStartTime()); in checkLightResult()
511 assertEquals("Incorrect test plan", SUITE_PLAN, lightResult.getTestPlan()); in checkLightResult()
513 assertEquals("Expected 1 completed module", 1, lightResult.getModuleCompleteCount()); in checkLightResult()
514 assertEquals("Expected 2 total modules", 2, modules.size()); in checkLightResult()
[all …]
DDynamicConfigTest.java94 assertEquals("Wrong Config", config.getValue("test-config-1"), "test config 1"); in testCorrectConfig()
95 assertEquals("Wrong Config", config.getValue("test-config-2"), "testconfig2"); in testCorrectConfig()
96 assertEquals("Wrong Config List", config.getValues("config-list").get(0), "config0"); in testCorrectConfig()
97 assertEquals("Wrong Config List", config.getValues("config-list").get(2), "config2"); in testCorrectConfig()
98 assertEquals("Wrong Config List", config.getValues("config-list-2").get(2), "C"); in testCorrectConfig()
DReportLogTest.java67 assertEquals(String.format(SUMMARY_XML, "testSerialize_summaryOnly:66"), in testSerialize_summaryOnly()
73 assertEquals(HEADER_XML, ReportLog.serialize(mReportLog)); in testSerialize_detailOnly()
79 assertEquals(String.format(FULL_XML, "testSerialize_full:77"), in testSerialize_full()
100 assertEquals("Sample", report.getSummary().getMessage()); in testParse_summaryOnly()
106 assertEquals("Sample", report.getSummary().getMessage()); in testParse_full()
112 assertEquals("Expected message to be ok", SOURCE, metric.getSource()); in testLimits_source()
120 assertEquals("Expected source to be trimmed", source.substring(source.length() - 200), in testLimits_source()
127 assertEquals("Expected message to be ok", MESSAGE, metric.getMessage()); in testLimits_message()
135 assertEquals("Expected message to be trimmed", message.substring(0, 200), in testLimits_message()
DReadElfTest.java110 assertEquals("ReadElf.isElf() " + elfFileName, true, ReadElf.isElf(targetFile)); in checkReadElf()
112 assertEquals("getBits() ", bits, elf.getBits()); in checkReadElf()
113 assertEquals("getArchitecture() ", arch, elf.getArchitecture()); in checkReadElf()
114 assertEquals("isDynamic() ", true, elf.isDynamic()); in checkReadElf()
115 assertEquals("getType() ", type, elf.getType()); in checkReadElf()
118 assertEquals("ReadElf.isElf() " + elfOutputFileName, false, ReadElf.isElf(elfOutputFile)); in checkReadElf()
123 assertEquals( in checkReadElf()
128 assertEquals( in checkReadElf()
221 assertEquals("chkDynSymbol type :", dynSymbolArr[i].toType(), phases[3]); in chkDynSymbol()
222 assertEquals("chkDynSymbol bind :", dynSymbolArr[i].toBind(), phases[4]); in chkDynSymbol()
[all …]
/platform_testing/libraries/flag-helpers/junit/test/src/android/platform/test/flag/util/
DFlagTest.java19 import static junit.framework.TestCase.assertEquals;
35 assertEquals("namespace", flag.namespace()); in createFlag_legacyFlag()
36 assertEquals("flag", flag.fullFlagName()); in createFlag_legacyFlag()
37 assertEquals("flag", flag.simpleFlagName()); in createFlag_legacyFlag()
55 assertEquals("android.platform.test.flag.junit.flag1", flag.fullFlagName()); in createFlag_aconfigFlagWithoutRepackaging()
56 assertEquals("flag1", flag.simpleFlagName()); in createFlag_aconfigFlagWithoutRepackaging()
57 assertEquals("android.platform.test.flag.junit", flag.packageName()); in createFlag_aconfigFlagWithoutRepackaging()
58 assertEquals("android.platform.test.flag.junit.Flags", flag.flagsClassName()); in createFlag_aconfigFlagWithoutRepackaging()
67 assertEquals("android.myflag.flag1", flag.fullFlagName()); in createFlag_aconfigFlagWithRepackaging()
68 assertEquals("flag1", flag.simpleFlagName()); in createFlag_aconfigFlagWithRepackaging()
[all …]
/platform_testing/libraries/collectors-helper/statsd/test/src/com/android/helpers/
DCrashHelperTest.java18 import static org.junit.Assert.assertEquals;
102 assertEquals(3, crashMap.size()); in testEmptyCrashMetric()
103 assertEquals(0, crashMap.get(TOTAL_CRASHES_KEY).intValue()); in testEmptyCrashMetric()
104 assertEquals(0, crashMap.get(TOTAL_NATIVE_CRASHES_KEY).intValue()); in testEmptyCrashMetric()
105 assertEquals(0, crashMap.get(TOTAL_ANRS_KEY).intValue()); in testEmptyCrashMetric()
120 assertEquals(4, crashMap.size()); in testCrashMetric()
121 assertEquals(1, crashMap.get(TOTAL_CRASHES_KEY).intValue()); in testCrashMetric()
122 assertEquals(0, crashMap.get(TOTAL_NATIVE_CRASHES_KEY).intValue()); in testCrashMetric()
123 assertEquals(1, crashMap.get(CRASH_PKG_KEY).intValue()); in testCrashMetric()
124 assertEquals(0, crashMap.get(TOTAL_ANRS_KEY).intValue()); in testCrashMetric()
[all …]
DStatsdStatsHelperTest.java18 import static org.junit.Assert.assertEquals;
265 assertEquals( in verifyAtomStats()
268 assertEquals( in verifyAtomStats()
283 assertEquals(result.get(metricKey), Long.valueOf(i + 2)); in verifyConfigAlertStats()
296 assertEquals(result.get(metricKey), Long.valueOf(i + 2)); in verifyConfigMatcherStats()
309 assertEquals(result.get(metricKey), Long.valueOf(i + 2)); in verifyConfigConditionStats()
322 assertEquals(result.get(metricKey), Long.valueOf(i + 2)); in verifyConfigMetricStats()
343 assertEquals(result.get(metricCountKey), Long.valueOf(configStatsMetricCount)); in verifyConfigStats()
347 assertEquals(result.get(conditionCountKey), Long.valueOf(configStatsConditionCount)); in verifyConfigStats()
351 assertEquals(result.get(matcherCountKey), Long.valueOf(configStatsMatcherCount)); in verifyConfigStats()
[all …]
DAppStartupHelperTest.java38 import static org.junit.Assert.assertEquals;
134 assertEquals(1, appLaunchMetrics.get(coldLaunchMetricKey).toString().split(",").length); in testSingleColdLaunchMetric()
135 assertEquals(1, Integer.parseInt(appLaunchMetrics.get(coldLaunchCountPkgKey).toString())); in testSingleColdLaunchMetric()
136 assertEquals(1, Integer.parseInt(appLaunchMetrics.get(COLD_LAUNCH_TOTAL_COUNT_KEY_TEMPLATE) in testSingleColdLaunchMetric()
144 assertEquals(1, in testSingleColdLaunchMetric()
153 assertEquals(1, in testSingleColdLaunchMetric()
155 assertEquals(1, in testSingleColdLaunchMetric()
157 assertEquals( in testSingleColdLaunchMetric()
167 assertEquals(1, in testSingleColdLaunchMetric()
191 assertEquals(2, appLaunchMetrics.get(coldLaunchMetricKey).toString().split(",").length); in testMultipleColdLaunchMetric()
[all …]
/platform_testing/libraries/collectors-helper/system/test/src/com/android/helpers/tests/
DBugReportDurationHelperTest.java18 import static org.junit.Assert.assertEquals;
139 assertEquals(9, metrics.size()); in testGetMetrics()
140 assertEquals(44.619, metrics.get("bugreport-duration-dumpstate_board()"), DELTA); in testGetMetrics()
141 assertEquals(21.397, metrics.get("bugreport-duration-dumpsys"), DELTA); in testGetMetrics()
142 assertEquals(0.022, metrics.get("bugreport-duration-dumpsys-critical-proto"), DELTA); in testGetMetrics()
143 assertEquals(0.051, metrics.get("bugreport-dumpsys-duration-SurfaceFlinger"), DELTA); in testGetMetrics()
144 assertEquals(24.741, metrics.get("bugreport-dumpsys-duration-meminfo"), DELTA); in testGetMetrics()
145 assertEquals(103, metrics.get("bugreport-dumpstate_board-duration-dump_display"), DELTA); in testGetMetrics()
146 assertEquals(12532, metrics.get("bugreport-dumpstate_board-duration-dump_modemlog"), DELTA); in testGetMetrics()
147 assertEquals( in testGetMetrics()
[all …]
DTimeInStateHelperTest.java19 import static org.junit.Assert.assertEquals;
81 assertEquals(results.size(), 0); in testCollectTimeInState_noSource()
99 assertEquals(results.size(), 3); in testCollectTimeInState_oneSource()
100 assertEquals(results.get(constructKey(key1, "10000")).longValue(), 100L); in testCollectTimeInState_oneSource()
101 assertEquals(results.get(constructKey(key1, "35000")).longValue(), 100L); in testCollectTimeInState_oneSource()
102 assertEquals(results.get(constructKey(key1, AVG_FREQ_KEY_SUFFIX)).longValue(), 22500L); in testCollectTimeInState_oneSource()
124 assertEquals(results.size(), 6); in testCollectTimeInState_multipleSources()
125 assertEquals(results.get(constructKey(key1, "10000")).longValue(), 50L); in testCollectTimeInState_multipleSources()
126 assertEquals(results.get(constructKey(key1, "150000")).longValue(), 50L); in testCollectTimeInState_multipleSources()
127 assertEquals(results.get(constructKey(key1, AVG_FREQ_KEY_SUFFIX)).longValue(), 80000L); in testCollectTimeInState_multipleSources()
[all …]
/platform_testing/libraries/device-collectors/src/test/java/android/device/collectors/
DBaseMetricListenerInstrumentedTest.java38 import static org.junit.Assert.assertEquals;
139 assertEquals(1, capturedBundle.size()); in testReportMetrics()
141 assertEquals(TEST_START_VALUE + "method", check.getString(TEST_START_KEY)); in testReportMetrics()
142 assertEquals(TEST_END_VALUE + "method", check.getString(TEST_END_KEY)); in testReportMetrics()
143 assertEquals(2, check.size()); in testReportMetrics()
146 assertEquals(RUN_START_VALUE, resultBundle.getString(RUN_START_KEY)); in testReportMetrics()
147 assertEquals(RUN_END_VALUE, resultBundle.getString(RUN_END_KEY)); in testReportMetrics()
148 assertEquals(2, resultBundle.size()); in testReportMetrics()
186 assertEquals(2, capturedBundle.size()); in testReportMetrics_withIncludeFilters()
188 assertEquals(TEST_START_VALUE + "method", check.getString(TEST_START_KEY)); in testReportMetrics_withIncludeFilters()
[all …]
DScheduledRunMetricListenerTest.java30 import static org.junit.Assert.assertEquals;
71 assertEquals(TEST_RUN_VALUE + "0", resultBundle.getString(TEST_RUN_KEY + "0")); in testPeriodicRun()
72 assertEquals(TEST_RUN_VALUE + "1", resultBundle.getString(TEST_RUN_KEY + "1")); in testPeriodicRun()
73 assertEquals(TEST_RUN_VALUE + "2", resultBundle.getString(TEST_RUN_KEY + "2")); in testPeriodicRun()
/platform_testing/libraries/flicker/utils/test/src/android/tools/
DFloatFormatterTest.kt25 Assert.assertEquals(FloatFormatter.format(0.0f), "0.0") in testFormat()
26 Assert.assertEquals(FloatFormatter.format(0.00001f), "0.0") in testFormat()
27 Assert.assertEquals(FloatFormatter.format(0.10f), "0.1") in testFormat()
28 Assert.assertEquals(FloatFormatter.format(10.0001f), "10.0") in testFormat()
DCacheTest.kt36 Assert.assertEquals(2, cacheSize()) in testGet()
42 Assert.assertEquals(1, cacheSize()) in testClear()
44 Assert.assertEquals(0, cacheSize()) in testClear()
64 Assert.assertEquals(3, cacheSize()) in testRestore()
/platform_testing/libraries/flicker/test/src/android/tools/flicker/assertions/
DCompoundAssertionTest.kt26 Assert.assertEquals(NAME, assertion.name) in correctNameSingle()
32 Assert.assertEquals(NAME, assertion.name) in correctNamePair()
34 Assert.assertEquals("$NAME and $OTHER", assertion.name) in correctNamePair()
41 Assert.assertEquals(NAME, assertion.name) in correctNameTriple()
44 Assert.assertEquals("$NAME and $OTHER and $OTHER", assertion.name) in correctNameTriple()
52 Assert.assertEquals(1, count) in executes()
55 Assert.assertEquals(3, count) in executes()
/platform_testing/libraries/flag-helpers/junit/test/src/android/platform/test/flag/junit/
DAnnotationsRetrieverTest.java19 import static org.junit.Assert.assertEquals;
75 assertEquals(Map.of(), flagAnnotations.mRequiredFlagValues); in noAnnotation()
85 assertEquals(Map.of("flag5", true), flagAnnotations1.mRequiredFlagValues); in oneAnnotationFromMethod()
86 assertEquals(Map.of("flag6", false), flagAnnotations2.mRequiredFlagValues); in oneAnnotationFromMethod()
96 assertEquals( in methodAnnotationsMergeWithClass()
99 assertEquals( in methodAnnotationsMergeWithClass()
111 assertEquals(Map.of("flag1", true, "flag2", true), flagAnnotations1.mRequiredFlagValues); in getFlagAnnotations_oneAnnotationFromClass()
112 assertEquals(Map.of("flag3", false, "flag4", false), flagAnnotations2.mRequiredFlagValues); in getFlagAnnotations_oneAnnotationFromClass()
123 assertEquals(Map.of("flag5", true, "flag6", false), flagAnnotations.mRequiredFlagValues); in bothAnnotationsFromMethod()
134 assertEquals( in bothAnnotationsFromMethodMergesWithClass()
[all …]
DFlagsParameterizationTest.java19 import static org.junit.Assert.assertEquals;
37 assertEquals(params1.toString(), params2.toString()); in toStringIsOrderIndependent()
38 assertEquals(params1, params2); in toStringIsOrderIndependent()
76 assertEquals(expected, actual); in allCombinationsWith0Flags()
86 assertEquals(expected, actual); in allCombinationsWith1Flags()
98 assertEquals(expected, actual); in allCombinationsWith2Flags()
114 assertEquals(expected, actual); in allCombinationsWith3Flags()
121 assertEquals(expected, actual); in progressionWith0Flags()
131 assertEquals(expected, actual); in progressionWith1Flags()
142 assertEquals(expected, actual); in progressionWith2Flags()
[all …]
/platform_testing/libraries/collectors-helper/generic/test/src/com/android/helpers/tests/
DGenericExecutableCollectorHelperTest.java19 import static org.junit.Assert.assertEquals;
127 assertEquals( in testMultipleGoodFiles()
129 assertEquals( in testMultipleGoodFiles()
131 assertEquals(metrics.get(sTestFile1NamePrefix + "SurfaceFlinger_client_count"), "8"); in testMultipleGoodFiles()
145 assertEquals( in testMultipleGoodFiles()
149 assertEquals( in testMultipleGoodFiles()
153 assertEquals( in testMultipleGoodFiles()
192 assertEquals( in testBadExectuable_goodExecutableStillCollects()
196 assertEquals( in testBadExectuable_goodExecutableStillCollects()
200 assertEquals( in testBadExectuable_goodExecutableStillCollects()
/platform_testing/libraries/collectors-helper/memory/test/src/com/android/helpers/tests/
DSlabinfoHelperTest.java19 import static org.junit.Assert.assertEquals;
81 assertEquals(Double.valueOf(300), slopes.get("slabinfo.a")); in testSimpleExactFits()
82 assertEquals(Double.valueOf(150), slopes.get("slabinfo.b")); in testSimpleExactFits()
83 assertEquals(Double.valueOf(75), slopes.get("slabinfo.c")); in testSimpleExactFits()
84 assertEquals(Double.valueOf(-75), slopes.get("slabinfo.d")); in testSimpleExactFits()
85 assertEquals(Double.valueOf(-150), slopes.get("slabinfo.e")); in testSimpleExactFits()
86 assertEquals(Double.valueOf(-300), slopes.get("slabinfo.f")); in testSimpleExactFits()
114 assertEquals(Double.valueOf(0), slopes.get("slabinfo.a")); in testNoSlopes()
115 assertEquals(Double.valueOf(0), slopes.get("slabinfo.b")); in testNoSlopes()
147 assertEquals(Double.valueOf(16.4835165), rounded_a); in testNonexactFits()
[all …]
/platform_testing/libraries/flicker/utils/test/src/android/tools/monitors/events/
DEventLogMonitorTest.kt34 import org.junit.Assert.assertEquals
101 assertEquals(2, eventLog.focusEvents.size) in canCaptureFocusEventLogs()
102 assertEquals( in canCaptureFocusEventLogs()
106 assertEquals(FocusEvent.Type.LOST, eventLog.focusEvents.first().type) in canCaptureFocusEventLogs()
107 assertEquals( in canCaptureFocusEventLogs()
111 assertEquals(FocusEvent.Type.GAINED, eventLog.focusEvents.drop(1).first().type) in canCaptureFocusEventLogs()
115 assertEquals(eventLog.focusEvents.first().reason, "test") in canCaptureFocusEventLogs()
157 assertEquals(2, eventLog.focusEvents.size) in onlyCapturesLastTransition()
158 assertEquals( in onlyCapturesLastTransition()
162 assertEquals(FocusEvent.Type.LOST, eventLog.focusEvents.first().type) in onlyCapturesLastTransition()
[all …]
/platform_testing/tests/automotive/functional/statusbar/src/android/platform/tests/
DStatusBarTest.java19 import static junit.framework.Assert.assertEquals;
59 assertEquals(1, mStatusBarHelper.get().getCurrentDisplayMode()); in testToVerifyChangeToDayMode()
66 assertEquals(2, mStatusBarHelper.get().getCurrentDisplayMode()); in testToVerifyChangeToNightMode()
72 assertEquals( in testClockTime()
/platform_testing/tests/functional/calculator/src/com/android/calculator/functional/
DCalculatorTests.java64 assertEquals("Results are wrong", "18", mCalculatorHelper.getResultText("result")); in testAdd()
74 assertEquals("Results are wrong","2", mCalculatorHelper.getResultText("result")); in testSubtract()
84 assertEquals("Results are wrong","35", mCalculatorHelper.getResultText("result")); in testMultiply()
94 assertEquals("Results are wrong","4", mCalculatorHelper.getResultText("result")); in testDivide()
120 assertEquals("Error", "Can't divide by 0", mCalculatorHelper.getResultText("result")); in testDivideByZero()
134 assertEquals("Scroll failed","1.52415787501E16", mCalculatorHelper.getResultText("result")); in testScrollLongResult()
148 assertEquals("Results are wrong", "1",mCalculatorHelper.getResultText("result")); in testAdvancedOperation()
170 assertEquals("Message not found", "Value may be infinite or undefined.",msgText.getText()); in testComplexCalculationTimeout()

1234