@@ -36,6 +36,9 @@ void runtime_test::MakeAnother::impl(context& ctx) {
36
36
ctx._ctx .generate (ctx.get <ComponentA>());
37
37
}
38
38
39
+ void runtime_test::TestAction::impl (context& ctx) {
40
+ }
41
+
39
42
void runtime_test::AlwaysRemove::impl (context& ctx) {
40
43
// This trivial remove should not even be required:
41
44
// SEE: https://github.com/ecsact-dev/ecsact_lang_cpp/issues/80
@@ -797,6 +800,36 @@ TEST(Core, MultiPkgUpdate) {
797
800
}
798
801
}
799
802
803
+ TEST (Core, NoAction) {
804
+ static bool action_executed = false ;
805
+
806
+ ASSERT_TRUE (ecsact_set_system_execution_impl (
807
+ ecsact_id_cast<ecsact_system_like_id>(runtime_test::TestAction::id),
808
+ [](ecsact_system_execution_context*) { action_executed = true ; }
809
+ ));
810
+
811
+ auto reg = ecsact::core::registry (" Core_NoAction" );
812
+
813
+ auto test_entity = reg.create_entity ();
814
+ reg.add_component (test_entity, runtime_test::ComponentA{});
815
+
816
+ reg.execute_systems ();
817
+
818
+ ASSERT_FALSE (action_executed);
819
+
820
+ auto exec_opts = ecsact::core::execution_options{};
821
+
822
+ auto exec_err = reg.execute_systems (std::array{exec_opts});
823
+ ASSERT_EQ (exec_err, ECSACT_EXEC_SYS_OK);
824
+ ASSERT_FALSE (action_executed);
825
+
826
+ auto evc = ecsact::core::execution_events_collector<>{};
827
+
828
+ exec_err = reg.execute_systems (std::array{exec_opts}, evc);
829
+ ASSERT_EQ (exec_err, ECSACT_EXEC_SYS_OK);
830
+ ASSERT_FALSE (action_executed);
831
+ }
832
+
800
833
#ifdef ECSACT_ENTT_TEST_STATIC_SYSTEM_IMPL
801
834
TEST (Core, StaticSystemImpl) {
802
835
auto reg_id = ecsact_create_registry (" StaticSystemImpl" );
0 commit comments