test calendar+ns2calendar schedulers
authorMathieu Lacage <mathieu.lacage@sophia.inria.fr>
Thu, 15 Jan 2009 20:55:34 +0100
changeset 4095 4b919c166ec3
parent 4094 7d5024b3f882
child 4096 4542370485ef
test calendar+ns2calendar schedulers
src/simulator/simulator.cc
--- a/src/simulator/simulator.cc	Thu Jan 15 20:54:11 2009 +0100
+++ b/src/simulator/simulator.cc	Thu Jan 15 20:55:34 2009 +0100
@@ -316,6 +316,8 @@
 #include "list-scheduler.h"
 #include "heap-scheduler.h"
 #include "map-scheduler.h"
+#include "calendar-scheduler.h"
+#include "ns2-calendar-scheduler.h"
 
 namespace ns3 {
 
@@ -742,6 +744,20 @@
     }
   Simulator::Destroy ();
 
+  Simulator::SetScheduler (CreateObject<CalendarScheduler> ());
+  if (!RunOneTest ()) 
+    {
+      result = false;
+    }
+  Simulator::Destroy ();
+
+  Simulator::SetScheduler (CreateObject<Ns2CalendarScheduler> ());
+  if (!RunOneTest ()) 
+    {
+      result = false;
+    }
+  Simulator::Destroy ();
+
   Simulator::Schedule (Seconds (0.0), &foo0);
   Simulator::Schedule (Seconds (0.0), &foo1, 0);
   Simulator::Schedule (Seconds (0.0), &foo2, 0, 0);