Skip to content

Commit d3547f6

Browse files
committed
test
1 parent 218d030 commit d3547f6

File tree

102 files changed

+14993
-459
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

102 files changed

+14993
-459
lines changed

.github/workflows/gut_unit_tests.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Gut
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches: [ master, main ]
7+
8+
jobs:
9+
gut:
10+
runs-on: ubuntu-latest
11+
container:
12+
image:
13+
barichello/godot-ci:3.5.1
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v2
17+
18+
- name: Gut (gut.sh)
19+
run: |
20+
cd demo/
21+
godot -s --path $PWD addons/gut/gut_cmdln.gd -gdir=res://tests -glog=1 -ginclude_subdirs -gexit

demo/.gut_editor_shortcuts.cfg

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
[main]
2+
3+
run_all=Object(ShortCut,"resource_local_to_scene":false,"resource_name":"","shortcut":Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":true,"meta":false,"command":false,"pressed":false,"scancode":49,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
4+
,"script":null)
5+
6+
run_current_script=Object(ShortCut,"resource_local_to_scene":false,"resource_name":"","shortcut":Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":true,"meta":false,"command":false,"pressed":false,"scancode":50,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
7+
,"script":null)
8+
9+
run_current_inner=Object(ShortCut,"resource_local_to_scene":false,"resource_name":"","shortcut":Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":true,"meta":false,"command":false,"pressed":false,"scancode":51,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
10+
,"script":null)
11+
12+
run_current_test=Object(ShortCut,"resource_local_to_scene":false,"resource_name":"","shortcut":Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":true,"meta":false,"command":false,"pressed":false,"scancode":52,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
13+
,"script":null)
14+
15+
panel_button=Object(ShortCut,"resource_local_to_scene":false,"resource_name":"","shortcut":Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":true,"meta":false,"command":false,"pressed":false,"scancode":48,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
16+
,"script":null)
17+

demo/BigFont.tres

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
[gd_resource type="DynamicFont" load_steps=2 format=2]
2+
3+
[sub_resource type="DynamicFontData" id=9]
4+
font_path = "res://addons/gut/fonts/LobsterTwo-BoldItalic.ttf"
5+
6+
[resource]
7+
size = 40
8+
font_data = SubResource( 9 )

demo/BigFontTheme.tres

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[gd_resource type="Theme" load_steps=2 format=2]
2+
3+
[ext_resource path="res://BigFont.tres" type="DynamicFont" id=1]
4+
5+
[resource]
6+
default_font = ExtResource( 1 )

demo/Main.gd

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
extends Control
22

33
func _enter_tree():
4-
var _error : int = $Database.connect("output_received", self, "_on_output_received")
5-
_error = $Database.connect("texture_received", self, "_on_texture_received")
4+
var _error : int = $Database.connect("output_received", self, "_on_output_received")
5+
_error = $Database.connect("texture_received", self, "_on_texture_received")
66

77
func _on_output_received(text : String) -> void:
8-
var label := Label.new()
9-
$MarginContainer/VBoxContainer/ScrollContainer/VBoxContainer.add_child(label)
8+
var label := Label.new()
9+
$MarginContainer/VBoxContainer/ScrollContainer/VBoxContainer.add_child(label)
1010

11-
label.text = text
12-
label.set("custom_colors/font_color", Color.limegreen)
13-
label.autowrap = true
11+
label.text = text
12+
label.set("custom_colors/font_color", Color.limegreen)
13+
label.autowrap = true
1414

1515
func _on_texture_received(texture : Texture) -> void:
16-
var texture_rect := TextureRect.new()
17-
$MarginContainer/VBoxContainer/ScrollContainer/VBoxContainer.add_child(texture_rect)
16+
var texture_rect := TextureRect.new()
17+
$MarginContainer/VBoxContainer/ScrollContainer/VBoxContainer.add_child(texture_rect)
1818

19-
texture_rect.texture = texture
19+
texture_rect.texture = texture

demo/Main.tscn

Lines changed: 8 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -1,64 +1,12 @@
1-
[gd_scene load_steps=4 format=2]
1+
[gd_scene load_steps=2 format=2]
22

3-
[ext_resource path="res://database.gd" type="Script" id=1]
4-
[ext_resource path="res://Main.gd" type="Script" id=2]
3+
[ext_resource path="res://addons/gut/plugin_control.gd" type="Script" id=3]
54

6-
[sub_resource type="StyleBoxFlat" id=1]
7-
content_margin_left = 24.0
8-
content_margin_right = 24.0
9-
content_margin_top = 12.0
10-
content_margin_bottom = 12.0
11-
bg_color = Color( 0, 0, 0, 1 )
12-
13-
[node name="Main" type="Control"]
14-
anchor_right = 1.0
15-
anchor_bottom = 1.0
16-
script = ExtResource( 2 )
17-
__meta__ = {
18-
"_edit_use_anchors_": false
19-
}
20-
21-
[node name="Database" type="Node" parent="."]
22-
script = ExtResource( 1 )
23-
24-
[node name="MarginContainer" type="MarginContainer" parent="."]
5+
[node name="Gut" type="Control"]
256
anchor_right = 1.0
267
anchor_bottom = 1.0
27-
custom_constants/margin_right = 24
28-
custom_constants/margin_top = 24
29-
custom_constants/margin_left = 24
30-
custom_constants/margin_bottom = 24
31-
__meta__ = {
32-
"_edit_use_anchors_": false
33-
}
34-
35-
[node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer"]
36-
margin_left = 24.0
37-
margin_top = 24.0
38-
margin_right = 1000.0
39-
margin_bottom = 576.0
40-
custom_constants/separation = 24
41-
42-
[node name="Label" type="Label" parent="MarginContainer/VBoxContainer"]
43-
margin_right = 976.0
44-
margin_bottom = 14.0
45-
text = "Godot SQLite Demo"
46-
align = 1
47-
48-
[node name="ScrollContainer" type="ScrollContainer" parent="MarginContainer/VBoxContainer"]
49-
margin_top = 38.0
50-
margin_right = 976.0
51-
margin_bottom = 552.0
52-
size_flags_horizontal = 3
53-
size_flags_vertical = 3
54-
custom_styles/bg = SubResource( 1 )
55-
__meta__ = {
56-
"_edit_use_anchors_": false
57-
}
58-
59-
[node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer/VBoxContainer/ScrollContainer"]
60-
margin_left = 24.0
61-
margin_top = 12.0
62-
margin_right = 952.0
63-
margin_bottom = 12.0
64-
size_flags_horizontal = 3
8+
rect_min_size = Vector2( 740, 250 )
9+
script = ExtResource( 3 )
10+
_run_on_load = true
11+
_include_subdirectories = true
12+
_directory1 = "res://tests/unit"

0 commit comments

Comments
 (0)