thread-master/backend/internal/library/copyvoice/human_test.go

22 lines
510 B
Go
Raw Permalink Normal View History

package copyvoice
import "testing"
func TestNarrativeLensStableForSeed(t *testing.T) {
a := NarrativeLens("scan-post-1")
b := NarrativeLens("scan-post-1")
if a == "" || a != b {
t.Fatalf("NarrativeLens() = %q, %q", a, b)
}
}
func TestNarrativeLensDiffersAcrossSeeds(t *testing.T) {
seen := map[string]struct{}{}
for _, seed := range []string{"a", "b", "c", "d", "e", "f"} {
seen[NarrativeLens(seed)] = struct{}{}
}
if len(seen) < 2 {
t.Fatalf("expected varied lenses, got %d", len(seen))
}
}