Skip to content

Commit

Permalink
added missing include to test-boys
Browse files Browse the repository at this point in the history
  • Loading branch information
evaleev committed Jan 18, 2019
1 parent 5225072 commit 4397a53
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 8 deletions.
17 changes: 11 additions & 6 deletions include/libint2/numeric.h
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions tests/unit/test-1body.cc
Expand Up @@ -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;

Expand Down
1 change: 1 addition & 0 deletions tests/unit/test-boys.cc
Expand Up @@ -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]") {
Expand Down

0 comments on commit 4397a53

Please sign in to comment.