Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
feefladder committed Feb 8, 2023
1 parent 218d030 commit 4a21da6
Show file tree
Hide file tree
Showing 102 changed files with 14,993 additions and 459 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/gut_unit_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Gut

on:
pull_request:
push:
branches: [ master, main ]

jobs:
gut:
runs-on: ubuntu-latest
container:
image:
barichello/godot-ci:3.5.1
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Gut (gut.sh)
run: |
cd demo/
godot -s --path $PWD addons/gut/gut_cmdln.gd -gdir=res://test -glog=1 -ginclude_subdirs -gexit
17 changes: 17 additions & 0 deletions demo/.gut_editor_shortcuts.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
[main]

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)
,"script":null)

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)
,"script":null)

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)
,"script":null)

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)
,"script":null)

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)
,"script":null)

8 changes: 8 additions & 0 deletions demo/BigFont.tres
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[gd_resource type="DynamicFont" load_steps=2 format=2]

[sub_resource type="DynamicFontData" id=9]
font_path = "res://addons/gut/fonts/LobsterTwo-BoldItalic.ttf"

[resource]
size = 40
font_data = SubResource( 9 )
6 changes: 6 additions & 0 deletions demo/BigFontTheme.tres
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[gd_resource type="Theme" load_steps=2 format=2]

[ext_resource path="res://BigFont.tres" type="DynamicFont" id=1]

[resource]
default_font = ExtResource( 1 )
20 changes: 10 additions & 10 deletions demo/Main.gd
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
extends Control

func _enter_tree():
var _error : int = $Database.connect("output_received", self, "_on_output_received")
_error = $Database.connect("texture_received", self, "_on_texture_received")
var _error : int = $Database.connect("output_received", self, "_on_output_received")
_error = $Database.connect("texture_received", self, "_on_texture_received")

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

label.text = text
label.set("custom_colors/font_color", Color.limegreen)
label.autowrap = true
label.text = text
label.set("custom_colors/font_color", Color.limegreen)
label.autowrap = true

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

texture_rect.texture = texture
texture_rect.texture = texture
68 changes: 8 additions & 60 deletions demo/Main.tscn
Original file line number Diff line number Diff line change
@@ -1,64 +1,12 @@
[gd_scene load_steps=4 format=2]
[gd_scene load_steps=2 format=2]

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

[sub_resource type="StyleBoxFlat" id=1]
content_margin_left = 24.0
content_margin_right = 24.0
content_margin_top = 12.0
content_margin_bottom = 12.0
bg_color = Color( 0, 0, 0, 1 )

[node name="Main" type="Control"]
anchor_right = 1.0
anchor_bottom = 1.0
script = ExtResource( 2 )
__meta__ = {
"_edit_use_anchors_": false
}

[node name="Database" type="Node" parent="."]
script = ExtResource( 1 )

[node name="MarginContainer" type="MarginContainer" parent="."]
[node name="Gut" type="Control"]
anchor_right = 1.0
anchor_bottom = 1.0
custom_constants/margin_right = 24
custom_constants/margin_top = 24
custom_constants/margin_left = 24
custom_constants/margin_bottom = 24
__meta__ = {
"_edit_use_anchors_": false
}

[node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer"]
margin_left = 24.0
margin_top = 24.0
margin_right = 1000.0
margin_bottom = 576.0
custom_constants/separation = 24

[node name="Label" type="Label" parent="MarginContainer/VBoxContainer"]
margin_right = 976.0
margin_bottom = 14.0
text = "Godot SQLite Demo"
align = 1

[node name="ScrollContainer" type="ScrollContainer" parent="MarginContainer/VBoxContainer"]
margin_top = 38.0
margin_right = 976.0
margin_bottom = 552.0
size_flags_horizontal = 3
size_flags_vertical = 3
custom_styles/bg = SubResource( 1 )
__meta__ = {
"_edit_use_anchors_": false
}

[node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer/VBoxContainer/ScrollContainer"]
margin_left = 24.0
margin_top = 12.0
margin_right = 952.0
margin_bottom = 12.0
size_flags_horizontal = 3
rect_min_size = Vector2( 740, 250 )
script = ExtResource( 3 )
_run_on_load = true
_include_subdirectories = true
_directory1 = "res://tests/unit"
Loading

0 comments on commit 4a21da6

Please sign in to comment.