QMCPACK
test_stdlib.cpp
Go to the documentation of this file.
1
2
#include "catch.hpp"
3
4
// Put tests for src/config/stdlib functions here
5
6
// Ensure that the backup "round" function is always defined
7
#include "
CPU/math.hpp
"
8
9
10
namespace
qmcplusplus
11
{
12
TEST_CASE
(
"stdlib round"
,
"[numerics]"
)
13
{
14
REQUIRE
(round(0.4f) == 0.0f);
15
REQUIRE
(round(0.6f) == 1.0f);
16
REQUIRE
(round(1.2f) == 1.0f);
17
REQUIRE
(round(1.8f) == 2.0f);
18
REQUIRE
(round(-1.4f) == -1.0f);
19
}
20
21
}
// namespace qmcplusplus
qmcplusplus
helper functions for EinsplineSetBuilder
Definition:
Configuration.h:43
qmcplusplus::TEST_CASE
TEST_CASE("complex_helper", "[type_traits]")
Definition:
test_complex_helper.cpp:38
qmcplusplus::REQUIRE
REQUIRE(std::filesystem::exists(filename))
math.hpp
src
Numerics
tests
test_stdlib.cpp
Generated on Fri Jun 28 2024 10:45:15 for QMCPACK by
1.8.14