mirror of
https://github.com/github/semantic.git
synced 2024-12-23 14:54:16 +03:00
483e8a3f00
JavaScript: method call → function call. Go: regenerated everything.
425 lines
13 KiB
JSON
425 lines
13 KiB
JSON
[{
|
|
"testCaseDescription": "go-int-literals-setup-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"int-literals.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": [
|
|
"int-literals.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/int-literals.go b/int-literals.go",
|
|
"index e69de29b..79058077 100644",
|
|
"--- a/int-literals.go",
|
|
"+++ b/int-literals.go",
|
|
"@@ -0,0 +1,5 @@",
|
|
"+package main",
|
|
"+",
|
|
"+func main() {",
|
|
"+",
|
|
"+}"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "1a06b53522da08ff0e788409aeccdf5f3f4b01bd..1f314ecf0de4fadb9d7e8fc74e165cd2cefb1612"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-int-literals-insert-test",
|
|
"expectedResult": {
|
|
"changes": {},
|
|
"errors": {
|
|
"int-literals.go": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
5,
|
|
1
|
|
],
|
|
"end": [
|
|
5,
|
|
20
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added 'a = 1, b = 2, c = 3' at line 5, column 1 - line 5, column 20 in the main function"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"filePaths": [
|
|
"int-literals.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/int-literals.go b/int-literals.go",
|
|
"index 79058077..38d36eca 100644",
|
|
"--- a/int-literals.go",
|
|
"+++ b/int-literals.go",
|
|
"@@ -1,5 +1,7 @@",
|
|
" package main",
|
|
" ",
|
|
" func main() {",
|
|
"-",
|
|
"+const (",
|
|
"+a = 1, b = 2, c = 3",
|
|
"+)",
|
|
" }"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "1f314ecf0de4fadb9d7e8fc74e165cd2cefb1612..f46a350f5acf876f46eeb0aaffadc43341f2e131"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-int-literals-replacement-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"int-literals.go": [
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
5,
|
|
5
|
|
],
|
|
"end": [
|
|
5,
|
|
6
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
5,
|
|
5
|
|
],
|
|
"end": [
|
|
5,
|
|
6
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced '1' with '4' in the a var assignment of the 'main' function"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
5,
|
|
12
|
|
],
|
|
"end": [
|
|
5,
|
|
13
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
5,
|
|
12
|
|
],
|
|
"end": [
|
|
5,
|
|
13
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced '2' with '5' in an assignment to number of the 'main' function"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
5,
|
|
19
|
|
],
|
|
"end": [
|
|
5,
|
|
20
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
5,
|
|
19
|
|
],
|
|
"end": [
|
|
5,
|
|
20
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced '3' with '6' in an assignment to number of the 'main' function"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"int-literals.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/int-literals.go b/int-literals.go",
|
|
"index 38d36eca..4f07c130 100644",
|
|
"--- a/int-literals.go",
|
|
"+++ b/int-literals.go",
|
|
"@@ -2,6 +2,6 @@ package main",
|
|
" ",
|
|
" func main() {",
|
|
" const (",
|
|
"-a = 1, b = 2, c = 3",
|
|
"+a = 4, b = 5, c = 6",
|
|
" )",
|
|
" }"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "f46a350f5acf876f46eeb0aaffadc43341f2e131..754d614b0d1e45ba0400c7cb9b613ad8568419c8"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-int-literals-delete-replacement-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"int-literals.go": [
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
5,
|
|
5
|
|
],
|
|
"end": [
|
|
5,
|
|
6
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
5,
|
|
5
|
|
],
|
|
"end": [
|
|
5,
|
|
6
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced '4' with '1' in the a var assignment of the 'main' function"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
5,
|
|
12
|
|
],
|
|
"end": [
|
|
5,
|
|
13
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
5,
|
|
12
|
|
],
|
|
"end": [
|
|
5,
|
|
13
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced '5' with '2' in an assignment to number of the 'main' function"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
5,
|
|
19
|
|
],
|
|
"end": [
|
|
5,
|
|
20
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
5,
|
|
19
|
|
],
|
|
"end": [
|
|
5,
|
|
20
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced '6' with '3' in an assignment to number of the 'main' function"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"int-literals.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/int-literals.go b/int-literals.go",
|
|
"index 4f07c130..38d36eca 100644",
|
|
"--- a/int-literals.go",
|
|
"+++ b/int-literals.go",
|
|
"@@ -2,6 +2,6 @@ package main",
|
|
" ",
|
|
" func main() {",
|
|
" const (",
|
|
"-a = 4, b = 5, c = 6",
|
|
"+a = 1, b = 2, c = 3",
|
|
" )",
|
|
" }"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "754d614b0d1e45ba0400c7cb9b613ad8568419c8..be0866dfa1dfe647e46dae621f63bc5e11787e9c"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-int-literals-delete-insert-test",
|
|
"expectedResult": {
|
|
"changes": {},
|
|
"errors": {
|
|
"int-literals.go": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
5,
|
|
1
|
|
],
|
|
"end": [
|
|
5,
|
|
20
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted 'a = 1, b = 2, c = 3' at line 5, column 1 - line 5, column 20 in the main function"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"filePaths": [
|
|
"int-literals.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/int-literals.go b/int-literals.go",
|
|
"index 38d36eca..79058077 100644",
|
|
"--- a/int-literals.go",
|
|
"+++ b/int-literals.go",
|
|
"@@ -1,7 +1,5 @@",
|
|
" package main",
|
|
" ",
|
|
" func main() {",
|
|
"-const (",
|
|
"-a = 1, b = 2, c = 3",
|
|
"-)",
|
|
"+",
|
|
" }"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "be0866dfa1dfe647e46dae621f63bc5e11787e9c..26240e45ff614e45ef463d40e96ac83d2e346b7d"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-int-literals-teardown-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"int-literals.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": [
|
|
"int-literals.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/int-literals.go b/int-literals.go",
|
|
"index 79058077..e69de29b 100644",
|
|
"--- a/int-literals.go",
|
|
"+++ b/int-literals.go",
|
|
"@@ -1,5 +0,0 @@",
|
|
"-package main",
|
|
"-",
|
|
"-func main() {",
|
|
"-",
|
|
"-}"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "26240e45ff614e45ef463d40e96ac83d2e346b7d..95d304f17785619b34b91180cd1ab2e5fea05c8f"
|
|
}]
|