Skip to content

Commit

Permalink
Refs #11104. Adding intensity test for Lorentzian
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Wedel committed Feb 18, 2015
1 parent 5d101c0 commit 7a4cefb
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions Code/Mantid/Framework/CurveFitting/test/LorentzianTest.h
Expand Up @@ -103,6 +103,21 @@ class LorentzianTest : public CxxTest::TestSuite
TS_ASSERT_EQUALS(y[0], 0.0);
}

void testIntensity()
{
Mantid::CurveFitting::Lorentzian lor;
lor.initialize();
lor.setHeight(2.0);
lor.setCentre(3.0);
lor.setFwhm(1.0);

TS_ASSERT_DELTA(lor.intensity(), 1.873097930277787, 1e-10);
TS_ASSERT_THROWS_NOTHING(lor.setIntensity(2.0));

TS_ASSERT_DELTA(lor.intensity(), 2.0, 1e-10);
TS_ASSERT_EQUALS(lor.fwhm(), 1.0);
}

private:

class TestableLorentzian : public Mantid::CurveFitting::Lorentzian
Expand Down

0 comments on commit 7a4cefb

Please sign in to comment.