Some more tests
diff --git a/include/rive/animation/state_machine_event.hpp b/include/rive/animation/state_machine_event.hpp index c59bc16..8eca197 100644 --- a/include/rive/animation/state_machine_event.hpp +++ b/include/rive/animation/state_machine_event.hpp
@@ -13,6 +13,7 @@ void addInputChange(EventInputChange* inputChange); public: + size_t inputChangeCount() const { return m_InputChanges.size(); } StatusCode import(ImportStack& importStack) override; }; } // namespace rive
diff --git a/test/state_machine_event_test.cpp b/test/state_machine_event_test.cpp index 4e5389c..e74e818 100644 --- a/test/state_machine_event_test.cpp +++ b/test/state_machine_event_test.cpp
@@ -2,6 +2,7 @@ #include <rive/file.hpp> #include <rive/animation/state_machine_bool.hpp> #include <rive/animation/state_machine_layer.hpp> +#include <rive/animation/state_machine_event.hpp> #include <rive/animation/animation_state.hpp> #include <rive/animation/entry_state.hpp> #include <rive/animation/state_transition.hpp> @@ -27,4 +28,10 @@ REQUIRE(stateMachine->eventCount() == 3); REQUIRE(stateMachine->inputCount() == 4); + + // Expect each of the three events to have one input change each. + for (int i = 0; i < 3; i++) { + auto event = stateMachine->event(i); + REQUIRE(event->inputChangeCount() == 1); + } }