diff --git a/DDTest/CMakeLists.txt b/DDTest/CMakeLists.txt index 56c67459ab96f371c1d2a0064b7c0ba96a10ad36..de36d1fd506b20c1462f7f83daccccb028dbdfa5 100644 --- a/DDTest/CMakeLists.txt +++ b/DDTest/CMakeLists.txt @@ -25,6 +25,7 @@ foreach(TEST_NAME test_cellDimensionsRPhi2 test_segmentationHandles test_Evaluator + test_shapes ) add_executable(${TEST_NAME} src/${TEST_NAME}.cc) target_link_libraries(${TEST_NAME} DD4hep::DDCore DD4hep::DDRec DD4hep::DDTest) diff --git a/DDTest/src/test_shapes.cc b/DDTest/src/test_shapes.cc new file mode 100644 index 0000000000000000000000000000000000000000..fdb74a01f2fee68c9ca2deb3fe1132fd9c2bd5c4 --- /dev/null +++ b/DDTest/src/test_shapes.cc @@ -0,0 +1,33 @@ +#include "DD4hep/DDTest.h" + +#include "DD4hep/Shapes.h" + +#include <exception> +#include <iostream> +#include <assert.h> +#include <cmath> + +//============================================================================= +int main(int /* argc */, char** /* argv */ ){ + + // this should be the first line in your test + dd4hep::DDTest test( "shapes" ); + + try{ + + // -------------------------------------------------------------------- + // Polycone + + // add single plane with addZPlanes + Polycone polycone(0, 2*M_PI, {0, 0}, {1, 1}, {0, 1}); + polycone.addZPlanes({0}, {1}, {0.5}); + + // -------------------------------------------------------------------- + } + catch( std::exception &e ){ + test.log( e.what() ); + test.error( "exception occurred" ); + } + return 0; +} +//=============================================================================