mirror of
https://github.com/triqs/dft_tools
synced 2024-08-17 01:31:44 +02:00
![Nils Wentzell](/assets/img/avatar_default.png)
-Disable LINTing in test macros with comment // NOLINT -Enable static analyzers for c++ tests -Switch app4triqs_c to static library Dynamic was pickung up previously installed libapp4triqs_c.so in tests Also there is no need to be dynamic for applications -Fix previous change in HeaderFilterRegex: 'app4triqs/c++' was blocking all headers for clang-tidy checks. 'app4triqs' works well, but we cannot install any other headers into app4triqs folder structure. We thus had to create INSTALL_DIR in travis.yml
33 lines
490 B
C++
33 lines
490 B
C++
#include <triqs/test_tools/gfs.hpp>
|
|
#include <app4triqs/toto.hpp>
|
|
|
|
using namespace app4triqs;
|
|
|
|
TEST(Toto, Add) { // NOLINT
|
|
|
|
toto a(0);
|
|
toto b(2);
|
|
|
|
auto c = a + b;
|
|
EXPECT_EQ(c, b); // NOLINT
|
|
}
|
|
|
|
TEST(Toto, H5) { // NOLINT
|
|
|
|
toto a(0);
|
|
{ // Local scope for file
|
|
triqs::h5::file f("f.h5", H5F_ACC_TRUNC);
|
|
h5_write(f, "a", a);
|
|
}
|
|
|
|
toto a2;
|
|
{
|
|
triqs::h5::file f("f.h5", H5F_ACC_RDWR);
|
|
h5_read(f, "a", a2);
|
|
}
|
|
|
|
EXPECT_EQ(a, a2); // NOLINT
|
|
}
|
|
|
|
MAKE_MAIN; // NOLINT
|