mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-21 01:01:43 +00:00
[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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user