Compare commits
No commits in common. "509667045dea87eb3be92df1a3856f3523939a74" and "14b5989f2623baca5c6494505600682a8f9f5f97" have entirely different histories.
509667045d
...
14b5989f26
3 changed files with 18 additions and 26 deletions
|
@ -23,19 +23,8 @@ var singles: Array[CoreValidationSingle]
|
|||
|
||||
# +++ module +++
|
||||
func _cleanup() -> void:
|
||||
# Schemas
|
||||
var schemas_remove_enty: Array[CoreValidationSchema] = []
|
||||
for schema in schemas:
|
||||
schemas_remove_enty.append(schema)
|
||||
if !is_instance_valid(schema): continue
|
||||
if !is_instance_valid(schema.parent):
|
||||
logger.diag("Removing schema '" + schema.name + "'")
|
||||
schema.queue_free()
|
||||
for schema in schemas_remove_enty:
|
||||
schemas.remove_at(schemas.find(schema))
|
||||
|
||||
# Singles
|
||||
var singles_remove_enty: Array[CoreValidationSingle] = []
|
||||
var singles_remove_enty: Array[CoreLoggerInstance] = []
|
||||
for single in singles:
|
||||
singles_remove_enty.append(single)
|
||||
if !is_instance_valid(single): continue
|
||||
|
@ -44,6 +33,17 @@ func _cleanup() -> void:
|
|||
single.queue_free()
|
||||
for single in singles_remove_enty:
|
||||
singles.remove_at(singles.find(single))
|
||||
|
||||
# Schemas
|
||||
var schemas_remove_enty: Array[CoreLoggerInstance] = []
|
||||
for schema in schemas:
|
||||
singles_remove_enty.append(schema)
|
||||
if !is_instance_valid(schema): continue
|
||||
if !is_instance_valid(schema.parent):
|
||||
logger.diag("Removing schema '" + schema.name + "'")
|
||||
schema.queue_free()
|
||||
for schema in schemas_remove_enty:
|
||||
schemas.remove_at(schemas.find(schema))
|
||||
|
||||
func _schedule() -> void:
|
||||
# Singles
|
||||
|
@ -61,12 +61,10 @@ func _schedule() -> void:
|
|||
# +++ data validation +++
|
||||
## Returns a new [CoreValidationSingle]
|
||||
func get_single(data, parent: Node) -> CoreValidationSingle:
|
||||
var single: CoreValidationSingle = CoreValidationSingle.new(core, data, parent)
|
||||
singles.append(single)
|
||||
return single
|
||||
singles.append(parent)
|
||||
return CoreValidationSingle.new(core, data, parent)
|
||||
|
||||
## Returns a new [CoreValidationSchema]
|
||||
func get_schema(schema_dict: Dictionary, parent: Node) -> CoreValidationSchema:
|
||||
var schema: CoreValidationSchema = CoreValidationSchema.new(core, schema_dict, parent)
|
||||
schemas.append(schema)
|
||||
return schema
|
||||
func get_schema(schema: Dictionary, parent: Node) -> CoreValidationSchema:
|
||||
schemas.append(parent)
|
||||
return CoreValidationSchema.new(core, schema, parent)
|
||||
|
|
|
@ -160,12 +160,7 @@ func test_get_center() -> void:
|
|||
# stringify_variables
|
||||
func test_stringify_variables() -> void:
|
||||
# Init CORE
|
||||
var core_config: CoreConfiguration = CoreConfiguration.new()
|
||||
core_config.misc_stringify_show_type = true
|
||||
core_config.misc_stringify_color_range8 = true
|
||||
core_config.misc_stringify_array = true
|
||||
core_config.misc_stringify_dictionary = true
|
||||
await load_framework(core_config)
|
||||
await load_framework()
|
||||
|
||||
# Variables
|
||||
var test_in_string: String = "null=%null%\nbool=%bool%\nint=%int%\nfloat=%float%\nstring=%string%\nstringname=%stringname%\ncolor=%color%\narray=%array%\ndict=%dictionary%\nnodepath=%nodepath%\nvec2=%vector2%\nvec2i=%vector2i%\nrect2=%rect2%\nrect2i=%rect2i%\ntrans2d=%transform2d%\nvec3=%vector3%\nvec3i=%vector3i%\nplane=%plane%\nquarternion=%quaternion%\naabb=%aabb%\ntrans3d=%transform3d%\nbasis=%basis%\nprojection=%projection%\nvec4=%vector4%\nvec4i=%vector4i%"
|
||||
|
|
|
@ -25,7 +25,6 @@ var callback: String = ""
|
|||
# Unload framework after each test
|
||||
func after_each() -> void:
|
||||
callback = ""
|
||||
await wait_process_time() # Prevent output overflows
|
||||
await unload_framework()
|
||||
|
||||
# Framework management
|
||||
|
|
Loading…
Reference in a new issue