summaryrefslogtreecommitdiff
path: root/addons/gut/compare_result.gd
diff options
context:
space:
mode:
authorSophia Pearson <codergal89@gmail.com>2022-05-20 00:45:25 +0200
committerSophia Pearson <codergal89@gmail.com>2022-05-20 18:56:04 +0200
commit05d29ccce1898ed89c0b650c77242c2fa2805128 (patch)
treee8ee3bcb570fa6f3d9d96273c2bf4d4c8618d08b /addons/gut/compare_result.gd
downloadtexty-05d29ccce1898ed89c0b650c77242c2fa2805128.tar.xz
texty-05d29ccce1898ed89c0b650c77242c2fa2805128.zip
texty: initial commit
Diffstat (limited to 'addons/gut/compare_result.gd')
-rw-r--r--addons/gut/compare_result.gd47
1 files changed, 47 insertions, 0 deletions
diff --git a/addons/gut/compare_result.gd b/addons/gut/compare_result.gd
new file mode 100644
index 0000000..be6aebd
--- /dev/null
+++ b/addons/gut/compare_result.gd
@@ -0,0 +1,47 @@
+var are_equal = null setget set_are_equal, get_are_equal
+var summary = null setget set_summary, get_summary
+var max_differences = 30 setget set_max_differences, get_max_differences
+var differences = {} setget set_differences, get_differences
+
+func _block_set(which, val):
+ push_error(str('cannot set ', which, ', value [', val, '] ignored.'))
+
+func _to_string():
+ return str(get_summary()) # could be null, gotta str it.
+
+func get_are_equal():
+ return are_equal
+
+func set_are_equal(r_eq):
+ are_equal = r_eq
+
+func get_summary():
+ return summary
+
+func set_summary(smry):
+ summary = smry
+
+func get_total_count():
+ pass
+
+func get_different_count():
+ pass
+
+func get_short_summary():
+ return summary
+
+func get_max_differences():
+ return max_differences
+
+func set_max_differences(max_diff):
+ max_differences = max_diff
+
+func get_differences():
+ return differences
+
+func set_differences(diffs):
+ _block_set('differences', diffs)
+
+func get_brackets():
+ return null
+