Skip to content

Commit

Permalink
Refs #9993. Replacing std::to_string with boost::lexical_cast
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Wedel committed Aug 5, 2014
1 parent c5bba0d commit 3718bab
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion Code/Mantid/Framework/Geometry/test/PointGroupTest.h
Expand Up @@ -10,6 +10,7 @@
#include <iostream>
#include <iomanip>
#include "MantidGeometry/Crystal/PointGroup.h"
#include <boost/lexical_cast.hpp>

using namespace Mantid;
using namespace Mantid::Kernel;
Expand All @@ -28,7 +29,7 @@ class PointGroupTest : public CxxTest::TestSuite
{
std::vector<V3D> equivalents = pgs[i]->getEquivalents(hkl);
// check that the number of equivalent reflections is as expected.
TSM_ASSERT_EQUALS(name + ": Expected " + std::to_string(numEquiv) + " equivalents, got " + std::to_string(equivalents.size()) + " instead.", equivalents.size(), numEquiv);
TSM_ASSERT_EQUALS(name + ": Expected " + boost::lexical_cast<std::string>(numEquiv) + " equivalents, got " + boost::lexical_cast<std::string>(equivalents.size()) + " instead.", equivalents.size(), numEquiv);

// get reflection family for this hkl
V3D family = pgs[i]->getReflectionFamily(hkl);
Expand Down
5 changes: 3 additions & 2 deletions Code/Mantid/Framework/Geometry/test/SymmetryOperationTest.h
Expand Up @@ -8,6 +8,7 @@

#include <boost/regex.hpp>
#include <boost/make_shared.hpp>
#include <boost/lexical_cast.hpp>

using namespace Mantid::Geometry;
using namespace Mantid::Kernel;
Expand Down Expand Up @@ -247,7 +248,7 @@ class SymmetryOperationTest : public CxxTest::TestSuite
{
size_t order = symOp->order();

TSM_ASSERT_EQUALS(symOp->identifier() + ": Order is " + std::to_string(order) + ", expected " + std::to_string(expected),
TSM_ASSERT_EQUALS(symOp->identifier() + ": Order is " + boost::lexical_cast<std::string>(order) + ", expected " + boost::lexical_cast<std::string>(expected),
order, expected);
}

Expand Down Expand Up @@ -300,7 +301,7 @@ class SymmetryOperationTest : public CxxTest::TestSuite
IntMatrix symOpMatrix = symOp->apply(IntMatrix(3, 3, true));
int determinant = abs(symOpMatrix.determinant());

TSM_ASSERT_EQUALS(symOp->identifier() + ": Determinant of symmetry operation matrix is expected to be 1. Actual value: " + std::to_string(determinant),
TSM_ASSERT_EQUALS(symOp->identifier() + ": Determinant of symmetry operation matrix is expected to be 1. Actual value: " + boost::lexical_cast<std::string>(determinant),
determinant, 1);
}

Expand Down

0 comments on commit 3718bab

Please sign in to comment.