mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-21 01:01:43 +00:00
[commands] Use factories and decorators in Command tests (#7006)
This commit is contained in:
@@ -2,6 +2,8 @@
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
#include <frc2/command/Commands.h>
|
||||
|
||||
#include "CommandTestBase.h"
|
||||
#include "frc2/command/RunCommand.h"
|
||||
|
||||
@@ -13,9 +15,9 @@ TEST_F(RunCommandTest, RunCommandSchedule) {
|
||||
|
||||
int counter = 0;
|
||||
|
||||
RunCommand command([&counter] { counter++; }, {});
|
||||
auto command = cmd::Run([&counter] { counter++; });
|
||||
|
||||
scheduler.Schedule(&command);
|
||||
scheduler.Schedule(command);
|
||||
scheduler.Run();
|
||||
scheduler.Run();
|
||||
scheduler.Run();
|
||||
|
||||
Reference in New Issue
Block a user