Adding log.gd
This commit is contained in:
parent
eb32d6614e
commit
4522259397
547 changed files with 46844 additions and 0 deletions
84
addons/gdUnit4/test/mocker/resources/AdvancedTestClass.gd
Normal file
84
addons/gdUnit4/test/mocker/resources/AdvancedTestClass.gd
Normal file
|
|
@ -0,0 +1,84 @@
|
|||
# this class used to mock testing with inner classes and default arguments in functions
|
||||
class_name AdvancedTestClass
|
||||
extends Resource
|
||||
|
||||
class SoundData:
|
||||
@warning_ignore("unused_private_class_variable")
|
||||
var _sample :String
|
||||
@warning_ignore("unused_private_class_variable")
|
||||
var _randomnes :float
|
||||
|
||||
class AtmosphereData:
|
||||
enum {
|
||||
WATER,
|
||||
AIR,
|
||||
SMOKY,
|
||||
}
|
||||
var _toxigen :float
|
||||
var _type :int
|
||||
|
||||
func _init(type := AIR, toxigen := 0.0):
|
||||
_type = type
|
||||
_toxigen = toxigen
|
||||
# some comment, and an row staring with an space to simmulate invalid formatting
|
||||
|
||||
|
||||
# seter func with default values
|
||||
func set_data(type := AIR, toxigen := 0.0) :
|
||||
_type = type
|
||||
_toxigen = toxigen
|
||||
|
||||
static func to_atmosphere(_value :Dictionary) -> AtmosphereData:
|
||||
return null
|
||||
|
||||
class Area4D extends Resource:
|
||||
|
||||
const SOUND := 1
|
||||
const ATMOSPHERE := 2
|
||||
var _meta := Dictionary()
|
||||
|
||||
func _init(_x :int, atmospere :AtmosphereData = null):
|
||||
_meta[ATMOSPHERE] = atmospere
|
||||
|
||||
func get_sound() -> SoundData:
|
||||
# sounds are optional
|
||||
if _meta.has(SOUND):
|
||||
return _meta[SOUND] as SoundData
|
||||
return null
|
||||
|
||||
func get_atmoshere() -> AtmosphereData:
|
||||
return _meta[ATMOSPHERE] as AtmosphereData
|
||||
|
||||
var _areas : = {}
|
||||
|
||||
func _init():
|
||||
# add default atmoshere
|
||||
_areas["default"] = Area4D.new(1, AtmosphereData.new())
|
||||
|
||||
func get_area(name :String, default :Area4D = null) -> Area4D:
|
||||
return _areas.get(name, default)
|
||||
|
||||
|
||||
# test spy is called sub functions select(<type>) -> a(), b(), c()
|
||||
enum {
|
||||
A, B, C
|
||||
}
|
||||
|
||||
func a() -> String:
|
||||
return "a"
|
||||
|
||||
func b() -> String:
|
||||
return "b"
|
||||
|
||||
func c() -> String:
|
||||
return "c"
|
||||
|
||||
func select( type :int) -> String:
|
||||
match type:
|
||||
A: return a()
|
||||
B: return b()
|
||||
C: return c()
|
||||
_: return ""
|
||||
|
||||
static func to_foo() -> String:
|
||||
return "foo"
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
class_name GdUnit_Test_CustomClassName
|
||||
extends Resource
|
||||
|
||||
|
|
@ -0,0 +1,52 @@
|
|||
extends Object
|
||||
|
||||
var _message
|
||||
|
||||
@warning_ignore("unused_parameter")
|
||||
func _init(message:String, path:String="", load_on_init:bool=false,
|
||||
set_auto_save:bool=false, set_network_sync:bool=false
|
||||
) -> void:
|
||||
_message = message
|
||||
|
||||
|
||||
@warning_ignore("unused_parameter")
|
||||
func a1(set_name:String, path:String="", load_on_init:bool=false,
|
||||
set_auto_save:bool=false, set_network_sync:bool=false
|
||||
) -> void:
|
||||
pass
|
||||
|
||||
|
||||
@warning_ignore("unused_parameter")
|
||||
func a2(set_name:String, path:String="", load_on_init:bool=false,
|
||||
set_auto_save:bool=false, set_network_sync:bool=false
|
||||
) -> void:
|
||||
pass
|
||||
|
||||
|
||||
@warning_ignore("unused_parameter")
|
||||
func a3(set_name:String, path:String="", load_on_init:bool=false,
|
||||
set_auto_save:bool=false, set_network_sync:bool=false
|
||||
) :
|
||||
pass
|
||||
|
||||
|
||||
@warning_ignore("unused_parameter")
|
||||
func a4(set_name:String,
|
||||
path:String="",
|
||||
load_on_init:bool=false,
|
||||
set_auto_save:bool=false,
|
||||
set_network_sync:bool=false
|
||||
):
|
||||
pass
|
||||
|
||||
|
||||
@warning_ignore("unused_parameter")
|
||||
func a5(
|
||||
value : Array,
|
||||
expected : String,
|
||||
test_parameters : Array = [
|
||||
[ ["a"], "a" ],
|
||||
[ ["a", "very", "long", "argument"], "a very long argument" ],
|
||||
]
|
||||
):
|
||||
pass
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
class_name ClassWithDefaultBuildIntTypes
|
||||
extends RefCounted
|
||||
|
||||
func foo(_value :String, _color := Color.RED):
|
||||
pass
|
||||
|
||||
func bar(_value :String, _direction := Vector3.FORWARD, _aabb := AABB()):
|
||||
pass
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
class_name ClassWithEnumReturnTypes
|
||||
extends Resource
|
||||
|
||||
|
||||
class InnerClass:
|
||||
enum TEST_ENUM { FOO = 111, BAR = 222 }
|
||||
|
||||
enum TEST_ENUM { FOO = 1, BAR = 2 }
|
||||
|
||||
const NOT_AN_ENUM := 1
|
||||
|
||||
const X := { FOO=1, BAR=2 }
|
||||
|
||||
|
||||
func get_enum() -> TEST_ENUM:
|
||||
return TEST_ENUM.FOO
|
||||
|
||||
|
||||
# function signature with an external enum reference
|
||||
func get_external_class_enum() -> CustomEnums.TEST_ENUM:
|
||||
return CustomEnums.TEST_ENUM.FOO
|
||||
|
||||
|
||||
# function signature with an inner class enum reference
|
||||
func get_inner_class_enum() -> InnerClass.TEST_ENUM:
|
||||
return InnerClass.TEST_ENUM.FOO
|
||||
5
addons/gdUnit4/test/mocker/resources/ClassWithNameA.gd
Normal file
5
addons/gdUnit4/test/mocker/resources/ClassWithNameA.gd
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
class_name ClassWithNameA
|
||||
extends Resource
|
||||
|
||||
class InnerClass extends Resource:
|
||||
pass
|
||||
8
addons/gdUnit4/test/mocker/resources/ClassWithNameB.gd
Normal file
8
addons/gdUnit4/test/mocker/resources/ClassWithNameB.gd
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
# some comments and empty lines
|
||||
|
||||
# similate bad formated class
|
||||
#
|
||||
|
||||
class_name ClassWithNameB
|
||||
extends Resource
|
||||
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
class_name ClassWithOverridenVirtuals
|
||||
extends Node
|
||||
|
||||
var _x := "default"
|
||||
|
||||
|
||||
func _init():
|
||||
_x = "_init"
|
||||
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready():
|
||||
if _x == "_init":
|
||||
_x = ""
|
||||
_x += "_ready"
|
||||
|
||||
|
||||
func _input(event):
|
||||
_x = "_input"
|
||||
if event.is_action_released("ui_accept"):
|
||||
_x = "ui_accept"
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
class_name ClassWithPoolStringArrayFunc
|
||||
extends RefCounted
|
||||
|
||||
var _values :PackedStringArray
|
||||
|
||||
func set_values(values :PackedStringArray):
|
||||
_values = values
|
||||
40
addons/gdUnit4/test/mocker/resources/ClassWithVariables.gd
Normal file
40
addons/gdUnit4/test/mocker/resources/ClassWithVariables.gd
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
@tool
|
||||
class_name ClassWithVariables
|
||||
extends Node
|
||||
|
||||
enum{
|
||||
A,
|
||||
B,
|
||||
C
|
||||
}
|
||||
|
||||
enum ETYPE {
|
||||
EA,
|
||||
EB
|
||||
}
|
||||
|
||||
# Declare member variables here. Examples:
|
||||
var a = 2
|
||||
var b = "text"
|
||||
|
||||
# Declare some const variables
|
||||
const T1 = 1
|
||||
|
||||
const T2 = 2
|
||||
|
||||
signal source_changed( text )
|
||||
|
||||
@onready var name_label = load("res://addons/gdUnit4/test/mocker/resources/ClassWithNameA.gd")
|
||||
|
||||
@export var path: NodePath = ".."
|
||||
|
||||
class ClassA:
|
||||
var x = 1
|
||||
# some comment
|
||||
func foo()->String:
|
||||
return ""
|
||||
|
||||
|
||||
func foo(_value :int = T1):
|
||||
var _c = a + b
|
||||
pass
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
# some comment
|
||||
|
||||
extends Resource
|
||||
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
# some comment
|
||||
|
||||
func foo():
|
||||
pass
|
||||
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
class_name CustomClassExtendsCustomClass
|
||||
extends CustomResourceTestClass
|
||||
|
||||
# override
|
||||
func foo2():
|
||||
return "foo2 overriden"
|
||||
|
||||
func bar2() -> String:
|
||||
return bar(23, 42)
|
||||
30
addons/gdUnit4/test/mocker/resources/CustomNodeTestClass.gd
Normal file
30
addons/gdUnit4/test/mocker/resources/CustomNodeTestClass.gd
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
class_name CustomNodeTestClass
|
||||
extends Node
|
||||
|
||||
const STATIC_FUNC_RETURN_VALUE = "i'm a static function"
|
||||
|
||||
enum {
|
||||
ENUM_A,
|
||||
ENUM_B
|
||||
}
|
||||
|
||||
#func get_path() -> NodePath:
|
||||
# return NodePath()
|
||||
|
||||
#func duplicate(flags_=15) -> Node:
|
||||
# return self
|
||||
|
||||
# added a custom static func for mock testing
|
||||
static func static_test() -> String:
|
||||
return STATIC_FUNC_RETURN_VALUE
|
||||
|
||||
static func static_test_void() -> void:
|
||||
pass
|
||||
|
||||
func get_value( type := ENUM_A) -> int:
|
||||
match type:
|
||||
ENUM_A:
|
||||
return 0
|
||||
ENUM_B:
|
||||
return 1
|
||||
return -1
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
class_name CustomResourceTestClass
|
||||
extends Resource
|
||||
|
||||
func foo() -> String:
|
||||
return "foo"
|
||||
|
||||
func foo2():
|
||||
return "foo2"
|
||||
|
||||
func foo_void() -> void:
|
||||
pass
|
||||
|
||||
func bar(arg1 :int, arg2 :int = 23, name :String = "test") -> String:
|
||||
return "%s_%d" % [name, arg1+arg2]
|
||||
|
||||
func foo5():
|
||||
pass
|
||||
16
addons/gdUnit4/test/mocker/resources/DeepStubTestClass.gd
Normal file
16
addons/gdUnit4/test/mocker/resources/DeepStubTestClass.gd
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
class_name DeepStubTestClass
|
||||
|
||||
class XShape:
|
||||
var _shape : Shape3D = BoxShape3D.new()
|
||||
|
||||
func get_shape() -> Shape3D:
|
||||
return _shape
|
||||
|
||||
|
||||
var _shape :XShape
|
||||
|
||||
func add(shape :XShape):
|
||||
_shape = shape
|
||||
|
||||
func validate() -> bool:
|
||||
return _shape.get_shape().get_margin() == 0.0
|
||||
5
addons/gdUnit4/test/mocker/resources/GD-256/world.gd
Normal file
5
addons/gdUnit4/test/mocker/resources/GD-256/world.gd
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
class_name Munderwood_Pathing_World
|
||||
extends Node
|
||||
|
||||
func foo() -> String:
|
||||
return "test"
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
class_name OverridenGetClassTestClass
|
||||
extends Resource
|
||||
|
||||
|
||||
@warning_ignore("native_method_override")
|
||||
func get_class() -> String:
|
||||
return "OverridenGetClassTestClass"
|
||||
|
||||
func foo() -> String:
|
||||
prints("foo")
|
||||
return "foo"
|
||||
22
addons/gdUnit4/test/mocker/resources/TestPersion.gd
Normal file
22
addons/gdUnit4/test/mocker/resources/TestPersion.gd
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
extends Object
|
||||
|
||||
var _name
|
||||
var _value
|
||||
var _address :Address
|
||||
|
||||
class Address:
|
||||
var _street :String
|
||||
var _code :int
|
||||
|
||||
func _init(street :String, code :int):
|
||||
_street = street
|
||||
_code = code
|
||||
|
||||
|
||||
func _init(name_ :String, street :String, code :int):
|
||||
_name = name_
|
||||
_value = 1024
|
||||
_address = Address.new(street, code)
|
||||
|
||||
func name() -> String:
|
||||
return _name
|
||||
3
addons/gdUnit4/test/mocker/resources/capsuleshape2d.tres
Normal file
3
addons/gdUnit4/test/mocker/resources/capsuleshape2d.tres
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
[gd_resource type="CapsuleShape2D" format=2]
|
||||
|
||||
[resource]
|
||||
39
addons/gdUnit4/test/mocker/resources/scenes/Spell.gd
Normal file
39
addons/gdUnit4/test/mocker/resources/scenes/Spell.gd
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
class_name Spell
|
||||
extends Node
|
||||
|
||||
signal spell_explode
|
||||
|
||||
const SPELL_LIVE_TIME = 1000
|
||||
|
||||
@warning_ignore("unused_private_class_variable")
|
||||
var _spell_fired :bool = false
|
||||
var _spell_live_time :float = 0
|
||||
var _spell_pos :Vector3 = Vector3.ZERO
|
||||
|
||||
# helper counter for testing simulate_frames
|
||||
@warning_ignore("unused_private_class_variable")
|
||||
var _debug_process_counted := 0
|
||||
|
||||
func _ready():
|
||||
set_name("Spell")
|
||||
|
||||
# only comment in for debugging reasons
|
||||
#func _notification(what):
|
||||
# prints("Spell", GdObjects.notification_as_string(what))
|
||||
|
||||
func _process(delta :float):
|
||||
# added pseudo yield to check `simulate_frames` works wih custom yielding
|
||||
await get_tree().process_frame
|
||||
_spell_live_time += delta * 1000
|
||||
if _spell_live_time < SPELL_LIVE_TIME:
|
||||
move(delta)
|
||||
else:
|
||||
explode()
|
||||
|
||||
func move(delta :float) -> void:
|
||||
#await get_tree().create_timer(0.1).timeout
|
||||
_spell_pos.x += delta
|
||||
|
||||
func explode() -> void:
|
||||
emit_signal("spell_explode", self)
|
||||
|
||||
104
addons/gdUnit4/test/mocker/resources/scenes/TestScene.gd
Normal file
104
addons/gdUnit4/test/mocker/resources/scenes/TestScene.gd
Normal file
|
|
@ -0,0 +1,104 @@
|
|||
extends Control
|
||||
|
||||
signal panel_color_change(box, color)
|
||||
|
||||
const COLOR_CYCLE := [Color.ROYAL_BLUE, Color.CHARTREUSE, Color.YELLOW_GREEN]
|
||||
|
||||
@onready var _box1 = $VBoxContainer/PanelContainer/HBoxContainer/Panel1
|
||||
@onready var _box2 = $VBoxContainer/PanelContainer/HBoxContainer/Panel2
|
||||
@onready var _box3 = $VBoxContainer/PanelContainer/HBoxContainer/Panel3
|
||||
|
||||
@warning_ignore("unused_private_class_variable")
|
||||
@export var _initial_color := Color.RED
|
||||
|
||||
@warning_ignore("unused_private_class_variable")
|
||||
var _nullable :Object
|
||||
|
||||
func _ready():
|
||||
connect("panel_color_change", _on_panel_color_changed)
|
||||
# we call this function to verify the _ready is only once called
|
||||
# this is need to verify `add_child` is calling the original implementation only once
|
||||
only_one_time_call()
|
||||
|
||||
|
||||
func only_one_time_call() -> void:
|
||||
pass
|
||||
|
||||
|
||||
#func _notification(what):
|
||||
# prints("TestScene", GdObjects.notification_as_string(what))
|
||||
|
||||
|
||||
func _on_test_pressed(button_id :int):
|
||||
var box :ColorRect
|
||||
match button_id:
|
||||
1: box = _box1
|
||||
2: box = _box2
|
||||
3: box = _box3
|
||||
emit_signal("panel_color_change", box, Color.RED)
|
||||
# special case for button 3 we wait 1s to change to gray
|
||||
if button_id == 3:
|
||||
await get_tree().create_timer(1).timeout
|
||||
emit_signal("panel_color_change", box, Color.GRAY)
|
||||
|
||||
|
||||
func _on_panel_color_changed(box :ColorRect, color :Color):
|
||||
box.color = color
|
||||
|
||||
|
||||
func create_timer(timeout :float) -> Timer:
|
||||
var timer :Timer = Timer.new()
|
||||
add_child(timer)
|
||||
timer.connect("timeout",Callable(self,"_on_timeout").bind(timer))
|
||||
timer.set_one_shot(true)
|
||||
timer.start(timeout)
|
||||
return timer
|
||||
|
||||
|
||||
func _on_timeout(timer :Timer):
|
||||
remove_child(timer)
|
||||
timer.queue_free()
|
||||
|
||||
|
||||
func color_cycle() -> String:
|
||||
prints("color_cycle")
|
||||
await create_timer(0.500).timeout
|
||||
emit_signal("panel_color_change", _box1, Color.RED)
|
||||
prints("timer1")
|
||||
await create_timer(0.500).timeout
|
||||
emit_signal("panel_color_change", _box1, Color.BLUE)
|
||||
prints("timer2")
|
||||
await create_timer(0.500).timeout
|
||||
emit_signal("panel_color_change", _box1, Color.GREEN)
|
||||
prints("cycle end")
|
||||
return "black"
|
||||
|
||||
|
||||
func start_color_cycle():
|
||||
color_cycle()
|
||||
|
||||
|
||||
# used for manuall spy checked created spy
|
||||
func _create_spell() -> Spell:
|
||||
return Spell.new()
|
||||
|
||||
|
||||
func create_spell() -> Spell:
|
||||
var spell := _create_spell()
|
||||
spell.connect("spell_explode", Callable(self, "_destroy_spell"))
|
||||
return spell
|
||||
|
||||
|
||||
func _destroy_spell(spell :Spell) -> void:
|
||||
#prints("_destroy_spell", spell)
|
||||
remove_child(spell)
|
||||
spell.queue_free()
|
||||
|
||||
|
||||
func _input(event):
|
||||
if event.is_action_released("ui_accept"):
|
||||
add_child(create_spell())
|
||||
|
||||
|
||||
func add(a: int, b :int) -> int:
|
||||
return a + b
|
||||
104
addons/gdUnit4/test/mocker/resources/scenes/TestScene.tscn
Normal file
104
addons/gdUnit4/test/mocker/resources/scenes/TestScene.tscn
Normal file
|
|
@ -0,0 +1,104 @@
|
|||
[gd_scene load_steps=2 format=3 uid="uid://bf24pr1xj60o6"]
|
||||
|
||||
[ext_resource type="Script" path="res://addons/gdUnit4/test/mocker/resources/scenes/TestScene.gd" id="1"]
|
||||
|
||||
[node name="Control" type="Control"]
|
||||
layout_mode = 3
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
script = ExtResource("1")
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="."]
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="VBoxContainer"]
|
||||
custom_minimum_size = Vector2(0, 40)
|
||||
layout_mode = 2
|
||||
|
||||
[node name="test1" type="Button" parent="VBoxContainer/HBoxContainer"]
|
||||
custom_minimum_size = Vector2(100, 0)
|
||||
layout_mode = 2
|
||||
text = "Test 1"
|
||||
|
||||
[node name="test2" type="Button" parent="VBoxContainer/HBoxContainer"]
|
||||
custom_minimum_size = Vector2(100, 0)
|
||||
layout_mode = 2
|
||||
text = "Test 2"
|
||||
|
||||
[node name="test3" type="Button" parent="VBoxContainer/HBoxContainer"]
|
||||
custom_minimum_size = Vector2(100, 0)
|
||||
layout_mode = 2
|
||||
text = "Test 3"
|
||||
|
||||
[node name="PanelContainer" type="TabContainer" parent="VBoxContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="VBoxContainer/PanelContainer"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Panel1" type="ColorRect" parent="VBoxContainer/PanelContainer/HBoxContainer"]
|
||||
custom_minimum_size = Vector2(100, 0)
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Label" type="Label" parent="VBoxContainer/PanelContainer/HBoxContainer/Panel1"]
|
||||
layout_mode = 1
|
||||
anchors_preset = 10
|
||||
anchor_right = 1.0
|
||||
offset_bottom = 14.0
|
||||
grow_horizontal = 2
|
||||
text = "Panel 1"
|
||||
|
||||
[node name="Panel2" type="ColorRect" parent="VBoxContainer/PanelContainer/HBoxContainer"]
|
||||
custom_minimum_size = Vector2(100, 0)
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Label" type="Label" parent="VBoxContainer/PanelContainer/HBoxContainer/Panel2"]
|
||||
layout_mode = 1
|
||||
anchors_preset = 10
|
||||
anchor_right = 1.0
|
||||
offset_bottom = 14.0
|
||||
grow_horizontal = 2
|
||||
text = "Panel 2"
|
||||
|
||||
[node name="Panel3" type="ColorRect" parent="VBoxContainer/PanelContainer/HBoxContainer"]
|
||||
custom_minimum_size = Vector2(100, 0)
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Label" type="Label" parent="VBoxContainer/PanelContainer/HBoxContainer/Panel3"]
|
||||
layout_mode = 1
|
||||
anchors_preset = 10
|
||||
anchor_right = 1.0
|
||||
offset_bottom = 14.0
|
||||
grow_horizontal = 2
|
||||
text = "Panel 3"
|
||||
|
||||
[node name="Line2D" type="Line2D" parent="VBoxContainer"]
|
||||
points = PackedVector2Array(0, 0, 20, 0)
|
||||
width = 30.0
|
||||
default_color = Color(1, 0.0509804, 0.192157, 1)
|
||||
|
||||
[node name="Line2D2" type="Line2D" parent="VBoxContainer"]
|
||||
points = PackedVector2Array(20, 0, 40, 0)
|
||||
width = 30.0
|
||||
default_color = Color(0.0392157, 1, 0.278431, 1)
|
||||
|
||||
[node name="Line2D3" type="Line2D" parent="VBoxContainer"]
|
||||
points = PackedVector2Array(40, 0, 60, 0)
|
||||
width = 30.0
|
||||
default_color = Color(1, 0.0392157, 0.247059, 1)
|
||||
|
||||
[connection signal="pressed" from="VBoxContainer/HBoxContainer/test1" to="." method="_on_test_pressed" binds= [1]]
|
||||
[connection signal="pressed" from="VBoxContainer/HBoxContainer/test2" to="." method="_on_test_pressed" binds= [2]]
|
||||
[connection signal="pressed" from="VBoxContainer/HBoxContainer/test3" to="." method="_on_test_pressed" binds= [3]]
|
||||
|
|
@ -0,0 +1,67 @@
|
|||
[gd_scene format=3 uid="uid://bvp8uaof31fhm"]
|
||||
|
||||
[node name="Control" type="Control"]
|
||||
layout_mode = 3
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="."]
|
||||
layout_mode = 0
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="VBoxContainer"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="test1" type="Button" parent="VBoxContainer/HBoxContainer"]
|
||||
layout_mode = 2
|
||||
text = "Test 1"
|
||||
|
||||
[node name="test2" type="Button" parent="VBoxContainer/HBoxContainer"]
|
||||
layout_mode = 2
|
||||
text = "Test 2"
|
||||
|
||||
[node name="test3" type="Button" parent="VBoxContainer/HBoxContainer"]
|
||||
layout_mode = 2
|
||||
text = "Test 3"
|
||||
|
||||
[node name="PanelContainer" type="TabContainer" parent="VBoxContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="VBoxContainer/PanelContainer"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Panel1" type="ColorRect" parent="VBoxContainer/PanelContainer/HBoxContainer"]
|
||||
layout_mode = 2
|
||||
color = Color(0.694118, 0.207843, 0.207843, 1)
|
||||
|
||||
[node name="Label" type="Label" parent="VBoxContainer/PanelContainer/HBoxContainer/Panel1"]
|
||||
layout_mode = 0
|
||||
anchor_right = 1.0
|
||||
offset_bottom = 14.0
|
||||
text = "Panel 1"
|
||||
|
||||
[node name="Panel2" type="ColorRect" parent="VBoxContainer/PanelContainer/HBoxContainer"]
|
||||
layout_mode = 2
|
||||
color = Color(0.219608, 0.662745, 0.380392, 1)
|
||||
|
||||
[node name="Label" type="Label" parent="VBoxContainer/PanelContainer/HBoxContainer/Panel2"]
|
||||
layout_mode = 0
|
||||
anchor_right = 1.0
|
||||
offset_bottom = 14.0
|
||||
text = "Panel 2"
|
||||
|
||||
[node name="Panel3" type="ColorRect" parent="VBoxContainer/PanelContainer/HBoxContainer"]
|
||||
layout_mode = 2
|
||||
color = Color(0.12549, 0.286275, 0.776471, 1)
|
||||
|
||||
[node name="Label" type="Label" parent="VBoxContainer/PanelContainer/HBoxContainer/Panel3"]
|
||||
layout_mode = 0
|
||||
anchor_right = 1.0
|
||||
offset_bottom = 14.0
|
||||
text = "Panel 3"
|
||||
4
addons/gdUnit4/test/mocker/resources/snake_case.gd
Normal file
4
addons/gdUnit4/test/mocker/resources/snake_case.gd
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
extends RefCounted
|
||||
|
||||
func custom_func():
|
||||
pass
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
class_name snake_case_class_name
|
||||
extends RefCounted
|
||||
|
||||
|
||||
func custom_func():
|
||||
pass
|
||||
Loading…
Add table
Add a link
Reference in a new issue