Belle II Software development
Box.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#include <tracking/trackFindingCDC/hough/boxes/Box.h>
9
10#include <gtest/gtest.h>
11
12
13using namespace Belle2;
14using namespace TrackFindingCDC;
15
16TEST(TrackFindingCDCTest, Box_intersects)
17{
18 Box<float, float> box({{0, 1}}, {{0, 1}});
19 EXPECT_TRUE(box.intersects(box));
20
21 Box<float, float> box2({{0.5, 1.5}}, {{0.5, 1.5}});
22 EXPECT_TRUE(box.intersects(box2));
23 EXPECT_TRUE(box2.intersects(box));
24
25 Box<float, float> box3({{1.5, 2.5}}, {{0.5, 1.5}});
26 EXPECT_FALSE(box.intersects(box3));
27 EXPECT_FALSE(box3.intersects(box));
28}
The base class for all boxes.
Definition: Box.h:33
Abstract base class for different kinds of events.