diff options
| author | historia <[not public]> | 2026-10-05 17:05:14 -0400 |
|---|---|---|
| committer | historia <[not public]> | 2026-10-05 17:05:14 -0400 |
| commit | e42952469dadfb3535633c66c881050ac128703c (patch) | |
| tree | a78f7396b72cdbd6fa4f6c454c830f40cf2ad0cb /internal/player/xp_test.go | |
| parent | 90ad8c0c33b519d5830c69d4128bdc984b5e9de8 (diff) | |
| download | thehouseoficarus-e42952469dadfb3535633c66c881050ac128703c.tar.gz | |
fix: gather verbs, walk oom, admin path bypass, roulette refund
Diffstat (limited to 'internal/player/xp_test.go')
| -rw-r--r-- | internal/player/xp_test.go | 15 |
1 files changed, 15 insertions, 0 deletions
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]) + } +} |
