Belle II Software  release-08-01-10
Ptr.test.cc
1 /**************************************************************************
2  * basf2 (Belle II Analysis Software Framework) *
3  * Author: The Belle II Collaboration *
4  * *
5  * See git log for contributors and copyright holders. *
6  * This file is licensed under LGPL-3.0, see LICENSE.md. *
7  **************************************************************************/
8 
9 #include <tracking/trackFindingCDC/utilities/Ptr.h>
10 
11 #include <gtest/gtest.h>
12 
13 using namespace Belle2;
14 using namespace TrackFindingCDC;
15 
16 namespace {
17  TEST(TrackFindingCDCTest, utilities_Ptr_construct)
18  {
19  int i = 4;
20  Ptr<int> ptrIFromPointer {&i};
21  EXPECT_EQ(4, *ptrIFromPointer);
22  }
23 
24  TEST(TrackFindingCDCTest, utilities_Ptr_const_conversion)
25  {
26  int i = 4;
27  Ptr<int> ptrI{&i};
28  Ptr<const int> ptrConstI = Ptr<const int>(ptrI);
29  EXPECT_EQ(4, *ptrConstI);
30  }
31 }
TEST(TestgetDetectorRegion, TestgetDetectorRegion)
Test Constructors.
Abstract base class for different kinds of events.