[RTT] Add sanity checks for RTT ranging results
Add checks to validate that the reported number of measurements and of successes is reasonable: non-zero for successful results. Bug: 79879905 Test: 'atest WifiRttTest' passes Change-Id: Ie79b10edacb660dd8c5d116539a4ee5cc32a779d
This commit is contained in:
@@ -165,6 +165,10 @@ public class WifiRttTest extends TestBase {
|
||||
(distanceMax - distanceAvg) <= MAX_VARIATION_FROM_AVERAGE_DISTANCE_MM);
|
||||
assertTrue("Wi-Fi RTT: Variation (min direction) exceeds threshold",
|
||||
(distanceAvg - distanceMin) <= MAX_VARIATION_FROM_AVERAGE_DISTANCE_MM);
|
||||
for (int i = 0; i < numGoodResults; ++i) {
|
||||
assertNotSame("Number of attempted measurements is 0", 0, numAttempted[i]);
|
||||
assertNotSame("Number of successful measurements is 0", 0, numSuccessful[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user