Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
acts-core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
acts
acts-core
Commits
17161e85
Commit
17161e85
authored
4 years ago
by
Andreas Salzburger
Committed by
Andreas Salzburger
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
fix UnitTets
parent
25ca2b08
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!789
Consistent storage and access schema for bounds
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Tests/UnitTests/Core/Geometry/DiscLayerTests.cpp
+4
-3
4 additions, 3 deletions
Tests/UnitTests/Core/Geometry/DiscLayerTests.cpp
Tests/UnitTests/Core/Surfaces/DiamondBoundsTests.cpp
+2
-1
2 additions, 1 deletion
Tests/UnitTests/Core/Surfaces/DiamondBoundsTests.cpp
with
6 additions
and
4 deletions
Tests/UnitTests/Core/Geometry/DiscLayerTests.cpp
+
4
−
3
View file @
17161e85
...
@@ -46,7 +46,7 @@ BOOST_AUTO_TEST_CASE(DiscLayerConstruction) {
...
@@ -46,7 +46,7 @@ BOOST_AUTO_TEST_CASE(DiscLayerConstruction) {
auto
pTransform
=
std
::
make_shared
<
const
Transform3D
>
(
translation
);
auto
pTransform
=
std
::
make_shared
<
const
Transform3D
>
(
translation
);
const
double
minRad
(
5.
),
maxRad
(
10.
);
// 20 x 10 disc
const
double
minRad
(
5.
),
maxRad
(
10.
);
// 20 x 10 disc
auto
pDisc
=
std
::
make_shared
<
const
RadialBounds
>
(
minRad
,
maxRad
);
auto
pDisc
=
std
::
make_shared
<
const
RadialBounds
>
(
minRad
,
maxRad
);
auto
pDiscLayer
=
DiscLayer
::
create
(
pTransform
,
pDisc
);
auto
pDiscLayer
=
DiscLayer
::
create
(
pTransform
,
pDisc
,
nullptr
,
1.
);
BOOST_CHECK_EQUAL
(
pDiscLayer
->
layerType
(),
LayerType
::
passive
);
BOOST_CHECK_EQUAL
(
pDiscLayer
->
layerType
(),
LayerType
::
passive
);
// next level: need an array of Surfaces;
// next level: need an array of Surfaces;
// bounds object, rectangle type
// bounds object, rectangle type
...
@@ -57,7 +57,8 @@ BOOST_AUTO_TEST_CASE(DiscLayerConstruction) {
...
@@ -57,7 +57,8 @@ BOOST_AUTO_TEST_CASE(DiscLayerConstruction) {
Surface
::
makeShared
<
PlaneSurface
>
(
pNullTransform
,
rBounds
),
Surface
::
makeShared
<
PlaneSurface
>
(
pNullTransform
,
rBounds
),
Surface
::
makeShared
<
PlaneSurface
>
(
pNullTransform
,
rBounds
)};
Surface
::
makeShared
<
PlaneSurface
>
(
pNullTransform
,
rBounds
)};
const
double
thickness
(
1.0
);
const
double
thickness
(
1.0
);
auto
pDiscLayerFromSurfaces
=
DiscLayer
::
create
(
pTransform
,
pDisc
,
nullptr
);
auto
pDiscLayerFromSurfaces
=
DiscLayer
::
create
(
pTransform
,
pDisc
,
nullptr
,
1.
);
BOOST_CHECK_EQUAL
(
pDiscLayerFromSurfaces
->
layerType
(),
LayerType
::
passive
);
BOOST_CHECK_EQUAL
(
pDiscLayerFromSurfaces
->
layerType
(),
LayerType
::
passive
);
// construct with thickness:
// construct with thickness:
auto
pDiscLayerWithThickness
=
auto
pDiscLayerWithThickness
=
...
@@ -83,7 +84,7 @@ BOOST_AUTO_TEST_CASE(DiscLayerProperties /*, *utf::expected_failures(1)*/) {
...
@@ -83,7 +84,7 @@ BOOST_AUTO_TEST_CASE(DiscLayerProperties /*, *utf::expected_failures(1)*/) {
auto
pTransform
=
std
::
make_shared
<
const
Transform3D
>
(
translation
);
auto
pTransform
=
std
::
make_shared
<
const
Transform3D
>
(
translation
);
const
double
minRad
(
5.
),
maxRad
(
10.
);
// 20 x 10 disc
const
double
minRad
(
5.
),
maxRad
(
10.
);
// 20 x 10 disc
auto
pDisc
=
std
::
make_shared
<
const
RadialBounds
>
(
minRad
,
maxRad
);
auto
pDisc
=
std
::
make_shared
<
const
RadialBounds
>
(
minRad
,
maxRad
);
auto
pDiscLayer
=
DiscLayer
::
create
(
pTransform
,
pDisc
);
auto
pDiscLayer
=
DiscLayer
::
create
(
pTransform
,
pDisc
,
nullptr
,
1.
);
// auto planeSurface = pDiscLayer->surfaceRepresentation();
// auto planeSurface = pDiscLayer->surfaceRepresentation();
BOOST_CHECK_EQUAL
(
pDiscLayer
->
surfaceRepresentation
().
name
(),
BOOST_CHECK_EQUAL
(
pDiscLayer
->
surfaceRepresentation
().
name
(),
std
::
string
(
"Acts::DiscSurface"
));
std
::
string
(
"Acts::DiscSurface"
));
...
...
This diff is collapsed.
Click to expand it.
Tests/UnitTests/Core/Surfaces/DiamondBoundsTests.cpp
+
2
−
1
View file @
17161e85
...
@@ -134,7 +134,8 @@ BOOST_AUTO_TEST_CASE(DiamondBoundsAssignment) {
...
@@ -134,7 +134,8 @@ BOOST_AUTO_TEST_CASE(DiamondBoundsAssignment) {
similarlyConstructeDiamondBoundsObject
);
similarlyConstructeDiamondBoundsObject
);
//
//
/// Test assignment
/// Test assignment
DiamondBounds
assignedDiamondBoundsObject
(
0
,
0
,
0
,
0
,
0
);
// invalid
DiamondBounds
assignedDiamondBoundsObject
(
2
*
minHalfX
,
2
*
midHalfX
,
2
*
maxHalfX
,
2
*
halfY1
,
2
*
halfY2
);
// object, in some sense
// object, in some sense
assignedDiamondBoundsObject
=
diamondBoundsObject
;
assignedDiamondBoundsObject
=
diamondBoundsObject
;
BOOST_CHECK_EQUAL
(
assignedDiamondBoundsObject
,
diamondBoundsObject
);
BOOST_CHECK_EQUAL
(
assignedDiamondBoundsObject
,
diamondBoundsObject
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment