diff options
| author | Sophia Pearson <codergal89@gmail.com> | 2022-10-03 22:22:50 +0200 |
|---|---|---|
| committer | Sophia Pearson <codergal89@gmail.com> | 2022-10-04 22:18:18 +0200 |
| commit | e127ad39e742396030352240d829bc903b1d4464 (patch) | |
| tree | 10cc21d70bf13181aef7c8ad0344077ff63579a3 /addons/gut/double_templates | |
| parent | ddbb045f6387a8ba23b1210b27a745516a387a52 (diff) | |
| download | texty-e127ad39e742396030352240d829bc903b1d4464.tar.xz texty-e127ad39e742396030352240d829bc903b1d4464.zip | |
godot: inital Godot 4 migration
Diffstat (limited to 'addons/gut/double_templates')
| -rw-r--r-- | addons/gut/double_templates/function_template.txt | 6 | ||||
| -rw-r--r-- | addons/gut/double_templates/init_template.txt | 3 | ||||
| -rw-r--r-- | addons/gut/double_templates/script_template.txt | 58 |
3 files changed, 0 insertions, 67 deletions
diff --git a/addons/gut/double_templates/function_template.txt b/addons/gut/double_templates/function_template.txt deleted file mode 100644 index 666952e..0000000 --- a/addons/gut/double_templates/function_template.txt +++ /dev/null @@ -1,6 +0,0 @@ -{func_decleration} - __gut_spy('{method_name}', {param_array}) - if(__gut_should_call_super('{method_name}', {param_array})): - return {super_call} - else: - return __gut_get_stubbed_return('{method_name}', {param_array}) diff --git a/addons/gut/double_templates/init_template.txt b/addons/gut/double_templates/init_template.txt deleted file mode 100644 index 8a0cb95..0000000 --- a/addons/gut/double_templates/init_template.txt +++ /dev/null @@ -1,3 +0,0 @@ -{func_decleration}{super_params}: - __gut_init() - __gut_spy('{method_name}', {param_array}) diff --git a/addons/gut/double_templates/script_template.txt b/addons/gut/double_templates/script_template.txt deleted file mode 100644 index 2071207..0000000 --- a/addons/gut/double_templates/script_template.txt +++ /dev/null @@ -1,58 +0,0 @@ -# ############################################################################## -# 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 __gut_init(): - if(__gut_metadata_.gut != null): - __gut_metadata_.gut.get_autofree().add_free(self) - -# ------------------------------------------------------------------------------ -# Methods start here -# ------------------------------------------------------------------------------ |
