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": "7c46088c01f3fd530d816a071e9ed1bdd9e137cc..4f2aba400e8acdce68710d3a72f913df00e79097"
|
|
}
|
|
,{
|
|
"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": "4f2aba400e8acdce68710d3a72f913df00e79097..322c60983dbc40aa353f006138d4db46b2a503b8"
|
|
}
|
|
,{
|
|
"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": "322c60983dbc40aa353f006138d4db46b2a503b8..d41651da621ecc34d029f95c857c77fd35b1737a"
|
|
}
|
|
,{
|
|
"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": "d41651da621ecc34d029f95c857c77fd35b1737a..3a8bb08b331aaa3243fbdb3153392140efb41b7c"
|
|
}
|
|
,{
|
|
"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": "3a8bb08b331aaa3243fbdb3153392140efb41b7c..0465ece0eedaf507c220a605dfc211807dd8b279"
|
|
}
|
|
,{
|
|
"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": "0465ece0eedaf507c220a605dfc211807dd8b279..b11d3161e17f89da4620cc4c648352acd21cc18e"
|
|
}]
|