[ntcore] Handle topicsonly followed by value subscribe (#4991)

Previously this wouldn't send the last value on the value subscribe if a
topics only subscription already existed.

Also start adding server implementation unit tests.
This commit is contained in:
Peter Johnson
2023-01-24 21:50:38 -08:00
committed by GitHub
parent 917906530a
commit 9e5b7b8040
4 changed files with 287 additions and 10 deletions

View File

@@ -33,8 +33,10 @@ class SpanMatcher : public ::testing::MatcherInterface<std::span<T>> {
};
template <typename T>
inline ::testing::Matcher<std::span<const T>> SpanEq(std::span<const T> good) {
return ::testing::MakeMatcher(new SpanMatcher(good));
inline ::testing::Matcher<std::span<const typename T::value_type>> SpanEq(
const T& good) {
return ::testing::MakeMatcher(
new SpanMatcher(std::span<const typename T::value_type>(good)));
}
template <typename T>