Fix broken DataProtocol.hexString test utility (#230)

This commit is contained in:
Si Beaumont authored and GitHub committed 2024-05-21 11:09:20 +01:00
1 parent bc1c29221f
commit c36d19a064
1 file changed
+8 -1
@@ -12,6 +12,7 @@
//
//===----------------------------------------------------------------------===//
import Foundation
import XCTest
enum ByteHexEncodingErrors: Error {
case incorrectHexValue
@@ -70,7 +71,7 @@ extension DataProtocol {
offset += 1
}
}
count = offset
count = offset * 2
}
return String(decoding: bytes, as: UTF8.self)
}
@@ -100,3 +101,9 @@ extension Data {
}
}
final class BytesUtilTests: XCTestCase {
func testHexStringUtils() throws {
XCTAssertEqual(try Data(hexString: "deadbeef").hexString, "deadbeef")
}
}