Skip to content

Commit

Permalink
Fix broken DataProtocol.hexString test utility (#230)
Browse files Browse the repository at this point in the history
  • Loading branch information
simonjbeaumont authored May 21, 2024
1 parent bc1c292 commit c36d19a
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion Tests/_CryptoExtrasTests/Utils/BytesUtil.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
//
//===----------------------------------------------------------------------===//
import Foundation
import XCTest

enum ByteHexEncodingErrors: Error {
case incorrectHexValue
Expand Down Expand Up @@ -70,7 +71,7 @@ extension DataProtocol {
offset += 1
}
}
count = offset
count = offset * 2
}
return String(decoding: bytes, as: UTF8.self)
}
Expand Down Expand Up @@ -100,3 +101,9 @@ extension Data {
}

}

final class BytesUtilTests: XCTestCase {
func testHexStringUtils() throws {
XCTAssertEqual(try Data(hexString: "deadbeef").hexString, "deadbeef")
}
}

0 comments on commit c36d19a

Please sign in to comment.