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

Side by Side Diff: chrome/installer/mini_installer/mini_string_test.cc

Issue 1548153002: Switch to standard integer types in chrome/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 <windows.h> 5 #include <windows.h>
6 #include <stddef.h>
6 #include <stdlib.h> 7 #include <stdlib.h>
7 8
8 #include <string> 9 #include <string>
9 10
10 #include "base/basictypes.h"
11 #include "chrome/installer/mini_installer/mini_string.h" 11 #include "chrome/installer/mini_installer/mini_string.h"
12 #include "testing/gtest/include/gtest/gtest.h" 12 #include "testing/gtest/include/gtest/gtest.h"
13 13
14 using mini_installer::StackString; 14 using mini_installer::StackString;
15 15
16 namespace { 16 namespace {
17 class MiniInstallerStringTest : public testing::Test { 17 class MiniInstallerStringTest : public testing::Test {
18 protected: 18 protected:
19 void SetUp() override {} 19 void SetUp() override {}
20 void TearDown() override {} 20 void TearDown() override {}
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 67
68 StackString<MAX_PATH> str; 68 StackString<MAX_PATH> str;
69 EXPECT_TRUE(str.assign(kTestStringSource)); 69 EXPECT_TRUE(str.assign(kTestStringSource));
70 EXPECT_EQ(str.get(), str.findi(kTestStringSource)); 70 EXPECT_EQ(str.get(), str.findi(kTestStringSource));
71 EXPECT_EQ(static_cast<const wchar_t*>(NULL), str.findi(kTestStringNotFound)); 71 EXPECT_EQ(static_cast<const wchar_t*>(NULL), str.findi(kTestStringNotFound));
72 const wchar_t* found = str.findi(kTestStringFind); 72 const wchar_t* found = str.findi(kTestStringFind);
73 EXPECT_NE(static_cast<const wchar_t*>(NULL), found); 73 EXPECT_NE(static_cast<const wchar_t*>(NULL), found);
74 std::wstring check(found, _countof(kTestStringFind) - 1); 74 std::wstring check(found, _countof(kTestStringFind) - 1);
75 EXPECT_EQ(0, lstrcmpi(check.c_str(), kTestStringFind)); 75 EXPECT_EQ(0, lstrcmpi(check.c_str(), kTestStringFind));
76 } 76 }
OLDNEW
« no previous file with comments | « chrome/installer/mini_installer/mini_string.h ('k') | chrome/installer/mini_installer/pe_resource.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698