From aaa7e5205e3f2d35478d558a75462d0e3c69ef94 Mon Sep 17 00:00:00 2001 From: Sander Mertens Date: Wed, 4 May 2022 13:46:15 +0000 Subject: [PATCH] #714 add quarantined test for reproducing cycle bug --- test/api/project.json | 1 + test/api/src/OnDelete.c | 17 +++++++++++++++++ test/api/src/main.c | 7 ++++++- 3 files changed, 24 insertions(+), 1 deletion(-) diff --git a/test/api/project.json b/test/api/project.json index a2688fad3..6444ddde4 100644 --- a/test/api/project.json +++ b/test/api/project.json @@ -555,6 +555,7 @@ "on_delete_cyclic_storage_table_2", "on_delete_cyclic_storage_table_3", "on_delete_cyclic_set_empty", + "2_acyclic_relations_w_cycle", "on_delete_remove_2_comps", "on_delete_remove_2_comps_to_existing_table", "on_delete_delete_recursive", diff --git a/test/api/src/OnDelete.c b/test/api/src/OnDelete.c index aa47764d0..a597d878e 100644 --- a/test/api/src/OnDelete.c +++ b/test/api/src/OnDelete.c @@ -848,6 +848,23 @@ void OnDelete_on_delete_cyclic_set_empty() { ecs_fini(world); } +void OnDelete_2_acyclic_relations_w_cycle() { + test_quarantine("May 4th 2022"); + + ecs_world_t *world = ecs_init(); + + ecs_entity_t r1 = ecs_new_w_id(world, EcsAcyclic); + ecs_entity_t r2 = ecs_new_w_id(world, EcsAcyclic); + + ecs_entity_t a = ecs_new_id(world); + ecs_entity_t b = ecs_new_id(world); + + ecs_add_pair(world, a, r1, b); + ecs_add_pair(world, b, r2, a); + + ecs_fini(world); +} + void OnDelete_on_delete_remove_2_comps() { ecs_world_t *world = ecs_init(); diff --git a/test/api/src/main.c b/test/api/src/main.c index 95d63482c..d462fc42d 100644 --- a/test/api/src/main.c +++ b/test/api/src/main.c @@ -518,6 +518,7 @@ void OnDelete_on_delete_cyclic_storage_table(void); void OnDelete_on_delete_cyclic_storage_table_2(void); void OnDelete_on_delete_cyclic_storage_table_3(void); void OnDelete_on_delete_cyclic_set_empty(void); +void OnDelete_2_acyclic_relations_w_cycle(void); void OnDelete_on_delete_remove_2_comps(void); void OnDelete_on_delete_remove_2_comps_to_existing_table(void); void OnDelete_on_delete_delete_recursive(void); @@ -3860,6 +3861,10 @@ bake_test_case OnDelete_testcases[] = { "on_delete_cyclic_set_empty", OnDelete_on_delete_cyclic_set_empty }, + { + "2_acyclic_relations_w_cycle", + OnDelete_2_acyclic_relations_w_cycle + }, { "on_delete_remove_2_comps", OnDelete_on_delete_remove_2_comps @@ -9415,7 +9420,7 @@ static bake_test_suite suites[] = { "OnDelete", NULL, NULL, - 77, + 78, OnDelete_testcases }, {