awawawawawawawawawawawawawawawawawawwawa
This commit is contained in:
parent
9e23368b09
commit
cdd4924668
1 changed files with 6 additions and 9 deletions
|
@ -28,9 +28,6 @@ var stats_unknown: int = 0
|
||||||
# To stop any still running test
|
# To stop any still running test
|
||||||
var crashed: bool = false
|
var crashed: bool = false
|
||||||
|
|
||||||
# To decrease allocations == to increase performance
|
|
||||||
var temp_test_message: String = ""
|
|
||||||
|
|
||||||
# +++ initialization +++
|
# +++ initialization +++
|
||||||
# Startup function
|
# Startup function
|
||||||
func _ready() -> void:
|
func _ready() -> void:
|
||||||
|
@ -255,15 +252,15 @@ func run_suite(suite: String) -> void:
|
||||||
await suite_node.after_each()
|
await suite_node.after_each()
|
||||||
if crashed: return
|
if crashed: return
|
||||||
|
|
||||||
temp_test_message = lsanitize(suite_node.test_message) if suite_node.test_message != "" else "[i]No message has been set.[/i]"
|
var test_message: String = lsanitize(suite_node.test_message) if suite_node.test_message != "" else "[i]No message has been set.[/i]"
|
||||||
# Merge result into result dictionary
|
# Merge result into result dictionary
|
||||||
results.merge({ suite + ":" + test_method["name"].replace("test_", ""): { "status": suite_node.test_status, "message": temp_test_message } })
|
results.merge({ suite + ":" + test_method["name"].replace("test_", ""): { "status": suite_node.test_status, "message": test_message } })
|
||||||
# Print result
|
# Print result
|
||||||
match(suite_node.test_status):
|
match(suite_node.test_status):
|
||||||
0: lresu("[color=green]Test " + suite + ":" + test_method["name"].replace("test_", "") + " has passed: " + temp_test_message + "[/color]")
|
0: lresu("[color=green]Test " + suite + ":" + test_method["name"].replace("test_", "") + " has passed: " + test_message + "[/color]")
|
||||||
1: lresu("[color=yellow]Test " + suite + ":" + test_method["name"].replace("test_", "") + " has passed with warnings: " + temp_test_message + "[/color]")
|
1: lresu("[color=yellow]Test " + suite + ":" + test_method["name"].replace("test_", "") + " has passed with warnings: " + test_message + "[/color]")
|
||||||
2: lresu("[color=red]Test " + suite + ":" + test_method["name"].replace("test_", "") + " has failed: " + temp_test_message + "[/color]")
|
2: lresu("[color=red]Test " + suite + ":" + test_method["name"].replace("test_", "") + " has failed: " + test_message + "[/color]")
|
||||||
3: lresu("[color=gray]Test " + suite + ":" + test_method["name"].replace("test_", "") + " was skipped: " + temp_test_message + "[/color]")
|
3: lresu("[color=gray]Test " + suite + ":" + test_method["name"].replace("test_", "") + " was skipped: " + test_message + "[/color]")
|
||||||
505: lresu("[color=red]Test " + suite + ":" + test_method["name"].replace("test_", "") + " returned an invalid status (did you forget to set the test status?).[/color]")
|
505: lresu("[color=red]Test " + suite + ":" + test_method["name"].replace("test_", "") + " returned an invalid status (did you forget to set the test status?).[/color]")
|
||||||
_: lresu("[color=red]Test " + suite + ":" + test_method["name"].replace("test_", "") + " returned an invalid status.[/color]")
|
_: lresu("[color=red]Test " + suite + ":" + test_method["name"].replace("test_", "") + " returned an invalid status.[/color]")
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue