test/lib/conds: use `:` to concatenate trigger name suffix
authorSimon Marchi <simon.marchi@efficios.com>
Wed, 1 May 2024 21:29:20 +0000 (17:29 -0400)
committerSimon Marchi <simon.marchi@efficios.com>
Wed, 9 Oct 2024 02:56:57 +0000 (22:56 -0400)
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:

    <function name>:<cond id>:<suffix>

... where the suffix discriminates different triggers to reach the
pre/post condition identified by `<function name>:<cond id>`.  When the
suffix is concatenated using `-`, it's not clear where the cond id ends.

Change-Id: I9e27524a589f19094eb90543d500d015a985a123
Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/12779
Tested-by: jenkins <jenkins@lttng.org>
Reviewed-by: Philippe Proulx <eeppeliteloop@gmail.com>
tests/lib/conds/utils.cpp
tests/lib/conds/utils.hpp

index 364a7527a0c03b980217995adc4a5db53acb6876..657ffa00ecc050028abb4a62068779a63a9b22fd 100644 (file)
@@ -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 : "")}
 {
 }
 
index 7833c072ce86805ceeacd9aa04c00992512246c4..b9cb5f4206a9b7fbf0ada18f7edd751321fa6794 100644 (file)
@@ -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().
      */
This page took 0.025089 seconds and 4 git commands to generate.