Permalink
Browse files

added missing include to test-boys

  • Loading branch information...
evaleev committed Jan 18, 2019
1 parent 5225072 commit 4397a53791edacd07d4434d39dfda44e4236ea01
Showing with 14 additions and 8 deletions.
  1. +11 −6 include/libint2/numeric.h
  2. +2 −2 tests/unit/test-1body.cc
  3. +1 −0 tests/unit/test-boys.cc
@@ -127,12 +127,17 @@ inline int get_max_digits10(const Real& value) {
}

template <typename To, typename From>
To sstream_convert(From && from) {
std::stringstream ss;
ss << std::scientific << std::setprecision(get_max_digits10(from)) << from;
To to(ss.str().c_str());
return to;
}
std::enable_if_t<!std::is_same<std::decay_t<To>,std::decay_t<From>>::value,To> sstream_convert(From && from) {
std::stringstream ss;
ss << std::scientific << std::setprecision(get_max_digits10(from)) << from;
To to(ss.str().c_str());
return to;
}

template <typename To>
To sstream_convert(const To& from) {
return from;
}

}; // namespace libint2

@@ -7,8 +7,8 @@ TEST_CASE("electrostatic potential", "[engine][1-body]") {
return;

std::vector<Shell> obs{
Shell{{1.0, 3.0}, {{2, true, {1.0, 0.3}}}, {{0.0, 0.0, 0.0}}},
Shell{{2.0, 5.0}, {{2, true, {1.0, 0.2}}}, {{1.0, 1.0, 1.0}}}};
Shell{{1.0, 3.0}, {{0, true, {1.0, 0.3}}}, {{0.0, 0.0, 0.0}}},
Shell{{2.0, 5.0}, {{0, true, {1.0, 0.2}}}, {{1.0, 1.0, 1.0}}}};
{
using namespace libint2::unit;

@@ -3,6 +3,7 @@
#include <type_traits>

#include <libint2/config.h>
#include <libint2/boys.h>

#ifdef LIBINT_HAS_MPFR
TEST_CASE("Boys reference values", "[boys]") {

0 comments on commit 4397a53

Please sign in to comment.