Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Add new entry in Release_Notes.
[simgrid.git] / src / kernel / resource / profile / Profile_test.cpp
index 09205f3..97ff0ab 100644 (file)
@@ -1,15 +1,14 @@
-/* Copyright (c) 2017-2022. The SimGrid Team. All rights reserved.               */
+/* Copyright (c) 2017-2023. The SimGrid Team. All rights reserved.               */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
-#include "catch.hpp"
+#include "src/3rd-party/catch.hpp"
 
+#include "simgrid/kernel/ProfileBuilder.hpp"
 #include "src/kernel/resource/Resource.hpp"
 #include "src/kernel/resource/profile/Event.hpp"
-#include "simgrid/kernel/ProfileBuilder.hpp"
 #include "src/kernel/resource/profile/StochasticDatedValue.hpp"
-#include "src/surf/surf_interface.hpp"
 
 #include "xbt/log.h"
 #include "xbt/misc.h"
@@ -45,7 +44,7 @@ static std::vector<simgrid::kernel::profile::DatedValue> trace2vector(const char
 
   MockedResource daResource;
   simgrid::kernel::profile::FutureEvtSet fes;
-  simgrid::kernel::profile::Event* insertedIt = trace->schedule(&fes, &daResource);
+  const simgrid::kernel::profile::Event* insertedIt = trace->schedule(&fes, &daResource);
 
   while (fes.next_date() <= 20.0 && fes.next_date() >= 0) {
     MockedResource::the_date = fes.next_date();
@@ -145,7 +144,7 @@ TEST_CASE("kernel::profile: Resource profiles, defining the external load", "ker
 
     REQUIRE(want == got);
   }
-/*
+
   SECTION("One stochastic event (parsing)")
   {
     using simgrid::kernel::profile::Distribution;
@@ -153,7 +152,6 @@ TEST_CASE("kernel::profile: Resource profiles, defining the external load", "ker
                                                                                    "DET 0 UNIF 10 20");
 
     std::vector<simgrid::kernel::profile::StochasticDatedValue> want;
-    want.emplace_back(0, -1); // The initial fake event
     want.emplace_back(Distribution::DET, std::vector<double>{0}, Distribution::UNIF, std::vector<double>{10, 20});
 
     REQUIRE(want == got);
@@ -169,7 +167,6 @@ TEST_CASE("kernel::profile: Resource profiles, defining the external load", "ker
                                                                                    "DET 5 UNIF 5 25");
 
     std::vector<simgrid::kernel::profile::StochasticDatedValue> want;
-    want.emplace_back(0, -1);
     want.emplace_back(Distribution::DET, std::vector<double>{0}, Distribution::DET, std::vector<double>{4});
     want.emplace_back(Distribution::NORM, std::vector<double>{25, 10}, Distribution::DET, std::vector<double>{3});
     want.emplace_back(Distribution::UNIF, std::vector<double>{10, 20}, Distribution::NORM, std::vector<double>{25, 10});
@@ -177,7 +174,7 @@ TEST_CASE("kernel::profile: Resource profiles, defining the external load", "ker
 
     REQUIRE(want == got);
   }
-*/
+
   SECTION("Two stochastic events (drawing each distribution)")
   {
     simgrid::xbt::random::set_implem_xbt();