Move outcome calibration to profile

This commit is contained in:
hz
2026-07-14 22:14:38 -05:00
parent d1dc467ade
commit d73fd5f2cf
4 changed files with 150 additions and 72 deletions
+16
View File
@@ -0,0 +1,16 @@
extends SceneTree
func _initialize() -> void:
var ProgressProfile = load("res://scripts/ui/progress_profile.gd")
_assert_equal(ProgressProfile.validate_outcome(236, "2026-07-14", true), "", "valid outcome")
_assert_equal(ProgressProfile.validate_outcome(236, "2026-07-14", false), "Consent is required before saving an outcome.", "consent")
_assert_equal(ProgressProfile.validate_outcome(236, "07/14/2026", true), "Enter the exam date as YYYY-MM-DD.", "date format")
_assert_equal(ProgressProfile.validate_outcome(301, "2026-07-14", true), "Enter an official score from 1 through 300.", "score range")
print("outcome_profile_test: PASS")
quit(0)
func _assert_equal(actual: Variant, expected: Variant, label: String) -> void:
if actual != expected:
push_error("%s: expected %s, got %s" % [label, expected, actual])
quit(1)