Add cleanup check
This commit is contained in:
parent
4e6d7c31f3
commit
8d819c9ffa
1 changed files with 8 additions and 0 deletions
8
tests/unit/z_cleanup.gd
Normal file
8
tests/unit/z_cleanup.gd
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
extends 'res://tests/unitbase.gd'
|
||||||
|
|
||||||
|
func test_root() -> void:
|
||||||
|
var children_active: Array[String] = []
|
||||||
|
for child in get_tree().root.get_children(): if child.name != "RuntimeScene" and child.name != name: children_active.append(child.name)
|
||||||
|
|
||||||
|
if children_active.size() == 0: rok()
|
||||||
|
else: rerror("There are still children active in /root/")
|
Loading…
Reference in a new issue