Changeset 0e5675


Ignore:
Timestamp:
Apr 6, 2011, 4:05:13 PM (15 years ago)
Author:
Frederik Heber <heber@…>
Children:
e3ace2
Parents:
9ebc9d
git-author:
Frederik Heber <heber@…> (04/06/11 12:26:41)
git-committer:
Frederik Heber <heber@…> (04/06/11 16:05:13)
Message:

Removed Info usage in ChronosUnitTest.

  • added dummy InfoStub.
  • but test uses Chronos functions only, not via Info class (this is for InfoTest!).
  • removed TESTLIB in Makefile.am, replaced by specific modules required.
Location:
src/Helpers/unittests
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • src/Helpers/unittests/ChronosUnitTest.cpp

    r9ebc9d r0e5675  
    2525
    2626#include "Chronos.hpp"
    27 #include "Info.hpp"
    2827
    2928#include "ChronosUnitTest.hpp"
     
    4140void dummy()
    4241{
    43   Info FunctionInfo(__func__);
     42  Chronos::getInstance().startTiming(__func__);
    4443  for (int i=0;i<10000000;++i)
    4544    std::cout << "";
     45  Chronos::getInstance().endTiming(__func__);
    4646}
    4747
    4848void dummy_two()
    4949{
    50   Info FunctionInfo(__func__);
     50  Chronos::getInstance().startTiming(__func__);
    5151  for (int i=0;i<1000000;++i)
    5252    std::cout << "";
     53  Chronos::getInstance().endTiming(__func__);
    5354}
    5455
     
    105106  // "inline" dummy
    106107  {
    107     Info DummyInfo("dummy_three");
     108    Chronos::getInstance().startTiming("dummy_three");
    108109    for (int i=0;i<1000000;++i)
    109110      std::cout << "";
     111    Chronos::getInstance().endTiming("dummy_three");
    110112  }
    111113  CPPUNIT_ASSERT( Chronos::getInstance().TimeRunning.find(std::string("dummy_three"))
  • src/Helpers/unittests/Makefile.am

    r9ebc9d r0e5675  
    3232ChronosUnitTest_SOURCES = $(top_srcdir)/src/unittests/UnitTestMain.cpp \
    3333        ChronosUnitTest.cpp \
    34         ChronosUnitTest.hpp
    35 ChronosUnitTest_LDADD = ${TESTLIBS}
     34        ChronosUnitTest.hpp \
     35        stubs/InfoStub.cpp
     36nodist_ChronosUnitTest_SOURCES = \
     37        ../Assert.cpp \
     38        ../Assert.hpp \
     39        ../MemDebug.cpp \
     40        ../MemDebug.hpp \
     41        ../Chronos.cpp \
     42        ../Chronos.hpp \
     43        ../Info.hpp
     44ChronosUnitTest_LDADD = \
     45        $(BOOST_THREAD_LIB)
    3646
    3747InfoUnitTest_SOURCES = $(top_srcdir)/src/unittests/UnitTestMain.cpp \
Note: See TracChangeset for help on using the changeset viewer.