diff --git a/addons/besseretests/src/runtimescene.gd b/addons/besseretests/src/runtimescene.gd index f3da277..29e157e 100644 --- a/addons/besseretests/src/runtimescene.gd +++ b/addons/besseretests/src/runtimescene.gd @@ -166,6 +166,13 @@ func terminate(exit_code: int = 0) -> void: get_tree().quit(exit_code) # Checks -func check_children() -> void: if get_tree().root.get_child_count() != 1: lwarn("There are still '" + str(get_tree().root.get_child_count()-1) + "' children active in the scene tree. Please make sure to call 'remove_child' on them in your tests.") +func check_children() -> void: + if get_tree().root.get_child_count() != 1: + lwarn("There are still '" + str(get_tree().root.get_child_count()-1) + "' children active in the scene tree. Please make sure to call 'remove_child' on them in your tests.") + lwarn("Here's a tree of /root:") + get_tree().root.print_tree_pretty() -func check_orphan_nodes() -> void: if config_print_orphan_nodes: if Performance.get_monitor(Performance.OBJECT_ORPHAN_NODE_COUNT) != 4: lwarn("There are still '" + str(Performance.get_monitor(Performance.OBJECT_ORPHAN_NODE_COUNT)-4) + "' orphan nodes loaded. Please make sure to call 'queue_free' or 'free' on them in your tests.") +func check_orphan_nodes() -> void: + if config_print_orphan_nodes: + if Performance.get_monitor(Performance.OBJECT_ORPHAN_NODE_COUNT) != 4: + lwarn("There are still '" + str(Performance.get_monitor(Performance.OBJECT_ORPHAN_NODE_COUNT)-4) + "' orphan nodes loaded. Please make sure to call 'queue_free' or 'free' on them in your tests.")