chore: add GUT test framework

This commit is contained in:
xiaji
2026-05-29 09:16:10 +08:00
parent 5741ba1dc0
commit 07fc763413
808 changed files with 76903 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
extends GutTest
func test_this_passes():
pass_test('passing')
func test_this_also_passes():
assert_eq(1, 1, 'one')
func test_this_is_pending():
pending('')
func test_this_does_nothing():
pass
func test_another_pass():
assert_true(true, 'true')

View File

@@ -0,0 +1 @@
uid://b07xl8307vui4

View File

@@ -0,0 +1,29 @@
extends GutTest
func test_this_causes_an_error_and_passes():
_lgr.error('There was an error here')
pass_test('passes')
func test_this_causes_an_error_and_fails():
_lgr.error('another error here')
fail_test('this fails')
func test_this_causes_an_orphan_and_passes():
var n = Node.new()
pass_test('passes')
func test_this_causes_a_warning_and_passes():
_lgr.warn('A new warning')
pass_test('passing')
func test_this_causes_a_warning_and_fails():
_lgr.warn('Another warning')
fail_test('failing')
func test_this_causes_a_deprecation_and_passes():
_lgr.deprecated('this thing should not be used anymore')
pass_test('passing')
func test_this_causes_a_deprecation_and_fails():
_lgr.deprecated('this thing should not be used anymore')
fail_test('passing')

View File

@@ -0,0 +1 @@
uid://cjxx4swxk6tdf