Update unitbase.gd

This commit is contained in:
JeremyStar™ 2024-03-31 11:23:36 +02:00
parent f97fddcb97
commit 9607c34ecf
Signed by: JeremyStarTM
GPG key ID: E366BAEF67E4704D
3 changed files with 16 additions and 14 deletions

View file

@ -17,7 +17,7 @@ func test_custom_module_support() -> void:
# Init CORE # Init CORE
var config: CoreConfiguration = CoreConfiguration.new() var config: CoreConfiguration = CoreConfiguration.new()
config.custom_modules = true config.custom_modules = true
var core_test: Core = await load_framework(config) core_test = await load_framework(config)
# Load module # Load module
var module: CoreBaseModule = CoreBaseModule.new() var module: CoreBaseModule = CoreBaseModule.new()
@ -63,7 +63,7 @@ func test_reload_config() -> void:
var config: CoreConfiguration = CoreConfiguration.new() var config: CoreConfiguration = CoreConfiguration.new()
# Init CORE # Init CORE
var core_test: Core = await load_framework() core_test = await load_framework()
# Update some keys and reload # Update some keys and reload
config.logger_colored = false config.logger_colored = false
@ -87,7 +87,7 @@ func test_reload_config() -> void:
func test_formatted_string() -> void: func test_formatted_string() -> void:
# Init CORE # Init CORE
var core_test: Core = await load_framework() core_test = await load_framework()
# Variables # Variables
var test_type: String var test_type: String

View file

@ -3,7 +3,7 @@ extends 'res://tests/unitbase.gd'
# byte2mib # byte2mib
func test_byte2mib() -> void: func test_byte2mib() -> void:
# Init CORE # Init CORE
var core_test: Core = await load_framework() core_test = await load_framework()
# Variables # Variables
var test_in: int = 51758516 var test_in: int = 51758516
@ -23,7 +23,7 @@ func test_byte2mib() -> void:
# mib2byte # mib2byte
func test_mib2byte() -> void: func test_mib2byte() -> void:
# Init CORE # Init CORE
var core_test: Core = await load_framework() core_test = await load_framework()
# Variables # Variables
var test_in: float = 49.36076736450195 var test_in: float = 49.36076736450195
@ -43,7 +43,7 @@ func test_mib2byte() -> void:
# mib2gib # mib2gib
func test_mib2gib() -> void: func test_mib2gib() -> void:
# Init CORE # Init CORE
var core_test: Core = await load_framework() core_test = await load_framework()
# Variables # Variables
var test_in: float = 1500 var test_in: float = 1500
@ -63,7 +63,7 @@ func test_mib2gib() -> void:
# gib2mib # gib2mib
func test_gib2mib() -> void: func test_gib2mib() -> void:
# Init CORE # Init CORE
var core_test: Core = await load_framework() core_test = await load_framework()
# Variables # Variables
var test_in: float = 1.46484375 var test_in: float = 1.46484375
@ -83,7 +83,7 @@ func test_gib2mib() -> void:
# format_stringarray # format_stringarray
func test_format_stringarray() -> void: func test_format_stringarray() -> void:
# Init CORE # Init CORE
var core_test: Core = await load_framework() core_test = await load_framework()
# Variables # Variables
var test_in: Array[String] = ["StarOpenSource", "JeremyStarTM", "Contributors"] var test_in: Array[String] = ["StarOpenSource", "JeremyStarTM", "Contributors"]
@ -98,7 +98,7 @@ func test_format_stringarray() -> void:
# format_stringarray (chaotic) # format_stringarray (chaotic)
func test_format_stringarray_chaotic() -> void: func test_format_stringarray_chaotic() -> void:
# Init CORE # Init CORE
var core_test: Core = await load_framework() core_test = await load_framework()
# Variables # Variables
var test_in: Array[String] = ["StarOpenSource", "JeremyStarTM", "Contributors"] var test_in: Array[String] = ["StarOpenSource", "JeremyStarTM", "Contributors"]
@ -113,7 +113,7 @@ func test_format_stringarray_chaotic() -> void:
# array_to_stringarray & stringarray_to_array # array_to_stringarray & stringarray_to_array
func test_array_stringarray_conversion() -> void: func test_array_stringarray_conversion() -> void:
# Init CORE # Init CORE
var core_test: Core = await load_framework() core_test = await load_framework()
# Variables # Variables
var test_in: Array = ["StarOpenSource", "JeremyStarTM", "Contributors"] var test_in: Array = ["StarOpenSource", "JeremyStarTM", "Contributors"]
@ -128,7 +128,7 @@ func test_array_stringarray_conversion() -> void:
# get_center # get_center
func test_get_center() -> void: func test_get_center() -> void:
# Init CORE # Init CORE
var core_test = await load_framework() core_test = await load_framework()
# Variables # Variables
var test_in_parent: Vector2 = Vector2(5919.591, 6815.9514) var test_in_parent: Vector2 = Vector2(5919.591, 6815.9514)

View file

@ -1,14 +1,16 @@
extends BessereTestsTest extends BessereTestsTest
# Callbacks
var callback: String = ""
# CORE # CORE
var core: Core var core: Core
# Used during testing
var callback: String = ""
var core_test: Core
# Unload framework after each test # Unload framework after each test
func after_each() -> void: func after_each() -> void:
callback = "" callback = ""
core_test = null
await unload_framework() await unload_framework()
# Framework management # Framework management