Changeset 4d4d33 for src/Parser/unittests
- Timestamp:
- Feb 9, 2011, 5:25:13 PM (14 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:
- acd638
- Parents:
- 1a6bda
- git-author:
- Frederik Heber <heber@…> (02/09/11 16:18:50)
- git-committer:
- Frederik Heber <heber@…> (02/09/11 17:25:13)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/unittests/ParserTremoloUnitTest.cpp
r1a6bda r4d4d33 44 44 CPPUNIT_TEST_SUITE_REGISTRATION( ParserTremoloUnitTest ); 45 45 46 static string Tremolo_Atomdata1 = "# ATOMDATA\tId\tname\tType\tx=3\n"; 47 static string Tremolo_Atomdata2 = "#\n#ATOMDATA Id name Type x=3\n1 hydrogen H 3.0 4.5 0.1\n\n"; 48 static string Tremolo_invalidkey = "#\n#ATOMDATA Id name foo Type x=3\n\n\n"; 49 static string Tremolo_velocity = "#\n#ATOMDATA Id name Type u=3\n1 hydrogen H 3.0 4.5 0.1\n\n"; 50 static string Tremolo_neighbours = "#\n#ATOMDATA Id Type neighbors=2\n1 H 3 0\n2 H 3 0\n3 O 1 2\n"; 51 static string Tremolo_improper = "#\n#ATOMDATA Id Type imprData\n8 H 9-10\n9 H 10-8,8-10\n10 O -\n"; 52 static string Tremolo_torsion = "#\n#ATOMDATA Id Type torsion\n8 H 9-10\n9 H 10-8,8-10\n10 O -\n"; 53 static string Tremolo_full = "# ATOMDATA\tx=3\tu=3\tF\tstress\tId\tneighbors=5\timprData\tGroupMeasureTypeNo\tType\textType\tname\tresName\tchainID\tresSeq\toccupancy\ttempFactor\tsegID\tCharge\tcharge\tGrpTypeNo\ttorsion\n0\t0\t0\t0\t0\t0\t0\t0\t1\t0\t0\t0\t0\t0\t-\t0\tH\t-\t-\t-\t0\t0\t0\t0\t0\t0\t0\t0\t-\t\n"; 46 static string Tremolo_Atomdata1 = "\ 47 # ATOMDATA\tId\tname\tType\tx=3\n"; 48 static string Tremolo_Atomdata2 = "\ 49 #\n\ 50 #ATOMDATA Id name Type x=3\n\ 51 1 hydrogen H 3.0 4.5 0.1\n\ 52 \n"; 53 static string Tremolo_invalidkey = "\ 54 #\n\ 55 #ATOMDATA Id name foo Type x=3\n\ 56 \n\n"; 57 static string Tremolo_velocity = "\ 58 #\n\ 59 #ATOMDATA Id name Type u=3\n\ 60 1 hydrogen H 3.0 4.5 0.1\n\ 61 \n"; 62 static string Tremolo_neighbours = "#\n\ 63 #ATOMDATA Id Type neighbors=2\n\ 64 1 H 3 0\n\ 65 2 H 3 0\n\ 66 3 O 1 2\n"; 67 static string Tremolo_improper = "\ 68 #\n\ 69 #ATOMDATA Id Type imprData\n\ 70 8 H 9-10\n\ 71 9 H 10-8,8-10\n\ 72 10 O -\n"; 73 static string Tremolo_torsion = "\ 74 #\n\ 75 #ATOMDATA Id Type torsion\n\ 76 8 H 9-10\n\ 77 9 H 10-8,8-10\n\ 78 10 O -\n"; 79 static string Tremolo_full = "\ 80 # ATOMDATA\tx=3\tu=3\tF\tstress\tId\tneighbors=5\timprData\tGroupMeasureTypeNo\tType\textType\tname\tresName\tchainID\tresSeq\toccupancy\ttempFactor\tsegID\tCharge\tcharge\tGrpTypeNo\ttorsion\n\ 81 0\t0\t0\t0\t0\t0\t0\t0\t1\t0\t0\t0\t0\t0\t-\t0\tH\t-\t-\t-\t0\t0\t0\t0\t0\t0\t0\t0\t-\t\n"; 54 82 55 83 void ParserTremoloUnitTest::setUp() { … … 79 107 std::vector<atom *> atoms = World::getInstance().getAllAtoms(); 80 108 testParser->save(&output, atoms); 109 // std::cout << output.str() << std::endl; 110 // std::cout << Tremolo_Atomdata1 << std::endl; 81 111 CPPUNIT_ASSERT(Tremolo_Atomdata1 == output.str()); 82 112 input.clear(); … … 90 120 std::vector<atom *> atoms = World::getInstance().getAllAtoms(); 91 121 testParser->save(&output, atoms); 122 std::cout << output.str() << std::endl; 92 123 CPPUNIT_ASSERT(output.str().find("hydrogen") != string::npos); 93 124 input.clear(); … … 149 180 testParser->save(&output, atoms); 150 181 CPPUNIT_ASSERT_EQUAL(3, World::getInstance().numAtoms()); 182 std::cout << output.str() << std::endl; 151 183 CPPUNIT_ASSERT(output.str().find("2-0,0-2") != string::npos); 152 184 input.clear(); … … 166 198 testParser->save(&output, atoms); 167 199 CPPUNIT_ASSERT_EQUAL(3, World::getInstance().numAtoms()); 200 std::cout << output.str() << std::endl; 168 201 CPPUNIT_ASSERT(output.str().find("2-0,0-2") != string::npos); 169 202 input.clear();
Note:
See TracChangeset
for help on using the changeset viewer.