Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(159)

Side by Side Diff: device/bluetooth/bluetooth_utils_unittest.cc

Issue 11075006: Moved bluetooth adapter files to device/bluetooth/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 <bluetooth/bluetooth.h> 5 #include <bluetooth/bluetooth.h>
6 6
7 #include "chrome/browser/chromeos/bluetooth/bluetooth_utils.h" 7 #include "device/bluetooth/bluetooth_utils.h"
8 #include "testing/gtest/include/gtest/gtest.h" 8 #include "testing/gtest/include/gtest/gtest.h"
9 9
10 namespace chromeos { 10 namespace device_bluetooth {
11 11
12 TEST(BluetoothUtilsTest, str2ba) { 12 TEST(BluetoothUtilsTest, str2ba) {
13 bdaddr_t bluetooth_address; 13 bdaddr_t bluetooth_address;
14 14
15 EXPECT_TRUE(bluetooth_utils::str2ba("01:02:03:0A:10:A0", &bluetooth_address)); 15 EXPECT_TRUE(bluetooth_utils::str2ba("01:02:03:0A:10:A0", &bluetooth_address));
16 EXPECT_EQ(1, bluetooth_address.b[5]); 16 EXPECT_EQ(1, bluetooth_address.b[5]);
17 EXPECT_EQ(2, bluetooth_address.b[4]); 17 EXPECT_EQ(2, bluetooth_address.b[4]);
18 EXPECT_EQ(3, bluetooth_address.b[3]); 18 EXPECT_EQ(3, bluetooth_address.b[3]);
19 EXPECT_EQ(10, bluetooth_address.b[2]); 19 EXPECT_EQ(10, bluetooth_address.b[2]);
20 EXPECT_EQ(16, bluetooth_address.b[1]); 20 EXPECT_EQ(16, bluetooth_address.b[1]);
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 EXPECT_EQ("00001101-0000-1000-8000-00805f9b34fb", 62 EXPECT_EQ("00001101-0000-1000-8000-00805f9b34fb",
63 bluetooth_utils::CanonicalUuid("00001101")); 63 bluetooth_utils::CanonicalUuid("00001101"));
64 EXPECT_EQ("00001101-0000-1000-8000-00805f9b34fb", 64 EXPECT_EQ("00001101-0000-1000-8000-00805f9b34fb",
65 bluetooth_utils::CanonicalUuid("0x00001101")); 65 bluetooth_utils::CanonicalUuid("0x00001101"));
66 66
67 // No 0x prefix on 36 character 67 // No 0x prefix on 36 character
68 EXPECT_EQ("", 68 EXPECT_EQ("",
69 bluetooth_utils::CanonicalUuid("0x00001101-0000-1000-8000-00805f9b34fb")); 69 bluetooth_utils::CanonicalUuid("0x00001101-0000-1000-8000-00805f9b34fb"));
70 } 70 }
71 71
72 } // namespace chromeos 72 } // namespace device_bluetooth
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698