• Home
  • Raw
  • Download

Lines Matching full:want

117 		if got, want := m.Name, tt.wantLicense; got != want {
118 t.Errorf("NearestMatch(%q) = %q, want %q", tt.description, got, want)
120 if got, want := m.Confidence, tt.wantConfidence; got < want {
121 t.Errorf("NearestMatch(%q) = %v, want %v", tt.description, got, want)
130 want stringclassifier.Matches
135 want: stringclassifier.Matches{
151 want: stringclassifier.Matches{
165 want: stringclassifier.Matches{
179 want: stringclassifier.Matches{
198 if len(m) != len(tt.want) {
199 t.Fatalf("MultipleMatch(%q) number matches: %v, want %v", tt.description, len(m), len(tt.want))
204 w := tt.want[i]
205 if got, want := m[i].Name, w.Name; got != want {
206 t.Errorf("MultipleMatch(%q) = %q, want %q", tt.description, got, want)
208 if got, want := m[i].Confidence, w.Confidence; got < want {
209 t.Errorf("MultipleMatch(%q) = %v, want %v", tt.description, got, want)
219 want stringclassifier.Matches
224 want: stringclassifier.Matches{
252 want: stringclassifier.Matches{
268 if len(m) != len(tt.want) {
269 t.Errorf("MultipleMatch(%q) number matches: %v, want %v", tt.description, len(m), len(tt.want))
274 w := tt.want[i]
275 if got, want := m[i].Name, w.Name; got != want {
276 t.Errorf("MultipleMatch(%q) = %q, want %q", tt.description, got, want)
278 if got, want := m[i].Confidence, w.Confidence; got < want {
279 t.Errorf("MultipleMatch(%q) = %v, want %v", tt.description, got, want)
288 want string
292 want: "Yoyodyne Inc.",
296 want: "Yoyodyne, Inc.",
300 want: "Yoyodyne, Inc.",
304 want: "Yoyodyne, Inc.",
308 want: "Yoyodyne, Inc., San Narciso, CA, US",
312 want: "The Algonquin Round Table",
316 want: "The Android Open Source Project",
323 want: "The Android Open Source Project",
329 if got != tt.want {
330 t.Errorf("CopyrightHolder(%q) = %q, want %q", tt.copyright, got, tt.want)
386 …t.Errorf("WithinConfidenceThreshold() at %v returned wrong result; got %v, want %v", classifier.Th…
392 t.Errorf("WithinConfidenceThreshold(%q) = %v, want %v", tt.description, got, tt.conf99)
398 t.Errorf("WithinConfidenceThreshold(%q) = %v, want %v", tt.description, got, tt.conf93)
404 t.Errorf("WithinConfidenceThreshold(%q) = %v, want %v", tt.description, got, tt.conf5)
411 …const want = `Lorem ipsum dolor sit amet, pellentesque wisi tortor duis, amet adipiscing bibendum …
417 want string
436 ` + want,
437 want: strings.ToLower(want),
442 if got := removeIgnorableTexts(strings.ToLower(tt.original)); got != tt.want {
443 t.Errorf("Mismatch(%q) =>\n%s\nwant:\n%s", tt.original, got, tt.want)
451 want string
455 want: "",
459 want: "#!/usr/bin/env python -C",
466 want: `# First line of license text.
474 want: `# First line of license text.
482 if got != tt.want {
483 t.Errorf("RemoveShebangLine(%q) =>\n%s\nwant:\n%s", tt.original, got, tt.want)
491 want string
497 want: ` Hello World `,
503 want: ` This text has a bulleted list item 1 item 2`,
511 want: ` This text has a bulleted list item 1 item 2`,
517 want: ` This text has a bulleted list 1 item 1 2 item 2`,
525 want: ` «Copyright c 1998 Yoyodyne Inc » This text has a bulleted list 1 item 1 2 item 2 `,
529 * This is the first line we want.
530 * This is the second line we want.
531 * This is the third line we want.
532 * This is the last line we want.
534want: ` This is the first line we want This is the second line we want This is the third line we w…
539 * This is the first line we want.
540 * This is the second line we want.
541 * This is the third line we want.
542 * This is the last line we want.
546want: ` This is the first line we want This is the second line we want This is the third line we w…
550 want: " ",
554 want: " ",
558 want: " ",
562 want: " precursor text ",
567 want: " ",
571 want: "",
576 if got := stringclassifier.FlattenWhitespace(RemoveNonWords(tt.original)); got != tt.want {
577 t.Errorf("Mismatch(%q) => %v, want %v", tt.original, got, tt.want)
585 want string
618 if got := NormalizePunctuation(tt.original); got != tt.want {
619 t.Errorf("Mismatch => %v, want %v", got, tt.want)
627 want string
673 if got := NormalizeEquivalentWords(tt.original); got != tt.want {
674 t.Errorf("Mismatch => %v, want %v", got, tt.want)
682 want string
699 If you develop a new program, and you want it to be of the greatest
703 want: `12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL
718 if got := TrimExtraneousTrailingText(tt.original); got != tt.want {
719 t.Errorf("Mismatch => %q, want %q", got, tt.want)
743 t.Errorf("Mismatch(%q) => false, want true", file.Name())
749 t.Error("Mismatch => true, want false")
781 t.Errorf("ConfidenceMatch(%q) => %v, want %v", name, m.Confidence, 0.99)
783 want := strings.TrimSuffix(name, ".header")
784 if want != m.Name {
785 t.Errorf("LicenseMatch(%q) => %v, want %v", name, m.Name, want)
858 want := tt.wantArchive()
859 if !bytes.Equal(got, want) {
860 t.Errorf("archives did not match; got %d bytes, wanted %d", len(got), len(want))