Skip to content

Commit

Permalink
Updated unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
colemancda committed Dec 4, 2017
1 parent 0521b36 commit b331fec
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions Tests/BluetoothTests/AttributeProtocolTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -166,11 +166,8 @@ final class AttributeProtocolTests: XCTestCase {
XCTAssert(pdu.data[0].value == [0xC7, 0xA8, 0xD5, 0x70, 0xE0, 0x23, 0x4F, 0xB8, 0xE5, 0x11, 0x72, 0xF9, 0xE2, 0x4F, 0xF1, 0x60]) // proper little endian representation
XCTAssert(pdu.data[0].value != [0x60, 0xF1, 0x4F, 0xE2, 0xF9, 0x72, 0x11, 0xE5, 0xB8, 0x4F, 0x23, 0xE0, 0x70, 0xD5, 0xA8, 0xC7]) // invalid data
XCTAssert(Data(pdu.data[0].value) == BluetoothUUID(rawValue: uuidString)!.littleEndian.data)
//XCTAssert(BluetoothUUID(littleEndian:
// BluetoothUUID(data: Data(pdu.data[0].value))!)!.rawValue == uuidString)

//print(BluetoothUUID.bit128(UUID.init(uuidString: uuidString)!).littleEndian.data.map { $0.toHexadecimal() })
print(pdu.data[0].value.map { $0.toHexadecimal() })
XCTAssert(BluetoothUUID(littleEndian:
BluetoothUUID(data: Data(pdu.data[0].value))!).rawValue == uuidString)
}
}
}

0 comments on commit b331fec

Please sign in to comment.