Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
codefactor: malformed whitespace issues
[simgrid.git] / src / xbt / dynar_test.cpp
index 87bd5fe..d549738 100644 (file)
 
 #include "catch.hpp"
 
-#define NB_ELEM 5000
+constexpr int NB_ELEM = 5000;
 
 TEST_CASE("xbt::dynar: generic C vector", "dynar")
 {
-
   SECTION("Dynars of integers")
   {
     /* Vars_decl [doxygen cruft] */
@@ -119,7 +118,7 @@ TEST_CASE("xbt::dynar: generic C vector", "dynar")
     for (int i = 0; i < NB_ELEM / 2; i++) {
       int val;
       xbt_dynar_shift(d, &val);
-      REQUIRE(val == i); // The retrieved value is not the same than the injected one at the begining
+      REQUIRE(val == i); // The retrieved value is not the same than the injected one at the beginning
     }
     for (int i = 999; i >= 0; i--) {
       int val;
@@ -272,7 +271,7 @@ TEST_CASE("xbt::dynar: generic C vector", "dynar")
     for (int i = 0; i < 2500; i++) {
       d1 = (double)i;
       xbt_dynar_shift(d, &d2);
-      REQUIRE(d1 == d2); // The retrieved value is not the same than the injected one at the begining
+      REQUIRE(d1 == d2); // The retrieved value is not the same than the injected one at the beginning
     }
     for (int i = 999; i >= 0; i--) {
       d1 = (double)i;