chore(tooling): install GUT v9.6.0 test framework
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
22
addons/gut/double_templates/double_data_template.txt
Normal file
22
addons/gut/double_templates/double_data_template.txt
Normal file
@@ -0,0 +1,22 @@
|
||||
var __gutdbl_values = {
|
||||
thepath = '{path}',
|
||||
subpath = '{subpath}',
|
||||
stubber = {stubber_id},
|
||||
spy = {spy_id},
|
||||
gut = {gut_id},
|
||||
singleton_name = '{singleton_name}',
|
||||
singleton = {singleton_id},
|
||||
is_partial = {is_partial},
|
||||
doubled_methods = {doubled_methods},
|
||||
}
|
||||
var __gutdbl = load('res://addons/gut/double_tools.gd').new(self)
|
||||
|
||||
# Here so other things can check for a method to know if this is a double.
|
||||
func __gutdbl_check_method__():
|
||||
pass
|
||||
|
||||
# Cleanup called by GUT after tests have finished. Important for RefCounted
|
||||
# objects. Nodes are freed, and won't have this method called on them.
|
||||
func __gutdbl_done():
|
||||
__gutdbl = null
|
||||
__gutdbl_values.clear()
|
||||
9
addons/gut/double_templates/function_template.txt
Normal file
9
addons/gut/double_templates/function_template.txt
Normal file
@@ -0,0 +1,9 @@
|
||||
{func_decleration}
|
||||
if(__gutdbl == null):
|
||||
return
|
||||
|
||||
__gutdbl.spy_on('{method_name}', {param_array})
|
||||
if(__gutdbl.is_stubbed_to_call_super('{method_name}', {param_array})):
|
||||
{super_call}
|
||||
else:
|
||||
return await __gutdbl.handle_other_stubs('{method_name}', {param_array})
|
||||
4
addons/gut/double_templates/init_template.txt
Normal file
4
addons/gut/double_templates/init_template.txt
Normal file
@@ -0,0 +1,4 @@
|
||||
{func_decleration}:
|
||||
super({super_params})
|
||||
__gutdbl.spy_on('{method_name}', {param_array})
|
||||
|
||||
13
addons/gut/double_templates/script_template.txt
Normal file
13
addons/gut/double_templates/script_template.txt
Normal file
@@ -0,0 +1,13 @@
|
||||
# ##############################################################################
|
||||
# Gut Doubled Script
|
||||
# ##############################################################################
|
||||
{extends}
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# GUT stuff
|
||||
# ------------------------------------------------------------------------------
|
||||
{double_data}
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# Doubled Methods
|
||||
# ------------------------------------------------------------------------------
|
||||
16
addons/gut/double_templates/singleton_template.txt
Normal file
16
addons/gut/double_templates/singleton_template.txt
Normal file
@@ -0,0 +1,16 @@
|
||||
{extends}
|
||||
|
||||
{constants}
|
||||
|
||||
{signals}
|
||||
|
||||
{properties}
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# GUT stuff
|
||||
# ------------------------------------------------------------------------------
|
||||
{double_data}
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# Doubled Methods
|
||||
# ------------------------------------------------------------------------------
|
||||
Reference in New Issue
Block a user