| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include <stdint.h> |
| 6 |
| 5 #include "device/bluetooth/bluetooth_advertisement.h" | 7 #include "device/bluetooth/bluetooth_advertisement.h" |
| 6 #include "testing/gtest/include/gtest/gtest.h" | 8 #include "testing/gtest/include/gtest/gtest.h" |
| 7 | 9 |
| 8 namespace device { | 10 namespace device { |
| 9 | 11 |
| 10 namespace { | 12 namespace { |
| 11 | 13 |
| 12 TEST(BluetoothAdvertisementTest, DataMembersAreAssignedCorrectly) { | 14 TEST(BluetoothAdvertisementTest, DataMembersAreAssignedCorrectly) { |
| 13 // Sample manufacturer data. | 15 // Sample manufacturer data. |
| 14 BluetoothAdvertisement::ManufacturerData manufacturer_data; | 16 BluetoothAdvertisement::ManufacturerData manufacturer_data; |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 make_scoped_ptr(new BluetoothAdvertisement::ServiceData(service_data))); | 63 make_scoped_ptr(new BluetoothAdvertisement::ServiceData(service_data))); |
| 62 // Retrieve Service Data. | 64 // Retrieve Service Data. |
| 63 ASSERT_EQ(*data.service_data(), service_data); | 65 ASSERT_EQ(*data.service_data(), service_data); |
| 64 // Retrieve again. | 66 // Retrieve again. |
| 65 ASSERT_FALSE(data.service_data().get()); | 67 ASSERT_FALSE(data.service_data().get()); |
| 66 } | 68 } |
| 67 | 69 |
| 68 } // namespace | 70 } // namespace |
| 69 | 71 |
| 70 } // namespace device | 72 } // namespace device |
| OLD | NEW |