3
0
mirror of https://github.com/triqs/dft_tools synced 2024-07-11 05:43:48 +02:00
dft_tools/test/c++/basic.cpp
Nils Wentzell 28d600f149 [app4triqs] Rename files and Python module from toto to app4triqs
-Automatically detect any wrap generator files
-rename tests to basic/Py_Basic
2019-09-04 17:37:50 -04:00

33 lines
495 B
C++

#include <triqs/test_tools/gfs.hpp>
#include <app4triqs/app4triqs.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