Skip to content

Commit

Permalink
Fix warn unused variable in test
Browse files Browse the repository at this point in the history
Signed-off-by: Jorge Perez <[email protected]>
  • Loading branch information
Blast545 committed Apr 26, 2024
1 parent 77f4c00 commit ae019b3
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 ae019b3

Please sign in to comment.