Commit 6b89efc3 authored by Lynn Garren's avatar Lynn Garren
Browse files

get rid of testBug6740.sh

parent 4df14ead
set( Geometry_tests testBasicVector3D
testBug6740 )
foreach ( test ${Geometry_tests} )
clhep_test( ${test} )
endforeach ( test ${Geometry_tests} )
clhep_test( testBasicVector3D )
clhep_test( testBug6740 SIMPLE )
......@@ -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 = \
testBug6740.sh
testBasicVector3D.sh
# supply our own suffix rule
.cc.obj:
......
#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;
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment