Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
mantidproject
mantid
Commits
ad194c68
Commit
ad194c68
authored
Jan 16, 2018
by
Karl Palmen
Browse files
Correct a modified test function re #12827
Signed-off-by:
Karl Palmen
<
karl.palmen@stfc.ac.uk
>
parent
23b4d3e4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Framework/Geometry/test/CSGObjectTest.h
View file @
ad194c68
...
...
@@ -393,15 +393,17 @@ public:
void
checkTrackIntercept
(
Track
&
track
,
const
std
::
vector
<
Link
>
&
expectedResults
)
{
int
index
=
0
;
for
(
Track
::
LType
::
const_iterator
it
=
track
.
cbegin
();
it
!=
track
.
cend
()
&&
index
<
expectedResults
.
size
();
++
it
)
{
TS_ASSERT_DELTA
(
it
->
distFromStart
,
expectedResults
[
index
].
distFromStart
,
1e-6
);
TS_ASSERT_DELTA
(
it
->
distInsideObject
,
expectedResults
[
index
].
distInsideObject
,
1e-6
);
TS_ASSERT_EQUALS
(
it
->
componentID
,
expectedResults
[
index
].
componentID
);
TS_ASSERT_EQUALS
(
it
->
entryPoint
,
expectedResults
[
index
].
entryPoint
);
TS_ASSERT_EQUALS
(
it
->
exitPoint
,
expectedResults
[
index
].
exitPoint
);
for
(
Track
::
LType
::
const_iterator
it
=
track
.
cbegin
();
it
!=
track
.
cend
();
++
it
)
{
if
(
index
<
expectedResults
.
size
())
{
TS_ASSERT_DELTA
(
it
->
distFromStart
,
expectedResults
[
index
].
distFromStart
,
1e-6
);
TS_ASSERT_DELTA
(
it
->
distInsideObject
,
expectedResults
[
index
].
distInsideObject
,
1e-6
);
TS_ASSERT_EQUALS
(
it
->
componentID
,
expectedResults
[
index
].
componentID
);
TS_ASSERT_EQUALS
(
it
->
entryPoint
,
expectedResults
[
index
].
entryPoint
);
TS_ASSERT_EQUALS
(
it
->
exitPoint
,
expectedResults
[
index
].
exitPoint
);
}
++
index
;
}
TS_ASSERT_EQUALS
(
index
,
static_cast
<
int
>
(
expectedResults
.
size
()));
...
...
Framework/Geometry/test/MeshObjectTest.h
View file @
ad194c68
...
...
@@ -645,15 +645,17 @@ public:
void
checkTrackIntercept
(
Track
&
track
,
const
std
::
vector
<
Link
>
&
expectedResults
)
{
int
index
=
0
;
for
(
Track
::
LType
::
const_iterator
it
=
track
.
cbegin
();
it
!=
track
.
cend
()
&&
index
<
expectedResults
.
size
();
++
it
)
{
TS_ASSERT_DELTA
(
it
->
distFromStart
,
expectedResults
[
index
].
distFromStart
,
1e-6
);
TS_ASSERT_DELTA
(
it
->
distInsideObject
,
expectedResults
[
index
].
distInsideObject
,
1e-6
);
TS_ASSERT_EQUALS
(
it
->
componentID
,
expectedResults
[
index
].
componentID
);
TS_ASSERT_EQUALS
(
it
->
entryPoint
,
expectedResults
[
index
].
entryPoint
);
TS_ASSERT_EQUALS
(
it
->
exitPoint
,
expectedResults
[
index
].
exitPoint
);
for
(
Track
::
LType
::
const_iterator
it
=
track
.
cbegin
();
it
!=
track
.
cend
();
++
it
)
{
if
(
index
<
expectedResults
.
size
())
{
TS_ASSERT_DELTA
(
it
->
distFromStart
,
expectedResults
[
index
].
distFromStart
,
1e-6
);
TS_ASSERT_DELTA
(
it
->
distInsideObject
,
expectedResults
[
index
].
distInsideObject
,
1e-6
);
TS_ASSERT_EQUALS
(
it
->
componentID
,
expectedResults
[
index
].
componentID
);
TS_ASSERT_EQUALS
(
it
->
entryPoint
,
expectedResults
[
index
].
entryPoint
);
TS_ASSERT_EQUALS
(
it
->
exitPoint
,
expectedResults
[
index
].
exitPoint
);
}
++
index
;
}
TS_ASSERT_EQUALS
(
index
,
static_cast
<
int
>
(
expectedResults
.
size
()));
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment