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

Unified Diff: device/usb/usb_descriptors_unittest.cc

Issue 1874313002: Convert device to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « device/usb/usb_descriptors.cc ('k') | device/usb/usb_device.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/usb/usb_descriptors_unittest.cc
diff --git a/device/usb/usb_descriptors_unittest.cc b/device/usb/usb_descriptors_unittest.cc
index 560ac3715df0512843a27eee9fd01527a7ba0d01..2dfed560617ee0dd21bd0f0ab645491f812006e8 100644
--- a/device/usb/usb_descriptors_unittest.cc
+++ b/device/usb/usb_descriptors_unittest.cc
@@ -2,12 +2,15 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "device/usb/usb_descriptors.h"
+
#include <stdint.h>
+#include <memory>
+
#include "base/bind.h"
#include "base/strings/utf_string_conversions.h"
#include "device/usb/mock_usb_device_handle.h"
-#include "device/usb/usb_descriptors.h"
#include "testing/gtest/include/gtest/gtest.h"
using testing::_;
@@ -23,7 +26,7 @@ ACTION_P2(InvokeCallback, data, length) {
}
void ExpectStringDescriptors(
- scoped_ptr<std::map<uint8_t, base::string16>> string_map) {
+ std::unique_ptr<std::map<uint8_t, base::string16>> string_map) {
EXPECT_EQ(3u, string_map->size());
EXPECT_EQ(base::ASCIIToUTF16("String 1"), (*string_map)[1]);
EXPECT_EQ(base::ASCIIToUTF16("String 2"), (*string_map)[2]);
@@ -181,7 +184,7 @@ TEST_F(UsbDescriptorsTest, OneByteStringDescriptor) {
}
TEST_F(UsbDescriptorsTest, ReadStringDescriptors) {
- scoped_ptr<std::map<uint8_t, base::string16>> string_map(
+ std::unique_ptr<std::map<uint8_t, base::string16>> string_map(
new std::map<uint8_t, base::string16>());
(*string_map)[1] = base::string16();
(*string_map)[2] = base::string16();
« no previous file with comments | « device/usb/usb_descriptors.cc ('k') | device/usb/usb_device.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698