X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/4834cb24245a3a7355ab8586f5177a774c545fb7..595e59c568ff5f8510de201bfd800951cdc2adcb:/src/surf/trace_mgr_test.cpp diff --git a/src/surf/trace_mgr_test.cpp b/src/surf/trace_mgr_test.cpp index 4b81b68863..30b261ef57 100644 --- a/src/surf/trace_mgr_test.cpp +++ b/src/surf/trace_mgr_test.cpp @@ -4,22 +4,22 @@ * under the terms of the license (GNU LGPL) which comes with this package. */ #define BOOST_TEST_MODULE Trace Manager tests - bool init_unit_test(); // boost forget to give this prototype on NetBSD, which does not fit our paranoid flags #define BOOST_TEST_DYN_LINK #define BOOST_TEST_NO_MAIN #include -namespace utf = boost::unit_test; #include "src/surf/surf_interface.hpp" #include "src/surf/trace_mgr.hpp" -namespace tmgr = simgrid::trace_mgr; #include "xbt/log.h" #include "xbt/misc.h" #include +namespace utf = boost::unit_test; +namespace tmgr = simgrid::trace_mgr; + XBT_LOG_NEW_DEFAULT_CATEGORY(unit, "Unit tests of the Trace Manager"); double thedate; @@ -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* 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