Skip to content

Commit

Permalink
Corrected Code and Added Unit Test re #5659
Browse files Browse the repository at this point in the history
Signed-off-by: Karl Palmen <karl.palmen@stfc.ac.uk>
  • Loading branch information
KarlPalmen committed Sep 7, 2012
1 parent c598cf7 commit e4c1c3a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ namespace Geometry
}

/** Get the full path name of the Component
* @return this.name
* @return full path name
*/
std::string Component::getFullName() const
{
Expand Down
9 changes: 9 additions & 0 deletions Code/Mantid/Framework/Geometry/test/ComponentTest.h
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,15 @@ class ComponentTest : public CxxTest::TestSuite
TS_ASSERT(ancs[0]->isParametrized());
}

void testGetFullName()
{
Component parent("Parent",V3D(1,1,1),Quat(1,1,1,1));
Component q("Child",V3D(5,6,7),&parent);

TS_ASSERT_EQUALS( parent.getFullName(),"Parent");
TS_ASSERT_EQUALS( q.getFullName(),"Parent/Child");
}

void testSetParent()
{
Component parent("Parent",V3D(1,1,1));
Expand Down

0 comments on commit e4c1c3a

Please sign in to comment.