strip.TestRewriteGodepImport   A
last analyzed

Complexity

Conditions 4

Size

Total Lines 10
Code Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 4
eloc 8
nop 1
dl 0
loc 10
rs 10
c 0
b 0
f 0
1
package strip
2
3
import "testing"
4
5
func TestRewriteGodepImport(t *testing.T) {
6
	tests := map[string]string{
7
		"github.com/Masterminds/glide/action":                           "github.com/Masterminds/glide/action",
8
		"github.com/tools/godep/Godeps/_workspace/src/github.com/kr/fs": "github.com/kr/fs",
9
	}
10
11
	for k, v := range tests {
12
		o := rewriteGodepImport(k)
13
		if o != v {
14
			t.Errorf("Incorrect Godep import path rewritten %s: %s", v, o)
15
		}
16
	}
17
}
18