fix: 修复聊天系统编译错误
- 修复 WebSocketManager/SocketIOClient 函数缩进错误 - 重命名 is_connected() 避免与 Object 基类冲突 - 修复 tscn 文件多余前导空格 - 修复测试文件 GUT 断言函数调用 - 添加 GUT 测试框架
This commit is contained in:
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})):
|
||||
return {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})
|
||||
|
||||
37
addons/gut/double_templates/script_template.txt
Normal file
37
addons/gut/double_templates/script_template.txt
Normal file
@@ -0,0 +1,37 @@
|
||||
# ##############################################################################
|
||||
# Gut Doubled Script
|
||||
# ##############################################################################
|
||||
{extends}
|
||||
|
||||
{constants}
|
||||
|
||||
{properties}
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# GUT stuff
|
||||
# ------------------------------------------------------------------------------
|
||||
var __gutdbl_values = {
|
||||
thepath = '{path}',
|
||||
subpath = '{subpath}',
|
||||
stubber = {stubber_id},
|
||||
spy = {spy_id},
|
||||
gut = {gut_id},
|
||||
from_singleton = '{singleton_name}',
|
||||
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()
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# Doubled Methods
|
||||
# ------------------------------------------------------------------------------
|
||||
Reference in New Issue
Block a user