1
1
mirror of https://github.com/github/semantic.git synced 2024-12-24 23:42:31 +03:00
semantic/test/corpus/diff-summaries/go/increment-decrement-statements.json

377 lines
12 KiB
JSON

[{
"testCaseDescription": "go-increment-decrement-statements-setup-test",
"expectedResult": {
"changes": {
"increment-decrement-statements.go": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
6,
1
]
}
},
"summary": "Added the 'main' module"
}
]
},
"errors": {}
},
"filePaths": [
"increment-decrement-statements.go"
],
"patch": [
"diff --git a/increment-decrement-statements.go b/increment-decrement-statements.go",
"index e69de29..7905807 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": "c9a9d49e044e5b64775ec487246b85b33366c7ef..ed31e99a07fef5e5f51b6129f70be9a0a8a9b0d0"
}
,{
"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 of the 'main' module"
},
{
"span": {
"insert": {
"start": [
5,
1
],
"end": [
5,
4
]
}
},
"summary": "Added the 'j--' decrement statement in the main function of the 'main' module"
}
]
},
"errors": {}
},
"filePaths": [
"increment-decrement-statements.go"
],
"patch": [
"diff --git a/increment-decrement-statements.go b/increment-decrement-statements.go",
"index 7905807..18bf03a 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": "ed31e99a07fef5e5f51b6129f70be9a0a8a9b0d0..58b193bc73886f738f5e951003cc425539ef4751"
}
,{
"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 of the 'main' module"
},
{
"span": {
"insert": {
"start": [
5,
1
],
"end": [
5,
4
]
}
},
"summary": "Added the 'x++' increment statement in the main function of the 'main' module"
},
{
"span": {
"delete": {
"start": [
5,
1
],
"end": [
5,
4
]
}
},
"summary": "Deleted the 'j--' decrement statement in the main function of the 'main' module"
}
]
},
"errors": {}
},
"filePaths": [
"increment-decrement-statements.go"
],
"patch": [
"diff --git a/increment-decrement-statements.go b/increment-decrement-statements.go",
"index 18bf03a..08611ad 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": "58b193bc73886f738f5e951003cc425539ef4751..8c5c4c68750bb280aac9fad4ab617b02c1f6ac91"
}
,{
"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 of the 'main' module"
},
{
"span": {
"insert": {
"start": [
5,
1
],
"end": [
5,
4
]
}
},
"summary": "Added the 'j--' decrement statement in the main function of the 'main' module"
},
{
"span": {
"delete": {
"start": [
5,
1
],
"end": [
5,
4
]
}
},
"summary": "Deleted the 'x++' increment statement in the main function of the 'main' module"
}
]
},
"errors": {}
},
"filePaths": [
"increment-decrement-statements.go"
],
"patch": [
"diff --git a/increment-decrement-statements.go b/increment-decrement-statements.go",
"index 08611ad..18bf03a 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": "8c5c4c68750bb280aac9fad4ab617b02c1f6ac91..30ec9ab14db83f8dff1e2f4e6bac4afa142999fa"
}
,{
"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 of the 'main' module"
},
{
"span": {
"delete": {
"start": [
5,
1
],
"end": [
5,
4
]
}
},
"summary": "Deleted the 'j--' decrement statement in the main function of the 'main' module"
}
]
},
"errors": {}
},
"filePaths": [
"increment-decrement-statements.go"
],
"patch": [
"diff --git a/increment-decrement-statements.go b/increment-decrement-statements.go",
"index 18bf03a..7905807 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": "30ec9ab14db83f8dff1e2f4e6bac4afa142999fa..9fc69ff7192756049ed8340b2291b16e606eddc3"
}
,{
"testCaseDescription": "go-increment-decrement-statements-teardown-test",
"expectedResult": {
"changes": {
"increment-decrement-statements.go": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
6,
1
]
}
},
"summary": "Deleted the 'main' module"
}
]
},
"errors": {}
},
"filePaths": [
"increment-decrement-statements.go"
],
"patch": [
"diff --git a/increment-decrement-statements.go b/increment-decrement-statements.go",
"index 7905807..e69de29 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": "9fc69ff7192756049ed8340b2291b16e606eddc3..eef71e601dedc3cbd9ffbf3df7babb7bfc056cac"
}]