mirror of
https://github.com/github/semantic.git
synced 2024-12-23 14:54:16 +03:00
407 lines
13 KiB
JSON
407 lines
13 KiB
JSON
[{
|
|
"testCaseDescription": "go-increment-decrement-statements-setup-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"increment-decrement-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": [
|
|
"increment-decrement-statements.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/increment-decrement-statements.go b/increment-decrement-statements.go",
|
|
"index e69de29b..79058077 100644",
|
|
"--- a/increment-decrement-statements.go",
|
|
"+++ b/increment-decrement-statements.go",
|
|
"@@ -0,0 +1,5 @@",
|
|
"+package main",
|
|
"+",
|
|
"+func main() {",
|
|
"+",
|
|
"+}"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "fd1c14f767a8a1d8c5e5591a7509dc6861634c14..f49e919a0e76fa844411228d998d35bb032893cb"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-increment-decrement-statements-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"increment-decrement-statements.go": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
4,
|
|
1
|
|
],
|
|
"end": [
|
|
4,
|
|
4
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'i++' increment statement in the main function"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
5,
|
|
1
|
|
],
|
|
"end": [
|
|
5,
|
|
4
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'j--' decrement statement in the main function"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"increment-decrement-statements.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/increment-decrement-statements.go b/increment-decrement-statements.go",
|
|
"index 79058077..18bf03a2 100644",
|
|
"--- a/increment-decrement-statements.go",
|
|
"+++ b/increment-decrement-statements.go",
|
|
"@@ -1,5 +1,6 @@",
|
|
" package main",
|
|
" ",
|
|
" func main() {",
|
|
"-",
|
|
"+i++",
|
|
"+j--",
|
|
" }"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "f49e919a0e76fa844411228d998d35bb032893cb..d40204e8599fa592c6dcc9a1ed10a24df6a41d22"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-increment-decrement-statements-replacement-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"increment-decrement-statements.go": [
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
4,
|
|
1
|
|
],
|
|
"end": [
|
|
4,
|
|
4
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
4,
|
|
1
|
|
],
|
|
"end": [
|
|
4,
|
|
6
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'i++' increment statement with the 'foo++' increment statement in the main function"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
5,
|
|
1
|
|
],
|
|
"end": [
|
|
5,
|
|
4
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'x++' increment statement in the main function"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
5,
|
|
1
|
|
],
|
|
"end": [
|
|
5,
|
|
4
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'j--' decrement statement in the main function"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"increment-decrement-statements.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/increment-decrement-statements.go b/increment-decrement-statements.go",
|
|
"index 18bf03a2..08611ad4 100644",
|
|
"--- a/increment-decrement-statements.go",
|
|
"+++ b/increment-decrement-statements.go",
|
|
"@@ -1,6 +1,6 @@",
|
|
" package main",
|
|
" ",
|
|
" func main() {",
|
|
"-i++",
|
|
"-j--",
|
|
"+foo++",
|
|
"+x++",
|
|
" }"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "d40204e8599fa592c6dcc9a1ed10a24df6a41d22..e6fdb95811282323687e43886ef6c6235a90cd82"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-increment-decrement-statements-delete-replacement-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"increment-decrement-statements.go": [
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
4,
|
|
1
|
|
],
|
|
"end": [
|
|
4,
|
|
6
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
4,
|
|
1
|
|
],
|
|
"end": [
|
|
4,
|
|
4
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'foo++' increment statement with the 'i++' increment statement in the main function"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
5,
|
|
1
|
|
],
|
|
"end": [
|
|
5,
|
|
4
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'j--' decrement statement in the main function"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
5,
|
|
1
|
|
],
|
|
"end": [
|
|
5,
|
|
4
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'x++' increment statement in the main function"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"increment-decrement-statements.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/increment-decrement-statements.go b/increment-decrement-statements.go",
|
|
"index 08611ad4..18bf03a2 100644",
|
|
"--- a/increment-decrement-statements.go",
|
|
"+++ b/increment-decrement-statements.go",
|
|
"@@ -1,6 +1,6 @@",
|
|
" package main",
|
|
" ",
|
|
" func main() {",
|
|
"-foo++",
|
|
"-x++",
|
|
"+i++",
|
|
"+j--",
|
|
" }"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "e6fdb95811282323687e43886ef6c6235a90cd82..4ad8cece3ba83a750de5755134b441087b14d36b"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-increment-decrement-statements-delete-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"increment-decrement-statements.go": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
4,
|
|
1
|
|
],
|
|
"end": [
|
|
4,
|
|
4
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'i++' increment statement in the main function"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
5,
|
|
1
|
|
],
|
|
"end": [
|
|
5,
|
|
4
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'j--' decrement statement in the main function"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"increment-decrement-statements.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/increment-decrement-statements.go b/increment-decrement-statements.go",
|
|
"index 18bf03a2..79058077 100644",
|
|
"--- a/increment-decrement-statements.go",
|
|
"+++ b/increment-decrement-statements.go",
|
|
"@@ -1,6 +1,5 @@",
|
|
" package main",
|
|
" ",
|
|
" func main() {",
|
|
"-i++",
|
|
"-j--",
|
|
"+",
|
|
" }"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "4ad8cece3ba83a750de5755134b441087b14d36b..9a1c128f8ba4831469f90214df190b6d452cef18"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-increment-decrement-statements-teardown-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"increment-decrement-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": [
|
|
"increment-decrement-statements.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/increment-decrement-statements.go b/increment-decrement-statements.go",
|
|
"index 79058077..e69de29b 100644",
|
|
"--- a/increment-decrement-statements.go",
|
|
"+++ b/increment-decrement-statements.go",
|
|
"@@ -1,5 +0,0 @@",
|
|
"-package main",
|
|
"-",
|
|
"-func main() {",
|
|
"-",
|
|
"-}"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "9a1c128f8ba4831469f90214df190b6d452cef18..119e158fedb475f8cce8b619268b05780b402a5b"
|
|
}]
|