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

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

Issue 663673002: Convert the few remaining ARRAYSIZE_UNSAFE -> arraysize. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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
« no previous file with comments | « crypto/hmac_unittest.cc ('k') | device/hid/hid_report_descriptor_unittest.cc » ('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 "base/macros.h" 5 #include "base/macros.h"
6 #include "device/bluetooth/bluetooth_uuid.h" 6 #include "device/bluetooth/bluetooth_uuid.h"
7 #include "testing/gtest/include/gtest/gtest.h" 7 #include "testing/gtest/include/gtest/gtest.h"
8 8
9 namespace device { 9 namespace device {
10 10
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 { "1ABC", k16Bit }, 88 { "1ABC", k16Bit },
89 { "1aBc", k16Bit }, 89 { "1aBc", k16Bit },
90 { "00001abc", k32Bit }, 90 { "00001abc", k32Bit },
91 { "00001ABC", k32Bit }, 91 { "00001ABC", k32Bit },
92 { "00001aBc", k32Bit }, 92 { "00001aBc", k32Bit },
93 { "00001abc-0000-1000-8000-00805f9b34fb", k128Bit }, 93 { "00001abc-0000-1000-8000-00805f9b34fb", k128Bit },
94 { "00001ABC-0000-1000-8000-00805F9B34FB", k128Bit }, 94 { "00001ABC-0000-1000-8000-00805F9B34FB", k128Bit },
95 { "00001aBc-0000-1000-8000-00805F9b34fB", k128Bit }, 95 { "00001aBc-0000-1000-8000-00805F9b34fB", k128Bit },
96 }; 96 };
97 97
98 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(test_cases); ++i) { 98 for (size_t i = 0; i < arraysize(test_cases); ++i) {
99 SCOPED_TRACE("Input UUID: " + test_cases[i].input_uuid); 99 SCOPED_TRACE("Input UUID: " + test_cases[i].input_uuid);
100 BluetoothUUID uuid(test_cases[i].input_uuid); 100 BluetoothUUID uuid(test_cases[i].input_uuid);
101 EXPECT_TRUE(uuid.IsValid()); 101 EXPECT_TRUE(uuid.IsValid());
102 EXPECT_EQ(test_cases[i].expected_value, uuid.value()); 102 EXPECT_EQ(test_cases[i].expected_value, uuid.value());
103 EXPECT_EQ(k128Bit, uuid.canonical_value()); 103 EXPECT_EQ(k128Bit, uuid.canonical_value());
104 } 104 }
105 } 105 }
106 106
107 } // namespace device 107 } // namespace device
OLDNEW
« no previous file with comments | « crypto/hmac_unittest.cc ('k') | device/hid/hid_report_descriptor_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698