| 1 |
{extends} |
| 2 |
|
| 3 |
var __gut_metadata_ = { |
| 4 |
path = '{path}', |
| 5 |
subpath = '{subpath}', |
| 6 |
stubber = __gut_instance_from_id({stubber_id}), |
| 7 |
spy = __gut_instance_from_id({spy_id}), |
| 8 |
gut = __gut_instance_from_id({gut_id}), |
| 9 |
} |
| 10 |
|
| 11 |
func __gut_instance_from_id(inst_id): |
| 12 |
if(inst_id == -1): |
| 13 |
return null |
| 14 |
else: |
| 15 |
return instance_from_id(inst_id) |
| 16 |
|
| 17 |
func __gut_should_call_super(method_name, called_with): |
| 18 |
if(__gut_metadata_.stubber != null): |
| 19 |
return __gut_metadata_.stubber.should_call_super(self, method_name, called_with) |
| 20 |
else: |
| 21 |
return false |
| 22 |
|
| 23 |
var __gut_utils_ = load('res://addons/gut/utils.gd').get_instance() |
| 24 |
|
| 25 |
func __gut_spy(method_name, called_with): |
| 26 |
if(__gut_metadata_.spy != null): |
| 27 |
__gut_metadata_.spy.add_call(self, method_name, called_with) |
| 28 |
|
| 29 |
func __gut_get_stubbed_return(method_name, called_with): |
| 30 |
if(__gut_metadata_.stubber != null): |
| 31 |
return __gut_metadata_.stubber.get_return(self, method_name, called_with) |
| 32 |
else: |
| 33 |
return null |
| 34 |
|
| 35 |
func _init(): |
| 36 |
if(__gut_metadata_.gut != null): |
| 37 |
__gut_metadata_.gut.get_autofree().add_free(self) |
| 38 |
|
| 39 |
# ------------------------------------------------------------------------------ |
| 40 |
# Methods start here |
| 41 |
# ------------------------------------------------------------------------------ |