Files
MovementTests/addons/gdUnit4/src/ui/templates/TestSuiteTemplate.tscn
Minimata af1f6da98d
Some checks failed
Create tag and build when new code gets to main / BumpTag (push) Successful in 31s
Create tag and build when new code gets to main / Test (push) Has been cancelled
Create tag and build when new code gets to main / Export (push) Has been cancelled
updating project files
2026-01-28 09:50:10 +01:00

239 lines
8.0 KiB
Plaintext

[gd_scene format=3 uid="uid://dte0m2endcgtu"]
[ext_resource type="Script" uid="uid://dciqrm7vemc53" path="res://addons/gdUnit4/src/ui/templates/TestSuiteTemplate.gd" id="1"]
[sub_resource type="CodeHighlighter" id="CodeHighlighter_6gsdy"]
number_color = Color(0.63, 1, 0.88, 1)
symbol_color = Color(0.67, 0.79, 1, 1)
function_color = Color(0.34, 0.7, 1, 1)
member_variable_color = Color(0.736, 0.88, 1, 1)
keyword_colors = {
"@": Color(1, 0.7, 0.45, 1),
"GdUnitTestSuite": Color(0.26, 1, 0.76, 1),
"after": Color(0.26, 1, 0.76, 1),
"after_test": Color(0.26, 1, 0.76, 1),
"before": Color(0.26, 1, 0.76, 1),
"before_test": Color(0.26, 1, 0.76, 1),
"class_name": Color(1, 0.44, 0.52, 1),
"const": Color(1, 0.44, 0.52, 1),
"extends": Color(1, 0.44, 0.52, 1),
"func": Color(1, 0.44, 0.52, 1),
"onready": Color(1, 0.44, 0.52, 1),
"pass": Color(1, 0.44, 0.52, 1),
"var": Color(1, 0.44, 0.52, 1),
"void": Color(1, 0.44, 0.52, 1),
"warning_ignore": Color(1, 0.7, 0.45, 1)
}
color_regions = {
"\" \"": Color(1, 1, 0, 1),
"#": Color(1, 1, 1, 0.5),
"${ }": Color(1, 1, 0, 1),
"' '": Color(1, 1, 0, 1)
}
[sub_resource type="CodeHighlighter" id="CodeHighlighter_oi772"]
number_color = Color(0.63, 1, 0.88, 1)
symbol_color = Color(0.67, 0.79, 1, 1)
function_color = Color(0.34, 0.7, 1, 1)
member_variable_color = Color(0.736, 0.88, 1, 1)
keyword_colors = {
"@": Color(1, 0.7, 0.45, 1),
"GdUnitTestSuite": Color(0.26, 1, 0.76, 1),
"after": Color(0.26, 1, 0.76, 1),
"after_test": Color(0.26, 1, 0.76, 1),
"before": Color(0.26, 1, 0.76, 1),
"before_test": Color(0.26, 1, 0.76, 1),
"class_name": Color(1, 0.44, 0.52, 1),
"const": Color(1, 0.44, 0.52, 1),
"extends": Color(1, 0.44, 0.52, 1),
"func": Color(1, 0.44, 0.52, 1),
"onready": Color(1, 0.44, 0.52, 1),
"pass": Color(1, 0.44, 0.52, 1),
"var": Color(1, 0.44, 0.52, 1),
"void": Color(1, 0.44, 0.52, 1),
"warning_ignore": Color(1, 0.7, 0.45, 1)
}
color_regions = {
"\" \"": Color(1, 1, 0, 1),
"#": Color(1, 1, 1, 0.5),
"${ }": Color(1, 1, 0, 1),
"' '": Color(1, 1, 0, 1)
}
[node name="TestSuiteTemplate" type="MarginContainer" unique_id=402020929]
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="." unique_id=272681786]
layout_mode = 2
size_flags_horizontal = 3
size_flags_vertical = 3
[node name="sub_category" type="Panel" parent="VBoxContainer" unique_id=1605561905]
custom_minimum_size = Vector2(0, 30)
layout_mode = 2
size_flags_horizontal = 3
[node name="Label" type="Label" parent="VBoxContainer/sub_category" unique_id=1875939532]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
offset_left = 4.0
offset_right = 4.0
offset_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
text = "Test Suite Template
"
[node name="EdiorLayout" type="VBoxContainer" parent="VBoxContainer" unique_id=1468756229]
layout_mode = 2
size_flags_vertical = 3
[node name="Editor" type="CodeEdit" parent="VBoxContainer/EdiorLayout" unique_id=228821849]
layout_mode = 2
size_flags_horizontal = 3
size_flags_vertical = 3
theme_override_colors/font_selected_color = Color(0.337, 0.62, 1, 0.4)
theme_override_colors/font_color = Color(1, 1, 1, 0.75)
theme_override_colors/font_readonly_color = Color(1, 1, 1, 0.75)
theme_override_colors/background_color = Color(0.103039995, 0.103039995, 0.103039995, 1)
theme_override_font_sizes/font_size = 14
text = "# GdUnit generated TestSuite
class_name ${suite_class_name}
extends GdUnitTestSuite
@warning_ignore('unused_parameter')
@warning_ignore('return_value_discarded')
# TestSuite generated from
const __source: String = '${source_resource_path}'
"
syntax_highlighter = SubResource("CodeHighlighter_6gsdy")
[node name="MarginContainer" type="MarginContainer" parent="VBoxContainer/EdiorLayout/Editor" unique_id=1204816327]
layout_mode = 1
anchors_preset = 12
anchor_top = 1.0
anchor_right = 1.0
anchor_bottom = 1.0
offset_top = -31.0
grow_horizontal = 2
grow_vertical = 0
size_flags_horizontal = 3
size_flags_vertical = 3
[node name="HBoxContainer" type="HBoxContainer" parent="VBoxContainer/EdiorLayout/Editor/MarginContainer" unique_id=1158496011]
layout_mode = 2
size_flags_vertical = 8
alignment = 2
[node name="Tags" type="Button" parent="VBoxContainer/EdiorLayout/Editor/MarginContainer/HBoxContainer" unique_id=2034943212]
layout_mode = 2
tooltip_text = "Shows supported tags."
text = "Supported Tags"
[node name="SelectType" type="OptionButton" parent="VBoxContainer/EdiorLayout/Editor/MarginContainer/HBoxContainer" unique_id=1529079823]
layout_mode = 2
tooltip_text = "Select the script type specific template."
selected = 0
item_count = 2
popup/item_0/text = "GD - GDScript"
popup/item_0/id = 1000
popup/item_1/text = "C# - CSharpScript"
popup/item_1/id = 2000
[node name="Panel" type="MarginContainer" parent="VBoxContainer" unique_id=2083851825]
layout_mode = 2
size_flags_horizontal = 3
[node name="HBoxContainer" type="HBoxContainer" parent="VBoxContainer/Panel" unique_id=2126419763]
layout_mode = 2
size_flags_horizontal = 3
size_flags_vertical = 3
alignment = 2
[node name="Restore" type="Button" parent="VBoxContainer/Panel/HBoxContainer" unique_id=596884455]
layout_mode = 2
text = "Restore"
[node name="Save" type="Button" parent="VBoxContainer/Panel/HBoxContainer" unique_id=969959868]
layout_mode = 2
disabled = true
text = "Save"
[node name="Tags" type="PopupPanel" parent="." unique_id=82452418]
size = Vector2i(300, 100)
unresizable = false
content_scale_aspect = 4
[node name="MarginContainer" type="MarginContainer" parent="Tags" unique_id=1992332459]
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
offset_left = 4.0
offset_top = 4.0
offset_right = 296.0
offset_bottom = 96.0
grow_horizontal = 2
grow_vertical = 2
[node name="TextEdit" type="CodeEdit" parent="Tags/MarginContainer" unique_id=904104423]
layout_mode = 2
size_flags_horizontal = 3
size_flags_vertical = 3
theme_override_colors/font_selected_color = Color(0.337, 0.62, 1, 0.4)
theme_override_colors/font_color = Color(1, 1, 1, 0.75)
theme_override_colors/font_readonly_color = Color(1, 1, 1, 0.75)
theme_override_colors/background_color = Color(0.103039995, 0.103039995, 0.103039995, 1)
theme_override_font_sizes/font_size = 14
text = "
GdScript Tags are replaced when the test-suite is created.
# The class name of the test-suite, formed from the source script.
${suite_class_name}
# is used to build the test suite class name
class_name ${suite_class_name}
extends GdUnitTestSuite
# The class name in pascal case, formed from the source script.
${source_class}
# can be used to create the class e.g. for source 'MyClass'
var my_test_class := ${source_class}.new()
# will be result in
var my_test_class := MyClass.new()
# The class as variable name in snake case, formed from the source script.
${source_var}
# Can be used to build the variable name e.g. for source 'MyClass'
var ${source_var} := ${source_class}.new()
# will be result in
var my_class := MyClass.new()
# The full resource path from which the file was created.
${source_resource_path}
# Can be used to load the script in your test
var my_script := load(${source_resource_path})
# will be result in
var my_script := load(\"res://folder/my_class.gd\")
"
editable = false
context_menu_enabled = false
shortcut_keys_enabled = false
virtual_keyboard_enabled = false
scroll_vertical = 30.0
syntax_highlighter = SubResource("CodeHighlighter_oi772")
[connection signal="text_changed" from="VBoxContainer/EdiorLayout/Editor" to="." method="_on_Editor_text_changed"]
[connection signal="pressed" from="VBoxContainer/EdiorLayout/Editor/MarginContainer/HBoxContainer/Tags" to="." method="_on_Tags_pressed"]
[connection signal="item_selected" from="VBoxContainer/EdiorLayout/Editor/MarginContainer/HBoxContainer/SelectType" to="." method="_on_SelectType_item_selected"]
[connection signal="pressed" from="VBoxContainer/Panel/HBoxContainer/Restore" to="." method="_on_Restore_pressed"]
[connection signal="pressed" from="VBoxContainer/Panel/HBoxContainer/Save" to="." method="_on_Save_pressed"]