TimeMonitor_UnitTests.cpp

Go to the documentation of this file.
00001 #include "Teuchos_TimeMonitor.hpp"
00002 
00003 #include "Teuchos_UnitTestHarness.hpp"
00004 
00005 
00006 namespace Teuchos {
00007 
00008 
00009 TEUCHOS_UNIT_TEST( TimeMonitor, FUNC_TIME_MONITOR  )
00010 {
00011   TEUCHOS_FUNC_TIME_MONITOR("FUNC_TIME_MONITOR1");
00012   std::ostringstream oss;
00013   TimeMonitor::summarize(oss);
00014   out << oss.str() << "\n";
00015   const size_t substr_i = oss.str().find("FUNC_TIME_MONITOR1");
00016   TEST_INEQUALITY(substr_i, std::string::npos);
00017 }
00018 
00019 
00020 TEUCHOS_UNIT_TEST( TimeMonitor, FUNC_TIME_MONITOR_tested  )
00021 {
00022   TEUCHOS_FUNC_TIME_MONITOR("FUNC_TIME_MONITOR2");
00023   {
00024     TEUCHOS_FUNC_TIME_MONITOR_DIFF("FUNC_TIME_MONITOR2_inner", inner);
00025   }
00026   std::ostringstream oss;
00027   TimeMonitor::summarize(oss);
00028   out << oss.str() << "\n";
00029   const size_t substr_i = oss.str().find("FUNC_TIME_MONITOR2");
00030   TEST_INEQUALITY(substr_i, std::string::npos);
00031   const size_t substr_inner_i = oss.str().find("FUNC_TIME_MONITOR2_inner");
00032   TEST_INEQUALITY(substr_inner_i, std::string::npos);
00033 }
00034 
00035 
00036 } // namespace Teuchos
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Generated on Wed Apr 13 09:57:31 2011 for Teuchos Package Browser (Single Doxygen Collection) by  doxygen 1.6.3