Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "components/proximity_auth/proximity_auth_system.h" | |
| 6 #include "testing/gtest/include/gtest/gtest.h" | |
| 7 | |
| 8 namespace proximity_auth { | |
| 9 | |
| 10 TEST(ProximityAuthSystemTest, GetRemoteDevices) { | |
| 11 RemoteDevice device1 = { "device 1" }; | |
| 12 RemoteDevice device2 = { "device 2" }; | |
| 13 | |
| 14 RemoteDeviceList device_list; | |
| 15 device_list.push_back(device1); | |
| 16 device_list.push_back(device2); | |
| 17 | |
| 18 ProximityAuthSystem system(device_list); | |
| 19 | |
| 20 const RemoteDeviceList& returned_list = system.GetRemoteDevices(); | |
| 21 EXPECT_EQ(2u, returned_list.size()); | |
|
Ilya Sherman
2014/08/27 03:18:33
nit: This should be an ASSERT_EQ, as otherwise the
Tim Song
2014/08/27 19:40:05
Done.
| |
| 22 EXPECT_EQ(device1.name, returned_list[0].name); | |
| 23 EXPECT_EQ(device2.name, returned_list[1].name); | |
| 24 } | |
| 25 | |
| 26 } // namespace proximity_auth | |
| OLD | NEW |