Skip to content

Commit

Permalink
Add test for classify without samples set
Browse files Browse the repository at this point in the history
  • Loading branch information
Kagami committed Jan 8, 2019
1 parent fbff52d commit 08b2496
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions face_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,14 @@ func TestNumFaces(t *testing.T) {
}
}

func TestEmptyClassify(t *testing.T) {
var sample face.Descriptor
id := rec.Classify(sample)
if id != -1 {
t.Fatalf("expected -1 but got %d", id)
}
}

func TestIdols(t *testing.T) {
idata, err := getIdolData()
if err != nil {
Expand Down

0 comments on commit 08b2496

Please sign in to comment.