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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/sys_info_posix.cc ('k') | base/sys_info_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/sys_info_unittest.cc
===================================================================
--- base/sys_info_unittest.cc (revision 2357)
+++ base/sys_info_unittest.cc (working copy)
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "base/file_util.h"
#include "base/sys_info.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -13,4 +14,12 @@
TEST(SysInfoTest, AmountOfMem) {
// We aren't actually testing that it's correct, just that it's sane.
EXPECT_GT(base::SysInfo::AmountOfPhysicalMemory(), 0);
+ EXPECT_GT(base::SysInfo::AmountOfPhysicalMemoryMB(), 0);
}
+
+TEST(SysInfoTest, AmountOfFreeDiskSpace) {
+ // We aren't actually testing that it's correct, just that it's sane.
+ std::wstring tmp_path;
+ ASSERT_TRUE(file_util::GetTempDir(&tmp_path));
+ EXPECT_GT(base::SysInfo::AmountOfFreeDiskSpace(tmp_path), 0);
+}
« 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