diff --git a/wpilibNewCommands/src/test/native/cpp/frc2/command/SendableChooserCommandTest.cpp b/wpilibNewCommands/src/test/native/cpp/frc2/command/SendableChooserCommandTest.cpp index 5c1bccf8d72..0d419d855f3 100644 --- a/wpilibNewCommands/src/test/native/cpp/frc2/command/SendableChooserCommandTest.cpp +++ b/wpilibNewCommands/src/test/native/cpp/frc2/command/SendableChooserCommandTest.cpp @@ -22,7 +22,7 @@ using namespace frc2; using SendableChooserTestPublisherFunc = std::function; using SendableChooserTestArgs = - std::pair, + std::pair, std::vector>; class SendableChooserCommandTest @@ -54,27 +54,27 @@ static const frc2::CommandPtr CommandNamed(std::string_view name) { return frc2::cmd::Print(name).WithName(name); } -static const auto OptionsAreCorrectParams() { +static const std::vector OptionsAreCorrectParams() { SendableChooserTestArgs empty{[](SendableChooserTestPublisherFunc func) { return frc2::cmd::Choose(func); }, std::vector()}; SendableChooserTestArgs duplicateName{ - [](SendableChooserTestPublisherFunc(func) { - return frc2::cmd::Choose(func, CommandNamed("a"), CommandNamed("b"), CommandNamed("a")), + [](SendableChooserTestPublisherFunc func) { + return frc2::cmd::Choose(func, CommandNamed("a"), CommandNamed("b"), CommandNamed("a")); }, make_vector("a", "b")}; SendableChooserTestArgs happyPath{ - [](SendableChooserTestPublisherFunc(func) { - return frc2::cmd::Choose(func, CommandNamed("a"), CommandNamed("b"), CommandNamed("c")), + [](SendableChooserTestPublisherFunc func) { + return frc2::cmd::Choose(func, CommandNamed("a"), CommandNamed("b"), CommandNamed("c")); }, make_vector("a", "b", "c")}; - return testing::Values(empty, duplicateName, happyPath); + return make_vector(empty, duplicateName, happyPath); } } // namespace utils INSTANTIATE_TEST_SUITE_P(SendableChooserCommandTests, SendableChooserCommandTest, - utils::OptionsAreCorrectParams()); + testing::ValuesIn(utils::OptionsAreCorrectParams()));