Skip to content

Commit

Permalink
go modules; fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
richardlehane committed Feb 18, 2019
1 parent 616c650 commit d7f2219
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module github.com/richardlehane/msoleps
8 changes: 4 additions & 4 deletions msoleps_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ func testFile(t *testing.T, path string) *Reader {
defer file.Close()
doc, err := NewFrom(file)
if err != nil {
t.Errorf("Error opening file; Returns error: ", err)
t.Errorf("Error opening file; Returns error: %v", err)
}
return doc
}

func TestDocSum(t *testing.T) {
doc := testFile(t, testDocSum)
if len(doc.Property) != 12 {
t.Error("Expecting 12 properties, got %d", len(doc.Property))
t.Errorf("Expecting 12 properties, got %d", len(doc.Property))
}
if doc.Property[1].String() != "Australian Broadcasting Corporation" {
t.Errorf("Expecting 'ABC' as second property, got %s", doc.Property[1])
Expand All @@ -34,7 +34,7 @@ func TestDocSum(t *testing.T) {
func TestSum(t *testing.T) {
doc := testFile(t, testSum)
if len(doc.Property) != 17 {
t.Error("Expecting 17 properties, got %d", len(doc.Property))
t.Errorf("Expecting 17 properties, got %d", len(doc.Property))
}
if doc.Property[5].String() != "Normal" {
t.Errorf("Expecting 'Normal' as sixth property, got %s", doc.Property[5])
Expand All @@ -44,7 +44,7 @@ func TestSum(t *testing.T) {
func TestSum1(t *testing.T) {
doc := testFile(t, testSum1)
if len(doc.Property) != 3 {
t.Error("Expecting 3 properties, got %d", len(doc.Property))
t.Errorf("Expecting 3 properties, got %d", len(doc.Property))
}
if doc.Property[0].String() != "Mail" {
t.Errorf("Expecting 'Mail' as first property, got %s", doc.Property[0])
Expand Down

0 comments on commit d7f2219

Please sign in to comment.