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

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

Issue 1542163002: Switch to standard integer types in device/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: win Created 5 years 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
« no previous file with comments | « device/bluetooth/bluetooth_uuid.cc ('k') | device/bluetooth/dbus/bluetooth_adapter_client.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 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 <stddef.h>
6
5 #include "base/macros.h" 7 #include "base/macros.h"
6 #include "device/bluetooth/bluetooth_uuid.h" 8 #include "device/bluetooth/bluetooth_uuid.h"
7 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
8 10
9 namespace device { 11 namespace device {
10 12
11 TEST(BluetoothUUIDTest, BluetoothUUID) { 13 TEST(BluetoothUUIDTest, BluetoothUUID) {
12 const char kValid128Bit0[] = "12345678-1234-5678-9abc-def123456789"; 14 const char kValid128Bit0[] = "12345678-1234-5678-9abc-def123456789";
13 const char kValid128Bit1[] = "00001101-0000-1000-8000-00805f9b34fb"; 15 const char kValid128Bit1[] = "00001101-0000-1000-8000-00805f9b34fb";
14 const char kInvalid36Char0[] = "1234567-1234-5678-9abc-def123456789"; 16 const char kInvalid36Char0[] = "1234567-1234-5678-9abc-def123456789";
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 for (size_t i = 0; i < arraysize(test_cases); ++i) { 100 for (size_t i = 0; i < arraysize(test_cases); ++i) {
99 SCOPED_TRACE("Input UUID: " + test_cases[i].input_uuid); 101 SCOPED_TRACE("Input UUID: " + test_cases[i].input_uuid);
100 BluetoothUUID uuid(test_cases[i].input_uuid); 102 BluetoothUUID uuid(test_cases[i].input_uuid);
101 EXPECT_TRUE(uuid.IsValid()); 103 EXPECT_TRUE(uuid.IsValid());
102 EXPECT_EQ(test_cases[i].expected_value, uuid.value()); 104 EXPECT_EQ(test_cases[i].expected_value, uuid.value());
103 EXPECT_EQ(k128Bit, uuid.canonical_value()); 105 EXPECT_EQ(k128Bit, uuid.canonical_value());
104 } 106 }
105 } 107 }
106 108
107 } // namespace device 109 } // namespace device
OLDNEW
« no previous file with comments | « device/bluetooth/bluetooth_uuid.cc ('k') | device/bluetooth/dbus/bluetooth_adapter_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698