diff options
author | thakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-09-25 20:09:00 +0000 |
---|---|---|
committer | thakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-09-25 20:09:00 +0000 |
commit | 2bf5a6a82f3ac8adbf25f57f0f3f7f2648842c2f (patch) | |
tree | 3a5778fb416aa101303b06bc73a96b63b87f779f /base/file_util_unittest.cc | |
parent | 5d4c422a0fbbc4393b4e816d4f0f3b6472cd0377 (diff) | |
download | chromium_src-2bf5a6a82f3ac8adbf25f57f0f3f7f2648842c2f.zip chromium_src-2bf5a6a82f3ac8adbf25f57f0f3f7f2648842c2f.tar.gz chromium_src-2bf5a6a82f3ac8adbf25f57f0f3f7f2648842c2f.tar.bz2 |
Clean up a few unused globals.
Found by clang's new -Wunused-const-variable.
BUG=290204
R=akalin@chromium.org, brettw@chromium.org, sergeyu@chromium.org, thestig@chromium.org
Review URL: https://codereview.chromium.org/24616002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@225235 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/file_util_unittest.cc')
-rw-r--r-- | base/file_util_unittest.cc | 102 |
1 files changed, 0 insertions, 102 deletions
diff --git a/base/file_util_unittest.cc b/base/file_util_unittest.cc index 787b6d5..1ca70b4 100644 --- a/base/file_util_unittest.cc +++ b/base/file_util_unittest.cc @@ -244,108 +244,6 @@ uint64 FileTimeAsUint64(const FILETIME& ft) { } #endif -const struct append_case { - const wchar_t* path; - const wchar_t* ending; - const wchar_t* result; -} append_cases[] = { -#if defined(OS_WIN) - {L"c:\\colon\\backslash", L"path", L"c:\\colon\\backslash\\path"}, - {L"c:\\colon\\backslash\\", L"path", L"c:\\colon\\backslash\\path"}, - {L"c:\\colon\\backslash\\\\", L"path", L"c:\\colon\\backslash\\\\path"}, - {L"c:\\colon\\backslash\\", L"", L"c:\\colon\\backslash\\"}, - {L"c:\\colon\\backslash", L"", L"c:\\colon\\backslash\\"}, - {L"", L"path", L"\\path"}, - {L"", L"", L"\\"}, -#elif defined(OS_POSIX) - {L"/foo/bar", L"path", L"/foo/bar/path"}, - {L"/foo/bar/", L"path", L"/foo/bar/path"}, - {L"/foo/bar//", L"path", L"/foo/bar//path"}, - {L"/foo/bar/", L"", L"/foo/bar/"}, - {L"/foo/bar", L"", L"/foo/bar/"}, - {L"", L"path", L"/path"}, - {L"", L"", L"/"}, -#endif -}; - -static const struct filename_case { - const wchar_t* path; - const wchar_t* filename; -} filename_cases[] = { -#if defined(OS_WIN) - {L"c:\\colon\\backslash", L"backslash"}, - {L"c:\\colon\\backslash\\", L""}, - {L"\\\\filename.exe", L"filename.exe"}, - {L"filename.exe", L"filename.exe"}, - {L"", L""}, - {L"\\\\\\", L""}, - {L"c:/colon/backslash", L"backslash"}, - {L"c:/colon/backslash/", L""}, - {L"//////", L""}, - {L"///filename.exe", L"filename.exe"}, -#elif defined(OS_POSIX) - {L"/foo/bar", L"bar"}, - {L"/foo/bar/", L""}, - {L"/filename.exe", L"filename.exe"}, - {L"filename.exe", L"filename.exe"}, - {L"", L""}, - {L"/", L""}, -#endif -}; - -// Test finding the file type from a path name -static const struct extension_case { - const wchar_t* path; - const wchar_t* extension; -} extension_cases[] = { -#if defined(OS_WIN) - {L"C:\\colon\\backslash\\filename.extension", L"extension"}, - {L"C:\\colon\\backslash\\filename.", L""}, - {L"C:\\colon\\backslash\\filename", L""}, - {L"C:\\colon\\backslash\\", L""}, - {L"C:\\colon\\backslash.\\", L""}, - {L"C:\\colon\\backslash\filename.extension.extension2", L"extension2"}, -#elif defined(OS_POSIX) - {L"/foo/bar/filename.extension", L"extension"}, - {L"/foo/bar/filename.", L""}, - {L"/foo/bar/filename", L""}, - {L"/foo/bar/", L""}, - {L"/foo/bar./", L""}, - {L"/foo/bar/filename.extension.extension2", L"extension2"}, - {L".", L""}, - {L"..", L""}, - {L"./foo", L""}, - {L"./foo.extension", L"extension"}, - {L"/foo.extension1/bar.extension2", L"extension2"}, -#endif -}; - -// Test finding the directory component of a path -static const struct dir_case { - const wchar_t* full_path; - const wchar_t* directory; -} dir_cases[] = { -#if defined(OS_WIN) - {L"C:\\WINDOWS\\system32\\gdi32.dll", L"C:\\WINDOWS\\system32"}, - {L"C:\\WINDOWS\\system32\\not_exist_thx_1138", L"C:\\WINDOWS\\system32"}, - {L"C:\\WINDOWS\\system32\\", L"C:\\WINDOWS\\system32"}, - {L"C:\\WINDOWS\\system32\\\\", L"C:\\WINDOWS\\system32"}, - {L"C:\\WINDOWS\\system32", L"C:\\WINDOWS"}, - {L"C:\\WINDOWS\\system32.\\", L"C:\\WINDOWS\\system32."}, - {L"C:\\", L"C:\\"}, -#elif defined(OS_POSIX) - {L"/foo/bar/gdi32.dll", L"/foo/bar"}, - {L"/foo/bar/not_exist_thx_1138", L"/foo/bar"}, - {L"/foo/bar/", L"/foo/bar"}, - {L"/foo/bar//", L"/foo/bar"}, - {L"/foo/bar", L"/foo"}, - {L"/foo/bar./", L"/foo/bar."}, - {L"/", L"/"}, - {L".", L"."}, - {L"..", L"."}, // yes, ".." technically lives in "." -#endif -}; - TEST_F(FileUtilTest, FileAndDirectorySize) { // Create three files of 20, 30 and 3 chars (utf8). ComputeDirectorySize // should return 53 bytes. |