tests/lib/conds: make `condMain()` take a span for args
[babeltrace.git] / tests / lib / conds / utils.hpp
index d742d9088f317d9a42405752cc17a2244e185462..d8abfafe11ac2ad2c2861146bbd80423c86dd58b 100644 (file)
@@ -8,8 +8,10 @@
 #define TESTS_LIB_CONDS_UTILS_HPP
 
 #include <functional>
+#include <memory>
 #include <string>
 #include <utility>
+#include <vector>
 
 #include <babeltrace2/babeltrace.h>
 
@@ -28,6 +30,8 @@
 class CondTrigger
 {
 public:
+    using UP = std::unique_ptr<CondTrigger>;
+
     /*
      * Condition type.
      */
@@ -135,7 +139,7 @@ private:
 /*
  * List of condition triggers.
  */
-using CondTriggers = bt2s::span<CondTrigger * const>;
+using CondTriggers = std::vector<CondTrigger::UP>;
 
 /*
  * The entry point of a condition trigger program.
@@ -174,6 +178,6 @@ using CondTriggers = bt2s::span<CondTrigger * const>;
  *     The program is expected to abort through a libbabeltrace2
  *     condition failure.
  */
-void condMain(int argc, const char **argv, CondTriggers triggers) noexcept;
+void condMain(const bt2s::span<const char * const> argv, const CondTriggers& triggers) noexcept;
 
 #endif /* TESTS_LIB_CONDS_UTILS_HPP */
This page took 0.024037 seconds and 4 git commands to generate.