/frameworks/base/wifi/tests/src/android/net/wifi/aware/ |
D | TlvBufferUtilsTest.java | 19 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 …]
|
D | WifiAwareManagerTest.java | 21 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 …]
|
D | WifiAwareAgentNetworkSpecifierTest.java | 19 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/ |
D | WifiAwareMetricsTest.java | 22 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 …]
|
D | WifiAwareNativeApiTest.java | 22 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 …]
|
D | WifiAwareStateManagerTest.java | 21 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/ |
D | DisplayRotationUtilTest.java | 30 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 …]
|
D | RotationCacheTest.java | 21 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 …]
|
D | WmDisplayCutoutTest.java | 26 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/ |
D | RttNativeTest.java | 20 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 …]
|
D | RttMetricsTest.java | 19 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/ |
D | IntHistogramTest.java | 22 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 …]
|
D | MetricsUtilsTest.java | 19 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/ |
D | TestLooperTest.java | 19 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/ |
D | ViewRootImplTest.java | 19 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()
|
D | DisplayCutoutTest.java | 23 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/ |
D | DisplayPolicyInsetsTests.java | 24 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/ |
D | InputMethodInfoTest.java | 19 import static org.hamcrest.CoreMatchers.equalTo; 49 assertThat(clone.hashCode(), equalTo(imi.hashCode())); in testEqualsAndHashCode()
|
/frameworks/base/core/tests/coretests/src/android/view/accessibility/ |
D | AccessibilityNodeInfoTest.java | 22 import static org.hamcrest.Matchers.equalTo; 136 assertThat(unparceledNode.getText(), equalTo(text)); in testEmptyListOfActions_parcelsCorrectly()
|
/frameworks/av/media/codec2/components/gsm/ |
D | C2SoftGsmDec.cpp | 61 .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/ |
D | TileQueryHelperTest.java | 20 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/ |
D | C2SoftAmrDec.cpp | 77 .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()
|
D | C2SoftAmrNbEnc.cpp | 62 .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/ |
D | EditorCursorTest.java | 28 import static org.hamcrest.Matchers.equalTo; 210 latch.await(10, TimeUnit.SECONDS), equalTo(true)); in setEditTextProperties()
|
/frameworks/av/media/codec2/components/g711/ |
D | C2SoftG711Dec.cpp | 77 .withFields({C2F(mChannelCount, value).equalTo(1)}) in IntfImpl() 84 .withFields({C2F(mBitrate, value).equalTo(64000)}) in IntfImpl()
|