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

Side by Side Diff: base/sys_info_unittest.cc

Issue 3141: Move GetFreeDiskSpace to SysInfo. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 12 years, 3 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/sys_info_posix.cc ('k') | base/sys_info_win.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) 2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2008 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/file_util.h"
5 #include "base/sys_info.h" 6 #include "base/sys_info.h"
6 #include "testing/gtest/include/gtest/gtest.h" 7 #include "testing/gtest/include/gtest/gtest.h"
7 8
8 TEST(SysInfoTest, NumProcs) { 9 TEST(SysInfoTest, NumProcs) {
9 // We aren't actually testing that it's correct, just that it's sane. 10 // We aren't actually testing that it's correct, just that it's sane.
10 EXPECT_GE(base::SysInfo::NumberOfProcessors(), 1); 11 EXPECT_GE(base::SysInfo::NumberOfProcessors(), 1);
11 } 12 }
12 13
13 TEST(SysInfoTest, AmountOfMem) { 14 TEST(SysInfoTest, AmountOfMem) {
14 // We aren't actually testing that it's correct, just that it's sane. 15 // We aren't actually testing that it's correct, just that it's sane.
15 EXPECT_GT(base::SysInfo::AmountOfPhysicalMemory(), 0); 16 EXPECT_GT(base::SysInfo::AmountOfPhysicalMemory(), 0);
17 EXPECT_GT(base::SysInfo::AmountOfPhysicalMemoryMB(), 0);
16 } 18 }
19
20 TEST(SysInfoTest, AmountOfFreeDiskSpace) {
21 // We aren't actually testing that it's correct, just that it's sane.
22 std::wstring tmp_path;
23 ASSERT_TRUE(file_util::GetTempDir(&tmp_path));
24 EXPECT_GT(base::SysInfo::AmountOfFreeDiskSpace(tmp_path), 0);
25 }
OLDNEW
« no previous file with comments | « base/sys_info_posix.cc ('k') | base/sys_info_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698