// Copyright 2013 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 <unistd.h>

#include "base/sys_info.h"
#include "testing/gtest/include/gtest/gtest.h"

namespace base {
namespace android {

TEST(SysUtils, AmountOfPhysicalMemory) {
  // Check that the RAM size reported by sysconf() matches the one
  // computed by base::SysInfo::AmountOfPhysicalMemory().
  size_t sys_ram_size =
      static_cast<size_t>(sysconf(_SC_PHYS_PAGES) * PAGE_SIZE);
  EXPECT_EQ(sys_ram_size,
            static_cast<size_t>(SysInfo::AmountOfPhysicalMemory()));
}

}  // namespace android
}  // namespace base

// Copyright 2013 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 <unistd.h>

#include "base/sys_info.h"
#include "testing/gtest/include/gtest/gtest.h"

namespace base {
namespace android {

TEST(SysUtils, AmountOfPhysicalMemory) {
  // Check that the RAM size reported by sysconf() matches the one
  // computed by base::SysInfo::AmountOfPhysicalMemory().
  size_t sys_ram_size =
      static_cast<size_t>(sysconf(_SC_PHYS_PAGES) * PAGE_SIZE);
  EXPECT_EQ(sys_ram_size, SysInfo::AmountOfPhysicalMemory());
}

}  // namespace android
}  // namespace base

--- 
+++ 
@@ -15,7 +15,8 @@
   // computed by base::SysInfo::AmountOfPhysicalMemory().
   size_t sys_ram_size =
       static_cast<size_t>(sysconf(_SC_PHYS_PAGES) * PAGE_SIZE);
-  EXPECT_EQ(sys_ram_size, SysInfo::AmountOfPhysicalMemory());
+  EXPECT_EQ(sys_ram_size,
+            static_cast<size_t>(SysInfo::AmountOfPhysicalMemory()));
 }
 
 }  // namespace android
Fix comparison between signed and unsigned integer expressions.

Only see on internal bots.

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

git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@280256 0039d316-1c4b-4281-b951-d872f2087c98
