EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
TrackingGeometryView3DTests.cpp
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file TrackingGeometryView3DTests.cpp
1 // This file is part of the Acts project.
2 //
3 // Copyright (C) 2020 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/tools/output_test_stream.hpp>
10 #include <boost/test/unit_test.hpp>
11 
15 
16 #include <fstream>
17 #include <iostream>
18 
21 
22 namespace Acts {
23 namespace Test {
24 
25 BOOST_AUTO_TEST_SUITE(Visualization)
26 
27 
28 BOOST_AUTO_TEST_CASE(TrackingGeometryView3DObj) {
30  // Standard test
31  bool triangulate = false;
32  auto objTest = TrackingGeometryView3DTest::run(obj, triangulate, "");
33  auto objErrors = testObjString(objTest, triangulate);
34  std::cout << "Sufaces Obj Test : " << objTest.size()
35  << " characters written with " << objErrors.size() << " errors."
36  << std::endl;
37  BOOST_CHECK(objErrors.size() == 0);
38  for (auto objerr : objErrors) {
39  std::cout << objerr << std::endl;
40  }
41  // Triangular mesh test
42  triangulate = true;
43  auto objTest3M = TrackingGeometryView3DTest::run(obj, triangulate, "_3M");
44  auto objErrors3M = testObjString(objTest3M, triangulate);
45  std::cout << "Sufaces Obj Test 3M : " << objTest3M.size()
46  << " characters written with " << objErrors3M.size() << " errors."
47  << std::endl;
48  BOOST_CHECK(objErrors3M.size() == 0);
49  for (auto objerr : objErrors3M) {
50  std::cout << objerr << std::endl;
51  }
52 }
53 
54 /*
56 BOOST_AUTO_TEST_CASE(TrackingGeometryView3DPly) {
57  PlyVisualization3D ply;
58  // Standard test
59  bool triangulate = false;
60  auto plyTest = TrackingGeometryView3DTest::run(ply, triangulate, "");
61  auto plyErrors = testPlyString(plyTest, triangulate);
62  std::cout << "Sufaces Ply Test : " << plyTest.size()
63  << " characters written with " << plyErrors.size() << " errors."
64  << std::endl;
65  BOOST_CHECK(plyErrors.size() == 0);
66  for (auto plyerr : plyErrors) {
67  std::cout << plyerr << std::endl;
68  }
69  // Triangular mesh test
70  triangulate = true;
71  auto plyTest3M = TrackingGeometryView3DTest::run(ply, triangulate, "_3M");
72  auto plyErrors3M = testPlyString(plyTest3M, triangulate);
73  std::cout << "Sufaces Ply Test 3M : " << plyTest3M.size()
74  << " characters written with " << plyErrors3M.size() << " errors."
75  << std::endl;
76  BOOST_CHECK(plyErrors3M.size() == 0);
77  for (auto plyerr : plyErrors3M) {
78  std::cout << plyerr << std::endl;
79  }
80 }
81 */
82 
83 BOOST_AUTO_TEST_SUITE_END()
84 
85 } // namespace Test
86 } // namespace Acts