StatemachineKeywords.cc 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /**
  2. * Copyright (c) 2017 committers of YAKINDU and others.
  3. * All rights reserved. This program and the accompanying materials
  4. * are made available under the terms of the Eclipse Public License v1.0
  5. * which accompanies this distribution, and is available at
  6. * http://www.eclipse.org/legal/epl-v10.html
  7. *
  8. * Contributors:
  9. * committers of YAKINDU - initial API and implementation
  10. */
  11. #include "gtest/gtest.h"
  12. #include "StatechartKeywords.h"
  13. #include "StatechartKeywordsRequired.h"
  14. StatechartKeywords handle;
  15. class StatemachineTest : public ::testing::Test{
  16. protected:
  17. virtual void SetUp() {
  18. statechartKeywords_init(&handle);
  19. }
  20. };
  21. TEST_F(StatemachineTest, statemachineKeywords) {
  22. statechartKeywords_enter(&handle);
  23. EXPECT_TRUE(statechartKeywords_isStateActive(&handle, StatechartKeywords_main_region_Timer));
  24. }
  25. void statechartKeywords_setTimer(StatechartKeywords* handle, const sc_eventid evid, const sc_integer time_ms, const sc_boolean periodic){
  26. // Mockup
  27. statechartKeywords_raiseTimeEvent(handle, evid);
  28. }
  29. void statechartKeywords_unsetTimer(StatechartKeywords* handle, const sc_eventid evid){
  30. // Mockup
  31. }
  32. void statechartKeywordsIfaceIf_myOperation(const StatechartKeywords* handle){
  33. }
  34. void statechartKeywordsInternal_myOperation(const StatechartKeywords* handle){
  35. }