Belle II Software  release-05-01-25
Ptr.test.cc
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2015 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Oliver Frost <oliver.frost@desy.de> *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 
11 #include <tracking/trackFindingCDC/utilities/Ptr.h>
12 
13 #include <gtest/gtest.h>
14 
15 using namespace Belle2;
16 using namespace TrackFindingCDC;
17 
18 namespace {
19  TEST(TrackFindingCDCTest, utilities_Ptr_construct)
20  {
21  int i = 4;
22  Ptr<int> ptrIFromPointer {&i};
23  EXPECT_EQ(4, *ptrIFromPointer);
24  }
25 
26  TEST(TrackFindingCDCTest, utilities_Ptr_const_conversion)
27  {
28  int i = 4;
29  Ptr<int> ptrI{&i};
30  Ptr<const int> ptrConstI = Ptr<const int>(ptrI);
31  EXPECT_EQ(4, *ptrConstI);
32  }
33 }
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::TEST
TEST(TestgetDetectorRegion, TestgetDetectorRegion)
Test Constructors.
Definition: utilityFunctions.cc:18