|
@@ -14,8 +14,8 @@ import (
|
14
|
14
|
)
|
15
|
15
|
|
16
|
16
|
func TestWebList(t *testing.T) {
|
17
|
|
- if runtime.GOOS != "linux" {
|
18
|
|
- t.Skip("weblist only tested on linux")
|
|
17
|
+ if runtime.GOOS != "linux" || runtime.GOARCH != "amd64" {
|
|
18
|
+ t.Skip("weblist only tested on x86-64 linux")
|
19
|
19
|
}
|
20
|
20
|
|
21
|
21
|
cpu := readProfile(filepath.Join("testdata", "sample.cpu"), t)
|
|
@@ -40,8 +40,8 @@ func TestWebList(t *testing.T) {
|
40
|
40
|
|
41
|
41
|
func TestIndentation(t *testing.T) {
|
42
|
42
|
for _, c := range []struct {
|
43
|
|
- str string
|
44
|
|
- indent int
|
|
43
|
+ str string
|
|
44
|
+ wantIndent int
|
45
|
45
|
}{
|
46
|
46
|
{"", 0},
|
47
|
47
|
{"foobar", 0},
|
|
@@ -52,8 +52,8 @@ func TestIndentation(t *testing.T) {
|
52
|
52
|
{" \tfoo", 8},
|
53
|
53
|
{" \tfoo", 16},
|
54
|
54
|
} {
|
55
|
|
- if n := indentation(c.str); n != c.indent {
|
56
|
|
- t.Errorf("indentation for %v: expect %d, got %d\n", c.str, c.indent, n)
|
|
55
|
+ if n := indentation(c.str); n != c.wantIndent {
|
|
56
|
+ t.Errorf("indentation(%v): got %d, want %d", c.str, n, c.wantIndent)
|
57
|
57
|
}
|
58
|
58
|
}
|
59
|
59
|
}
|