StaticChoiceTest.cc 771 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /* Generated by YAKINDU Statechart Tools code generator. */
  2. #include <string>
  3. #include "gtest/gtest.h"
  4. #include "StaticChoice.h"
  5. #include "sc_runner.h"
  6. #include "sc_types.h"
  7. //! The timers are managed by a timer service. */
  8. static SctUnitRunner * runner;
  9. class StaticChoiceTest : public ::testing::Test{
  10. protected:
  11. StaticChoice* statechart;
  12. virtual void SetUp() {
  13. statechart = new StaticChoice();
  14. statechart->init();
  15. runner = new SctUnitRunner(
  16. statechart,
  17. false,
  18. 200
  19. );
  20. }
  21. virtual void TearDown() {
  22. delete statechart;
  23. delete runner;
  24. }
  25. };
  26. TEST_F(StaticChoiceTest, StaticChoiceTest) {
  27. statechart->enter();
  28. EXPECT_TRUE(statechart->isStateActive(StaticChoice::main_region_Start));
  29. runner->proceed_cycles(1);
  30. }