mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
[cmd3] Change Command.noRequirements to accept a command implementation (#8783)
This is more ergonomic than `Command.noRequirements().executing(...)`
This commit is contained in:
@@ -64,8 +64,7 @@ class SchedulerDefaultCommandTests extends CommandTestBase {
|
||||
var commandScopedCommand = mech.run(Coroutine::park).named("Command-Scoped Default Command");
|
||||
|
||||
var scopingCommand =
|
||||
Command.noRequirements()
|
||||
.executing(
|
||||
Command.noRequirements(
|
||||
co -> {
|
||||
mech.setDefaultCommand(commandScopedCommand);
|
||||
co.park();
|
||||
@@ -93,8 +92,7 @@ class SchedulerDefaultCommandTests extends CommandTestBase {
|
||||
|
||||
var commandScopedCommand = mech.run(Coroutine::park).named("Command-Scoped Default Command");
|
||||
var scopingCommand =
|
||||
Command.noRequirements()
|
||||
.executing(
|
||||
Command.noRequirements(
|
||||
co -> {
|
||||
mech.setDefaultCommand(commandScopedCommand);
|
||||
co.park();
|
||||
@@ -126,8 +124,7 @@ class SchedulerDefaultCommandTests extends CommandTestBase {
|
||||
var commandScopedCommand = mech.run(Coroutine::park).named("Command-Scoped Default Command");
|
||||
|
||||
final Command scopingCommand =
|
||||
Command.noRequirements()
|
||||
.executing(
|
||||
Command.noRequirements(
|
||||
co -> {
|
||||
mech.setDefaultCommand(commandScopedCommand);
|
||||
co.park();
|
||||
|
||||
Reference in New Issue
Block a user