mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-20 00:51:42 +00:00
[command] Add ignoringDisable decorator (#4305)
This commit is contained in:
@@ -54,6 +54,19 @@ TEST_F(CommandDecoratorTest, Until) {
|
||||
EXPECT_FALSE(scheduler.IsScheduled(&command));
|
||||
}
|
||||
|
||||
TEST_F(CommandDecoratorTest, IgnoringDisable) {
|
||||
CommandScheduler scheduler = GetScheduler();
|
||||
|
||||
auto command = RunCommand([] {}, {}).IgnoringDisable(true);
|
||||
|
||||
SetDSEnabled(false);
|
||||
|
||||
scheduler.Schedule(command.get());
|
||||
|
||||
scheduler.Run();
|
||||
EXPECT_TRUE(scheduler.IsScheduled(command.get()));
|
||||
}
|
||||
|
||||
TEST_F(CommandDecoratorTest, BeforeStarting) {
|
||||
CommandScheduler scheduler = GetScheduler();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user