From e42952469dadfb3535633c66c881050ac128703c Mon Sep 17 00:00:00 2001 From: historia <[not public]> Date: Mon, 5 Oct 2026 17:05:14 -0400 Subject: fix: gather verbs, walk oom, admin path bypass, roulette refund --- internal/player/xp_test.go | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 internal/player/xp_test.go (limited to 'internal/player/xp_test.go') diff --git a/internal/player/xp_test.go b/internal/player/xp_test.go new file mode 100644 index 0000000..fc0eeb4 --- /dev/null +++ b/internal/player/xp_test.go @@ -0,0 +1,15 @@ +package player + +import "testing" + +// Regression: XPTable was declared [100]int with 99 initializers, so index 99 +// silently read as 0 ("level 100 costs 0 XP"). The array is now sized so an +// out-of-range index is a compile error. +func TestXPTableBounds(t *testing.T) { + if len(XPTable) != 99 { + t.Fatalf("len(XPTable) = %d, want 99", len(XPTable)) + } + if XPTable[98] != 13034431 { + t.Fatalf("XPTable[98] = %d, want 13034431", XPTable[98]) + } +} -- cgit v1.2.3