summaryrefslogtreecommitdiffstats
path: root/base/sys_info_unittest.cc
diff options
context:
space:
mode:
Diffstat (limited to 'base/sys_info_unittest.cc')
-rw-r--r--base/sys_info_unittest.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/base/sys_info_unittest.cc b/base/sys_info_unittest.cc
index edaf2aa..c10b1b7 100644
--- a/base/sys_info_unittest.cc
+++ b/base/sys_info_unittest.cc
@@ -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, NumProcs) {
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);
}