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

Side by Side Diff: device/usb/usb_ids_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 4 years, 12 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 | « device/usb/usb_ids.h ('k') | device/usb/usb_service.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 (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 <stdint.h>
6
5 #include <string> 7 #include <string>
6 8
7 #include "device/usb/usb_ids.h" 9 #include "device/usb/usb_ids.h"
8 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
9 11
10 namespace { 12 namespace {
11 13
12 static const uint16_t kGoogleVendorId = 0x18d1; 14 static const uint16_t kGoogleVendorId = 0x18d1;
13 static const uint16_t kNexusSProductId = 0x4e21; 15 static const uint16_t kNexusSProductId = 0x4e21;
14 16
15 } // namespace 17 } // namespace
16 18
17 namespace device { 19 namespace device {
18 20
19 TEST(UsbIdsTest, GetVendorName) { 21 TEST(UsbIdsTest, GetVendorName) {
20 EXPECT_EQ(NULL, UsbIds::GetVendorName(0)); 22 EXPECT_EQ(NULL, UsbIds::GetVendorName(0));
21 EXPECT_EQ(std::string("Google Inc."), UsbIds::GetVendorName(kGoogleVendorId)); 23 EXPECT_EQ(std::string("Google Inc."), UsbIds::GetVendorName(kGoogleVendorId));
22 } 24 }
23 25
24 TEST(UsbIdsTest, GetProductName) { 26 TEST(UsbIdsTest, GetProductName) {
25 EXPECT_EQ(NULL, UsbIds::GetProductName(0, 0)); 27 EXPECT_EQ(NULL, UsbIds::GetProductName(0, 0));
26 EXPECT_EQ(NULL, UsbIds::GetProductName(kGoogleVendorId, 0)); 28 EXPECT_EQ(NULL, UsbIds::GetProductName(kGoogleVendorId, 0));
27 EXPECT_EQ(std::string("Nexus S"), UsbIds::GetProductName(kGoogleVendorId, 29 EXPECT_EQ(std::string("Nexus S"), UsbIds::GetProductName(kGoogleVendorId,
28 kNexusSProductId)); 30 kNexusSProductId));
29 } 31 }
30 32
31 } // namespace device 33 } // namespace device
OLDNEW
« no previous file with comments | « device/usb/usb_ids.h ('k') | device/usb/usb_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698