mirror of
https://github.com/github/semantic.git
synced 2024-12-23 14:54:16 +03:00
1166 lines
38 KiB
JSON
1166 lines
38 KiB
JSON
[{
|
|
"testCaseDescription": "go-switch-statements-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"switch-statements.go": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
3,
|
|
15
|
|
],
|
|
"end": [
|
|
3,
|
|
16
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'x' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
3,
|
|
19
|
|
],
|
|
"end": [
|
|
3,
|
|
20
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'y' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
3,
|
|
22
|
|
],
|
|
"end": [
|
|
3,
|
|
26
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'f1()' function call"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
4,
|
|
6
|
|
],
|
|
"end": [
|
|
4,
|
|
7
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'x' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
4,
|
|
10
|
|
],
|
|
"end": [
|
|
4,
|
|
11
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'z' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
4,
|
|
13
|
|
],
|
|
"end": [
|
|
4,
|
|
16
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'g()' function call"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
5,
|
|
6
|
|
],
|
|
"end": [
|
|
5,
|
|
7
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'x' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
5,
|
|
11
|
|
],
|
|
"end": [
|
|
5,
|
|
12
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the '4'"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
5,
|
|
14
|
|
],
|
|
"end": [
|
|
5,
|
|
17
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'h()' function call"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"switch-statements.go"
|
|
],
|
|
"sha1": "ad009ae663a027f35bb25867c4aa1375820fd816",
|
|
"gitDir": "test/corpus/repos/go",
|
|
"sha2": "eca256b2b008a62971c928a2009d22eadc8b1bf4"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-switch-statements-replacement-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"switch-statements.go": [
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
7,
|
|
1
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
13
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'main' module with the 'main' module"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"switch-statements.go"
|
|
],
|
|
"sha1": "eca256b2b008a62971c928a2009d22eadc8b1bf4",
|
|
"gitDir": "test/corpus/repos/go",
|
|
"sha2": "6cf706b5feaf6184c5678978e67906307f7e57ef"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-switch-statements-delete-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"switch-statements.go": [
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
3,
|
|
15
|
|
],
|
|
"end": [
|
|
3,
|
|
16
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
3,
|
|
15
|
|
],
|
|
"end": [
|
|
3,
|
|
16
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'a' identifier with the 'x' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
3,
|
|
19
|
|
],
|
|
"end": [
|
|
3,
|
|
20
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
3,
|
|
19
|
|
],
|
|
"end": [
|
|
3,
|
|
20
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'b' identifier with the 'y' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
4,
|
|
6
|
|
],
|
|
"end": [
|
|
4,
|
|
7
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
4,
|
|
6
|
|
],
|
|
"end": [
|
|
4,
|
|
7
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'c' identifier with the 'x' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
4,
|
|
10
|
|
],
|
|
"end": [
|
|
4,
|
|
11
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
4,
|
|
10
|
|
],
|
|
"end": [
|
|
4,
|
|
11
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'd' identifier with the 'z' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
5,
|
|
6
|
|
],
|
|
"end": [
|
|
5,
|
|
7
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
5,
|
|
6
|
|
],
|
|
"end": [
|
|
5,
|
|
7
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'e' identifier with the 'x' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
5,
|
|
14
|
|
],
|
|
"end": [
|
|
5,
|
|
15
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
5,
|
|
14
|
|
],
|
|
"end": [
|
|
5,
|
|
15
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'f' identifier with the 'h' identifier in the h() function call"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"switch-statements.go"
|
|
],
|
|
"sha1": "6cf706b5feaf6184c5678978e67906307f7e57ef",
|
|
"gitDir": "test/corpus/repos/go",
|
|
"sha2": "b989fd66b8f35311c6663707229199f3ece5caf1"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-switch-statements-replacement-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"switch-statements.go": [
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
3,
|
|
15
|
|
],
|
|
"end": [
|
|
3,
|
|
16
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
3,
|
|
15
|
|
],
|
|
"end": [
|
|
3,
|
|
16
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'x' identifier with the 'a' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
3,
|
|
19
|
|
],
|
|
"end": [
|
|
3,
|
|
20
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
3,
|
|
19
|
|
],
|
|
"end": [
|
|
3,
|
|
20
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'y' identifier with the 'b' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
4,
|
|
6
|
|
],
|
|
"end": [
|
|
4,
|
|
7
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
4,
|
|
6
|
|
],
|
|
"end": [
|
|
4,
|
|
7
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'x' identifier with the 'c' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
4,
|
|
10
|
|
],
|
|
"end": [
|
|
4,
|
|
11
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
4,
|
|
10
|
|
],
|
|
"end": [
|
|
4,
|
|
11
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'z' identifier with the 'd' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
5,
|
|
6
|
|
],
|
|
"end": [
|
|
5,
|
|
7
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
5,
|
|
6
|
|
],
|
|
"end": [
|
|
5,
|
|
7
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'x' identifier with the 'e' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
5,
|
|
14
|
|
],
|
|
"end": [
|
|
5,
|
|
15
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
5,
|
|
14
|
|
],
|
|
"end": [
|
|
5,
|
|
15
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'h' identifier with the 'f' identifier in the f() function call"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"switch-statements.go"
|
|
],
|
|
"sha1": "b989fd66b8f35311c6663707229199f3ece5caf1",
|
|
"gitDir": "test/corpus/repos/go",
|
|
"sha2": "882983ce40cff6b060eabe22c2b8a9382fdb50c7"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-switch-statements-delete-replacement-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"switch-statements.go": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
3,
|
|
15
|
|
],
|
|
"end": [
|
|
3,
|
|
16
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'a' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
3,
|
|
19
|
|
],
|
|
"end": [
|
|
3,
|
|
20
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'b' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
3,
|
|
22
|
|
],
|
|
"end": [
|
|
3,
|
|
26
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'f1()' function call"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
4,
|
|
6
|
|
],
|
|
"end": [
|
|
4,
|
|
7
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'c' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
4,
|
|
10
|
|
],
|
|
"end": [
|
|
4,
|
|
11
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'd' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
4,
|
|
13
|
|
],
|
|
"end": [
|
|
4,
|
|
16
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'g()' function call"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
5,
|
|
6
|
|
],
|
|
"end": [
|
|
5,
|
|
7
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'e' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
5,
|
|
11
|
|
],
|
|
"end": [
|
|
5,
|
|
12
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the '4'"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
5,
|
|
14
|
|
],
|
|
"end": [
|
|
5,
|
|
17
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'f()' function call"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
7,
|
|
15
|
|
],
|
|
"end": [
|
|
7,
|
|
16
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'x' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
7,
|
|
19
|
|
],
|
|
"end": [
|
|
7,
|
|
20
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'y' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
7,
|
|
22
|
|
],
|
|
"end": [
|
|
7,
|
|
26
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'f1()' function call"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
8,
|
|
6
|
|
],
|
|
"end": [
|
|
8,
|
|
7
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'x' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
8,
|
|
10
|
|
],
|
|
"end": [
|
|
8,
|
|
11
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'z' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
8,
|
|
13
|
|
],
|
|
"end": [
|
|
8,
|
|
16
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'g()' function call"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
9,
|
|
6
|
|
],
|
|
"end": [
|
|
9,
|
|
7
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'x' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
9,
|
|
11
|
|
],
|
|
"end": [
|
|
9,
|
|
12
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the '4'"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
9,
|
|
14
|
|
],
|
|
"end": [
|
|
9,
|
|
17
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'h()' function call"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
7,
|
|
15
|
|
],
|
|
"end": [
|
|
7,
|
|
16
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'a' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
7,
|
|
19
|
|
],
|
|
"end": [
|
|
7,
|
|
20
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'b' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
7,
|
|
22
|
|
],
|
|
"end": [
|
|
7,
|
|
26
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'f1()' function call"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
8,
|
|
6
|
|
],
|
|
"end": [
|
|
8,
|
|
7
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'c' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
8,
|
|
10
|
|
],
|
|
"end": [
|
|
8,
|
|
11
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'd' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
8,
|
|
13
|
|
],
|
|
"end": [
|
|
8,
|
|
16
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'g()' function call"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
9,
|
|
6
|
|
],
|
|
"end": [
|
|
9,
|
|
7
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'e' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
9,
|
|
11
|
|
],
|
|
"end": [
|
|
9,
|
|
12
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the '4'"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
9,
|
|
14
|
|
],
|
|
"end": [
|
|
9,
|
|
17
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'f()' function call"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"switch-statements.go"
|
|
],
|
|
"sha1": "882983ce40cff6b060eabe22c2b8a9382fdb50c7",
|
|
"gitDir": "test/corpus/repos/go",
|
|
"sha2": "25d10a5d7a4393580359323f5bc44091c8631f64"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-switch-statements-delete-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"switch-statements.go": [
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
13
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
7,
|
|
1
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'main' module with the 'main' module"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"switch-statements.go"
|
|
],
|
|
"sha1": "25d10a5d7a4393580359323f5bc44091c8631f64",
|
|
"gitDir": "test/corpus/repos/go",
|
|
"sha2": "5a3c200ddcdc80be60f7cb691c69cfb4ca04349b"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-switch-statements-delete-rest-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"switch-statements.go": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
3,
|
|
15
|
|
],
|
|
"end": [
|
|
3,
|
|
16
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'a' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
3,
|
|
19
|
|
],
|
|
"end": [
|
|
3,
|
|
20
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'b' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
3,
|
|
22
|
|
],
|
|
"end": [
|
|
3,
|
|
26
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'f1()' function call"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
4,
|
|
6
|
|
],
|
|
"end": [
|
|
4,
|
|
7
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'c' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
4,
|
|
10
|
|
],
|
|
"end": [
|
|
4,
|
|
11
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'd' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
4,
|
|
13
|
|
],
|
|
"end": [
|
|
4,
|
|
16
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'g()' function call"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
5,
|
|
6
|
|
],
|
|
"end": [
|
|
5,
|
|
7
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'e' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
5,
|
|
11
|
|
],
|
|
"end": [
|
|
5,
|
|
12
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the '4'"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
5,
|
|
14
|
|
],
|
|
"end": [
|
|
5,
|
|
17
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'f()' function call"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"switch-statements.go"
|
|
],
|
|
"sha1": "5a3c200ddcdc80be60f7cb691c69cfb4ca04349b",
|
|
"gitDir": "test/corpus/repos/go",
|
|
"sha2": "5ed5348fda2a0c23b658e6e2a4a918d6abfd9b09"
|
|
}]
|