Skip to content

Commit a5b21bf

Browse files
committed
Reviewer comment
1 parent 6e4cc0e commit a5b21bf

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

test/cpp/ext/otel/otel_test_library.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -407,13 +407,16 @@ MATCHER_P7(GaugeDataIsIncrementalForSpecificMetricAndLabelSet, metric_name,
407407
return result;
408408
}
409409

410+
// Helper matcher to check whether a value is within a certain range
410411
MATCHER_P2(IsWithinRange, lo, hi,
411412
absl::StrCat(negation ? "isn't" : "is", " between ",
412413
::testing::PrintToString(lo), " and ",
413414
::testing::PrintToString(hi))) {
414415
return (lo) <= arg && arg <= (hi);
415416
}
416417

418+
// Specialization of Extract to be able to use `IsWithinRange` matcher within
419+
// the `HistogramResultEq` matcher defined above.
417420
template <typename T>
418421
struct Extract<const IsWithinRangeMatcherP2<T, T>> {
419422
using Type = T;

0 commit comments

Comments
 (0)