v8/test/unittests/base/sys-info-unittest.cc
bmeurer@chromium.org bfd37ab267 Move unit tests to test/unittests.
As per discussion on the V8 team, this is the place we want them to live,
not following the Chrome Style Guide for this.

BUG=v8:3489
LOG=y
R=svenpanne@chromium.org

Review URL: https://codereview.chromium.org/615393002

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24350 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-01 08:34:25 +00:00

33 lines
733 B
C++

// 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"
#if V8_OS_NACL
#define DISABLE_ON_NACL(Name) DISABLED_##Name
#else
#define DISABLE_ON_NACL(Name) Name
#endif
namespace v8 {
namespace base {
TEST(SysInfoTest, NumberOfProcessors) {
EXPECT_LT(0, SysInfo::NumberOfProcessors());
}
TEST(SysInfoTest, DISABLE_ON_NACL(AmountOfPhysicalMemory)) {
EXPECT_LT(0, SysInfo::AmountOfPhysicalMemory());
}
TEST(SysInfoTest, AmountOfVirtualMemory) {
EXPECT_LE(0, SysInfo::AmountOfVirtualMemory());
}
} // namespace base
} // namespace v8