Refactor the D&D spells module to apply deterministic fields where appropriate

This commit is contained in:
2026-07-08 10:43:39 -05:00
parent 610bdb4fea
commit 98b03a4629
12 changed files with 324 additions and 37 deletions

View File

@@ -16,6 +16,9 @@ func TestUnitRefUnmarshalAcceptsIntegerAndNumericString(t *testing.T) {
if got := integerRef.String(); got != "12" {
t.Fatalf("integer ref = %q, want 12", got)
}
if got := integerRef.Int(); got != 12 {
t.Fatalf("integer ref value = %d, want 12", got)
}
var stringRef UnitRef
if err := json.Unmarshal([]byte(`"12"`), &stringRef); err != nil {