LCOV - code coverage report
Current view: top level - test/unittests/zone - zone-unittest.cc (source / functions) Hit Total Coverage
Test: app.info Lines: 7 7 100.0 %
Date: 2019-01-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/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       15128 : TEST(Zone, 8ByteAlignment) {
      14           1 :   AccountingAllocator allocator;
      15           2 :   Zone zone(&allocator, ZONE_NAME);
      16             : 
      17          17 :   for (size_t i = 0; i < 16; ++i) {
      18          33 :     ASSERT_EQ(reinterpret_cast<intptr_t>(zone.New(i)) % 8, 0);
      19           1 :   }
      20             : }
      21             : 
      22             : }  // namespace internal
      23        9075 : }  // namespace v8

Generated by: LCOV version 1.10