@@ -71,7 +71,8 @@ class StateTest : public hyped::testing::Test {
71
71
/* *
72
72
* Testing Idle behaviour with respect to data
73
73
*/
74
- struct IdleTest : public StateTest {
74
+ class IdleTest : public StateTest {
75
+ protected:
75
76
state_machine::Idle *state = state_machine::Idle::getInstance();
76
77
};
77
78
@@ -131,7 +132,8 @@ TEST_F(IdleTest, handlesAllInitialised)
131
132
// Pre- Calibrating Tests
132
133
// ---------------------------------------------------------------------------
133
134
134
- struct PreCalibratingTest : public StateTest {
135
+ class PreCalibratingTest : public StateTest {
136
+ protected:
135
137
state_machine::PreCalibrating *state = state_machine::PreCalibrating::getInstance();
136
138
};
137
139
@@ -195,7 +197,8 @@ TEST_F(PreCalibratingTest, handlesCalibrateCommand)
195
197
* Testing Calibrating behaviour with respect to data
196
198
*/
197
199
198
- struct CalibratingTest : public StateTest {
200
+ class CalibratingTest : public StateTest {
201
+ protected:
199
202
state_machine::Calibrating *state = state_machine::Calibrating::getInstance();
200
203
};
201
204
@@ -259,7 +262,8 @@ TEST_F(CalibratingTest, handlesAllReady)
259
262
/* *
260
263
* Testing Ready behaviour with respect to data
261
264
*/
262
- struct ReadyTest : public StateTest {
265
+ class ReadyTest : public StateTest {
266
+ protected:
263
267
state_machine::Ready *state = state_machine::Ready::getInstance();
264
268
};
265
269
@@ -325,7 +329,8 @@ TEST_F(ReadyTest, handlesLaunchCommand)
325
329
/* *
326
330
* Testing Accelerating behaviour with respect to data
327
331
*/
328
- struct AcceleratingTest : public StateTest {
332
+ class AcceleratingTest : public StateTest {
333
+ protected:
329
334
state_machine::Accelerating *state = state_machine::Accelerating::getInstance();
330
335
};
331
336
@@ -433,7 +438,8 @@ TEST_F(AcceleratingTest, handlesReachedMaxVelocity)
433
438
/* *
434
439
* Testing Cruising behaviour with respect to data
435
440
*/
436
- struct CruisingTest : public StateTest {
441
+ class CruisingTest : public StateTest {
442
+ protected:
437
443
state_machine::Cruising *state = state_machine::Cruising::getInstance();
438
444
};
439
445
@@ -498,7 +504,8 @@ TEST_F(CruisingTest, handlesInBrakingZone)
498
504
/* *
499
505
* Testing PreBraking behaviour with respect to data
500
506
*/
501
- struct PreBrakingTest : public StateTest {
507
+ class PreBrakingTest : public StateTest {
508
+ protected:
502
509
state_machine::PreBraking *state = state_machine::PreBraking::getInstance();
503
510
};
504
511
@@ -563,7 +570,8 @@ TEST_F(PreBrakingTest, handlesHighPowerOff)
563
570
/* *
564
571
* Testing NominalBraking behaviour with respect to data
565
572
*/
566
- struct NominalBrakingTest : public StateTest {
573
+ class NominalBrakingTest : public StateTest {
574
+ protected:
567
575
state_machine::NominalBraking *state = state_machine::NominalBraking::getInstance();
568
576
};
569
577
@@ -628,7 +636,8 @@ TEST_F(NominalBrakingTest, handlesStopped)
628
636
/* *
629
637
* Testing Finished behaviour with respect to data
630
638
*/
631
- struct FinishedTest : public StateTest {
639
+ class FinishedTest : public StateTest {
640
+ protected:
632
641
state_machine::Finished *state = state_machine::Finished::getInstance();
633
642
};
634
643
@@ -663,7 +672,8 @@ TEST_F(FinishedTest, handlesShutdownCommand)
663
672
/* *
664
673
* Testing failure pre-braking behaviour with respect to data
665
674
*/
666
- struct FailurePreBrakingTest : public StateTest {
675
+ class FailurePreBrakingTest : public StateTest {
676
+ protected:
667
677
state_machine::FailurePreBraking *state = state_machine::FailurePreBraking::getInstance();
668
678
};
669
679
@@ -698,7 +708,8 @@ TEST_F(FailurePreBrakingTest, handlesHighPowerOff)
698
708
/* *
699
709
* Testing failure Braking behaviour with respect to data
700
710
*/
701
- struct FailureBrakingTest : public StateTest {
711
+ class FailureBrakingTest : public StateTest {
712
+ protected:
702
713
state_machine::FailureBraking *state = state_machine::FailureBraking::getInstance();
703
714
};
704
715
@@ -733,7 +744,8 @@ TEST_F(FailureBrakingTest, handlesStopped)
733
744
/* *
734
745
* Testing FailureStopped behaviour with respect to data
735
746
*/
736
- struct FailureStoppedTest : public StateTest {
747
+ class FailureStoppedTest : public StateTest {
748
+ protected:
737
749
state_machine::FailureStopped *state = state_machine::FailureStopped::getInstance();
738
750
};
739
751
0 commit comments