mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-29 02:21:44 +00:00
Expose and fix error where old subsystems were being referended after use in tests
Change-Id: I50e66b3d61f5c70dee653ab3e9899f2286f3741c
This commit is contained in:
@@ -26,7 +26,7 @@ protected:
|
||||
* scope of the test.
|
||||
*/
|
||||
void TeardownScheduler(){
|
||||
Scheduler::GetInstance()->RemoveAll();
|
||||
Scheduler::GetInstance()->ResetAll();
|
||||
}
|
||||
|
||||
void AssertCommandState(MockCommand &command, int initialize, int execute, int isFinished, int end, int interrupted){
|
||||
@@ -224,11 +224,11 @@ TEST_F(CommandTest, ThreeCommandOnSubSystem){
|
||||
|
||||
//CommandSequentialGroupTest ported from CommandSequentialGroupTest.java
|
||||
TEST_F(CommandTest, OneCommandSupersedingAnotherBecauseOfDependencies){
|
||||
ASubsystem subsystem("Command Superseding Test Subsystem");
|
||||
ASubsystem* subsystem = new ASubsystem("Command Superseding Test Subsystem");
|
||||
MockCommand command1;
|
||||
command1.Requires(&subsystem);
|
||||
command1.Requires(subsystem);
|
||||
MockCommand command2;
|
||||
command2.Requires(&subsystem);
|
||||
command2.Requires(subsystem);
|
||||
|
||||
|
||||
AssertCommandState(command1, 0, 0, 0, 0, 0);
|
||||
|
||||
Reference in New Issue
Block a user