godot-xterm/addons/gut/compare_result.gd

84 lines
1.2 KiB
GDScript
Raw Normal View History

var _are_equal = false
2023-01-20 23:34:39 +01:00
var are_equal = false:
2022-11-09 21:57:46 +01:00
get:
return get_are_equal()
set(val):
set_are_equal(val)
var _summary = null
2023-01-20 23:34:39 +01:00
var summary = null:
2022-11-09 21:57:46 +01:00
get:
return get_summary()
set(val):
set_summary(val)
var _max_differences = 30
2023-01-20 23:34:39 +01:00
var max_differences = 30:
2022-11-09 21:57:46 +01:00
get:
return get_max_differences()
set(val):
set_max_differences(val)
var _differences = {}
2023-01-20 23:34:39 +01:00
var differences:
get:
return get_differences()
set(val):
set_differences(val)
2023-01-20 23:34:39 +01:00
func _block_set(which, val):
2023-01-20 23:34:39 +01:00
push_error(str("cannot set ", which, ", value [", val, "] ignored."))
func _to_string():
2023-01-20 23:34:39 +01:00
return str(get_summary()) # could be null, gotta str it.
func get_are_equal():
return _are_equal
2023-01-20 23:34:39 +01:00
func set_are_equal(r_eq):
_are_equal = r_eq
2023-01-20 23:34:39 +01:00
func get_summary():
return _summary
2023-01-20 23:34:39 +01:00
func set_summary(smry):
_summary = smry
2023-01-20 23:34:39 +01:00
func get_total_count():
pass
2023-01-20 23:34:39 +01:00
func get_different_count():
pass
2023-01-20 23:34:39 +01:00
func get_short_summary():
return summary
2023-01-20 23:34:39 +01:00
func get_max_differences():
return _max_differences
2023-01-20 23:34:39 +01:00
func set_max_differences(max_diff):
_max_differences = max_diff
2023-01-20 23:34:39 +01:00
func get_differences():
return _differences
2023-01-20 23:34:39 +01:00
func set_differences(diffs):
2023-01-20 23:34:39 +01:00
_block_set("differences", diffs)
func get_brackets():
return null