LCOV - code coverage report
Current view: top level - test/unittests/base - macros-unittest.cc (source / functions) Hit Total Coverage
Test: app.info Lines: 8 13 61.5 %
Date: 2017-10-20 Functions: 4 5 80.0 %

          Line data    Source code
       1             : // Copyright 2017 the V8 project authors. All rights reserved.
       2             : // Use of this source code is governed by a BSD-style license that can be
       3             : // found in the LICENSE file.
       4             : 
       5             : #include "src/base/macros.h"
       6             : #include "testing/gtest/include/gtest/gtest.h"
       7             : 
       8             : namespace v8 {
       9             : namespace base {
      10             : 
      11       13158 : TEST(AlignedAddressTest, AlignedAddress) {
      12           2 :   EXPECT_EQ(reinterpret_cast<void*>(0xFFFF0),
      13           0 :             AlignedAddress(reinterpret_cast<void*>(0xFFFF0), 16));
      14           2 :   EXPECT_EQ(reinterpret_cast<void*>(0xFFFF0),
      15           0 :             AlignedAddress(reinterpret_cast<void*>(0xFFFF2), 16));
      16           2 :   EXPECT_EQ(reinterpret_cast<void*>(0xFFFF0),
      17           0 :             AlignedAddress(reinterpret_cast<void*>(0xFFFF2), 16));
      18           2 :   EXPECT_EQ(reinterpret_cast<void*>(0xFFFF0),
      19           0 :             AlignedAddress(reinterpret_cast<void*>(0xFFFFF), 16));
      20           2 :   EXPECT_EQ(reinterpret_cast<void*>(0x0),
      21           0 :             AlignedAddress(reinterpret_cast<void*>(0xFFFFF), 0x100000));
      22           1 : }
      23             : 
      24             : }  // namespace base
      25        7893 : }  // namespace v8

Generated by: LCOV version 1.10