1
1
mirror of https://github.com/github/semantic.git synced 2024-12-26 00:12:29 +03:00
semantic/test/corpus/diff-summaries/go/single-line-function-declarations.json

611 lines
21 KiB
JSON
Raw Normal View History

2016-11-02 04:36:43 +03:00
[{
2016-12-02 00:03:52 +03:00
"testCaseDescription": "go-single-line-function-declarations-setup-test",
2016-11-02 04:36:43 +03:00
"expectedResult": {
"changes": {
2016-11-02 21:37:30 +03:00
"single-line-function-declarations.go": [
2016-11-02 04:36:43 +03:00
{
"span": {
"insert": {
"start": [
2016-11-11 00:19:53 +03:00
1,
2016-11-02 04:36:43 +03:00
1
],
"end": [
2016-12-02 00:03:52 +03:00
6,
2016-11-02 04:36:43 +03:00
1
]
}
},
2016-12-02 00:03:52 +03:00
"summary": "Added the 'main' module"
2016-11-02 04:36:43 +03:00
}
]
2016-11-02 21:37:30 +03:00
},
"errors": {}
2016-11-02 04:36:43 +03:00
},
"filePaths": [
2016-11-02 21:37:30 +03:00
"single-line-function-declarations.go"
2016-11-02 04:36:43 +03:00
],
2016-11-11 00:19:53 +03:00
"patch": [
"diff --git a/single-line-function-declarations.go b/single-line-function-declarations.go",
2016-12-02 00:03:52 +03:00
"index e69de29..7905807 100644",
2016-11-11 00:19:53 +03:00
"--- a/single-line-function-declarations.go",
"+++ b/single-line-function-declarations.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 04:36:43 +03:00
"gitDir": "test/corpus/repos/go",
2016-12-07 23:41:28 +03:00
"shas": "3e1b41d4f939e40479b5b44fd483fb8a4dbac796..1cf66758fbdb584122798be26ad7dca12e4ead07"
2016-11-02 04:36:43 +03:00
}
,{
2016-12-02 00:03:52 +03:00
"testCaseDescription": "go-single-line-function-declarations-insert-test",
2016-11-02 04:36:43 +03:00
"expectedResult": {
"changes": {
2016-11-02 21:37:30 +03:00
"single-line-function-declarations.go": [
2016-11-02 04:36:43 +03:00
{
"span": {
"insert": {
"start": [
2016-12-02 00:03:52 +03:00
4,
6
2016-11-02 04:36:43 +03:00
],
"end": [
2016-12-02 00:03:52 +03:00
4,
10
2016-11-02 04:36:43 +03:00
]
}
},
2016-12-02 00:03:52 +03:00
"summary": "Added the 'f1()' function call in the main function of the 'main' module"
2016-11-02 04:36:43 +03:00
},
{
"span": {
"insert": {
"start": [
2016-12-02 00:03:52 +03:00
4,
13
2016-11-02 04:36:43 +03:00
],
"end": [
2016-12-02 00:03:52 +03:00
4,
16
2016-11-02 04:36:43 +03:00
]
}
},
2016-12-02 00:03:52 +03:00
"summary": "Added the 'a()' function call in the main function of the 'main' module"
2016-11-02 04:36:43 +03:00
},
{
"span": {
"insert": {
"start": [
2016-12-02 00:03:52 +03:00
5,
6
2016-11-02 04:36:43 +03:00
],
"end": [
2016-12-02 00:03:52 +03:00
5,
10
2016-11-02 04:36:43 +03:00
]
}
},
2016-12-02 00:03:52 +03:00
"summary": "Added the 'f2()' function call in the main function of the 'main' module"
2016-11-02 04:36:43 +03:00
},
{
"span": {
"insert": {
"start": [
2016-12-02 00:03:52 +03:00
5,
13
2016-11-02 04:36:43 +03:00
],
"end": [
2016-12-02 00:03:52 +03:00
5,
16
2016-11-02 04:36:43 +03:00
]
}
},
2016-12-02 00:03:52 +03:00
"summary": "Added the 'a()' function call in the main function of the 'main' module"
2016-11-02 21:37:30 +03:00
},
2016-11-02 04:36:43 +03:00
{
"span": {
"insert": {
"start": [
2016-11-11 00:19:53 +03:00
5,
2016-12-02 00:03:52 +03:00
18
2016-11-02 04:36:43 +03:00
],
"end": [
2016-11-11 00:19:53 +03:00
5,
2016-12-02 00:03:52 +03:00
21
2016-11-02 04:36:43 +03:00
]
}
},
2016-12-02 00:03:52 +03:00
"summary": "Added the 'b()' function call in the main function of the 'main' module"
2016-11-02 04:36:43 +03:00
},
{
"span": {
"insert": {
"start": [
2016-11-11 00:19:53 +03:00
6,
2016-12-02 00:03:52 +03:00
6
2016-11-02 04:36:43 +03:00
],
"end": [
2016-11-11 00:19:53 +03:00
6,
2016-12-02 00:03:52 +03:00
10
2016-11-02 04:36:43 +03:00
]
}
},
2016-12-02 00:03:52 +03:00
"summary": "Added the 'f3()' function call in the main function of the 'main' module"
},
{
"span": {
"insert": {
"start": [
6,
13
],
"end": [
6,
16
]
}
},
"summary": "Added the 'a()' function call in the main function of the 'main' module"
},
{
"span": {
"insert": {
"start": [
6,
18
],
"end": [
6,
21
]
}
},
"summary": "Added the 'b()' function call in the main function of the 'main' module"
2016-11-02 04:36:43 +03:00
}
]
2016-11-02 21:37:30 +03:00
},
"errors": {}
2016-11-02 04:36:43 +03:00
},
"filePaths": [
2016-11-02 21:37:30 +03:00
"single-line-function-declarations.go"
2016-11-02 04:36:43 +03:00
],
2016-11-11 00:19:53 +03:00
"patch": [
"diff --git a/single-line-function-declarations.go b/single-line-function-declarations.go",
2016-12-02 00:03:52 +03:00
"index 7905807..0339b42 100644",
2016-11-11 00:19:53 +03:00
"--- a/single-line-function-declarations.go",
"+++ b/single-line-function-declarations.go",
2016-12-02 00:03:52 +03:00
"@@ -1,5 +1,7 @@",
" package main",
" ",
" func main() {",
"-",
2016-11-11 00:19:53 +03:00
"+func f1() { a() }",
"+func f2() { a(); b() }",
"+func f3() { a(); b(); }",
2016-12-02 00:03:52 +03:00
" }"
2016-11-11 00:19:53 +03:00
],
2016-11-02 04:36:43 +03:00
"gitDir": "test/corpus/repos/go",
2016-12-07 23:41:28 +03:00
"shas": "1cf66758fbdb584122798be26ad7dca12e4ead07..fad836a4d1f902aefc44c140bf44640c33229cbc"
2016-11-02 04:36:43 +03:00
}
,{
2016-12-02 00:03:52 +03:00
"testCaseDescription": "go-single-line-function-declarations-replacement-test",
2016-11-02 04:36:43 +03:00
"expectedResult": {
"changes": {
2016-11-02 21:37:30 +03:00
"single-line-function-declarations.go": [
2016-11-02 04:36:43 +03:00
{
"span": {
"replace": [
{
"start": [
2016-12-02 00:03:52 +03:00
4,
2016-11-02 21:37:30 +03:00
6
2016-11-02 04:36:43 +03:00
],
"end": [
2016-12-02 00:03:52 +03:00
4,
2016-11-02 21:37:30 +03:00
8
2016-11-02 04:36:43 +03:00
]
},
{
"start": [
2016-12-02 00:03:52 +03:00
4,
2016-11-02 21:37:30 +03:00
6
2016-11-02 04:36:43 +03:00
],
"end": [
2016-12-02 00:03:52 +03:00
4,
2016-11-02 21:37:30 +03:00
8
2016-11-02 04:36:43 +03:00
]
}
]
},
2016-12-02 00:03:52 +03:00
"summary": "Replaced the 'f1' identifier with the 'g1' identifier in the g1() function call of the 'main' function"
2016-11-02 04:36:43 +03:00
},
{
"span": {
"replace": [
{
"start": [
2016-12-02 00:03:52 +03:00
5,
2016-11-02 21:37:30 +03:00
6
2016-11-02 04:36:43 +03:00
],
"end": [
2016-12-02 00:03:52 +03:00
5,
2016-11-02 21:37:30 +03:00
8
2016-11-02 04:36:43 +03:00
]
},
{
"start": [
2016-12-02 00:03:52 +03:00
5,
2016-11-02 21:37:30 +03:00
6
2016-11-02 04:36:43 +03:00
],
"end": [
2016-12-02 00:03:52 +03:00
5,
2016-11-02 21:37:30 +03:00
8
2016-11-02 04:36:43 +03:00
]
}
]
},
2016-12-02 00:03:52 +03:00
"summary": "Replaced the 'f2' identifier with the 'g2' identifier in the g2() function call of the 'main' function"
2016-11-02 04:36:43 +03:00
},
{
"span": {
"replace": [
{
"start": [
2016-12-02 00:03:52 +03:00
6,
2016-11-02 21:37:30 +03:00
6
2016-11-02 04:36:43 +03:00
],
"end": [
2016-12-02 00:03:52 +03:00
6,
2016-11-02 21:37:30 +03:00
8
2016-11-02 04:36:43 +03:00
]
},
{
"start": [
2016-12-02 00:03:52 +03:00
6,
2016-11-02 21:37:30 +03:00
6
2016-11-02 04:36:43 +03:00
],
"end": [
2016-12-02 00:03:52 +03:00
6,
2016-11-02 21:37:30 +03:00
8
2016-11-02 04:36:43 +03:00
]
}
]
},
2016-12-02 00:03:52 +03:00
"summary": "Replaced the 'f3' identifier with the 'g3' identifier in the g3() function call of the 'main' function"
2016-11-02 04:36:43 +03:00
}
]
},
"errors": {}
},
"filePaths": [
2016-11-02 21:37:30 +03:00
"single-line-function-declarations.go"
2016-11-02 04:36:43 +03:00
],
2016-11-11 00:19:53 +03:00
"patch": [
"diff --git a/single-line-function-declarations.go b/single-line-function-declarations.go",
2016-12-02 00:03:52 +03:00
"index 0339b42..5bfe23f 100644",
2016-11-11 00:19:53 +03:00
"--- a/single-line-function-declarations.go",
"+++ b/single-line-function-declarations.go",
2016-12-02 00:03:52 +03:00
"@@ -1,7 +1,7 @@",
" package main",
" ",
" func main() {",
"-func f1() { a() }",
"-func f2() { a(); b() }",
"-func f3() { a(); b(); }",
"+func g1() { a() }",
"+func g2() { a(); b() }",
"+func g3() { a(); b(); }",
" }"
2016-11-11 00:19:53 +03:00
],
2016-11-02 04:36:43 +03:00
"gitDir": "test/corpus/repos/go",
2016-12-07 23:41:28 +03:00
"shas": "fad836a4d1f902aefc44c140bf44640c33229cbc..58bb30f8e59b6d12715bad6eb194776aee5d5a23"
2016-11-02 04:36:43 +03:00
}
,{
2016-12-02 00:03:52 +03:00
"testCaseDescription": "go-single-line-function-declarations-delete-replacement-test",
2016-11-02 04:36:43 +03:00
"expectedResult": {
"changes": {
2016-11-02 21:37:30 +03:00
"single-line-function-declarations.go": [
2016-11-02 04:36:43 +03:00
{
"span": {
"replace": [
{
"start": [
2016-12-02 00:03:52 +03:00
4,
2016-11-02 21:37:30 +03:00
6
2016-11-02 04:36:43 +03:00
],
"end": [
2016-12-02 00:03:52 +03:00
4,
2016-11-02 21:37:30 +03:00
8
2016-11-02 04:36:43 +03:00
]
},
{
"start": [
2016-12-02 00:03:52 +03:00
4,
2016-11-02 21:37:30 +03:00
6
2016-11-02 04:36:43 +03:00
],
"end": [
2016-12-02 00:03:52 +03:00
4,
2016-11-02 21:37:30 +03:00
8
2016-11-02 04:36:43 +03:00
]
}
]
},
2016-12-02 00:03:52 +03:00
"summary": "Replaced the 'g1' identifier with the 'f1' identifier in the f1() function call of the 'main' function"
2016-11-02 04:36:43 +03:00
},
{
"span": {
"replace": [
{
"start": [
2016-12-02 00:03:52 +03:00
5,
2016-11-02 21:37:30 +03:00
6
2016-11-02 04:36:43 +03:00
],
"end": [
2016-12-02 00:03:52 +03:00
5,
2016-11-02 21:37:30 +03:00
8
2016-11-02 04:36:43 +03:00
]
},
{
"start": [
2016-12-02 00:03:52 +03:00
5,
2016-11-02 21:37:30 +03:00
6
2016-11-02 04:36:43 +03:00
],
"end": [
2016-12-02 00:03:52 +03:00
5,
2016-11-02 21:37:30 +03:00
8
2016-11-02 04:36:43 +03:00
]
}
]
},
2016-12-02 00:03:52 +03:00
"summary": "Replaced the 'g2' identifier with the 'f2' identifier in the f2() function call of the 'main' function"
2016-11-02 04:36:43 +03:00
},
{
"span": {
"replace": [
{
"start": [
2016-12-02 00:03:52 +03:00
6,
2016-11-02 21:37:30 +03:00
6
2016-11-02 04:36:43 +03:00
],
"end": [
2016-12-02 00:03:52 +03:00
6,
2016-11-02 21:37:30 +03:00
8
2016-11-02 04:36:43 +03:00
]
},
{
"start": [
2016-12-02 00:03:52 +03:00
6,
2016-11-02 21:37:30 +03:00
6
2016-11-02 04:36:43 +03:00
],
"end": [
2016-12-02 00:03:52 +03:00
6,
2016-11-02 21:37:30 +03:00
8
2016-11-02 04:36:43 +03:00
]
}
]
},
2016-12-02 00:03:52 +03:00
"summary": "Replaced the 'g3' identifier with the 'f3' identifier in the f3() function call of the 'main' function"
2016-11-02 04:36:43 +03:00
}
]
},
"errors": {}
},
"filePaths": [
2016-11-02 21:37:30 +03:00
"single-line-function-declarations.go"
2016-11-02 04:36:43 +03:00
],
2016-11-11 00:19:53 +03:00
"patch": [
"diff --git a/single-line-function-declarations.go b/single-line-function-declarations.go",
2016-12-02 00:03:52 +03:00
"index 5bfe23f..0339b42 100644",
2016-11-11 00:19:53 +03:00
"--- a/single-line-function-declarations.go",
"+++ b/single-line-function-declarations.go",
2016-12-02 00:03:52 +03:00
"@@ -1,7 +1,7 @@",
" package main",
" ",
" func main() {",
"-func g1() { a() }",
"-func g2() { a(); b() }",
"-func g3() { a(); b(); }",
"+func f1() { a() }",
"+func f2() { a(); b() }",
"+func f3() { a(); b(); }",
" }"
2016-11-11 00:19:53 +03:00
],
2016-11-02 04:36:43 +03:00
"gitDir": "test/corpus/repos/go",
2016-12-07 23:41:28 +03:00
"shas": "58bb30f8e59b6d12715bad6eb194776aee5d5a23..bba301659ec8c7e3a8795b3d0fe5fa6f3108ca97"
2016-11-02 04:36:43 +03:00
}
,{
2016-12-02 00:03:52 +03:00
"testCaseDescription": "go-single-line-function-declarations-delete-insert-test",
2016-11-02 04:36:43 +03:00
"expectedResult": {
"changes": {
2016-11-02 21:37:30 +03:00
"single-line-function-declarations.go": [
2016-11-02 04:36:43 +03:00
{
"span": {
"delete": {
"start": [
2016-12-02 00:03:52 +03:00
4,
6
2016-11-02 04:36:43 +03:00
],
"end": [
2016-12-02 00:03:52 +03:00
4,
10
2016-11-02 04:36:43 +03:00
]
}
},
2016-12-02 00:03:52 +03:00
"summary": "Deleted the 'f1()' function call in the main function of the 'main' module"
2016-11-02 04:36:43 +03:00
},
{
"span": {
"delete": {
"start": [
2016-11-11 00:19:53 +03:00
4,
2016-12-02 00:03:52 +03:00
13
2016-11-02 04:36:43 +03:00
],
"end": [
2016-11-11 00:19:53 +03:00
4,
2016-12-02 00:03:52 +03:00
16
2016-11-02 04:36:43 +03:00
]
}
},
2016-12-02 00:03:52 +03:00
"summary": "Deleted the 'a()' function call in the main function of the 'main' module"
2016-11-02 04:36:43 +03:00
},
{
"span": {
2016-11-02 21:37:30 +03:00
"delete": {
2016-11-02 04:36:43 +03:00
"start": [
2016-11-11 00:19:53 +03:00
5,
2016-12-02 00:03:52 +03:00
6
2016-11-02 04:36:43 +03:00
],
"end": [
2016-11-11 00:19:53 +03:00
5,
2016-12-02 00:03:52 +03:00
10
2016-11-02 04:36:43 +03:00
]
}
},
2016-12-02 00:03:52 +03:00
"summary": "Deleted the 'f2()' function call in the main function of the 'main' module"
2016-11-02 04:36:43 +03:00
},
{
"span": {
2016-11-02 21:37:30 +03:00
"delete": {
2016-11-02 04:36:43 +03:00
"start": [
2016-12-02 00:03:52 +03:00
5,
13
2016-11-02 04:36:43 +03:00
],
"end": [
2016-12-02 00:03:52 +03:00
5,
16
2016-11-02 04:36:43 +03:00
]
}
},
2016-12-02 00:03:52 +03:00
"summary": "Deleted the 'a()' function call in the main function of the 'main' module"
2016-11-02 04:36:43 +03:00
},
{
"span": {
2016-12-02 00:03:52 +03:00
"delete": {
2016-11-02 04:36:43 +03:00
"start": [
2016-11-11 00:19:53 +03:00
5,
2016-12-02 00:03:52 +03:00
18
2016-11-02 04:36:43 +03:00
],
"end": [
2016-11-11 00:19:53 +03:00
5,
2016-12-02 00:03:52 +03:00
21
2016-11-02 04:36:43 +03:00
]
}
},
2016-12-02 00:03:52 +03:00
"summary": "Deleted the 'b()' function call in the main function of the 'main' module"
2016-11-02 04:36:43 +03:00
},
{
"span": {
2016-12-02 00:03:52 +03:00
"delete": {
2016-11-02 04:36:43 +03:00
"start": [
2016-11-11 00:19:53 +03:00
6,
2016-12-02 00:03:52 +03:00
6
2016-11-02 04:36:43 +03:00
],
"end": [
2016-11-11 00:19:53 +03:00
6,
2016-12-02 00:03:52 +03:00
10
2016-11-02 04:36:43 +03:00
]
}
},
2016-12-02 00:03:52 +03:00
"summary": "Deleted the 'f3()' function call in the main function of the 'main' module"
2016-11-02 04:36:43 +03:00
},
{
"span": {
"delete": {
"start": [
2016-12-02 00:03:52 +03:00
6,
13
2016-11-02 04:36:43 +03:00
],
"end": [
2016-12-02 00:03:52 +03:00
6,
16
2016-11-02 04:36:43 +03:00
]
}
},
2016-12-02 00:03:52 +03:00
"summary": "Deleted the 'a()' function call in the main function of the 'main' module"
2016-11-02 21:37:30 +03:00
},
2016-11-02 04:36:43 +03:00
{
"span": {
"delete": {
"start": [
2016-12-02 00:03:52 +03:00
6,
18
2016-11-02 04:36:43 +03:00
],
"end": [
2016-12-02 00:03:52 +03:00
6,
21
2016-11-02 04:36:43 +03:00
]
}
},
2016-12-02 00:03:52 +03:00
"summary": "Deleted the 'b()' function call in the main function of the 'main' module"
2016-11-02 04:36:43 +03:00
}
]
2016-11-02 21:37:30 +03:00
},
"errors": {}
2016-11-02 04:36:43 +03:00
},
"filePaths": [
2016-11-02 21:37:30 +03:00
"single-line-function-declarations.go"
2016-11-02 04:36:43 +03:00
],
2016-11-11 00:19:53 +03:00
"patch": [
"diff --git a/single-line-function-declarations.go b/single-line-function-declarations.go",
2016-12-02 00:03:52 +03:00
"index 0339b42..7905807 100644",
2016-11-11 00:19:53 +03:00
"--- a/single-line-function-declarations.go",
"+++ b/single-line-function-declarations.go",
2016-12-02 00:03:52 +03:00
"@@ -1,7 +1,5 @@",
" package main",
" ",
" func main() {",
2016-11-11 00:19:53 +03:00
"-func f1() { a() }",
"-func f2() { a(); b() }",
"-func f3() { a(); b(); }",
2016-12-02 00:03:52 +03:00
"+",
" }"
2016-11-11 00:19:53 +03:00
],
2016-11-02 04:36:43 +03:00
"gitDir": "test/corpus/repos/go",
2016-12-07 23:41:28 +03:00
"shas": "bba301659ec8c7e3a8795b3d0fe5fa6f3108ca97..a60a5dc28ed8277e5c5100a7ac74b11b70998e85"
2016-11-02 04:36:43 +03:00
}
,{
2016-12-02 00:03:52 +03:00
"testCaseDescription": "go-single-line-function-declarations-teardown-test",
2016-11-02 04:36:43 +03:00
"expectedResult": {
"changes": {
2016-11-02 21:37:30 +03:00
"single-line-function-declarations.go": [
2016-11-02 04:36:43 +03:00
{
"span": {
"delete": {
"start": [
2016-11-11 00:19:53 +03:00
1,
2016-11-02 04:36:43 +03:00
1
],
"end": [
2016-12-02 00:03:52 +03:00
6,
2016-11-02 04:36:43 +03:00
1
]
}
},
2016-12-02 00:03:52 +03:00
"summary": "Deleted the 'main' module"
2016-11-02 04:36:43 +03:00
}
]
2016-11-02 21:37:30 +03:00
},
"errors": {}
2016-11-02 04:36:43 +03:00
},
"filePaths": [
2016-11-02 21:37:30 +03:00
"single-line-function-declarations.go"
2016-11-02 04:36:43 +03:00
],
2016-11-11 00:19:53 +03:00
"patch": [
"diff --git a/single-line-function-declarations.go b/single-line-function-declarations.go",
2016-12-02 00:03:52 +03:00
"index 7905807..e69de29 100644",
2016-11-11 00:19:53 +03:00
"--- a/single-line-function-declarations.go",
"+++ b/single-line-function-declarations.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 04:36:43 +03:00
"gitDir": "test/corpus/repos/go",
2016-12-07 23:41:28 +03:00
"shas": "a60a5dc28ed8277e5c5100a7ac74b11b70998e85..fa6a24858afeb927fdde2db2c9eab23cf921a15e"
2016-11-02 04:36:43 +03:00
}]