blob: c10b1b7e54d5708652bcd638e8427d191e5b0699 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
// Copyright (c) 2008 The Chromium Authors. All rights reserved.
// 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"
TEST(SysInfoTest, NumProcs) {
// We aren't actually testing that it's correct, just that it's sane.
EXPECT_GE(base::SysInfo::NumberOfProcessors(), 1);
}
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);
}
|