Belle II Software development
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
13using namespace Belle2;
14using namespace TrackFindingCDC;
15
16namespace {
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}
Abstract base class for different kinds of events.