Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Add first implementation of variable for-loop
[simgrid.git] / src / xbt / utils / iter / subsets_tests.cpp
index 2db7f18..2415a16 100644 (file)
@@ -1,6 +1,7 @@
 #include "src/3rd-party/catch.hpp"
 #include "src/xbt/utils/iter/LazyKSubsets.hpp"
 #include "src/xbt/utils/iter/LazyPowerset.hpp"
+#include "src/xbt/utils/iter/variable_for_loop.hpp"
 
 #include <unordered_map>
 #include <unordered_set>
@@ -22,7 +23,7 @@ TEST_CASE("simgrid::xbt::subsets_iterator: Iteration General Properties")
 {
   std::vector<int> example_vec{0, 1, 2, 3, 4, 5, 6, 7};
 
-  SECTION("Each element of each subset is distinct and appears half of the time")
+  SECTION("Each element of each subset is distinct")
   {
     for (unsigned k = 0; static_cast<size_t>(k) < example_vec.size(); k++) {
       for (auto& subset : make_k_subsets_iter(k, example_vec)) {
@@ -68,4 +69,15 @@ TEST_CASE("simgrid::xbt::powerset_iterator: Iteration General Properties")
       REQUIRE(iter.second == expected_count);
     }
   }
+}
+
+TEST_CASE("simgrid::xbt::variable_for_loop: Edge Cases")
+{
+
+  SECTION("Iterations without effect")
+  {
+    SECTION("Iteration over no collections") {}
+
+    SECTION("Iteration with an empty collection") {}
+  }
 }
\ No newline at end of file