Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
CLHEP
CLHEP
Commits
6b89efc3
Commit
6b89efc3
authored
Feb 01, 2012
by
Lynn Garren
Browse files
get rid of testBug6740.sh
parent
4df14ead
Changes
3
Hide whitespace changes
Inline
Side-by-side
Geometry/test/CMakeLists.txt
View file @
6b89efc3
set
(
Geometry_tests testBasicVector3D
testBug6740
)
foreach
(
test
${
Geometry_tests
}
)
clhep_test
(
${
test
}
)
endforeach
(
test
${
Geometry_tests
}
)
clhep_test
(
testBasicVector3D
)
clhep_test
(
testBug6740 SIMPLE
)
Geometry/test/Makefile.am
View file @
6b89efc3
...
...
@@ -34,13 +34,12 @@ check_PROGRAMS = \
testBug6740
check_SCRIPTS
=
\
testBasicVector3D.sh
\
testBug6740.sh
testBasicVector3D.sh
# Identify test(s) to run when 'make check' is requested:
TESTS
=
\
testBasicVector3D.sh
\
testBug6740
.sh
testBug6740
# Identify the test(s) for which failure is the intended outcome:
XFAIL_TESTS
=
...
...
@@ -51,12 +50,11 @@ testBug6740_SOURCES = testBug6740.cc
# Identify input data file(s) and prototype output file(s):
EXTRA_DIST
=
\
testBasicVector3D.input testBasicVector3D.output
\
testBug6740.sh
testBasicVector3D.input testBasicVector3D.output
# Identify generated file(s) to be removed when 'make clean' is requested:
CLEANFILES
=
\
testB
ug6740
.sh
testB
asicVector3D
.sh
# supply our own suffix rule
.cc.obj
:
...
...
Geometry/test/testBug6740.cc
View file @
6b89efc3
#include <iostream>
#include <cmath>
#include <float.h>
#include "CLHEP/Geometry/Point3D.h"
#include "CLHEP/Vector/ThreeVector.h"
...
...
@@ -11,9 +13,20 @@ int main(int, char **) {
CLHEP
::
Hep3Vector
d
(
10
,
0
,
0
);
HepPoint3D
a
(
0
,
0
,
0
);
HepPoint3D
pv
(
1
,
1
,
1
);
float
expected
=
1.41421
;
int
numbad
=
0
;
CLHEP
::
Hep3Vector
dist
=
a
-
pv
;
// this does not compile anymore
CLHEP
::
Hep3Vector
Cross
=
dist
.
cross
(
d
.
unit
());
std
::
cout
<<
Cross
.
mag
()
<<
std
::
endl
;
float
result
=
Cross
.
mag
();
float
eps
=
1.0e-5
;
if
(
fabs
(
result
-
expected
)
>
eps
)
{
++
numbad
;
std
::
cout
<<
"Expected "
<<
expected
<<
" got "
<<
result
<<
std
::
endl
;
}
return
numbad
;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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