mirror of
https://github.com/github/semantic.git
synced 2024-12-23 14:54:16 +03:00
587 lines
19 KiB
JSON
587 lines
19 KiB
JSON
[{
|
|
"testCaseDescription": "go-assignment-statements-setup-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"assignment-statements.go": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
13
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'main' module"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
3,
|
|
1
|
|
],
|
|
"end": [
|
|
5,
|
|
2
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'main' function"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"assignment-statements.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/assignment-statements.go b/assignment-statements.go",
|
|
"index e69de29b..79058077 100644",
|
|
"--- a/assignment-statements.go",
|
|
"+++ b/assignment-statements.go",
|
|
"@@ -0,0 +1,5 @@",
|
|
"+package main",
|
|
"+",
|
|
"+func main() {",
|
|
"+",
|
|
"+}"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "355894e4ad27e01132c001a0ec6628a68699a98a..dee4726cc2355867234df5eb768a1833d12fb545"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-assignment-statements-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"assignment-statements.go": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
4,
|
|
1
|
|
],
|
|
"end": [
|
|
4,
|
|
6
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'a' assignment in the main function"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
5,
|
|
1
|
|
],
|
|
"end": [
|
|
5,
|
|
13
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'b, c' assignment in the main function"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
6,
|
|
1
|
|
],
|
|
"end": [
|
|
6,
|
|
7
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'd' assignment in the main function"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
7,
|
|
1
|
|
],
|
|
"end": [
|
|
7,
|
|
7
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'e' assignment in the main function"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"assignment-statements.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/assignment-statements.go b/assignment-statements.go",
|
|
"index 79058077..072782b1 100644",
|
|
"--- a/assignment-statements.go",
|
|
"+++ b/assignment-statements.go",
|
|
"@@ -1,5 +1,8 @@",
|
|
" package main",
|
|
" ",
|
|
" func main() {",
|
|
"-",
|
|
"+a = 1",
|
|
"+b, c += 2, 3",
|
|
"+d *= 3",
|
|
"+e += 1",
|
|
" }"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "dee4726cc2355867234df5eb768a1833d12fb545..130b0a5e98d5cb84a5f8fdd40a206c617ed5457d"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-assignment-statements-replacement-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"assignment-statements.go": [
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
4,
|
|
1
|
|
],
|
|
"end": [
|
|
4,
|
|
2
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
4,
|
|
1
|
|
],
|
|
"end": [
|
|
4,
|
|
2
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'a' identifier with the 'x' identifier in an assignment to x of the 'main' function"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
5,
|
|
1
|
|
],
|
|
"end": [
|
|
5,
|
|
2
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
5,
|
|
1
|
|
],
|
|
"end": [
|
|
5,
|
|
2
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'b' identifier with the 'y' identifier in an assignment to y, c of the 'main' function"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
6,
|
|
1
|
|
],
|
|
"end": [
|
|
6,
|
|
2
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
6,
|
|
1
|
|
],
|
|
"end": [
|
|
6,
|
|
2
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'd' identifier with the 'z' identifier in an assignment to z of the 'main' function"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
7,
|
|
1
|
|
],
|
|
"end": [
|
|
7,
|
|
7
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'h' assignment in the main function"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
7,
|
|
1
|
|
],
|
|
"end": [
|
|
7,
|
|
7
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'e' assignment in the main function"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"assignment-statements.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/assignment-statements.go b/assignment-statements.go",
|
|
"index 072782b1..2e6b444c 100644",
|
|
"--- a/assignment-statements.go",
|
|
"+++ b/assignment-statements.go",
|
|
"@@ -1,8 +1,8 @@",
|
|
" package main",
|
|
" ",
|
|
" func main() {",
|
|
"-a = 1",
|
|
"-b, c += 2, 3",
|
|
"-d *= 3",
|
|
"-e += 1",
|
|
"+x = 1",
|
|
"+y, c += 2, 3",
|
|
"+z *= 3",
|
|
"+h += 1",
|
|
" }"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "130b0a5e98d5cb84a5f8fdd40a206c617ed5457d..200c99db1973054a8b08399acb934a04f7e5d400"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-assignment-statements-delete-replacement-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"assignment-statements.go": [
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
4,
|
|
1
|
|
],
|
|
"end": [
|
|
4,
|
|
2
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
4,
|
|
1
|
|
],
|
|
"end": [
|
|
4,
|
|
2
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'x' identifier with the 'a' identifier in an assignment to a of the 'main' function"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
5,
|
|
1
|
|
],
|
|
"end": [
|
|
5,
|
|
2
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
5,
|
|
1
|
|
],
|
|
"end": [
|
|
5,
|
|
2
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'y' identifier with the 'b' identifier in an assignment to b, c of the 'main' function"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
6,
|
|
1
|
|
],
|
|
"end": [
|
|
6,
|
|
2
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
6,
|
|
1
|
|
],
|
|
"end": [
|
|
6,
|
|
2
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'z' identifier with the 'd' identifier in an assignment to d of the 'main' function"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
7,
|
|
1
|
|
],
|
|
"end": [
|
|
7,
|
|
7
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'e' assignment in the main function"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
7,
|
|
1
|
|
],
|
|
"end": [
|
|
7,
|
|
7
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'h' assignment in the main function"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"assignment-statements.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/assignment-statements.go b/assignment-statements.go",
|
|
"index 2e6b444c..072782b1 100644",
|
|
"--- a/assignment-statements.go",
|
|
"+++ b/assignment-statements.go",
|
|
"@@ -1,8 +1,8 @@",
|
|
" package main",
|
|
" ",
|
|
" func main() {",
|
|
"-x = 1",
|
|
"-y, c += 2, 3",
|
|
"-z *= 3",
|
|
"-h += 1",
|
|
"+a = 1",
|
|
"+b, c += 2, 3",
|
|
"+d *= 3",
|
|
"+e += 1",
|
|
" }"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "200c99db1973054a8b08399acb934a04f7e5d400..0cb78cdf1584f9b8ba5cd6338d6611fd62489ce5"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-assignment-statements-delete-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"assignment-statements.go": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
4,
|
|
1
|
|
],
|
|
"end": [
|
|
4,
|
|
6
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'a' assignment in the main function"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
5,
|
|
1
|
|
],
|
|
"end": [
|
|
5,
|
|
13
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'b, c' assignment in the main function"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
6,
|
|
1
|
|
],
|
|
"end": [
|
|
6,
|
|
7
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'd' assignment in the main function"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
7,
|
|
1
|
|
],
|
|
"end": [
|
|
7,
|
|
7
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'e' assignment in the main function"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"assignment-statements.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/assignment-statements.go b/assignment-statements.go",
|
|
"index 072782b1..79058077 100644",
|
|
"--- a/assignment-statements.go",
|
|
"+++ b/assignment-statements.go",
|
|
"@@ -1,8 +1,5 @@",
|
|
" package main",
|
|
" ",
|
|
" func main() {",
|
|
"-a = 1",
|
|
"-b, c += 2, 3",
|
|
"-d *= 3",
|
|
"-e += 1",
|
|
"+",
|
|
" }"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "0cb78cdf1584f9b8ba5cd6338d6611fd62489ce5..ef617e9c737846a93d7b3784e94a3503b657e345"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-assignment-statements-teardown-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"assignment-statements.go": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
13
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'main' module"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
3,
|
|
1
|
|
],
|
|
"end": [
|
|
5,
|
|
2
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'main' function"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"assignment-statements.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/assignment-statements.go b/assignment-statements.go",
|
|
"index 79058077..e69de29b 100644",
|
|
"--- a/assignment-statements.go",
|
|
"+++ b/assignment-statements.go",
|
|
"@@ -1,5 +0,0 @@",
|
|
"-package main",
|
|
"-",
|
|
"-func main() {",
|
|
"-",
|
|
"-}"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "ef617e9c737846a93d7b3784e94a3503b657e345..ab0c9d4b9fa55d59bab945f9e19cb5a992a55f0a"
|
|
}]
|