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

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

Issue 1220133003: Fixed all unused-variable Clang warnings on Windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@iaccessible2-fix-gn
Patch Set: Rebase. Created 5 years, 5 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
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 "base/basictypes.h" 5 #include "base/basictypes.h"
6 #include "base/strings/string_number_conversions.h" 6 #include "base/strings/string_number_conversions.h"
7 #include "device/bluetooth/bluetooth_service_record_win.h" 7 #include "device/bluetooth/bluetooth_service_record_win.h"
8 #include "device/bluetooth/bluetooth_uuid.h" 8 #include "device/bluetooth/bluetooth_uuid.h"
9 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
10 10
11 namespace { 11 namespace {
12 12
13 const char kTestNoRfcommSdpBytes[] = 13 const char kTestNoRfcommSdpBytes[] =
14 "35510900000a00010001090001350319110a09000435103506190100090019350619001909" 14 "35510900000a00010001090001350319110a09000435103506190100090019350619001909"
15 "010209000535031910020900093508350619110d090102090100250c417564696f20536f75" 15 "010209000535031910020900093508350619110d090102090100250c417564696f20536f75"
16 "726365090311090001"; 16 "726365090311090001";
17 const int kTestNoRfcommSdpBytesSize = sizeof(kTestNoRfcommSdpBytes) / 2;
18 const device::BluetoothUUID kTestNoRfcommSdpUuid("110a"); 17 const device::BluetoothUUID kTestNoRfcommSdpUuid("110a");
19 18
20 const char kTestRfcommSdpBytes[] = 19 const char kTestRfcommSdpBytes[] =
21 "354b0900000a000100030900013506191112191203090004350c3503190100350519000308" 20 "354b0900000a000100030900013506191112191203090004350c3503190100350519000308"
22 "0b090005350319100209000935083506191108090100090100250d566f6963652047617465" 21 "0b090005350319100209000935083506191108090100090100250d566f6963652047617465"
23 "776179"; 22 "776179";
24 const int kTestRfcommSdpBytesSize = sizeof(kTestRfcommSdpBytes) / 2;
25 const device::BluetoothUUID kTestRfcommSdpUuid("1112"); 23 const device::BluetoothUUID kTestRfcommSdpUuid("1112");
26 const int kTestRfcommChannel = 11; 24 const int kTestRfcommChannel = 11;
27 25
28 } // namespace 26 } // namespace
29 27
30 namespace device { 28 namespace device {
31 29
32 class BluetoothServiceRecordWinTest : public testing::Test { 30 class BluetoothServiceRecordWinTest : public testing::Test {
33 protected: 31 protected:
34 void ConvertSdpBytes(const char* sdp_hex_char, 32 void ConvertSdpBytes(const char* sdp_hex_char,
(...skipping 24 matching lines...) Expand all
59 57
60 TEST_F(BluetoothServiceRecordWinTest, BthAddr) { 58 TEST_F(BluetoothServiceRecordWinTest, BthAddr) {
61 std::vector<uint8> sdp_bytes_array; 59 std::vector<uint8> sdp_bytes_array;
62 ConvertSdpBytes(kTestRfcommSdpBytes, &sdp_bytes_array); 60 ConvertSdpBytes(kTestRfcommSdpBytes, &sdp_bytes_array);
63 BluetoothServiceRecordWin service_record( 61 BluetoothServiceRecordWin service_record(
64 "01:02:03:0A:10:A0", "Sdp", sdp_bytes_array, BluetoothUUID()); 62 "01:02:03:0A:10:A0", "Sdp", sdp_bytes_array, BluetoothUUID());
65 EXPECT_EQ(1108152553632, service_record.device_bth_addr()); 63 EXPECT_EQ(1108152553632, service_record.device_bth_addr());
66 } 64 }
67 65
68 } // namespace device 66 } // namespace device
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698