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

Side by Side Diff: base/file_path_unittest.cc

Issue 10004001: Add virtual and OVERRIDE to base/ implementation files (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Win Fix -> Missing header Created 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « base/file_descriptor_shuffle_unittest.cc ('k') | base/file_util_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 (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 "base/basictypes.h" 5 #include "base/basictypes.h"
6 #include "base/file_path.h" 6 #include "base/file_path.h"
7 #include "base/file_util.h" 7 #include "base/file_util.h"
8 #include "base/utf_string_conversions.h" 8 #include "base/utf_string_conversions.h"
9 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
10 #include "testing/platform_test.h" 10 #include "testing/platform_test.h"
(...skipping 28 matching lines...) Expand all
39 39
40 struct UTF8TestData { 40 struct UTF8TestData {
41 const FilePath::CharType* native; 41 const FilePath::CharType* native;
42 const char* utf8; 42 const char* utf8;
43 }; 43 };
44 44
45 // file_util winds up using autoreleased objects on the Mac, so this needs 45 // file_util winds up using autoreleased objects on the Mac, so this needs
46 // to be a PlatformTest 46 // to be a PlatformTest
47 class FilePathTest : public PlatformTest { 47 class FilePathTest : public PlatformTest {
48 protected: 48 protected:
49 virtual void SetUp() { 49 virtual void SetUp() OVERRIDE {
50 PlatformTest::SetUp(); 50 PlatformTest::SetUp();
51 } 51 }
52 virtual void TearDown() { 52 virtual void TearDown() OVERRIDE {
53 PlatformTest::TearDown(); 53 PlatformTest::TearDown();
54 } 54 }
55 }; 55 };
56 56
57 TEST_F(FilePathTest, DirName) { 57 TEST_F(FilePathTest, DirName) {
58 const struct UnaryTestData cases[] = { 58 const struct UnaryTestData cases[] = {
59 { FPL(""), FPL(".") }, 59 { FPL(""), FPL(".") },
60 { FPL("aa"), FPL(".") }, 60 { FPL("aa"), FPL(".") },
61 { FPL("/aa/bb"), FPL("/aa") }, 61 { FPL("/aa/bb"), FPL("/aa") },
62 { FPL("/aa/bb/"), FPL("/aa") }, 62 { FPL("/aa/bb/"), FPL("/aa") },
(...skipping 1047 matching lines...) Expand 10 before | Expand all | Expand 10 after
1110 }; 1110 };
1111 for (size_t i = 0; i < arraysize(cases); ++i) { 1111 for (size_t i = 0; i < arraysize(cases); ++i) {
1112 FilePath input(cases[i].input); 1112 FilePath input(cases[i].input);
1113 FilePath observed = input.NormalizePathSeparators(); 1113 FilePath observed = input.NormalizePathSeparators();
1114 EXPECT_EQ(FilePath::StringType(cases[i].expected), observed.value()) << 1114 EXPECT_EQ(FilePath::StringType(cases[i].expected), observed.value()) <<
1115 "i: " << i << ", input: " << input.value(); 1115 "i: " << i << ", input: " << input.value();
1116 } 1116 }
1117 } 1117 }
1118 1118
1119 #endif 1119 #endif
OLDNEW
« no previous file with comments | « base/file_descriptor_shuffle_unittest.cc ('k') | base/file_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698