mirror of
https://github.com/github/semantic.git
synced 2024-12-23 23:11:50 +03:00
371 lines
11 KiB
JSON
371 lines
11 KiB
JSON
[{
|
|
"testCaseDescription": "go-unary-expressions-setup-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"unary-expressions.go": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
6,
|
|
1
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'main' module"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"unary-expressions.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/unary-expressions.go b/unary-expressions.go",
|
|
"index e69de29b..79058077 100644",
|
|
"--- a/unary-expressions.go",
|
|
"+++ b/unary-expressions.go",
|
|
"@@ -0,0 +1,5 @@",
|
|
"+package main",
|
|
"+",
|
|
"+func main() {",
|
|
"+",
|
|
"+}"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "17539bd3043b11a2ee479a191c1a1b3c10116161..95d724a0a09fadc48ea2890dee7d75ac5b9aa7af"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-unary-expressions-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"unary-expressions.go": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
4,
|
|
1
|
|
],
|
|
"end": [
|
|
4,
|
|
5
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the '!<-a' operator in the main function of the 'main' module"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
5,
|
|
1
|
|
],
|
|
"end": [
|
|
5,
|
|
7
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the '*foo()' operator in the main function of the 'main' module"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"unary-expressions.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/unary-expressions.go b/unary-expressions.go",
|
|
"index 79058077..bdf9ccc5 100644",
|
|
"--- a/unary-expressions.go",
|
|
"+++ b/unary-expressions.go",
|
|
"@@ -1,5 +1,6 @@",
|
|
" package main",
|
|
" ",
|
|
" func main() {",
|
|
"-",
|
|
"+!<-a",
|
|
"+*foo()",
|
|
" }"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "95d724a0a09fadc48ea2890dee7d75ac5b9aa7af..a1314a7b82e8afb936c41bc2b1f8f7f6dea61f0a"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-unary-expressions-replacement-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"unary-expressions.go": [
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
4,
|
|
4
|
|
],
|
|
"end": [
|
|
4,
|
|
5
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
4,
|
|
4
|
|
],
|
|
"end": [
|
|
4,
|
|
5
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'a' identifier with the 'b' identifier in the main function of the 'main' module"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
5,
|
|
2
|
|
],
|
|
"end": [
|
|
5,
|
|
5
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
5,
|
|
2
|
|
],
|
|
"end": [
|
|
5,
|
|
5
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'foo' identifier with the 'bar' identifier in the bar() function call of the 'main' function"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"unary-expressions.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/unary-expressions.go b/unary-expressions.go",
|
|
"index bdf9ccc5..cf8ed882 100644",
|
|
"--- a/unary-expressions.go",
|
|
"+++ b/unary-expressions.go",
|
|
"@@ -1,6 +1,6 @@",
|
|
" package main",
|
|
" ",
|
|
" func main() {",
|
|
"-!<-a",
|
|
"-*foo()",
|
|
"+!<-b",
|
|
"+*bar()",
|
|
" }"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "a1314a7b82e8afb936c41bc2b1f8f7f6dea61f0a..fc3fe7fe5250957e38223499d73968baa410b221"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-unary-expressions-delete-replacement-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"unary-expressions.go": [
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
4,
|
|
4
|
|
],
|
|
"end": [
|
|
4,
|
|
5
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
4,
|
|
4
|
|
],
|
|
"end": [
|
|
4,
|
|
5
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'b' identifier with the 'a' identifier in the main function of the 'main' module"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
5,
|
|
2
|
|
],
|
|
"end": [
|
|
5,
|
|
5
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
5,
|
|
2
|
|
],
|
|
"end": [
|
|
5,
|
|
5
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'bar' identifier with the 'foo' identifier in the foo() function call of the 'main' function"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"unary-expressions.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/unary-expressions.go b/unary-expressions.go",
|
|
"index cf8ed882..bdf9ccc5 100644",
|
|
"--- a/unary-expressions.go",
|
|
"+++ b/unary-expressions.go",
|
|
"@@ -1,6 +1,6 @@",
|
|
" package main",
|
|
" ",
|
|
" func main() {",
|
|
"-!<-b",
|
|
"-*bar()",
|
|
"+!<-a",
|
|
"+*foo()",
|
|
" }"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "fc3fe7fe5250957e38223499d73968baa410b221..8432ee8db9ae0dc6e5b596495e564e1ead822991"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-unary-expressions-delete-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"unary-expressions.go": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
4,
|
|
1
|
|
],
|
|
"end": [
|
|
4,
|
|
5
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the '!<-a' operator in the main function of the 'main' module"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
5,
|
|
1
|
|
],
|
|
"end": [
|
|
5,
|
|
7
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the '*foo()' operator in the main function of the 'main' module"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"unary-expressions.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/unary-expressions.go b/unary-expressions.go",
|
|
"index bdf9ccc5..79058077 100644",
|
|
"--- a/unary-expressions.go",
|
|
"+++ b/unary-expressions.go",
|
|
"@@ -1,6 +1,5 @@",
|
|
" package main",
|
|
" ",
|
|
" func main() {",
|
|
"-!<-a",
|
|
"-*foo()",
|
|
"+",
|
|
" }"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "8432ee8db9ae0dc6e5b596495e564e1ead822991..22c7306ff2ebc9176ca41b89ca4020751157e748"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-unary-expressions-teardown-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"unary-expressions.go": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
6,
|
|
1
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'main' module"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"unary-expressions.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/unary-expressions.go b/unary-expressions.go",
|
|
"index 79058077..e69de29b 100644",
|
|
"--- a/unary-expressions.go",
|
|
"+++ b/unary-expressions.go",
|
|
"@@ -1,5 +0,0 @@",
|
|
"-package main",
|
|
"-",
|
|
"-func main() {",
|
|
"-",
|
|
"-}"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "22c7306ff2ebc9176ca41b89ca4020751157e748..2f519cce92d26f6a9c43d21d062dc065afef2bbb"
|
|
}]
|