(t *testing.T)
| 19 | ) |
| 20 | |
| 21 | func TestNetDevParseLine(t *testing.T) { |
| 22 | tc := []string{"eth0", "eth0:1"} |
| 23 | for i := range tc { |
| 24 | rawLine := fmt.Sprintf(` %v: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16`, tc[i]) |
| 25 | have, err := NetDev{}.parseLine(rawLine) |
| 26 | if err != nil { |
| 27 | t.Fatal(err) |
| 28 | } |
| 29 | want := NetDevLine{tc[i], 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16} |
| 30 | if want != *have { |
| 31 | t.Errorf("want %v, have %v", want, have) |
| 32 | } |
| 33 | } |
| 34 | |
| 35 | } |
| 36 | |
| 37 | func TestNetDev(t *testing.T) { |
| 38 | fs, err := NewFS(procTestFixtures) |
nothing calls this directly
no test coverage detected
searching dependent graphs…