Skip to content

Commit

Permalink
feat: Enable windows ci (#173)
Browse files Browse the repository at this point in the history
  • Loading branch information
erikzenker authored Dec 12, 2021
1 parent f0ee392 commit 273749e
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
File renamed without changes.
6 changes: 2 additions & 4 deletions include/hsm/details/sm.h
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ template <class RootState, class... OptionalParameters> class sm {
return ProcessEventResult::AllGuardsFailed;
}

process_anonymous_transitions();
process_anonymous_transitions(noneEvent {});
return ProcessEventResult::EventProcessed;
}

Expand All @@ -205,16 +205,14 @@ template <class RootState, class... OptionalParameters> class sm {
}
}

auto process_anonymous_transitions()
template <class Event> auto process_anonymous_transitions(Event&& event)
{
if constexpr (has_anonymous_transition(rootState)) {
while (true) {
auto allGuardsFailed = true;

const auto currentRegions = current_regions();
for (Region region = 0; region < currentRegions; region++) {

auto event = noneEvent {};
// NOLINTNEXTLINE(cppcoreguidelines-pro-bounds-constant-array-index)
auto& results = get_dispatch_table_entry(event, region);

Expand Down
10 changes: 9 additions & 1 deletion test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ add_executable(
integration/transition_postfix_dsl.cpp
integration/transition_prefix_dsl.cpp
integration/no_action.cpp
integration/state_data_members.cpp
integration/transition_logging.cpp
integration/amalgamation_header.cpp
integration/custom_targets.cpp
Expand All @@ -84,6 +83,15 @@ add_executable(
integration/reproducer/should_enter_substate_with_multiple_regions.cpp
)

if (UNIX)
target_sources(
hsmIntegrationTests
PRIVATE
# Test compilation fails with msvc with: fatal error C1001: Internal compiler error
integration/state_data_members.cpp
)
endif()

target_compile_features(hsmIntegrationTests PRIVATE cxx_std_17)
target_link_libraries(hsmIntegrationTests PRIVATE hsm::hsm GTest::gtest_main)
gtest_discover_tests(hsmIntegrationTests TEST_PREFIX integration.)

0 comments on commit 273749e

Please sign in to comment.