2014-08-27 08:29:22 +00:00
|
|
|
// Copyright 2014 the V8 project 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 "src/base/sys-info.h"
|
|
|
|
#include "testing/gtest/include/gtest/gtest.h"
|
|
|
|
|
2014-08-27 10:37:54 +00:00
|
|
|
#if V8_OS_NACL
|
|
|
|
#define DISABLE_ON_NACL(Name) DISABLED_##Name
|
|
|
|
#else
|
|
|
|
#define DISABLE_ON_NACL(Name) Name
|
|
|
|
#endif
|
|
|
|
|
2014-08-27 08:29:22 +00:00
|
|
|
namespace v8 {
|
|
|
|
namespace base {
|
|
|
|
|
|
|
|
TEST(SysInfoTest, NumberOfProcessors) {
|
|
|
|
EXPECT_LT(0, SysInfo::NumberOfProcessors());
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2014-08-27 10:37:54 +00:00
|
|
|
TEST(SysInfoTest, DISABLE_ON_NACL(AmountOfPhysicalMemory)) {
|
2014-08-27 08:29:22 +00:00
|
|
|
EXPECT_LT(0, SysInfo::AmountOfPhysicalMemory());
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
TEST(SysInfoTest, AmountOfVirtualMemory) {
|
|
|
|
EXPECT_LE(0, SysInfo::AmountOfVirtualMemory());
|
|
|
|
}
|
|
|
|
|
|
|
|
} // namespace base
|
|
|
|
} // namespace v8
|