Convert new tests to Swift Testing

This commit is contained in:
islam
2025-10-15 01:25:48 +01:00
parent 91040f7ed4
commit b4e2746be6
2 changed files with 20 additions and 33 deletions
@@ -68,10 +68,8 @@ struct BinaryProtocolTests {
let encodedData = try #require(BinaryProtocol.encode(packet), "Failed to encode packet with large payload")
// The encoded size should be smaller than uncompressed due to compression
guard let headerSize = BinaryProtocol.headerSize(for: packet.version) else {
XCTFail("Invalid version")
return
}
let headerSize = try #require(BinaryProtocol.headerSize(for: packet.version), "Invalid version")
let uncompressedSize = headerSize + BinaryProtocol.senderIDSize + largePayload.count
#expect(encodedData.count < uncompressedSize)