Skip to content
This repository has been archived by the owner on Apr 4, 2021. It is now read-only.

Commit

Permalink
テスト追加
Browse files Browse the repository at this point in the history
  • Loading branch information
syou6162 committed Oct 14, 2018
1 parent e35847f commit 0952a24
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lib/cache/cache_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,19 @@ func TestAttachMetaData(t *testing.T) {
t.Errorf("Feature vector must be empty for %s", examples[0].Url)
}

if examples[1].OgType != "" {
t.Errorf("OgType must be empty for %s", examples[1].Url)
}

AttachMetadata(examples, true, false)
if examples[0].Title == "" {
t.Errorf("Title must not be empty for %s", examples[0].Url)
}
if len(examples[0].Fv) == 0 {
t.Errorf("Feature vector must not be empty for %s", examples[0].Url)
}

if examples[1].OgType == "" {
t.Errorf("OgType must not be empty for %s", examples[1].Url)
}
}

0 comments on commit 0952a24

Please sign in to comment.