summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron M. Ucko <ucko@debian.org>2018-04-24 19:45:54 -0400
committerAaron M. Ucko <ucko@debian.org>2018-04-25 19:05:17 -0400
commit7ca4d55e4d5a59543e43d1c08750cfba90f6d1af (patch)
treeb1a212b3c354511038daf2243f25d2300872f3ab
parente5ffa05f49c88972fc7c2ede0585f08f300eaeb1 (diff)
porter2_test.go: Formally port from surge/glog to golang/glog.
Replace Debugf, which golang/glog lacks, with Infof, which should be close enough for this test's purposes. (There's no Debian package for surge/glog, and no point in bothering to make one for one private test.) Gbp-Pq: Name 0001-porter2_test.go-Formally-port-from-surge-glog-to-gol.patch
-rw-r--r--porter2_test.go28
1 files changed, 14 insertions, 14 deletions
diff --git a/porter2_test.go b/porter2_test.go
index d0d8df3..847f76f 100644
--- a/porter2_test.go
+++ b/porter2_test.go
@@ -23,7 +23,7 @@ import (
"testing"
"github.com/stretchr/testify/assert"
- "github.com/surge/glog"
+ "github.com/golang/glog"
)
var (
@@ -324,7 +324,7 @@ var (
func TestEnglishStep0(t *testing.T) {
for i, rs := range data0 {
- //glog.Debugf("rs=%q, expected=%q", string(rs), string(expect[i]))
+ //glog.Infof("rs=%q, expected=%q", string(rs), string(expect[i]))
assert.Equal(t, step0(rs), expect0[i])
}
}
@@ -333,7 +333,7 @@ func TestEnglishStep1a(t *testing.T) {
for i, rs := range data1a {
assert.Equal(t, step1a(rs), expect1a[i])
- //glog.Debugf("rs=%q, expected=%q, got=%q", string(rs), string(expect1a[i]), string(s))
+ //glog.Infof("rs=%q, expected=%q, got=%q", string(rs), string(expect1a[i]), string(s))
}
}
@@ -341,7 +341,7 @@ func TestEnglishStep1b(t *testing.T) {
for i, rs := range data1b {
r1, _ := markR1R2(rs)
- //glog.Debugf("rs=%q, expected=%q, r1=%d", string(rs), string(expect1b[i]), r1)
+ //glog.Infof("rs=%q, expected=%q, r1=%d", string(rs), string(expect1b[i]), r1)
s := step1b(rs, r1)
assert.Equal(t, s, expect1b[i])
}
@@ -350,7 +350,7 @@ func TestEnglishStep1b(t *testing.T) {
func TestEnglishStep1c(t *testing.T) {
for i, rs := range data1c {
- //glog.Debugf("rs=%q, expected=%q, got=%q", string(rs), string(expect1c[i]), string(step1c(rs)))
+ //glog.Infof("rs=%q, expected=%q, got=%q", string(rs), string(expect1c[i]), string(step1c(rs)))
assert.Equal(t, step1c(rs), expect1c[i])
}
}
@@ -360,7 +360,7 @@ func TestEnglishStep2(t *testing.T) {
for i, rs := range data2 {
r1, _ := markR1R2(rs)
s := step2(rs, r1)
- //glog.Debugf("rs=%q, expected=%q, got=%q, r1=%d", string(rs), string(expect2[i]), string(s), r1)
+ //glog.Infof("rs=%q, expected=%q, got=%q, r1=%d", string(rs), string(expect2[i]), string(s), r1)
assert.Equal(t, s, expect2[i])
}
}
@@ -370,7 +370,7 @@ func TestEnglishStep3(t *testing.T) {
for i, rs := range data3 {
r1, r2 := markR1R2(rs)
s := step3(rs, r1, r2)
- //glog.Debugf("rs=%q, expected=%q, got=%q, r1=%d", string(rs), string(expect3[i]), string(s), r1)
+ //glog.Infof("rs=%q, expected=%q, got=%q, r1=%d", string(rs), string(expect3[i]), string(s), r1)
assert.Equal(t, s, expect3[i])
}
}
@@ -380,7 +380,7 @@ func TestEnglishStep4(t *testing.T) {
for i, rs := range data4 {
_, r2 := markR1R2(rs)
s := step4(rs, r2)
- //glog.Debugf("rs=%q, expected=%q, got=%q, r1=%d, r2=%d", string(rs), string(expect4[i]), string(s), r1, r2)
+ //glog.Infof("rs=%q, expected=%q, got=%q, r1=%d, r2=%d", string(rs), string(expect4[i]), string(s), r1, r2)
assert.Equal(t, s, expect4[i])
}
}
@@ -390,7 +390,7 @@ func TestEnglishStep5(t *testing.T) {
for i, rs := range data5 {
r1, r2 := markR1R2(rs)
s := step5(rs, r1, r2)
- //glog.Debugf("rs=%q, expected=%q, got=%q, r1=%d, r2=%d", string(rs), string(expect5[i]), string(s), r1, r2)
+ //glog.Infof("rs=%q, expected=%q, got=%q, r1=%d, r2=%d", string(rs), string(expect5[i]), string(s), r1, r2)
assert.Equal(t, s, expect5[i])
}
}
@@ -398,7 +398,7 @@ func TestEnglishStep5(t *testing.T) {
func TestEnglishMarkR1R2(t *testing.T) {
for i, rs := range dataRegions {
r1, r2 := markR1R2(rs)
- //glog.Debugf("rs = %v, expected = %v, got = %v", rs, expectRegions[i], []int{r1, r2})
+ //glog.Infof("rs = %v, expected = %v, got = %v", rs, expectRegions[i], []int{r1, r2})
assert.Equal(t, expectRegions[i], []int{r1, r2})
}
@@ -408,7 +408,7 @@ func TestEnglishIsShortWord(t *testing.T) {
for s, v := range shortWords {
rs := []rune(s)
r1, _ := markR1R2(rs)
- //glog.Debugf("rs=%q, r1=%d", s, r1)
+ //glog.Infof("rs=%q, r1=%d", s, r1)
assert.Equal(t, v, isShortWord(rs, r1))
}
}
@@ -417,7 +417,7 @@ func TestEnglishExceptions1(t *testing.T) {
for k, v := range exceptions1 {
rs, ex := exception1([]rune(k))
- //glog.Debugf("rs=%q, expected=%q, got=%q", k, v, string(rs))
+ //glog.Infof("rs=%q, expected=%q, got=%q", k, v, string(rs))
assert.True(t, ex)
assert.Equal(t, []rune(v), rs)
}
@@ -484,10 +484,10 @@ func TestEnglishVocOutput(t *testing.T) {
word := inscan.Text()
expect := outscan.Text()
- //glog.Debugf("word=%q, expect=%q", word, expect)
+ //glog.Infof("word=%q, expect=%q", word, expect)
actual := Stem(word)
if actual != expect {
- glog.Debugf("word=%q, actual=%q != expect=%q", word, actual, expect)
+ glog.Infof("word=%q, actual=%q != expect=%q", word, actual, expect)
}
assert.Equal(t, expect, actual)
}