Files
conan-center-index/recipes/hfsm2/all/test_package/example.cpp
Jak-o-Shadows 7baff33db9 Add HFSM2 Recipe (#22647)
* Add HFSM2 Recipe

* #22657 - fix linter errors via adding newlines to end of yaml files

* #22647 - Remove trailing spaces in HFSM2 conandata.yml (introduced while adding newline at end of file)

* Change to only latest version, add newlines to end of files, changes to make CIwork, responding to feedback on PR#22647

* coan-io#22647 - Add newline back, fix issue added when upgrading version to 2.5.1

* conan-io#22657: Try not including the examples and tests

* Remove template comments

* Bump hfm2 version to 2.5.2

Signed-off-by: Uilian Ries <uilianries@gmail.com>

* Adapt recipe for Conan 2.x only

Signed-off-by: Uilian Ries <uilianries@gmail.com>

* Simplify HFSM2 test package

Signed-off-by: Uilian Ries <uilianries@gmail.com>

---------

Signed-off-by: Uilian Ries <uilianries@gmail.com>
Co-authored-by: Uilian Ries <uilianries@gmail.com>
2025-02-27 12:10:53 +00:00

21 lines
443 B
C++

#include <cstdlib>
#include <iostream>
#include <hfsm2/machine.hpp>
struct Context{};
using Config = hfsm2::Config::ContextT<Context&>;
using M = hfsm2::MachineT<Config>;
using FSM = M::PeerRoot<struct State>;
struct State : FSM::State {};
int main(void) {
Context context;
FSM::Instance machine{context};
machine.update();
std::cout << "[HFSM2] Test package passed with success." << std::endl;
return EXIT_SUCCESS;
}