# A connection lifecycle as a state machine: states and events are
# std::variant alternatives, the transition is a pure function that
# returns the next state and a command, and the tests check every
# state against every event.
add_library(adv_connection STATIC connection.cpp)
target_include_directories(adv_connection PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})

lld_add_example(adv_connection_lifecycle SOURCES main.cpp EXPECTED_OUTPUT expected_output.txt)
target_link_libraries(adv_connection_lifecycle PRIVATE adv_connection)

lld_add_test(adv_connection_tests SOURCES tests/test_transitions.cpp tests/test_properties.cpp)
target_link_libraries(adv_connection_tests PRIVATE adv_connection)
