Changeset cd5047 for src/unittests


Ignore:
Timestamp:
Jun 9, 2010, 2:30:10 PM (15 years ago)
Author:
Tillmann Crueger <crueger@…>
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:
112b09
Parents:
2c8934
Message:

Added Logging capabilities to Observer Framework

Location:
src/unittests
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • src/unittests/CacheableTest.cpp

    r2c8934 rcd5047  
    5555
    5656  threeNumbers(int _x,int _y, int _z) :
     57    Observable("threeNumbers"),
    5758    x(_x),y(_y),z(_z),
    58     sum(this,boost::bind(&threeNumbers::calcSum,this)),
     59    sum(this,boost::bind(&threeNumbers::calcSum,this),"sum"),
    5960    hasRecalced(false)
    6061  {}
  • src/unittests/ObserverTest.cpp

    r2c8934 rcd5047  
    3333public:
    3434  UpdateCountObserver() :
     35    Observer("UpdateCountObserver"),
    3536    updates(0)
    3637  {};
     
    4546class SimpleObservable : public Observable {
    4647public:
     48  SimpleObservable() :
     49    Observable("SimpleObservable")
     50  {}
     51
    4752  void changeMethod() {
    4853    OBSERVE;
     
    5459class CallObservable : public Observable {
    5560public:
     61  CallObservable() :
     62    Observable("CallObservable")
     63  {}
     64
    5665  void changeMethod1() {
    5766    OBSERVE;
     
    7079class BlockObservable : public Observable {
    7180public:
     81  BlockObservable() :
     82    Observable("BlockObservable")
     83  {}
     84
    7285  void changeMethod1(){
    7386    OBSERVE;
     
    104117class SuperObservable : public Observable {
    105118public:
    106   SuperObservable(){
     119  SuperObservable():
     120    Observable("SuperObservable")
     121  {
    107122    subObservable = new SimpleObservable();
    108123    subObservable->signOn(this);
     
    123138public:
    124139  NotificationObservable() :
    125       notification1(new Notification(this)),
    126       notification2(new Notification(this))
     140    Observable("NotificationObservable"),
     141    notification1(new Notification(this)),
     142    notification2(new Notification(this))
    127143  {}
    128144
     
    149165public:
    150166  NotificationObserver(Notification_ptr notification) :
     167    Observer("NotificationObserver"),
    151168    requestedNotification(notification),
    152169    wasNotified(false)
     
    172189
    173190  ObservableCollection(int _num) :
    174   num(_num)
     191    Observable("ObservableCollection"),
     192    num(_num)
    175193  {
    176194    for(int i=0; i<num; ++i){
  • src/unittests/manipulateAtomsTest.cpp

    r2c8934 rcd5047  
    5555public:
    5656  countObserver() :
     57    Observer("countObserver"),
    5758    count(0)
    5859    {}
Note: See TracChangeset for help on using the changeset viewer.