Skip to content

Commit

Permalink
add block_processor test
Browse files Browse the repository at this point in the history
  • Loading branch information
yukihir0 committed Jul 19, 2015
1 parent a7d8008 commit 0a16f45
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions block_processor_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
package gec

import (
"testing"
)

func TestMaxScoreContent(t *testing.T) {
opt := NewOption()
tp := NewTextProcessor(opt)
bp := NewBlockProcessor(opt, tp)

docs := []string{
"",
"<html><head><title>hoge</title></head><html>",
}
expecteds := []string{
"",
"",
}

for i, _ := range docs {
bp.Process(docs[i])
actual := bp.GetMaxScoreContent()
if actual != expecteds[i] {
t.Errorf("expected %s, but got %s", expecteds[i], actual)
}
}

}

0 comments on commit 0a16f45

Please sign in to comment.