Skip to content
Snippets Groups Projects
Commit 3d90859b authored by Doucet, Mathieu's avatar Doucet, Mathieu
Browse files

Fixed tests that failed because of latest changes to LoadSpice2D. Re #1421.

parent 2ee1fe7f
No related branches found
No related tags found
No related merge requests found
......@@ -30,7 +30,6 @@ public:
// Y = (95-192.0/2.0+0.5)*5.15/1000.0 = -0.002575
mover.setPropertyValue("X","0.409425");
mover.setPropertyValue("Y","0.002575");
mover.setPropertyValue("Z","6");
mover.execute();
// Perform solid angle correction
......
......@@ -55,7 +55,6 @@ public:
// Y = (95-192.0/2.0+0.5)*5.15/1000.0 = -0.002575
mover.setPropertyValue("X","0.409425");
mover.setPropertyValue("Y","0.002575");
mover.setPropertyValue("Z","6");
mover.execute();
// Perform solid angle correction
......
......@@ -50,7 +50,6 @@ public:
// Y = (95-192.0/2.0)*5.15/1000.0 = -0.00515
mover.setPropertyValue("X","0.412");
mover.setPropertyValue("Y","0.00515");
mover.setPropertyValue("Z","6");
mover.execute();
if (!correction.isInitialized()) correction.initialize();
......
......@@ -115,7 +115,6 @@ public:
// Check parameter map access
const Mantid::Geometry::ParameterMap *m_paraMap = &(ws2d->instrumentParameters());
TS_ASSERT_EQUALS( m_paraMap->size(), 9);
// Check that we can get a parameter
boost::shared_ptr<Mantid::Geometry::Parameter> sample_aperture_size = m_paraMap->get(sample_aperture.get(), "Size");
......@@ -126,8 +125,13 @@ public:
sample_aperture_size->set(15.0);
TS_ASSERT_EQUALS( sample_aperture_size->value<double>(), 15.0);
double distance = spice2d.getProperty("SampleDetectorDistance");
TS_ASSERT_EQUALS( distance, 6000.0 );
boost::shared_ptr<Mantid::Geometry::IComponent> sample = i->getSample();
boost::shared_ptr<Mantid::Geometry::Parameter> d = m_paraMap->get(sample.get(), "sample-detector-distance");
TS_ASSERT_EQUALS( d->type(), "double");
TS_ASSERT_EQUALS( d->value<double>(), 6000.0);
// Check detector position
TS_ASSERT_EQUALS( i->getComponentByName("detector1")->getPos().Z(), 6.0);
}
private:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment