diff --git a/test/parmsTest.cpp b/test/parmsTest.cpp index c0394cd..e54a703 100644 --- a/test/parmsTest.cpp +++ b/test/parmsTest.cpp @@ -71,6 +71,29 @@ TEST(Parameters,DataInParam){ boost::filesystem::remove(pf); } +TEST(Parameters,DataInFile){ +std::string pf=alps::temporary_filename("in_file.dat"); + write_minimal_input_file(pf); + + //fake input + alps::params p; + MaxEntSimulation::define_parameters(p); + p["BETA"]=2; + p["DATA"]=pf; + p["NDAT"] = 5; + + ContiParameters c(p); + EXPECT_EQ(c.ndat(),5); + EXPECT_EQ(c.T(),0.5); + + for(int i=0;i