mirror of
https://github.com/github/semantic.git
synced 2024-12-24 23:42:31 +03:00
395 lines
12 KiB
JSON
395 lines
12 KiB
JSON
[{
|
|
"testCaseDescription": "go-int-literals-setup-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"int-literals.go": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
6,
|
|
1
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'main' module"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"int-literals.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/int-literals.go b/int-literals.go",
|
|
"index e69de29..7905807 100644",
|
|
"--- a/int-literals.go",
|
|
"+++ b/int-literals.go",
|
|
"@@ -0,0 +1,5 @@",
|
|
"+package main",
|
|
"+",
|
|
"+func main() {",
|
|
"+",
|
|
"+}"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "5ba2f3848075790efeeabe7f701b95ad6ee38727..086f40d0e9e70592aad3b00b34f5972867bc65e0"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-int-literals-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"int-literals.go": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
4,
|
|
1
|
|
],
|
|
"end": [
|
|
6,
|
|
2
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'a' var assignment in the main function of the 'main' module"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"int-literals.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/int-literals.go b/int-literals.go",
|
|
"index 7905807..38d36ec 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": "086f40d0e9e70592aad3b00b34f5972867bc65e0..f6c2316cfb1f6f413a6b30ed3d0834eda9593b6b"
|
|
}
|
|
,{
|
|
"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 the 5 var assignment of the 'main' function"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
5,
|
|
19
|
|
],
|
|
"end": [
|
|
5,
|
|
20
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
5,
|
|
19
|
|
],
|
|
"end": [
|
|
5,
|
|
20
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced '3' with '6' in the 5 var assignment of the 'main' function"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"int-literals.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/int-literals.go b/int-literals.go",
|
|
"index 38d36ec..4f07c13 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": "f6c2316cfb1f6f413a6b30ed3d0834eda9593b6b..a9d1d1fd6e404f3ee3fc361d450de78efb66add9"
|
|
}
|
|
,{
|
|
"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 the 2 var assignment of the 'main' function"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
5,
|
|
19
|
|
],
|
|
"end": [
|
|
5,
|
|
20
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
5,
|
|
19
|
|
],
|
|
"end": [
|
|
5,
|
|
20
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced '6' with '3' in the 2 var assignment of the 'main' function"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"int-literals.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/int-literals.go b/int-literals.go",
|
|
"index 4f07c13..38d36ec 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": "a9d1d1fd6e404f3ee3fc361d450de78efb66add9..b3b92011b9dc87dec6cd7d487b5d8b79790ad9c9"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-int-literals-delete-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"int-literals.go": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
4,
|
|
1
|
|
],
|
|
"end": [
|
|
6,
|
|
2
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'a' var assignment in the main function of the 'main' module"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"int-literals.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/int-literals.go b/int-literals.go",
|
|
"index 38d36ec..7905807 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": "b3b92011b9dc87dec6cd7d487b5d8b79790ad9c9..0d57e34f436f54fc54b73bd8f1e375727a29d6a2"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-int-literals-teardown-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"int-literals.go": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
6,
|
|
1
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'main' module"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"int-literals.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/int-literals.go b/int-literals.go",
|
|
"index 7905807..e69de29 100644",
|
|
"--- a/int-literals.go",
|
|
"+++ b/int-literals.go",
|
|
"@@ -1,5 +0,0 @@",
|
|
"-package main",
|
|
"-",
|
|
"-func main() {",
|
|
"-",
|
|
"-}"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "0d57e34f436f54fc54b73bd8f1e375727a29d6a2..efd0c3cb1a849ee204223f8b2e77cc03fabdd406"
|
|
}]
|