mirror of
https://github.com/lihop/godot-xterm.git
synced 2025-05-08 21:25:31 +02:00
Add GUT (CLI only) and remove gd-plug
Commit GUT directly to the git repo and remove gd-plug as it is no longer required to install GUT. Modify GUT to be used by command-line only. For example: ``` cp test/.gutconfig.ci.json .gutconfig.json godot --no-window -s addons/gut/gut_cmdln.gd ```
This commit is contained in:
parent
b14ea64492
commit
d784b53e25
52 changed files with 11394 additions and 1174 deletions
59
addons/gut/double_templates/script_template.txt
Normal file
59
addons/gut/double_templates/script_template.txt
Normal file
|
@ -0,0 +1,59 @@
|
|||
# ##############################################################################
|
||||
# Start Script
|
||||
# ##############################################################################
|
||||
{extends}
|
||||
|
||||
{constants}
|
||||
|
||||
{properties}
|
||||
# ------------------------------------------------------------------------------
|
||||
# GUT Double properties and methods
|
||||
# ------------------------------------------------------------------------------
|
||||
var __gut_metadata_ = {
|
||||
path = '{path}',
|
||||
subpath = '{subpath}',
|
||||
stubber = __gut_instance_from_id({stubber_id}),
|
||||
spy = __gut_instance_from_id({spy_id}),
|
||||
gut = __gut_instance_from_id({gut_id}),
|
||||
from_singleton = '{singleton_name}',
|
||||
is_partial = {is_partial}
|
||||
}
|
||||
|
||||
func __gut_instance_from_id(inst_id):
|
||||
if(inst_id == -1):
|
||||
return null
|
||||
else:
|
||||
return instance_from_id(inst_id)
|
||||
|
||||
func __gut_should_call_super(method_name, called_with):
|
||||
if(__gut_metadata_.stubber != null):
|
||||
return __gut_metadata_.stubber.should_call_super(self, method_name, called_with)
|
||||
else:
|
||||
return false
|
||||
|
||||
var __gut_utils_ = load('res://addons/gut/utils.gd').get_instance()
|
||||
|
||||
func __gut_spy(method_name, called_with):
|
||||
if(__gut_metadata_.spy != null):
|
||||
__gut_metadata_.spy.add_call(self, method_name, called_with)
|
||||
|
||||
func __gut_get_stubbed_return(method_name, called_with):
|
||||
if(__gut_metadata_.stubber != null):
|
||||
return __gut_metadata_.stubber.get_return(self, method_name, called_with)
|
||||
else:
|
||||
return null
|
||||
|
||||
func __gut_default_val(method_name, p_index):
|
||||
if(__gut_metadata_.stubber != null):
|
||||
return __gut_metadata_.stubber.get_default_value(self, method_name, p_index)
|
||||
else:
|
||||
return null
|
||||
|
||||
|
||||
func _init():
|
||||
if(__gut_metadata_.gut != null):
|
||||
__gut_metadata_.gut.get_autofree().add_free(self)
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# Methods start here
|
||||
# ------------------------------------------------------------------------------
|
Loading…
Add table
Add a link
Reference in a new issue