[ntcore] Pass pub/sub options as a unified PubSubOptions struct (#4794)

In Java, PubSubOption is still used for passing options, but this
simplifies C++ use substantially, as it allows aggregate construction.
This commit is contained in:
Peter Johnson
2022-12-12 19:28:15 -08:00
committed by GitHub
parent f66a667321
commit a865f48e96
53 changed files with 695 additions and 623 deletions

View File

@@ -9,18 +9,19 @@
namespace nt {
bool PubSubOptionsMatcher::MatchAndExplain(
const PubSubOptions& val, ::testing::MatchResultListener* listener) const {
const PubSubOptionsImpl& val,
::testing::MatchResultListener* listener) const {
bool match = true;
if (val.periodicMs != good.periodicMs) {
*listener << "periodic mismatch ";
match = false;
}
if (val.pollStorageSize != good.pollStorageSize) {
*listener << "pollStorageSize mismatch ";
if (val.pollStorage != good.pollStorage) {
*listener << "pollStorage mismatch ";
match = false;
}
if (val.sendAll != good.sendAll) {
*listener << "logging mismatch ";
*listener << "sendAll mismatch ";
match = false;
}
if (val.keepDuplicates != good.keepDuplicates) {