Skip to content

Commit

Permalink
refs #11056. Run alg as child.
Browse files Browse the repository at this point in the history
  • Loading branch information
OwenArnold committed Feb 19, 2015
1 parent 1ec1f83 commit f42f48d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Code/Mantid/Framework/Crystal/test/AddPeakHKLTest.h
Expand Up @@ -75,8 +75,8 @@ class AddPeakHKLTest : public CxxTest::TestSuite
ws->mutableSample().setOrientedLattice(&orientedLattice);
ws->mutableRun().setGoniometer(goniometer, false);

Mantid::API::AnalysisDataService::Instance().add("peaks_ws",ws);
AddPeakHKL alg;
alg.setChild(true);
alg.initialize();
std::vector<double> hklVec;
hklVec.push_back(hkl.X());
Expand All @@ -85,10 +85,10 @@ class AddPeakHKLTest : public CxxTest::TestSuite
alg.setProperty("HKL", hklVec);
alg.setProperty("Workspace", ws);
alg.execute();
ws = Mantid::API::AnalysisDataService::Instance().retrieveWS<PeaksWorkspace>("peaks_ws");
IPeaksWorkspace_sptr ws_out = alg.getProperty("Workspace");

// Get the peak just added.
const Peak& peak = ws->getPeak(0);
const IPeak& peak =ws_out->getPeak(0);

/*
Now we check we have made a self - consistent peak
Expand Down

0 comments on commit f42f48d

Please sign in to comment.