Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
overall optimization of map usage
[simgrid.git] / src / surf / trace_mgr_test.cpp
index c498ee6..bc2d47c 100644 (file)
@@ -29,6 +29,7 @@ public:
   void apply_event(tmgr_trace_event_t event, double value)
   {
     XBT_VERB("t=%.1f: Change value to %lg (idx: %d)", thedate, value, event->idx);
+    tmgr_trace_event_unref(&event);
   }
   bool isUsed() { return true; }
 };
@@ -61,6 +62,7 @@ static void trace2vector(const char* str, std::vector<tmgr::DatedValue>* whereto
       XBT_DEBUG("%.1f: ignore an event (idx: %d)\n", thedate, it->idx);
     }
   }
+  tmgr_finalize();
 }
 
 /* Fails in a way that is difficult to test: xbt_assert should become throw
@@ -155,6 +157,7 @@ static bool init_function()
 
 int main(int argc, char** argv)
 {
+  XBT_LOG_CONNECT(unit);
   xbt_log_init(&argc, argv);
   return ::boost::unit_test::unit_test_main(&init_function, argc, argv);
 }