-
Notifications
You must be signed in to change notification settings - Fork 1
/
structs.go
101 lines (88 loc) · 1.99 KB
/
structs.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
package main
type Exec struct {
TestCase []TestCaseExec `json:"testCase"`
TestSuite []TestSuiteExec `json:"testSuite"`
}
type (
TestCaseExec struct {
ID string `json:"id"`
Status string `json:"status"`
Duration float64 `json:"duration"`
FailureMsg string `json:"failureMsg"`
}
TestSuiteExec struct {
ID string `json:"id"`
Status string `json:"status"`
Duration float64 `json:"duration"`
FailureMsg string `json:"failureMsg"`
Package string `json:"pkg"`
NumTests int `json:"numTests"`
}
)
type Discovery struct {
TestCases []TestCases `json:"testCases"`
TestSuites []TestSuite `json:"testSuites"`
}
type TestCases struct {
ID string `json:"id"`
Label string `json:"label"`
Package string `json:"pkg"`
TestSuites []string `json:"test-suites"`
}
type TestSuite struct {
ID string `json:"id"`
Label string `json:"label"`
Package string `json:"pkg"`
}
type cmdFlags struct {
titleFlag string
sizeFlag string
groupSize int
listFlag string
outputFlag string
verbose bool
execFlag string
}
type testStatus struct {
TestName string
Package string
ElapsedTime float64
Output []string
Passed bool
Skipped bool
TestFileName string
TestFunctionDetail testFunctionFilePos
}
type goTestOutputRow struct {
Time string
TestName string `json:"Test"`
Action string
Package string
Elapsed float64
Output string
}
type goListJSON struct {
Dir string
ImportPath string
Name string
GoFiles []string
TestGoFiles []string
Module goListJSONModule
}
type goListJSONModule struct {
Path string
Dir string
Main bool
}
type (
testFunctionFilePos struct {
Line int
Col int
}
testFileDetail struct {
FileName string
TestFunctionFilePos testFunctionFilePos
}
testFileDetailsByTest map[string]*testFileDetail
testFileDetailsByPackage map[string]testFileDetailsByTest
)