diff --git a/Tests/_CryptoExtrasTests/Utils/BytesUtil.swift b/Tests/_CryptoExtrasTests/Utils/BytesUtil.swift index a01b0db9..dfbf64e8 100644 --- a/Tests/_CryptoExtrasTests/Utils/BytesUtil.swift +++ b/Tests/_CryptoExtrasTests/Utils/BytesUtil.swift @@ -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") + } +}