From bcce909e4c9161e4c6a68706f8ce8a902c1b6e89 Mon Sep 17 00:00:00 2001 From: Simon Marchi Date: Wed, 1 May 2024 17:29:20 -0400 Subject: [PATCH] test/lib/conds: use `:` to concatenate trigger name suffix For cosmetic (and obviously subjective reasons), use `:` when appending a trigger name suffix. Example: -message-iterator-class-next-method:clock-class-is-expected-mii-mii +message-iterator-class-next-method:clock-class-is-expected:mii-mii I like it because it's now of the form: :: ... where the suffix discriminates different triggers to reach the pre/post condition identified by `:`. When the suffix is concatenated using `-`, it's not clear where the cond id ends. Change-Id: I9e27524a589f19094eb90543d500d015a985a123 Signed-off-by: Simon Marchi Reviewed-on: https://review.lttng.org/c/babeltrace/+/12779 Tested-by: jenkins Reviewed-by: Philippe Proulx --- tests/lib/conds/utils.cpp | 2 +- tests/lib/conds/utils.hpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/lib/conds/utils.cpp b/tests/lib/conds/utils.cpp index 364a7527..657ffa00 100644 --- a/tests/lib/conds/utils.cpp +++ b/tests/lib/conds/utils.cpp @@ -21,7 +21,7 @@ CondTrigger::CondTrigger(const Type type, const std::string& condId, const bt2c::CStringView nameSuffix) noexcept : _mType {type}, _mCondId {fmt::format("{}:{}", type == Type::Pre ? "pre" : "post", condId)}, - _mName {fmt::format("{}{}{}", condId, nameSuffix ? "-" : "", nameSuffix ? nameSuffix : "")} + _mName {fmt::format("{}{}{}", condId, nameSuffix ? ":" : "", nameSuffix ? nameSuffix : "")} { } diff --git a/tests/lib/conds/utils.hpp b/tests/lib/conds/utils.hpp index 7833c072..b9cb5f42 100644 --- a/tests/lib/conds/utils.hpp +++ b/tests/lib/conds/utils.hpp @@ -47,7 +47,7 @@ protected: * ID `condId` (_without_ any `pre:` or `post:` prefix), and the * optional name suffix `nameSuffix`. * - * The concatenation of `condId` and, if it's set, `-` and + * The concatenation of `condId` and, if it's set, `:` and * `*nameSuffix`, forms the name of the condition trigger. Get the * name of the created condition trigger with name(). */ -- 2.34.1