feat: verify scanner engine acceptance criteria
Confirm normalization + 0.85 threshold, IsIgnored skip, per-artist scoping, and zero-threshold→default contract. Added TestScanArtist_ZeroThresholdUsesDefault, fixed gofmt on two test files. Coverage: scanner 90.3%, normalize 100.0%.
This commit is contained in:
@@ -8,11 +8,11 @@ import (
|
||||
|
||||
func TestSimilarity(t *testing.T) {
|
||||
tests := []struct {
|
||||
name string
|
||||
a string
|
||||
b string
|
||||
want float64
|
||||
epsilon float64
|
||||
name string
|
||||
a string
|
||||
b string
|
||||
want float64
|
||||
epsilon float64
|
||||
}{
|
||||
{
|
||||
name: "exact match scores 1.0",
|
||||
@@ -127,14 +127,14 @@ func TestFindMissingReleases(t *testing.T) {
|
||||
artistB := "artist-b"
|
||||
|
||||
tests := []struct {
|
||||
name string
|
||||
local []database.LocalAlbum
|
||||
name string
|
||||
local []database.LocalAlbum
|
||||
external []database.ExternalRelease
|
||||
want []string // RGIDs expected to be reported as missing
|
||||
want []string // RGIDs expected to be reported as missing
|
||||
}{
|
||||
{
|
||||
name: "no local albums means all external are missing",
|
||||
local: nil,
|
||||
name: "no local albums means all external are missing",
|
||||
local: nil,
|
||||
external: []database.ExternalRelease{
|
||||
{RGID: "rg1", ArtistID: artistA, Title: "The Wall"},
|
||||
{RGID: "rg2", ArtistID: artistA, Title: "Animals"},
|
||||
|
||||
Reference in New Issue
Block a user