EntryExitSelfTransition.cc 903 B

1234567891011121314151617181920212223242526272829
  1. /**
  2. * Copyright (c) 2014 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 <string>
  12. #include "gtest/gtest.h"
  13. #include "EntryExitSelfTransition.h"
  14. EntryExitSelfTransition handle;
  15. TEST(StatemachineTest, EntryExitSelfTransitionTest) {
  16. entryExitSelfTransition_init(&handle);
  17. entryExitSelfTransition_enter(&handle);
  18. entryExitSelfTransition_runCycle(&handle);
  19. EXPECT_TRUE(entryExitSelfTransitionIface_get_x(&handle) == 1);
  20. entryExitSelfTransitionIface_raise_e(&handle);
  21. entryExitSelfTransition_runCycle(&handle);
  22. EXPECT_TRUE(entryExitSelfTransitionIface_get_x(&handle) == 3);
  23. }