3
0
mirror of https://github.com/triqs/dft_tools synced 2024-12-23 12:55:17 +01:00
dft_tools/test/c++/basic.cpp
Nils Wentzell b5a85e3034 Squash app4triqs/3.1.x to reduce skeleton history when tracking
Co-authored-by: Dylan Simon <dylan@dylex.net>
Co-authored-by: Alexander Hampel <ahampel@flatironinstitute.org>
2022-02-17 17:04:28 -05:00

31 lines
440 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
h5::file f("f.h5", 'w');
h5_write(f, "a", a);
}
toto a2;
{
h5::file f("f.h5", 'a');
h5_read(f, "a", a2);
}
EXPECT_EQ(a, a2); // NOLINT
}