summaryrefslogtreecommitdiff
path: root/fpdf_test.go
diff options
context:
space:
mode:
authorKurt <kurt.w.jung@gmail.com>2017-07-19 08:57:33 -0400
committerKurt <kurt.w.jung@gmail.com>2017-07-19 08:57:33 -0400
commit784ad190acab08c54aa4847f15207d5fa9c25ef0 (patch)
tree0c5bb80595a5fd7936eddb6af939c7f3834ff279 /fpdf_test.go
parentfdeef9c676bdb5f738d02c770b6312c0e2e12775 (diff)
Tweak some last page expressions and comments
Diffstat (limited to 'fpdf_test.go')
-rw-r--r--fpdf_test.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/fpdf_test.go b/fpdf_test.go
index f25866e..9b45486 100644
--- a/fpdf_test.go
+++ b/fpdf_test.go
@@ -116,11 +116,11 @@ func TestFooterFuncLpi(t *testing.T) {
}
w := &bytes.Buffer{}
if err := pdf.Output(w); err != nil {
- t.Errorf("got err:%v want nil")
+ t.Errorf("unexpected err: %s", err)
}
b := w.Bytes()
if bytes.Contains(b, []byte(oldFooterFnc)) {
- t.Errorf("Not expecting %s render on pdf when FooterFncLpi is set", oldFooterFnc)
+ t.Errorf("not expecting %s render on pdf when FooterFncLpi is set", oldFooterFnc)
}
got := bytes.Count(b, []byte("bothPages"))
if got != 2 {
@@ -128,16 +128,16 @@ func TestFooterFuncLpi(t *testing.T) {
}
got = bytes.Count(b, []byte(firstPageOnly))
if got != 1 {
- t.Errorf("footer %s should render only on first page got:%d", firstPageOnly, got)
+ t.Errorf("footer %s should render only on first page got: %d", firstPageOnly, got)
}
got = bytes.Count(b, []byte(lastPageOnly))
if got != 1 {
- t.Errorf("footer %s should render only on first page got:%d", lastPageOnly, got)
+ t.Errorf("footer %s should render only on first page got: %d", lastPageOnly, got)
}
f := bytes.Index(b, []byte(firstPageOnly))
l := bytes.Index(b, []byte(lastPageOnly))
if f > l {
- t.Errorf("index %s : %d should less than indec of %s : %d", f, l)
+ t.Errorf("index %d (%s) should less than index %d (%s)", f, firstPageOnly, l, lastPageOnly)
}
}