- Timestamp:
- May 4, 2012, 2:19:07 PM (13 years ago)
- Branches:
- Action_Thermostats, Add_AtomRandomPerturbation, Add_FitFragmentPartialChargesAction, Add_RotateAroundBondAction, Add_SelectAtomByNameAction, Added_ParseSaveFragmentResults, AddingActions_SaveParseParticleParameters, Adding_Graph_to_ChangeBondActions, Adding_MD_integration_tests, Adding_ParticleName_to_Atom, Adding_StructOpt_integration_tests, AtomFragments, Automaking_mpqc_open, AutomationFragmentation_failures, Candidate_v1.5.4, Candidate_v1.6.0, Candidate_v1.6.1, ChangeBugEmailaddress, ChangingTestPorts, ChemicalSpaceEvaluator, CombiningParticlePotentialParsing, Combining_Subpackages, Debian_Package_split, Debian_package_split_molecuildergui_only, Disabling_MemDebug, Docu_Python_wait, EmpiricalPotential_contain_HomologyGraph, EmpiricalPotential_contain_HomologyGraph_documentation, Enable_parallel_make_install, Enhance_userguide, Enhanced_StructuralOptimization, Enhanced_StructuralOptimization_continued, Example_ManyWaysToTranslateAtom, Exclude_Hydrogens_annealWithBondGraph, FitPartialCharges_GlobalError, Fix_BoundInBox_CenterInBox_MoleculeActions, Fix_ChargeSampling_PBC, Fix_ChronosMutex, Fix_FitPartialCharges, Fix_FitPotential_needs_atomicnumbers, Fix_ForceAnnealing, Fix_IndependentFragmentGrids, Fix_ParseParticles, Fix_ParseParticles_split_forward_backward_Actions, Fix_PopActions, Fix_QtFragmentList_sorted_selection, Fix_Restrictedkeyset_FragmentMolecule, Fix_StatusMsg, Fix_StepWorldTime_single_argument, Fix_Verbose_Codepatterns, Fix_fitting_potentials, Fixes, ForceAnnealing_goodresults, ForceAnnealing_oldresults, ForceAnnealing_tocheck, ForceAnnealing_with_BondGraph, ForceAnnealing_with_BondGraph_continued, ForceAnnealing_with_BondGraph_continued_betteresults, ForceAnnealing_with_BondGraph_contraction-expansion, FragmentAction_writes_AtomFragments, FragmentMolecule_checks_bonddegrees, GeometryObjects, Gui_Fixes, Gui_displays_atomic_force_velocity, ImplicitCharges, IndependentFragmentGrids, IndependentFragmentGrids_IndividualZeroInstances, IndependentFragmentGrids_IntegrationTest, IndependentFragmentGrids_Sole_NN_Calculation, JobMarket_RobustOnKillsSegFaults, JobMarket_StableWorkerPool, JobMarket_unresolvable_hostname_fix, MoreRobust_FragmentAutomation, ODR_violation_mpqc_open, PartialCharges_OrthogonalSummation, PdbParser_setsAtomName, PythonUI_with_named_parameters, QtGui_reactivate_TimeChanged_changes, Recreated_GuiChecks, Rewrite_FitPartialCharges, RotateToPrincipalAxisSystem_UndoRedo, SaturateAtoms_findBestMatching, SaturateAtoms_singleDegree, StoppableMakroAction, Subpackage_CodePatterns, Subpackage_JobMarket, Subpackage_LinearAlgebra, Subpackage_levmar, Subpackage_mpqc_open, Subpackage_vmg, Switchable_LogView, ThirdParty_MPQC_rebuilt_buildsystem, TrajectoryDependenant_MaxOrder, TremoloParser_IncreasedPrecision, TremoloParser_MultipleTimesteps, TremoloParser_setsAtomName, Ubuntu_1604_changes, stable
- Children:
- 9875cc
- Parents:
- 083490
- git-author:
- Frederik Heber <heber@…> (11/27/11 20:09:01)
- git-committer:
- Frederik Heber <heber@…> (05/04/12 14:19:07)
- Location:
- src/Fragmentation/Automation
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Fragmentation/Automation/FragmentResult.cpp
r083490 r2445fb 21 21 22 22 #include "FragmentResult.hpp" 23 24 /** Private default Constructor of class FragmentResult. 25 * 26 * This cstor is for serialization of this class inside a vector 27 * only. Without it, we would not need it. 28 */ 29 FragmentResult::FragmentResult() : 30 JobId(JobId::NoJob), 31 result(std::string("NoJob")) 32 {} 23 33 24 34 /** Constructor of class FragmentResult. -
src/Fragmentation/Automation/FragmentResult.hpp
r083490 r2445fb 50 50 private: 51 51 friend class boost::serialization::access; 52 53 /// private default constructor for serialization only. 54 FragmentResult(); 55 52 56 // serialization 53 57 template <typename Archive> -
src/Fragmentation/Automation/unittests/FragmentResultUnitTest.cpp
r083490 r2445fb 25 25 #include <boost/archive/text_oarchive.hpp> 26 26 #include <boost/archive/text_iarchive.hpp> 27 #include <boost/serialization/vector.hpp> 27 28 28 29 #include "FragmentResultUnitTest.hpp" … … 93 94 } 94 95 96 /** UnitTest for serialization 97 */ 98 void FragmentResultTest::vectorserializationTest() 99 { 100 std::vector<FragmentResult> testresults; 101 FragmentResult testResult(1); 102 testresults.push_back(testResult); 103 // write element to stream 104 std::stringstream stream; 105 boost::archive::text_oarchive oa(stream); 106 oa << testresults; 107 108 //std::cout << "Contents of archive is " << stream.str() << std::endl; 109 110 // create and open an archive for input 111 boost::archive::text_iarchive ia(stream); 112 // read class state from archive 113 std::vector<FragmentResult> othertestresults; 114 115 ia >> othertestresults; 116 117 CPPUNIT_ASSERT (testresults == othertestresults); 118 } -
src/Fragmentation/Automation/unittests/FragmentResultUnitTest.hpp
r083490 r2445fb 15 15 16 16 #include <string> 17 #include <vector> 17 18 18 19 #include <cppunit/extensions/HelperMacros.h> … … 25 26 CPPUNIT_TEST ( equalityTest ); 26 27 CPPUNIT_TEST ( serializationTest ); 28 CPPUNIT_TEST ( vectorserializationTest ); 27 29 CPPUNIT_TEST_SUITE_END(); 28 30 … … 32 34 void equalityTest(); 33 35 void serializationTest(); 36 void vectorserializationTest(); 34 37 35 38 };
Note:
See TracChangeset
for help on using the changeset viewer.