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

407 lines
13 KiB
JSON
Raw Normal View History

2016-11-02 17:50:05 +03:00
[{
2016-12-02 00:03:52 +03:00
"testCaseDescription": "go-increment-decrement-statements-setup-test",
2016-11-02 17:50:05 +03:00
"expectedResult": {
"changes": {
2016-11-02 21:37:30 +03:00
"increment-decrement-statements.go": [
{
"span": {
2016-11-11 00:19:53 +03:00
"insert": {
"start": [
1,
1
],
"end": [
1,
13
2016-11-11 00:19:53 +03:00
]
}
2016-11-02 21:37:30 +03:00
},
2016-12-02 00:03:52 +03:00
"summary": "Added the 'main' module"
},
{
"span": {
"insert": {
"start": [
3,
1
],
"end": [
5,
2
]
}
},
"summary": "Added the 'main' function"
2016-11-02 21:37:30 +03:00
}
]
},
"errors": {}
},
"filePaths": [
"increment-decrement-statements.go"
],
2016-11-11 00:19:53 +03:00
"patch": [
"diff --git a/increment-decrement-statements.go b/increment-decrement-statements.go",
2017-01-17 23:26:07 +03:00
"index e69de29b..79058077 100644",
2016-11-11 00:19:53 +03:00
"--- a/increment-decrement-statements.go",
"+++ b/increment-decrement-statements.go",
2016-12-02 00:03:52 +03:00
"@@ -0,0 +1,5 @@",
"+package main",
"+",
"+func main() {",
"+",
"+}"
2016-11-11 00:19:53 +03:00
],
2016-11-02 21:37:30 +03:00
"gitDir": "test/corpus/repos/go",
"shas": "fd1c14f767a8a1d8c5e5591a7509dc6861634c14..f49e919a0e76fa844411228d998d35bb032893cb"
2016-11-02 21:37:30 +03:00
}
,{
2016-12-02 00:03:52 +03:00
"testCaseDescription": "go-increment-decrement-statements-insert-test",
2016-11-02 21:37:30 +03:00
"expectedResult": {
"changes": {
"increment-decrement-statements.go": [
2016-11-02 17:50:05 +03:00
{
"span": {
"insert": {
"start": [
2016-12-02 00:03:52 +03:00
4,
2016-11-02 21:37:30 +03:00
1
2016-11-02 17:50:05 +03:00
],
"end": [
2016-12-02 00:03:52 +03:00
4,
4
2016-11-02 17:50:05 +03:00
]
}
},
"summary": "Added the 'i++' increment statement in the main function"
2016-11-02 17:50:05 +03:00
},
{
"span": {
"insert": {
"start": [
2016-12-02 00:03:52 +03:00
5,
2016-11-02 21:37:30 +03:00
1
2016-11-02 17:50:05 +03:00
],
"end": [
2016-12-02 00:03:52 +03:00
5,
4
2016-11-02 17:50:05 +03:00
]
}
},
"summary": "Added the 'j--' decrement statement in the main function"
2016-11-02 17:50:05 +03:00
}
]
},
"errors": {}
},
"filePaths": [
2016-11-02 21:37:30 +03:00
"increment-decrement-statements.go"
2016-11-02 17:50:05 +03:00
],
2016-11-11 00:19:53 +03:00
"patch": [
"diff --git a/increment-decrement-statements.go b/increment-decrement-statements.go",
2017-01-17 23:26:07 +03:00
"index 79058077..18bf03a2 100644",
2016-11-11 00:19:53 +03:00
"--- a/increment-decrement-statements.go",
"+++ b/increment-decrement-statements.go",
2016-12-02 00:03:52 +03:00
"@@ -1,5 +1,6 @@",
" package main",
" ",
" func main() {",
"-",
2016-11-11 00:19:53 +03:00
"+i++",
"+j--",
2016-12-02 00:03:52 +03:00
" }"
2016-11-11 00:19:53 +03:00
],
2016-11-02 17:50:05 +03:00
"gitDir": "test/corpus/repos/go",
"shas": "f49e919a0e76fa844411228d998d35bb032893cb..d40204e8599fa592c6dcc9a1ed10a24df6a41d22"
2016-11-02 17:50:05 +03:00
}
,{
2016-12-02 00:03:52 +03:00
"testCaseDescription": "go-increment-decrement-statements-replacement-test",
2016-11-02 17:50:05 +03:00
"expectedResult": {
"changes": {
2016-11-02 21:37:30 +03:00
"increment-decrement-statements.go": [
2016-11-02 17:50:05 +03:00
{
"span": {
"replace": [
{
"start": [
4,
2016-11-02 17:50:05 +03:00
1
],
"end": [
4,
4
2016-11-02 17:50:05 +03:00
]
},
{
"start": [
4,
2016-11-02 17:50:05 +03:00
1
],
"end": [
4,
6
2016-11-02 17:50:05 +03:00
]
}
]
},
"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"
2016-11-02 17:50:05 +03:00
}
]
},
"errors": {}
},
"filePaths": [
2016-11-02 21:37:30 +03:00
"increment-decrement-statements.go"
2016-11-02 17:50:05 +03:00
],
2016-11-11 00:19:53 +03:00
"patch": [
"diff --git a/increment-decrement-statements.go b/increment-decrement-statements.go",
2017-01-17 23:26:07 +03:00
"index 18bf03a2..08611ad4 100644",
2016-11-11 00:19:53 +03:00
"--- a/increment-decrement-statements.go",
"+++ b/increment-decrement-statements.go",
2016-12-02 00:03:52 +03:00
"@@ -1,6 +1,6 @@",
" package main",
" ",
" func main() {",
"-i++",
"-j--",
"+foo++",
"+x++",
" }"
2016-11-11 00:19:53 +03:00
],
2016-11-02 17:50:05 +03:00
"gitDir": "test/corpus/repos/go",
"shas": "d40204e8599fa592c6dcc9a1ed10a24df6a41d22..e6fdb95811282323687e43886ef6c6235a90cd82"
2016-11-02 17:50:05 +03:00
}
,{
2016-12-02 00:03:52 +03:00
"testCaseDescription": "go-increment-decrement-statements-delete-replacement-test",
2016-11-02 17:50:05 +03:00
"expectedResult": {
"changes": {
2016-11-02 21:37:30 +03:00
"increment-decrement-statements.go": [
2016-11-02 17:50:05 +03:00
{
"span": {
"replace": [
{
"start": [
4,
2016-11-02 17:50:05 +03:00
1
],
"end": [
4,
6
2016-11-02 17:50:05 +03:00
]
},
{
"start": [
4,
2016-11-02 17:50:05 +03:00
1
],
"end": [
4,
4
2016-11-02 17:50:05 +03:00
]
}
]
},
"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"
2016-11-02 17:50:05 +03:00
}
]
},
"errors": {}
},
"filePaths": [
2016-11-02 21:37:30 +03:00
"increment-decrement-statements.go"
2016-11-02 17:50:05 +03:00
],
2016-11-11 00:19:53 +03:00
"patch": [
"diff --git a/increment-decrement-statements.go b/increment-decrement-statements.go",
2017-01-17 23:26:07 +03:00
"index 08611ad4..18bf03a2 100644",
2016-11-11 00:19:53 +03:00
"--- a/increment-decrement-statements.go",
"+++ b/increment-decrement-statements.go",
2016-12-02 00:03:52 +03:00
"@@ -1,6 +1,6 @@",
" package main",
" ",
" func main() {",
2016-11-11 00:19:53 +03:00
"-foo++",
"-x++",
2016-12-02 00:03:52 +03:00
"+i++",
"+j--",
" }"
2016-11-11 00:19:53 +03:00
],
2016-11-02 21:37:30 +03:00
"gitDir": "test/corpus/repos/go",
"shas": "e6fdb95811282323687e43886ef6c6235a90cd82..4ad8cece3ba83a750de5755134b441087b14d36b"
2016-11-02 21:37:30 +03:00
}
,{
2016-12-02 00:03:52 +03:00
"testCaseDescription": "go-increment-decrement-statements-delete-insert-test",
2016-11-02 21:37:30 +03:00
"expectedResult": {
"changes": {
"increment-decrement-statements.go": [
2016-11-02 17:50:05 +03:00
{
"span": {
2016-11-02 21:37:30 +03:00
"delete": {
2016-11-02 17:50:05 +03:00
"start": [
2016-12-02 00:03:52 +03:00
4,
2016-11-02 21:37:30 +03:00
1
2016-11-02 17:50:05 +03:00
],
"end": [
2016-12-02 00:03:52 +03:00
4,
4
2016-11-02 17:50:05 +03:00
]
}
},
"summary": "Deleted the 'i++' increment statement in the main function"
2016-11-02 17:50:05 +03:00
},
{
"span": {
2016-11-02 21:37:30 +03:00
"delete": {
2016-11-02 17:50:05 +03:00
"start": [
2016-12-02 00:03:52 +03:00
5,
2016-11-02 21:37:30 +03:00
1
2016-11-02 17:50:05 +03:00
],
"end": [
2016-12-02 00:03:52 +03:00
5,
4
2016-11-02 17:50:05 +03:00
]
}
},
"summary": "Deleted the 'j--' decrement statement in the main function"
2016-11-02 17:50:05 +03:00
}
]
},
"errors": {}
},
"filePaths": [
2016-11-02 21:37:30 +03:00
"increment-decrement-statements.go"
2016-11-02 17:50:05 +03:00
],
2016-11-11 00:19:53 +03:00
"patch": [
"diff --git a/increment-decrement-statements.go b/increment-decrement-statements.go",
2017-01-17 23:26:07 +03:00
"index 18bf03a2..79058077 100644",
2016-11-11 00:19:53 +03:00
"--- a/increment-decrement-statements.go",
"+++ b/increment-decrement-statements.go",
2016-12-02 00:03:52 +03:00
"@@ -1,6 +1,5 @@",
" package main",
" ",
" func main() {",
2016-11-11 00:19:53 +03:00
"-i++",
"-j--",
2016-12-02 00:03:52 +03:00
"+",
" }"
2016-11-11 00:19:53 +03:00
],
2016-11-02 17:50:05 +03:00
"gitDir": "test/corpus/repos/go",
"shas": "4ad8cece3ba83a750de5755134b441087b14d36b..9a1c128f8ba4831469f90214df190b6d452cef18"
2016-11-02 17:50:05 +03:00
}
,{
2016-12-02 00:03:52 +03:00
"testCaseDescription": "go-increment-decrement-statements-teardown-test",
2016-11-02 17:50:05 +03:00
"expectedResult": {
"changes": {
2016-11-02 21:37:30 +03:00
"increment-decrement-statements.go": [
2016-11-02 17:50:05 +03:00
{
"span": {
2016-11-11 00:19:53 +03:00
"delete": {
"start": [
1,
1
],
"end": [
1,
13
2016-11-11 00:19:53 +03:00
]
}
2016-11-02 17:50:05 +03:00
},
2016-12-02 00:03:52 +03:00
"summary": "Deleted the 'main' module"
},
{
"span": {
"delete": {
"start": [
3,
1
],
"end": [
5,
2
]
}
},
"summary": "Deleted the 'main' function"
2016-11-02 17:50:05 +03:00
}
]
},
"errors": {}
},
"filePaths": [
2016-11-02 21:37:30 +03:00
"increment-decrement-statements.go"
2016-11-02 17:50:05 +03:00
],
2016-11-11 00:19:53 +03:00
"patch": [
"diff --git a/increment-decrement-statements.go b/increment-decrement-statements.go",
2017-01-17 23:26:07 +03:00
"index 79058077..e69de29b 100644",
2016-11-11 00:19:53 +03:00
"--- a/increment-decrement-statements.go",
"+++ b/increment-decrement-statements.go",
2016-12-02 00:03:52 +03:00
"@@ -1,5 +0,0 @@",
"-package main",
"-",
"-func main() {",
"-",
"-}"
2016-11-11 00:19:53 +03:00
],
2016-11-02 17:50:05 +03:00
"gitDir": "test/corpus/repos/go",
"shas": "9a1c128f8ba4831469f90214df190b6d452cef18..119e158fedb475f8cce8b619268b05780b402a5b"
2016-11-02 17:50:05 +03:00
}]