StatemachineKeywords.cc 837 B

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