aboutsummaryrefslogtreecommitdiff
path: root/internal/game/economy_journal_test_helpers_test.go
blob: e65c622697dbdf7ac608cbed48afb9f9ead7417f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
package game

import "testing"

// mustLoadOpen is the test-side loadOpen: a journal fold failure is a test
// failure, not a nil slice to accidentally treat as "nothing open".
func (j *economyJournal) mustLoadOpen(t *testing.T) []*economyRecord {
	t.Helper()
	open, err := j.loadOpen()
	if err != nil {
		t.Fatalf("loadOpen: %v", err)
	}
	return open
}