Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Use a constant for the testdata directory
  • Loading branch information
zimmski committed Dec 2, 2016
commit 2be755f07c89fb99d39962938dd2e69003c4f6e6
6 changes: 4 additions & 2 deletions diffmatchpatch/benchutil_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,14 @@ import (
"io/ioutil"
)

const testdataPath = "../testdata/"

func speedtestTexts() (s1 string, s2 string) {
d1, err := ioutil.ReadFile("../testdata/speedtest1.txt")
d1, err := ioutil.ReadFile(testdataPath + "speedtest1.txt")
if err != nil {
panic(err)
}
d2, err := ioutil.ReadFile("../testdata/speedtest2.txt")
d2, err := ioutil.ReadFile(testdataPath + "speedtest2.txt")
if err != nil {
panic(err)
}
Expand Down