LCOV - code coverage report
Current view: top level - test/unittests/zone - zone-unittest.cc (source / functions) Hit Total Coverage
Test: app.info Lines: 6 6 100.0 %
Date: 2019-04-18 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/zone/zone.h"
       6             : 
       7             : #include "src/zone/accounting-allocator.h"
       8             : #include "testing/gtest/include/gtest/gtest.h"
       9             : 
      10             : namespace v8 {
      11             : namespace internal {
      12             : 
      13       15418 : TEST(Zone, 8ByteAlignment) {
      14           2 :   AccountingAllocator allocator;
      15           2 :   Zone zone(&allocator, ZONE_NAME);
      16             : 
      17          33 :   for (size_t i = 0; i < 16; ++i) {
      18          32 :     ASSERT_EQ(reinterpret_cast<intptr_t>(zone.New(i)) % 8, 0);
      19             :   }
      20             : }
      21             : 
      22             : }  // namespace internal
      23        9249 : }  // namespace v8

Generated by: LCOV version 1.10