Brücke zu Godot und Godot-Projekt

Die GDExtension grovewright-bridge gibt den Kern als Klasse GwSession
an GDScript weiter: Befehle einreihen, einen Takt ausführen, Karte und
Inventar lesen, speichern, laden, aufzeichnen. Eine Panik im Kern macht
die Sitzung defekt, statt einen guten Speicherstand zu überschreiben.
Das Godot-Projekt bekommt einen Testläufer, der auch Laufzeitfehler als
Fehlschlag zählt.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
Steven Wroblewski
2026-10-01 10:46:23 +02:00
parent 5dacbf2222
commit bd0f588714
16 changed files with 838 additions and 1 deletions
+19
View File
@@ -0,0 +1,19 @@
class_name TestCase
extends RefCounted
## Base of every test script. Checks collect failures instead of stopping at
## the first one, so a run shows everything that is wrong.
var failures: PackedStringArray = []
## The running SceneTree, for tests that need frames or nodes.
var tree: SceneTree
func check(condition: bool, message: String) -> void:
if not condition:
failures.append(message)
## Fails unless `actual` and `expected` have the same type and value.
func check_eq(actual: Variant, expected: Variant, message: String) -> void:
if typeof(actual) != typeof(expected) or actual != expected:
failures.append("%s: expected %s, got %s" % [message, expected, actual])