Skip to content

Commit

Permalink
more fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Starlight220 committed Dec 20, 2024
1 parent 77afd7d commit 28d7291
Showing 1 changed file with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ using namespace frc2;

using SendableChooserTestPublisherFunc = std::function<void(wpi::Sendable*)>;
using SendableChooserTestArgs =
std::pair<std::function<frc2::CommandPtr(SendablePublisherFunc)>,
std::pair<std::function<frc2::CommandPtr(SendableChooserTestPublisherFunc)>,
std::vector<std::string_view>>;

class SendableChooserCommandTest
Expand Down Expand Up @@ -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<SendableChooserTestArgs> OptionsAreCorrectParams() {
SendableChooserTestArgs empty{[](SendableChooserTestPublisherFunc func) {
return frc2::cmd::Choose(func);
},
std::vector<std::string_view>()};

SendableChooserTestArgs duplicateName{

Check failure on line 63 in wpilibNewCommands/src/test/native/cpp/frc2/command/SendableChooserCommandTest.cpp

View workflow job for this annotation

GitHub Actions / Build - Windows

'initializing': cannot convert from 'initializer list' to 'std::pair<std::function<frc2::CommandPtr (SendableChooserTestPublisherFunc)>,std::vector<std::string_view,std::allocator<std::string_view>>>'
[](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"));

Check failure on line 65 in wpilibNewCommands/src/test/native/cpp/frc2/command/SendableChooserCommandTest.cpp

View workflow job for this annotation

GitHub Actions / Build - Windows

'frc2::cmd::Choose': no matching overloaded function found
}, make_vector<std::string_view>("a", "b")};

SendableChooserTestArgs happyPath{

Check failure on line 68 in wpilibNewCommands/src/test/native/cpp/frc2/command/SendableChooserCommandTest.cpp

View workflow job for this annotation

GitHub Actions / Build - Windows

'initializing': cannot convert from 'initializer list' to 'std::pair<std::function<frc2::CommandPtr (SendableChooserTestPublisherFunc)>,std::vector<std::string_view,std::allocator<std::string_view>>>'
[](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"));

Check failure on line 70 in wpilibNewCommands/src/test/native/cpp/frc2/command/SendableChooserCommandTest.cpp

View workflow job for this annotation

GitHub Actions / Build - Windows

'frc2::cmd::Choose': no matching overloaded function found
}, make_vector<std::string_view>("a", "b", "c")};

return testing::Values(empty, duplicateName, happyPath);
return make_vector<SendableChooserTestArgs>(empty, duplicateName, happyPath);
}

} // namespace utils

INSTANTIATE_TEST_SUITE_P(SendableChooserCommandTests,
SendableChooserCommandTest,
utils::OptionsAreCorrectParams());
testing::ValuesIn(utils::OptionsAreCorrectParams()));

0 comments on commit 28d7291

Please sign in to comment.