testDBPath to package variables
This commit is contained in:
@@ -31,7 +31,6 @@ func mustRead(fname string) string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func TestParse(t *testing.T) {
|
func TestParse(t *testing.T) {
|
||||||
testDBPath := "testdata/testdb.txt"
|
|
||||||
vendors, classes, err := ParseIDs(strings.NewReader(mustRead(testDBPath)))
|
vendors, classes, err := ParseIDs(strings.NewReader(mustRead(testDBPath)))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatalf("ParseIDs(%q): %s", testDBPath, err)
|
t.Fatalf("ParseIDs(%q): %s", testDBPath, err)
|
||||||
|
@@ -17,6 +17,7 @@ package usbid
|
|||||||
import "github.com/kylelemons/gousb/usb"
|
import "github.com/kylelemons/gousb/usb"
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
testDBPath = "testdata/testdb.txt"
|
||||||
testDBVendors = map[usb.ID]*Vendor{
|
testDBVendors = map[usb.ID]*Vendor{
|
||||||
0xabcd: {
|
0xabcd: {
|
||||||
Name: "Vendor One",
|
Name: "Vendor One",
|
||||||
|
Reference in New Issue
Block a user