mirror of
https://github.com/github/semantic.git
synced 2024-12-23 23:11:50 +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": "a7a87cc877aeb5b93e77345d8e91f87444569058",
|
|
"gitDir": "test/corpus/repos/go",
|
|
"sha2": "4333e6e8a284d165821d4913b1bfd12948784238"
|
|
}
|
|
,{
|
|
"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": "4333e6e8a284d165821d4913b1bfd12948784238",
|
|
"gitDir": "test/corpus/repos/go",
|
|
"sha2": "733fcb122c1bc6dde7b21df1c64456788b0833df"
|
|
}
|
|
,{
|
|
"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": "733fcb122c1bc6dde7b21df1c64456788b0833df",
|
|
"gitDir": "test/corpus/repos/go",
|
|
"sha2": "7218134dad62cd6a1607bfcc8fe3544a26d7e111"
|
|
}
|
|
,{
|
|
"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": "7218134dad62cd6a1607bfcc8fe3544a26d7e111",
|
|
"gitDir": "test/corpus/repos/go",
|
|
"sha2": "cf0f561313acb3c98a0c9fe7266d875f56792c1a"
|
|
}
|
|
,{
|
|
"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": "cf0f561313acb3c98a0c9fe7266d875f56792c1a",
|
|
"gitDir": "test/corpus/repos/go",
|
|
"sha2": "8952055a4c3b3cd47351d67aea5e80fb60aafadc"
|
|
}
|
|
,{
|
|
"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": "8952055a4c3b3cd47351d67aea5e80fb60aafadc",
|
|
"gitDir": "test/corpus/repos/go",
|
|
"sha2": "b490df41a3dcd3065c340b804f84ae4d1c22af96"
|
|
}
|
|
,{
|
|
"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": "b490df41a3dcd3065c340b804f84ae4d1c22af96",
|
|
"gitDir": "test/corpus/repos/go",
|
|
"sha2": "9ee437b40b9b93e417b3bb9a2e991eb064c38af6"
|
|
}]
|