#include "IsingModel.hpp" #include "testlib.hpp" #include #include class IsingModelTest { public: void test_constructor() { IsingModel test(3, 1.); arma::Mat a(3, 3); std::function f = [](int x) { return x == 1 || x == -1; }; // unmangled int status = 0; char *demangled = abi::__cxa_demangle(typeid(f).name(), 0, 0, &status); std::cout << "Type: " << demangled << std::endl; ASSERT(assert_each(f, test.lattice), "Testing that lattices contain only 1 and -1"); } }; int main() { IsingModelTest test; test.test_constructor(); }