The first public release of Fabled Minstrel #158

Merged
bvandeusen merged 256 commits from dev into main 2026-12-03 21:41:58 -05:00
Showing only changes of commit de335333da - Show all commits
+3 -2
View File
@@ -143,7 +143,8 @@ func (f playHistoryFixture) search3Songs(t *testing.T, query string) (titles []s
} }
// An app that keeps a copy of the library downloads it with an empty query, // An app that keeps a copy of the library downloads it with an empty query,
// a page at a time; the pages must cover every song once. // a page at a time; the pages must cover every playable song once. C's file
// is missing in this fixture, so it is left out without shortening a page.
func TestSearch3_EmptyQueryPagesThroughEverySong(t *testing.T) { func TestSearch3_EmptyQueryPagesThroughEverySong(t *testing.T) {
f := seedPlayHistory(t) f := seedPlayHistory(t)
var all []string var all []string
@@ -154,7 +155,7 @@ func TestSearch3_EmptyQueryPagesThroughEverySong(t *testing.T) {
} }
all = append(all, page...) all = append(all, page...)
} }
if want := []string{"A", "B", "C", "D", "E"}; !slices.Equal(all, want) { if want := []string{"A", "B", "D", "E"}; !slices.Equal(all, want) {
t.Errorf("songs across pages = %v, want %v", all, want) t.Errorf("songs across pages = %v, want %v", all, want)
} }
if page, code := f.search3Songs(t, `query=""&songCount=2`); code != 0 || !slices.Equal(page, []string{"A", "B"}) { if page, code := f.search3Songs(t, `query=""&songCount=2`); code != 0 || !slices.Equal(page, []string{"A", "B"}) {