mirror of
https://github.com/permissionlesstech/bitchat.git
synced 2026-07-25 20:05:19 +00:00
Raise protocol coverage to 99 percent (#1058)
* Expand protocol coverage with edge-case tests * Stabilize read receipt transport test * Stabilize BLE duplicate packet test --------- Co-authored-by: jack <jackjackbits@users.noreply.github.com>
This commit is contained in:
@@ -44,4 +44,12 @@ struct LocationChannelsTests {
|
||||
let id2 = try idBridge.deriveIdentity(forGeohash: gh)
|
||||
#expect(id1.publicKeyHex == id2.publicKeyHex)
|
||||
}
|
||||
|
||||
@Test func geohashNeighborsNearPoleSkipOutOfBoundsCells() {
|
||||
let nearPole = Geohash.encode(latitude: 89.9999, longitude: 0.0, precision: 8)
|
||||
let neighbors = Geohash.neighbors(of: nearPole)
|
||||
|
||||
#expect(neighbors.isEmpty == false)
|
||||
#expect(neighbors.count < 8)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user