Home
last modified time | relevance | path

Searched refs:equalTo (Results 1 – 25 of 37) sorted by relevance

12

/frameworks/base/wifi/tests/src/android/net/wifi/aware/
DTlvBufferUtilsTest.java19 import static org.hamcrest.core.IsEqual.equalTo;
53 tlv11.getArray(), equalTo(new byte[]{0, 1, 2, 2, 3, 0, 1, 2})); in testTlvBuild()
62 tlv01.getArray(), equalTo(new byte[] {1, 2, 3, 0, 1, 2 })); in testTlvBuild()
66 equalTo(true)); in testTlvBuild()
69 equalTo(true)); in testTlvBuild()
83 collector.checkThat("initial", tlv.getArray(), equalTo(new byte[]{0, 1, 2, 1, 1, 104})); in testTlvReuse()
87 collector.checkThat("re-alloc", tlv.getArray(), equalTo(new byte[]{5, 1, 7})); in testTlvReuse()
110 equalTo(entry1.length + 1 + entry2.length + 1 + entry3.length + 1 + 1)); in testTlvListOperations()
111 collector.checkThat("parsedList-correct-length", parsedList.size(), equalTo(4)); in testTlvListOperations()
112 collector.checkThat("parsedList-entry1", parsedList.get(0), equalTo(entry1)); in testTlvListOperations()
[all …]
DWifiAwareManagerTest.java21 import static org.hamcrest.core.IsEqual.equalTo;
341 equalTo(matchFilterCaptor.getValue().size())); in testPublishFlow()
343 equalTo(matchFilterCaptor.getValue().get(0))); in testPublishFlow()
345 equalTo(matchFilterCaptor.getValue().get(1))); in testPublishFlow()
574 equalTo(configRequest.mClusterHigh)); in testConfigRequestBuilderDefaults()
576 equalTo(configRequest.mClusterLow)); in testConfigRequestBuilderDefaults()
578 equalTo(configRequest.mMasterPreference)); in testConfigRequestBuilderDefaults()
579 collector.checkThat("mSupport5gBand", true, equalTo(configRequest.mSupport5gBand)); in testConfigRequestBuilderDefaults()
581 equalTo(configRequest.mDiscoveryWindowInterval.length)); in testConfigRequestBuilderDefaults()
583 equalTo(configRequest.mDiscoveryWindowInterval[ConfigRequest.NAN_BAND_24GHZ])); in testConfigRequestBuilderDefaults()
[all …]
DWifiAwareAgentNetworkSpecifierTest.java19 import static org.hamcrest.core.IsEqual.equalTo;
82 collector.checkThat("No match expected", ns.satisfiedBy(dut), equalTo(false)); in testEmptyDoesntMatchAnything()
94 collector.checkThat("Match expected", nsThis.satisfiedBy(dut), equalTo(true)); in testSingleMatch()
95 collector.checkThat("No match expected", nsOther.satisfiedBy(dut), equalTo(false)); in testSingleMatch()
116 collector.checkThat("Match expected", nsThis.satisfiedBy(dut), equalTo(true)); in testMultipleMatchesAllMembers()
118 collector.checkThat("No match expected", nsOther.satisfiedBy(dut), equalTo(false)); in testMultipleMatchesAllMembers()
140 collector.checkThat("Match expected", oldNs.satisfiedBy(newNs), equalTo(true)); in testMatchSuperset()
162 collector.checkThat("Match unexpected", oldNs.satisfiedBy(newNs), equalTo(false)); in testNoMatchSubset()
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/aware/
DWifiAwareMetricsTest.java22 import static org.hamcrest.core.IsEqual.equalTo;
128 equalTo(2)); in testEnableDisableUsageMetrics()
133 collector.checkThat(log.availableTimeMs, equalTo(6L)); in testEnableDisableUsageMetrics()
142 equalTo(2)); in testEnableDisableUsageMetrics()
147 collector.checkThat(log.availableTimeMs, equalTo(8L)); // the partial record of 2ms in testEnableDisableUsageMetrics()
157 equalTo(1)); in testEnableDisableUsageMetrics()
160 collector.checkThat(log.availableTimeMs, equalTo(6L)); // the remnant record of 6ms in testEnableDisableUsageMetrics()
166 equalTo(0)); in testEnableDisableUsageMetrics()
189 equalTo(2)); in testEnableDisableAwareMetrics()
194 collector.checkThat(log.enabledTimeMs, equalTo(6L)); in testEnableDisableAwareMetrics()
[all …]
DWifiAwareNativeApiTest.java22 import static org.hamcrest.core.IsEqual.equalTo;
156 equalTo(configs.first.bandSpecificConfig[NanBandIndex.NAN_BAND_5GHZ] in testEnableAndConfigPowerSettingsDefaults()
159 equalTo(configs.first.bandSpecificConfig[NanBandIndex.NAN_BAND_24GHZ] in testEnableAndConfigPowerSettingsDefaults()
162 equalTo(configs.first.bandSpecificConfig[NanBandIndex.NAN_BAND_5GHZ] in testEnableAndConfigPowerSettingsDefaults()
165 equalTo(configs.first.bandSpecificConfig[NanBandIndex.NAN_BAND_24GHZ] in testEnableAndConfigPowerSettingsDefaults()
184 equalTo(configs.first.bandSpecificConfig[NanBandIndex.NAN_BAND_5GHZ] in testEnableAndConfigPowerSettingsNoneInteractive()
187 equalTo(configs.first.bandSpecificConfig[NanBandIndex.NAN_BAND_5GHZ] in testEnableAndConfigPowerSettingsNoneInteractive()
190 equalTo(configs.first.bandSpecificConfig[NanBandIndex.NAN_BAND_24GHZ] in testEnableAndConfigPowerSettingsNoneInteractive()
193 equalTo(configs.first.bandSpecificConfig[NanBandIndex.NAN_BAND_24GHZ] in testEnableAndConfigPowerSettingsNoneInteractive()
212 equalTo(configs.first.bandSpecificConfig[NanBandIndex.NAN_BAND_5GHZ] in testEnableAndConfigPowerSettingsIdle()
[all …]
DWifiAwareStateManagerTest.java21 import static org.hamcrest.core.IsEqual.equalTo;
364 collector.checkThat("usage enabled", mDut.isUsageEnabled(), equalTo(true)); in testAwareDataPathInterfaceUpDown()
410 collector.checkThat("usage enabled", mDut.isUsageEnabled(), equalTo(true)); in testDisableUsageDisablesApis()
415 collector.checkThat("usage disabled", mDut.isUsageEnabled(), equalTo(false)); in testDisableUsageDisablesApis()
457 collector.checkThat("usage enabled", mDut.isUsageEnabled(), equalTo(true)); in testDisableUsageFlow()
469 collector.checkThat("num of clients", sparseArrayCaptor.getValue().size(), equalTo(1)); in testDisableUsageFlow()
474 collector.checkThat("usage disabled", mDut.isUsageEnabled(), equalTo(false)); in testDisableUsageFlow()
494 collector.checkThat("usage disabled", mDut.isUsageEnabled(), equalTo(false)); in testDisableUsageFlow()
500 collector.checkThat("usage enabled", mDut.isUsageEnabled(), equalTo(true)); in testDisableUsageFlow()
513 collector.checkThat("num of clients", sparseArrayCaptor.getValue().size(), equalTo(1)); in testDisableUsageFlow()
[all …]
/frameworks/base/services/tests/wmtests/src/com/android/server/wm/utils/
DDisplayRotationUtilTest.java30 import static org.hamcrest.Matchers.equalTo;
54 equalTo(BOUNDS_POSITION_LEFT)); in testGetBoundIndexFromRotation_rot0()
56 equalTo(BOUNDS_POSITION_TOP)); in testGetBoundIndexFromRotation_rot0()
58 equalTo(BOUNDS_POSITION_RIGHT)); in testGetBoundIndexFromRotation_rot0()
60 equalTo(BOUNDS_POSITION_BOTTOM)); in testGetBoundIndexFromRotation_rot0()
66 equalTo(BOUNDS_POSITION_BOTTOM)); in testGetBoundIndexFromRotation_rot90()
68 equalTo(BOUNDS_POSITION_LEFT)); in testGetBoundIndexFromRotation_rot90()
70 equalTo(BOUNDS_POSITION_TOP)); in testGetBoundIndexFromRotation_rot90()
72 equalTo(BOUNDS_POSITION_RIGHT)); in testGetBoundIndexFromRotation_rot90()
78 equalTo(BOUNDS_POSITION_RIGHT)); in testGetBoundIndexFromRotation_rot180()
[all …]
DRotationCacheTest.java21 import static org.hamcrest.Matchers.equalTo;
57 assertThat(mCache.getOrCompute("hello", 0), equalTo(create("hello", 0))); in getOrCompute_computes()
58 assertThat(mCache.getOrCompute("hello", 1), equalTo(create("hello", 1))); in getOrCompute_computes()
59 assertThat(mCache.getOrCompute("hello", 2), equalTo(create("hello", 2))); in getOrCompute_computes()
60 assertThat(mCache.getOrCompute("hello", 3), equalTo(create("hello", 3))); in getOrCompute_computes()
68 assertThat(mCache.getOrCompute("hello", 1), equalTo(create("hello", 1))); in getOrCompute_sameParam_sameRot_hitsCache()
80 assertThat(mCache.getOrCompute("hello", 1), equalTo(create("hello", 1))); in getOrCompute_sameParam_hitsCache_forAllRots()
81 assertThat(mCache.getOrCompute("hello", 0), equalTo(create("hello", 0))); in getOrCompute_sameParam_hitsCache_forAllRots()
82 assertThat(mCache.getOrCompute("hello", 2), equalTo(create("hello", 2))); in getOrCompute_sameParam_hitsCache_forAllRots()
83 assertThat(mCache.getOrCompute("hello", 3), equalTo(create("hello", 3))); in getOrCompute_sameParam_hitsCache_forAllRots()
[all …]
DWmDisplayCutoutTest.java26 import static org.hamcrest.Matchers.equalTo;
98 equalTo(new Rect(-5, -10, 95, 10))); in calculateRelativeTo_bounds()
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/rtt/
DRttNativeTest.java20 import static org.hamcrest.core.IsEqual.equalTo;
138 equalTo(request.mRttPeers.size())); in testRangeRequest()
142 equalTo(MacAddress.fromString("00:01:02:03:04:00").toByteArray())); in testRangeRequest()
143 collector.checkThat("entry 0: rtt type", rttConfig.type, equalTo(RttType.TWO_SIDED)); in testRangeRequest()
144 collector.checkThat("entry 0: peer type", rttConfig.peer, equalTo(RttPeerType.AP)); in testRangeRequest()
145 collector.checkThat("entry 0: lci", rttConfig.mustRequestLci, equalTo(true)); in testRangeRequest()
146 collector.checkThat("entry 0: lcr", rttConfig.mustRequestLcr, equalTo(true)); in testRangeRequest()
150 equalTo(MacAddress.fromString("0A:0B:0C:0D:0E:00").toByteArray())); in testRangeRequest()
151 collector.checkThat("entry 1: rtt type", rttConfig.type, equalTo(RttType.ONE_SIDED)); in testRangeRequest()
152 collector.checkThat("entry 1: peer type", rttConfig.peer, equalTo(RttPeerType.AP)); in testRangeRequest()
[all …]
DRttMetricsTest.java19 import static org.hamcrest.core.IsEqual.equalTo;
404 log.rttToAp.histogramIndividualStatus.length, equalTo(16)); in testRecordResultsStatuses()
452 log.rttToAware.histogramIndividualStatus.length, equalTo(0)); in testRecordResultsStatuses()
478 equalTo(8)); in testRecordOverallStatus()
512 collector.checkThat(logPrefix + ": start", bucket.start, equalTo(start)); in validateProtoHistBucket()
513 collector.checkThat(logPrefix + ": end", bucket.end, equalTo(end)); in validateProtoHistBucket()
514 collector.checkThat(logPrefix + ": count", bucket.count, equalTo(count)); in validateProtoHistBucket()
520 collector.checkThat(logPrefix + ": statusType", bucket.statusType, equalTo(status)); in validateProtoOverallStatusHistBucket()
521 collector.checkThat(logPrefix + ": count", bucket.count, equalTo(count)); in validateProtoOverallStatusHistBucket()
527 collector.checkThat(logPrefix + ": statusType", bucket.statusType, equalTo(status)); in validateProtoIndividualStatusHistBucket()
[all …]
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/util/
DIntHistogramTest.java22 import static org.hamcrest.core.IsEqual.equalTo;
59 mHistogram.getBucketByIndex(expectedBucketIndex).count, equalTo(expectedCount)); in incrementValueAndVerify()
87 mHistogram.numNonEmptyBuckets(), equalTo(TEST_BUCKET_BOUNDARIES.length + 1)); in testAddToHistogram()
92 mHistogram.toString(), equalTo(expectedStr)); in testAddToHistogram()
129 mHistogram.numNonEmptyBuckets(), equalTo(4)); in testAddToHistogramWithGap()
134 mHistogram.toString(), equalTo(expectedStr)); in testAddToHistogramWithGap()
179 equalTo(TEST_NEGATIVE_BUCKET_BOUNDARIES.length + 1)); in testAddNegativeToHistogram()
184 mHistogram.toString(), equalTo(expectedStr)); in testAddNegativeToHistogram()
209 mHistogram.numNonEmptyBuckets(), equalTo(0)); in testEmptyHistogram()
213 mHistogram.toString(), equalTo(expectedStr)); in testEmptyHistogram()
[all …]
DMetricsUtilsTest.java19 import static org.hamcrest.core.IsEqual.equalTo;
113 collector.checkThat("Number of buckets #1", phb1.length, equalTo(hist1.size())); in testHistBucketing()
140 collector.checkThat("Number of buckets #2", phb2.length, equalTo(hist2.size())); in testHistBucketing()
177 collector.checkThat("Number of buckets", phb.length, equalTo(hist.size())); in testLinearHistBucketing()
190 collector.checkThat(prefix + value, h.get(expectedKey), equalTo(expectedValue)); in bucketValueAndVerify()
196 collector.checkThat(prefix + value, h.get(expectedKey), equalTo(expectedValue)); in bucketValueAndVerify()
201 collector.checkThat(prefix + ": start", bucket.start, equalTo(start)); in validateProtoHistBucket()
202 collector.checkThat(prefix + ": end", bucket.end, equalTo(end)); in validateProtoHistBucket()
203 collector.checkThat(prefix + ": count", bucket.count, equalTo(count)); in validateProtoHistBucket()
/frameworks/base/tests/utils/testutils/java/android/os/test/
DTestLooperTest.java19 import static org.hamcrest.core.IsEqual.equalTo;
89 collector.checkThat("1: messageA", messageA, equalTo(messageCaptor.getValue().what)); in testNoTimeMovement()
91 collector.checkThat("2: messageA", messageA, equalTo(messageCaptor.getValue().what)); in testNoTimeMovement()
93 collector.checkThat("3: messageB", messageB, equalTo(messageCaptor.getValue().what)); in testNoTimeMovement()
95 collector.checkThat("4: messageC", messageC, equalTo(messageCaptor.getValue().what)); in testNoTimeMovement()
147 collector.checkThat("1: messageA", messageA, equalTo(messageCaptor.getValue().what)); in testDelayedDispatchNoTimeMove()
149 collector.checkThat("2: messageB", messageB, equalTo(messageCaptor.getValue().what)); in testDelayedDispatchNoTimeMove()
176 collector.checkThat("1: messageA", messageA, equalTo(messageCaptor.getValue().what)); in testDelayedDispatchAdvanceTimeOnce()
178 collector.checkThat("2: messageB", messageB, equalTo(messageCaptor.getValue().what)); in testDelayedDispatchAdvanceTimeOnce()
180 collector.checkThat("3: messageC", messageC, equalTo(messageCaptor.getValue().what)); in testDelayedDispatchAdvanceTimeOnce()
[all …]
/frameworks/base/core/tests/coretests/src/android/view/
DViewRootImplTest.java19 import static org.hamcrest.Matchers.equalTo;
62 assertThat(insets.getSystemWindowInsets(), equalTo(Insets.NONE)); in negativeInsets_areSetToZero()
63 assertThat(insets.getStableInsets(), equalTo(Insets.NONE)); in negativeInsets_areSetToZero()
72 assertThat(insets.getSystemWindowInsets(), equalTo(Insets.of(0, 20, 0, 40))); in negativeInsets_areSetToZero_positiveAreLeftAsIs()
73 assertThat(insets.getStableInsets(), equalTo(Insets.of(10, 0, 30, 0))); in negativeInsets_areSetToZero_positiveAreLeftAsIs()
82 assertThat(insets.getSystemWindowInsets(), equalTo(Insets.of(10, 20, 30, 40))); in positiveInsets_areLeftAsIs()
83 assertThat(insets.getStableInsets(), equalTo(Insets.of(10, 20, 30, 40))); in positiveInsets_areLeftAsIs()
DDisplayCutoutTest.java23 import static org.hamcrest.Matchers.equalTo;
78 equalTo(new Rect[]{bound, ZERO_RECT, ZERO_RECT, ZERO_RECT})); in testExtractBoundsFromList_left()
86 equalTo(new Rect[]{ZERO_RECT, bound, ZERO_RECT, ZERO_RECT})); in testExtractBoundsFromList_top()
94 equalTo(new Rect[]{ZERO_RECT, ZERO_RECT, bound, ZERO_RECT})); in testExtractBoundsFromList_right()
102 equalTo(new Rect[]{ZERO_RECT, ZERO_RECT, ZERO_RECT, bound})); in testExtractBoundsFromList_bottom()
112 equalTo(new Rect[]{ZERO_RECT, boundTop, ZERO_RECT, boundBottom})); in testExtractBoundsFromList_top_and_bottom()
119 equalTo(new Rect[]{ZERO_RECT, ZERO_RECT, ZERO_RECT, ZERO_RECT})); in testExtractBoundsFromList_nullBoundingRects()
125 equalTo(new Rect[]{ZERO_RECT, ZERO_RECT, ZERO_RECT, ZERO_RECT})); in testExtractBoundsFromList_nullSafeInsets()
224 assertThat(cutout.getBoundingRectsAll(), equalTo( in inset_bounds()
298 assertThat(cutout.getSafeInsets(), equalTo(new Rect(0, 20, 0, 0))); in fromSpec_setsSafeInsets_top()
[all …]
/frameworks/base/services/tests/wmtests/src/com/android/server/wm/
DDisplayPolicyInsetsTests.java24 import static org.hamcrest.Matchers.equalTo;
116 mErrorCollector.checkThat("stableInsets", getStableInsetsLw(di), equalTo(new Rect( in verifyStableInsets()
121 mErrorCollector.checkThat("nonDecorInsets", getNonDecorInsetsLw(di), equalTo(new Rect( in verifyNonDecorInsets()
135 equalTo(di.logicalWidth - insets.left - insets.right)); in verifyConsistency()
137 equalTo(di.logicalHeight - insets.top - insets.bottom)); in verifyConsistency()
/frameworks/base/core/tests/coretests/src/android/view/inputmethod/
DInputMethodInfoTest.java19 import static org.hamcrest.CoreMatchers.equalTo;
49 assertThat(clone.hashCode(), equalTo(imi.hashCode())); in testEqualsAndHashCode()
/frameworks/base/core/tests/coretests/src/android/view/accessibility/
DAccessibilityNodeInfoTest.java22 import static org.hamcrest.Matchers.equalTo;
136 assertThat(unparceledNode.getText(), equalTo(text)); in testEmptyListOfActions_parcelsCorrectly()
/frameworks/av/media/codec2/components/gsm/
DC2SoftGsmDec.cpp61 .withFields({C2F(mSampleRate, value).equalTo(8000)}) in IntfImpl()
68 .withFields({C2F(mChannelCount, value).equalTo(1)}) in IntfImpl()
75 .withFields({C2F(mBitrate, value).equalTo(13200)}) in IntfImpl()
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/qs/customize/
DTileQueryHelperTest.java20 import static org.hamcrest.Matchers.equalTo;
186 assertThat(tiles, is(equalTo(STOCK_TILES))); in testQueryTiles_correctTilesAndOrderOnlyStockTiles()
207 assertThat(tiles, is(equalTo(ALL_TILES))); in testQueryTiles_correctTilesAndOrderOtherFactoryTiles()
/frameworks/av/media/codec2/components/amr_nb_wb/
DC2SoftAmrDec.cpp77 .withFields({C2F(mSampleRate, value).equalTo(8000)}) in IntfImpl()
80 .withFields({C2F(mSampleRate, value).equalTo(16000)}) in IntfImpl()
88 .withFields({C2F(mChannelCount, value).equalTo(1)}) in IntfImpl()
DC2SoftAmrNbEnc.cpp62 .withFields({C2F(mChannelCount, value).equalTo(1)}) in IntfImpl()
69 .withFields({C2F(mSampleRate, value).equalTo(8000)}) in IntfImpl()
/frameworks/base/core/tests/coretests/src/android/widget/
DEditorCursorTest.java28 import static org.hamcrest.Matchers.equalTo;
210 latch.await(10, TimeUnit.SECONDS), equalTo(true)); in setEditTextProperties()
/frameworks/av/media/codec2/components/g711/
DC2SoftG711Dec.cpp77 .withFields({C2F(mChannelCount, value).equalTo(1)}) in IntfImpl()
84 .withFields({C2F(mBitrate, value).equalTo(64000)}) in IntfImpl()

12