Skip to content

Commit

Permalink
Fix warn unused variable in test (#2388)
Browse files Browse the repository at this point in the history
Signed-off-by: Jorge Perez <[email protected]>
  • Loading branch information
Blast545 authored Apr 29, 2024
1 parent cffd297 commit 0b54328
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/network/NetworkConfig_TEST.cc
Original file line number Diff line number Diff line change
Expand Up @@ -33,30 +33,35 @@ TEST(NetworkManager, ValueConstructor)
assert(config.role == NetworkRole::None);
assert(config.numSecondariesExpected == 0);
// Expect console warning as well
(void) config;
}

{
// Primary with number of secondaries is valid
auto config = NetworkConfig::FromValues("PRIMARY", 3);
assert(config.role == NetworkRole::SimulationPrimary);
assert(config.numSecondariesExpected == 3);
(void) config;
}

{
// Secondary is always valid
auto config = NetworkConfig::FromValues("SECONDARY", 0);
assert(config.role == NetworkRole::SimulationSecondary);
(void) config;
}

{
// Readonly is always valid
auto config = NetworkConfig::FromValues("READONLY");
assert(config.role == NetworkRole::ReadOnly);
(void) config;
}

{
// Anything else is invalid
auto config = NetworkConfig::FromValues("READ_WRITE");
assert(config.role == NetworkRole::None);
(void) config;
}
}

0 comments on commit 0b54328

Please sign in to comment.