Commit 58d8871f authored by jlebel's avatar jlebel Committed by Commit bot

bluetooth: Adding #if and #endif around each tests

Adding #if and #endif to match our coding style.

BUG=

Review-Url: https://codereview.chromium.org/2863643003
Cr-Commit-Position: refs/heads/master@{#469495}
parent 99f1e6d5
...@@ -895,7 +895,9 @@ TEST_F(BluetoothTest, DiscoverConnectedLowEnergyDeviceWithNoFilter) { ...@@ -895,7 +895,9 @@ TEST_F(BluetoothTest, DiscoverConnectedLowEnergyDeviceWithNoFilter) {
EXPECT_EQ(2, observer.device_added_count()); EXPECT_EQ(2, observer.device_added_count());
EXPECT_EQ(2u, adapter_->GetDevices().size()); EXPECT_EQ(2u, adapter_->GetDevices().size());
} }
#endif // defined(OS_MACOSX)
#if defined(OS_MACOSX)
// Simulate two devices being connected before calling // Simulate two devices being connected before calling
// RetrieveGattConnectedDevicesWithDiscoveryFilter() with one service filter. // RetrieveGattConnectedDevicesWithDiscoveryFilter() with one service filter.
TEST_F(BluetoothTest, DiscoverConnectedLowEnergyDeviceWithFilter) { TEST_F(BluetoothTest, DiscoverConnectedLowEnergyDeviceWithFilter) {
...@@ -927,7 +929,9 @@ TEST_F(BluetoothTest, DiscoverConnectedLowEnergyDeviceWithFilter) { ...@@ -927,7 +929,9 @@ TEST_F(BluetoothTest, DiscoverConnectedLowEnergyDeviceWithFilter) {
EXPECT_EQ(1, observer.device_added_count()); EXPECT_EQ(1, observer.device_added_count());
EXPECT_EQ(1u, adapter_->GetDevices().size()); EXPECT_EQ(1u, adapter_->GetDevices().size());
} }
#endif // defined(OS_MACOSX)
#if defined(OS_MACOSX)
// Simulate two devices being connected before calling // Simulate two devices being connected before calling
// RetrieveGattConnectedDevicesWithDiscoveryFilter() with one service filter // RetrieveGattConnectedDevicesWithDiscoveryFilter() with one service filter
// that doesn't match. // that doesn't match.
...@@ -954,7 +958,9 @@ TEST_F(BluetoothTest, DiscoverConnectedLowEnergyDeviceWithWrongFilter) { ...@@ -954,7 +958,9 @@ TEST_F(BluetoothTest, DiscoverConnectedLowEnergyDeviceWithWrongFilter) {
EXPECT_EQ(0, observer.device_added_count()); EXPECT_EQ(0, observer.device_added_count());
EXPECT_EQ(0u, adapter_->GetDevices().size()); EXPECT_EQ(0u, adapter_->GetDevices().size());
} }
#endif // defined(OS_MACOSX)
#if defined(OS_MACOSX)
// Simulate two devices being connected before calling // Simulate two devices being connected before calling
// RetrieveGattConnectedDevicesWithDiscoveryFilter() with two service filters // RetrieveGattConnectedDevicesWithDiscoveryFilter() with two service filters
// that both match. // that both match.
...@@ -999,7 +1005,9 @@ TEST_F(BluetoothTest, DiscoverConnectedLowEnergyDeviceWithTwoFilters) { ...@@ -999,7 +1005,9 @@ TEST_F(BluetoothTest, DiscoverConnectedLowEnergyDeviceWithTwoFilters) {
EXPECT_EQ(2, observer.device_added_count()); EXPECT_EQ(2, observer.device_added_count());
EXPECT_EQ(2u, adapter_->GetDevices().size()); EXPECT_EQ(2u, adapter_->GetDevices().size());
} }
#endif // defined(OS_MACOSX)
#if defined(OS_MACOSX)
// Simulate two devices being connected before calling // Simulate two devices being connected before calling
// RetrieveGattConnectedDevicesWithDiscoveryFilter() with one service filter // RetrieveGattConnectedDevicesWithDiscoveryFilter() with one service filter
// that one match device, and then // that one match device, and then
......
...@@ -171,7 +171,9 @@ TEST_F(BluetoothRemoteGattServiceTest, ...@@ -171,7 +171,9 @@ TEST_F(BluetoothRemoteGattServiceTest,
EXPECT_EQ(service->GetCharacteristic(char_id1), EXPECT_EQ(service->GetCharacteristic(char_id1),
service->GetCharacteristic(char_id1)); service->GetCharacteristic(char_id1));
} }
#endif // defined(OS_ANDROID) || defined(OS_MACOSX) || defined(OS_WIN)
#if defined(OS_ANDROID) || defined(OS_MACOSX) || defined(OS_WIN)
TEST_F(BluetoothRemoteGattServiceTest, GetCharacteristicsByUUID) { TEST_F(BluetoothRemoteGattServiceTest, GetCharacteristicsByUUID) {
if (!PlatformSupportsLowEnergy()) { if (!PlatformSupportsLowEnergy()) {
LOG(WARNING) << "Low Energy Bluetooth unavailable, skipping unit test."; LOG(WARNING) << "Low Energy Bluetooth unavailable, skipping unit test.";
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment