#include "cpp-common/bt2/graph.hpp"
#include "cpp-common/bt2c/c-string-view.hpp"
+#include "cpp-common/bt2c/span.hpp"
#include "cpp-common/bt2s/make-unique.hpp"
#include "utils.hpp"
},
CondTrigger::Type::PRE, "field-class-integer-set-field-value-range:not-null:field-class"));
- condMain(argc, argv, triggers);
+ condMain(bt2c::makeSpan(argv, argc), triggers);
}
} /* namespace */
-void condMain(const int argc, const char ** const argv, const CondTriggers& condTriggers) noexcept
+void condMain(const bt2s::span<const char * const> argv, const CondTriggers& condTriggers) noexcept
{
- BT_ASSERT(argc >= 2);
+ BT_ASSERT(argv.size() >= 2);
if (strcmp(argv[1], "list") == 0) {
listCondTriggers(condTriggers);
g_unsetenv("BABELTRACE_EXEC_ON_ABORT");
/* Call the trigger */
- BT_ASSERT(argc >= 3);
+ BT_ASSERT(argv.size() >= 3);
const auto index = atoi(argv[2]);
#include <babeltrace2/babeltrace.h>
#include "cpp-common/bt2c/c-string-view.hpp"
+#include "cpp-common/bt2s/span.hpp"
#include "../utils/run-in.hpp"
* The program is expected to abort through a libbabeltrace2
* condition failure.
*/
-void condMain(int argc, const char **argv, const CondTriggers& triggers) noexcept;
+void condMain(const bt2s::span<const char * const> argv, const CondTriggers& triggers) noexcept;
#endif /* TESTS_LIB_CONDS_UTILS_HPP */