[Echempp-devel] Experiment/Experiment/test ExperimentTest.cpp, 1.2, 1.3
Status: Beta
Brought to you by:
berndspeiser
|
From: beeblbrox <bee...@us...> - 2007-04-07 08:06:59
|
Update of /cvsroot/echempp/Experiment/Experiment/test In directory sc8-pr-cvs5.sourceforge.net:/tmp/cvs-serv11788 Modified Files: ExperimentTest.cpp Log Message: Modification to serialization test. Index: ExperimentTest.cpp =================================================================== RCS file: /cvsroot/echempp/Experiment/Experiment/test/ExperimentTest.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ExperimentTest.cpp 6 Apr 2007 17:18:18 -0000 1.2 --- ExperimentTest.cpp 7 Apr 2007 08:06:45 -0000 1.3 *************** *** 1,2 **** --- 1,4 ---- + #include <iostream> + // Boost includes #include <boost/test/unit_test.hpp> *************** *** 62,66 **** Homogeneous hg; hg.add(new experiment::MyAction()); ! // hg.add(new Observation(Dynamic,Real)); hg.add(new experiment::MyAction()); --- 64,75 ---- Homogeneous hg; hg.add(new experiment::MyAction()); ! try ! { ! hg.add(new experiment::MyObservation()); ! } ! catch(ExperimentException& e) ! { ! std::cout << e.what() << std::endl; ! } hg.add(new experiment::MyAction()); *************** *** 85,88 **** --- 94,105 ---- ia_txt >> hg2; ifs_txt.close(); + + { + const Homogeneous& hgc = hg2; + std::ofstream ofs_xml("/tmp/exp2.xml"); + boost::archive::xml_oarchive oa_xml(ofs_xml); + oa_xml << BOOST_SERIALIZATION_NVP(hgc); + ofs_xml.close(); + } } |