HexConversionTests.swift 501 B

1234567891011121314151617181920
  1. //
  2. // HexConversionTests.swift
  3. // OmniBLE
  4. //
  5. // Created by Bill Gestrich on 12/11/21.
  6. // Copyright © 2021 LoopKit Authors. All rights reserved.
  7. //
  8. import XCTest
  9. @testable import OmniBLE
  10. class HexConversionTests: XCTestCase {
  11. func testConversion(){
  12. let hexString = "00,01,54,57,10,23,03,00,00,c0,ff,ff,ff,fe,08,20,2e,a8,50,30".replacingOccurrences(of: ",", with: "")
  13. let f1 = Data(hexadecimalString: hexString)!
  14. assert(f1.hexadecimalString == hexString)
  15. }
  16. }