| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/file_util.h" |
| 6 #include "base/sys_info.h" | 6 #include "base/sys_info.h" |
| 7 #include "testing/gtest/include/gtest/gtest.h" | 7 #include "testing/gtest/include/gtest/gtest.h" |
| 8 #include "testing/platform_test.h" | 8 #include "testing/platform_test.h" |
| 9 | 9 |
| 10 typedef PlatformTest SysInfoTest; | 10 typedef PlatformTest SysInfoTest; |
| 11 | 11 |
| 12 #if defined(OS_POSIX) && !defined(OS_MACOSX) |
| 13 TEST_F(SysInfoTest, MaxSharedMemorySize) { |
| 14 // We aren't actually testing that it's correct, just that it's sane. |
| 15 EXPECT_GT(base::SysInfo::MaxSharedMemorySize(), 0u); |
| 16 } |
| 17 #endif |
| 18 |
| 12 TEST_F(SysInfoTest, NumProcs) { | 19 TEST_F(SysInfoTest, NumProcs) { |
| 13 // We aren't actually testing that it's correct, just that it's sane. | 20 // We aren't actually testing that it's correct, just that it's sane. |
| 14 EXPECT_GE(base::SysInfo::NumberOfProcessors(), 1); | 21 EXPECT_GE(base::SysInfo::NumberOfProcessors(), 1); |
| 15 } | 22 } |
| 16 | 23 |
| 17 TEST_F(SysInfoTest, AmountOfMem) { | 24 TEST_F(SysInfoTest, AmountOfMem) { |
| 18 // We aren't actually testing that it's correct, just that it's sane. | 25 // We aren't actually testing that it's correct, just that it's sane. |
| 19 EXPECT_GT(base::SysInfo::AmountOfPhysicalMemory(), 0); | 26 EXPECT_GT(base::SysInfo::AmountOfPhysicalMemory(), 0); |
| 20 EXPECT_GT(base::SysInfo::AmountOfPhysicalMemoryMB(), 0); | 27 EXPECT_GT(base::SysInfo::AmountOfPhysicalMemoryMB(), 0); |
| 21 } | 28 } |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 base::SysInfo::ParseLsbRelease(lsb_release, | 90 base::SysInfo::ParseLsbRelease(lsb_release, |
| 84 &os_major_version, | 91 &os_major_version, |
| 85 &os_minor_version, | 92 &os_minor_version, |
| 86 &os_bugfix_version); | 93 &os_bugfix_version); |
| 87 EXPECT_EQ(-1, os_major_version); | 94 EXPECT_EQ(-1, os_major_version); |
| 88 EXPECT_EQ(-1, os_minor_version); | 95 EXPECT_EQ(-1, os_minor_version); |
| 89 EXPECT_EQ(-1, os_bugfix_version); | 96 EXPECT_EQ(-1, os_bugfix_version); |
| 90 } | 97 } |
| 91 | 98 |
| 92 #endif // OS_CHROMEOS | 99 #endif // OS_CHROMEOS |
| OLD | NEW |