From df35d3660ceb3741f0e34148df1642c6881b8fa4 Mon Sep 17 00:00:00 2001 From: Alsey Coleman Miller Date: Sun, 12 Aug 2018 01:28:45 -0500 Subject: [PATCH] Updated unit tests --- Tests/BluetoothTests/iBeaconTests.swift | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/Tests/BluetoothTests/iBeaconTests.swift b/Tests/BluetoothTests/iBeaconTests.swift index 89e027072..4d6f9f4af 100644 --- a/Tests/BluetoothTests/iBeaconTests.swift +++ b/Tests/BluetoothTests/iBeaconTests.swift @@ -112,6 +112,28 @@ final class iBeaconTests: XCTestCase { let hostController = TestHostController() + /** + SEND [200A] LE Set Advertise Enable - 0x00 + [200A] Opcode: 0x200A (OGF: 0x08 OCF: 0x0A) + Parameter Length: 1 (0x01) + Advertising Enable: 00 + */ + + hostController.queue.append( + .command(HCILowEnergyCommand.setAdvertiseEnable.opcode, + [0x0a, 0x20, 0x01, 0x00] + ) + ) + + /** + RECV Command Complete [200A] - LE Set Advertise Enable + Parameter Length: 4 (0x04) + Status: 0x00 - Success + Num HCI Command Packets: 0x01 + Opcode: 0x200A (OGF: 0x08 OCF: 0x0A) - [Low Energy] LE Set Advertise Enable + */ + hostController.queue.append(.event([0x0e, 0x04, 0x01, 0x0a, 0x20, 0x00])) + // LE Set Advertising Parameters (15 bytes) hostController.queue.append( .command(HCILowEnergyCommand.setAdvertisingParameters.opcode,