Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
InfiniteBoundsTests.cpp
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file InfiniteBoundsTests.cpp
1 // This file is part of the Acts project.
2 //
3 // Copyright (C) 2017-2018 CERN for the benefit of the Acts project
4 //
5 // This Source Code Form is subject to the terms of the Mozilla Public
6 // License, v. 2.0. If a copy of the MPL was not distributed with this
7 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 
9 #include <boost/test/data/test_case.hpp>
10 #include <boost/test/tools/output_test_stream.hpp>
11 #include <boost/test/unit_test.hpp>
12 
17 
18 namespace Acts {
19 
20 namespace Test {
21 BOOST_AUTO_TEST_SUITE(Surfaces)
23 BOOST_AUTO_TEST_CASE(InfiniteBoundsConstruction) {
25  BOOST_CHECK_EQUAL(u.type(), SurfaceBounds::eBoundless);
26  // InfiniteBounds s(1); // would act as size_t cast to InfiniteBounds
27  // InfiniteBounds t(s);
28  InfiniteBounds v(u); // implicit
29  BOOST_CHECK_EQUAL(v.type(), SurfaceBounds::eBoundless);
30 }
32 BOOST_AUTO_TEST_CASE(InfiniteBoundsProperties) {
33  InfiniteBounds infiniteBoundsObject;
35  BOOST_CHECK_EQUAL(infiniteBoundsObject.type(), SurfaceBounds::eBoundless);
36 
38  const Vector2 anyVector{0., 1.};
39  const BoundaryCheck anyBoundaryCheck(true);
40  BOOST_CHECK(infiniteBoundsObject.inside(anyVector, anyBoundaryCheck));
41 
43  boost::test_tools::output_test_stream dumpOuput;
44  infiniteBoundsObject.toStream(dumpOuput);
45  BOOST_CHECK(
46  dumpOuput.is_equal("Acts::InfiniteBounds ... boundless surface\n"));
47 }
48 
49 BOOST_AUTO_TEST_SUITE_END()
50 
51 } // namespace Test
52 
53 } // namespace Acts