TransmitterIDTests.swift 461 B

123456789101112131415161718192021
  1. //
  2. // TransmitterIDTests.swift
  3. // xDripG5Tests
  4. //
  5. // Copyright © 2018 LoopKit Authors. All rights reserved.
  6. //
  7. import XCTest
  8. @testable import CGMBLEKit
  9. class TransmitterIDTests: XCTestCase {
  10. /// Sanity check the hash computation path
  11. func testComputeHash() {
  12. let id = TransmitterID(id: "123456")
  13. XCTAssertEqual("e60d4a7999b0fbb2", id.computeHash(of: Data(hexadecimalString: "0123456789abcdef")!)!.hexadecimalString)
  14. }
  15. }