Skip to content

Commit

Permalink
Updated unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
colemancda committed Aug 15, 2018
1 parent 4268909 commit 4db1da9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
1 change: 0 additions & 1 deletion Sources/GAPData.swift
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,6 @@ public struct GAPDataDecoder {
value = Data()
}


elements.append(GAPDataElement(type: type, value: value))
}

Expand Down
8 changes: 4 additions & 4 deletions Tests/BluetoothTests/HCITests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -655,9 +655,9 @@ final class HCITests: XCTestCase {
XCTAssertEqual(report.rssi.rawValue, -45)
XCTAssertEqual(report.responseData.count, 0x16)

let advertisingData: [UInt8] = [0x02, 0x01, 0x1A, 0x07, 0x03, 0x03, 0x18, 0x04, 0x18, 0x02, 0x18, 0x0A, 0x09, 0x50, 0x72, 0x6F, 0x78, 0x69, 0x6D, 0x69, 0x74, 0x79]
let advertisingData: LowEnergyAdvertisingData = [0x02, 0x01, 0x1A, 0x07, 0x03, 0x03, 0x18, 0x04, 0x18, 0x02, 0x18, 0x0A, 0x09, 0x50, 0x72, 0x6F, 0x78, 0x69, 0x6D, 0x69, 0x74, 0x79]

XCTAssertEqual(report.responseData, Data(advertisingData))
XCTAssertEqual(report.responseData, advertisingData)
}

do {
Expand Down Expand Up @@ -687,7 +687,7 @@ final class HCITests: XCTestCase {
XCTAssertEqual(report.addressType, .public)
XCTAssertEqual(report.event, .scanResponse)
XCTAssertEqual(report.rssi.rawValue, -44)
XCTAssertEqual(report.responseData, Data())
XCTAssertEqual(report.responseData.data, Data())
}

do {
Expand Down Expand Up @@ -720,7 +720,7 @@ final class HCITests: XCTestCase {
XCTAssertEqual(report.event, .scanResponse)
XCTAssertEqual(report.rssi.rawValue, -70)
XCTAssertEqual(report.responseData.count, 0x0C)
XCTAssertEqual(report.responseData, Data([0x0B, 0x09, 0x42, 0x6C, 0x75, 0x65, 0x5A, 0x20, 0x35, 0x2E, 0x34, 0x33]))
XCTAssertEqual(report.responseData, [0x0B, 0x09, 0x42, 0x6C, 0x75, 0x65, 0x5A, 0x20, 0x35, 0x2E, 0x34, 0x33])

}
}
Expand Down

0 comments on commit 4db1da9

Please sign in to comment.