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/function-literals.json

373 lines
12 KiB
JSON
Raw Normal View History

2016-11-01 21:36:23 +03:00
[{
2016-12-02 00:03:52 +03:00
"testCaseDescription": "go-function-literals-setup-test",
2016-11-01 21:36:23 +03:00
"expectedResult": {
"changes": {
2016-11-02 21:37:30 +03:00
"function-literals.go": [
2016-11-01 21:36:23 +03:00
{
"span": {
"insert": {
"start": [
2016-11-11 00:19:53 +03:00
1,
2016-11-01 21:36:23 +03:00
1
],
"end": [
1,
13
2016-11-01 21:36:23 +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-01 21:36:23 +03:00
}
]
},
"errors": {}
},
"filePaths": [
2016-11-02 21:37:30 +03:00
"function-literals.go"
2016-11-01 21:36:23 +03:00
],
2016-11-11 00:19:53 +03:00
"patch": [
"diff --git a/function-literals.go b/function-literals.go",
2017-01-17 23:26:07 +03:00
"index e69de29b..79058077 100644",
2016-11-11 00:19:53 +03:00
"--- a/function-literals.go",
"+++ b/function-literals.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-01 21:36:23 +03:00
"gitDir": "test/corpus/repos/go",
2017-01-26 04:27:46 +03:00
"shas": "29a926b992e14be79f37cee8527accea6ed82ebd..f09f36dc3a15ab3e1d81fc405277115bd81f9435"
2016-11-01 21:36:23 +03:00
}
,{
2016-12-02 00:03:52 +03:00
"testCaseDescription": "go-function-literals-insert-test",
2016-11-01 21:36:23 +03:00
"expectedResult": {
2016-12-07 23:41:28 +03:00
"changes": {
"function-literals.go": [
{
"span": {
"insert": {
"start": [
4,
2017-01-10 23:09:09 +03:00
7
2016-12-07 23:41:28 +03:00
],
"end": [
6,
2
]
}
},
"summary": "Added the 's1' var assignment in the main function"
2016-12-07 23:41:28 +03:00
}
]
},
2016-11-01 21:36:23 +03:00
"errors": {}
},
"filePaths": [
2016-11-02 21:37:30 +03:00
"function-literals.go"
2016-11-01 21:36:23 +03:00
],
2016-11-11 00:19:53 +03:00
"patch": [
"diff --git a/function-literals.go b/function-literals.go",
2017-01-17 23:26:07 +03:00
"index 79058077..1f4ead96 100644",
2016-11-11 00:19:53 +03:00
"--- a/function-literals.go",
"+++ b/function-literals.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
"+const s1 = func(s string) (int, int) {",
"+return 1, 2",
"+}",
" }"
],
2016-11-01 21:36:23 +03:00
"gitDir": "test/corpus/repos/go",
2017-01-26 04:27:46 +03:00
"shas": "f09f36dc3a15ab3e1d81fc405277115bd81f9435..69ea4a95a501080fa427d099ccda50f19a9b1361"
2016-11-01 21:36:23 +03:00
}
,{
2016-11-02 21:37:30 +03:00
"testCaseDescription": "go-function-literals-replacement-test",
2016-11-01 21:36:23 +03:00
"expectedResult": {
2016-12-07 23:41:28 +03:00
"changes": {
"function-literals.go": [
{
"span": {
"replace": [
{
"start": [
4,
2017-01-11 00:08:59 +03:00
19
2016-12-07 23:41:28 +03:00
],
"end": [
4,
2017-01-11 00:08:59 +03:00
25
2016-12-07 23:41:28 +03:00
]
},
{
"start": [
4,
2017-01-11 00:08:59 +03:00
19
2016-12-07 23:41:28 +03:00
],
"end": [
4,
2017-01-11 00:08:59 +03:00
22
2016-12-07 23:41:28 +03:00
]
}
]
},
2017-01-11 00:08:59 +03:00
"summary": "Replaced the 'string' identifier with the 'int' identifier in the s1 var assignment of the 'main' function"
2016-12-07 23:41:28 +03:00
},
{
"span": {
"replace": [
{
"start": [
4,
2017-01-11 00:08:59 +03:00
17
2016-12-07 23:41:28 +03:00
],
"end": [
4,
2017-01-11 00:08:59 +03:00
18
2016-12-07 23:41:28 +03:00
]
},
{
"start": [
4,
2017-01-11 00:08:59 +03:00
17
2016-12-07 23:41:28 +03:00
],
"end": [
4,
2017-01-11 00:08:59 +03:00
18
2016-12-07 23:41:28 +03:00
]
}
]
},
2017-01-11 00:08:59 +03:00
"summary": "Replaced the 's' identifier with the 'b' identifier in the s1 var assignment of the 'main' function"
2016-12-07 23:41:28 +03:00
}
]
},
2016-11-01 21:36:23 +03:00
"errors": {}
},
"filePaths": [
2016-11-02 21:37:30 +03:00
"function-literals.go"
2016-11-01 21:36:23 +03:00
],
2016-11-11 00:19:53 +03:00
"patch": [
"diff --git a/function-literals.go b/function-literals.go",
2017-01-17 23:26:07 +03:00
"index 1f4ead96..7b034662 100644",
2016-11-11 00:19:53 +03:00
"--- a/function-literals.go",
"+++ b/function-literals.go",
2016-12-02 00:03:52 +03:00
"@@ -1,7 +1,7 @@",
" package main",
" ",
" func main() {",
2016-11-11 00:19:53 +03:00
"-const s1 = func(s string) (int, int) {",
"+const s1 = func(b int) (string, string) {",
" return 1, 2",
" }",
2016-12-02 00:03:52 +03:00
" }"
2016-11-11 00:19:53 +03:00
],
2016-11-01 21:36:23 +03:00
"gitDir": "test/corpus/repos/go",
2017-01-26 04:27:46 +03:00
"shas": "69ea4a95a501080fa427d099ccda50f19a9b1361..31ed37c18c52197c0f07b5a9eaf87cde6da5fcd1"
2016-11-01 21:36:23 +03:00
}
,{
2016-11-02 21:37:30 +03:00
"testCaseDescription": "go-function-literals-delete-replacement-test",
2016-11-01 21:36:23 +03:00
"expectedResult": {
2016-12-07 23:41:28 +03:00
"changes": {
"function-literals.go": [
{
"span": {
"replace": [
{
"start": [
4,
2017-01-11 00:08:59 +03:00
19
2016-12-07 23:41:28 +03:00
],
"end": [
4,
2017-01-11 00:08:59 +03:00
22
2016-12-07 23:41:28 +03:00
]
},
{
"start": [
4,
2017-01-11 00:08:59 +03:00
19
2016-12-07 23:41:28 +03:00
],
"end": [
4,
2017-01-11 00:08:59 +03:00
25
2016-12-07 23:41:28 +03:00
]
}
]
},
2017-01-11 00:08:59 +03:00
"summary": "Replaced the 'int' identifier with the 'string' identifier in the s1 var assignment of the 'main' function"
2016-12-07 23:41:28 +03:00
},
{
"span": {
"replace": [
{
"start": [
4,
2017-01-11 00:08:59 +03:00
17
2016-12-07 23:41:28 +03:00
],
"end": [
4,
2017-01-11 00:08:59 +03:00
18
2016-12-07 23:41:28 +03:00
]
},
{
"start": [
4,
2017-01-11 00:08:59 +03:00
17
2016-12-07 23:41:28 +03:00
],
"end": [
4,
2017-01-11 00:08:59 +03:00
18
2016-12-07 23:41:28 +03:00
]
}
]
},
2017-01-11 00:08:59 +03:00
"summary": "Replaced the 'b' identifier with the 's' identifier in the s1 var assignment of the 'main' function"
2016-12-07 23:41:28 +03:00
}
]
},
2016-11-01 21:36:23 +03:00
"errors": {}
},
"filePaths": [
2016-11-02 21:37:30 +03:00
"function-literals.go"
2016-11-01 21:36:23 +03:00
],
2016-11-11 00:19:53 +03:00
"patch": [
"diff --git a/function-literals.go b/function-literals.go",
2017-01-17 23:26:07 +03:00
"index 7b034662..1f4ead96 100644",
2016-11-11 00:19:53 +03:00
"--- a/function-literals.go",
"+++ b/function-literals.go",
2016-12-02 00:03:52 +03:00
"@@ -1,7 +1,7 @@",
" package main",
" ",
" func main() {",
2016-11-11 00:19:53 +03:00
"-const s1 = func(b int) (string, string) {",
2016-12-02 00:03:52 +03:00
"+const s1 = func(s string) (int, int) {",
2016-11-11 00:19:53 +03:00
" return 1, 2",
" }",
" }"
],
2016-11-01 21:36:23 +03:00
"gitDir": "test/corpus/repos/go",
2017-01-26 04:27:46 +03:00
"shas": "31ed37c18c52197c0f07b5a9eaf87cde6da5fcd1..1b13123002919a765d575bcc729a3f97d5a1a78e"
2016-11-01 21:36:23 +03:00
}
,{
2016-12-02 00:03:52 +03:00
"testCaseDescription": "go-function-literals-delete-insert-test",
2016-11-01 21:36:23 +03:00
"expectedResult": {
2016-12-07 23:41:28 +03:00
"changes": {
"function-literals.go": [
{
"span": {
"delete": {
"start": [
4,
2017-01-10 23:09:09 +03:00
7
2016-12-07 23:41:28 +03:00
],
"end": [
6,
2
]
}
},
"summary": "Deleted the 's1' var assignment in the main function"
2016-12-07 23:41:28 +03:00
}
]
},
2016-11-01 21:36:23 +03:00
"errors": {}
},
"filePaths": [
2016-11-02 21:37:30 +03:00
"function-literals.go"
2016-11-01 21:36:23 +03:00
],
2016-11-11 00:19:53 +03:00
"patch": [
"diff --git a/function-literals.go b/function-literals.go",
2017-01-17 23:26:07 +03:00
"index 1f4ead96..79058077 100644",
2016-11-11 00:19:53 +03:00
"--- a/function-literals.go",
"+++ b/function-literals.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
"-const s1 = func(s string) (int, int) {",
"-return 1, 2",
"-}",
2016-12-02 00:03:52 +03:00
"+",
2016-11-11 00:19:53 +03:00
" }"
],
2016-11-01 21:36:23 +03:00
"gitDir": "test/corpus/repos/go",
2017-01-26 04:27:46 +03:00
"shas": "1b13123002919a765d575bcc729a3f97d5a1a78e..ba1439005b12e3a83fa33bd5a8712c5c58397bfc"
2016-11-01 21:36:23 +03:00
}
,{
2016-12-02 00:03:52 +03:00
"testCaseDescription": "go-function-literals-teardown-test",
2016-11-01 21:36:23 +03:00
"expectedResult": {
"changes": {
2016-11-02 21:37:30 +03:00
"function-literals.go": [
2016-11-01 21:36:23 +03:00
{
"span": {
"delete": {
"start": [
2016-11-11 00:19:53 +03:00
1,
2016-11-01 21:36:23 +03:00
1
],
"end": [
1,
13
2016-11-01 21:36:23 +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-01 21:36:23 +03:00
}
]
},
"errors": {}
},
"filePaths": [
2016-11-02 21:37:30 +03:00
"function-literals.go"
2016-11-01 21:36:23 +03:00
],
2016-11-11 00:19:53 +03:00
"patch": [
"diff --git a/function-literals.go b/function-literals.go",
2017-01-17 23:26:07 +03:00
"index 79058077..e69de29b 100644",
2016-11-11 00:19:53 +03:00
"--- a/function-literals.go",
"+++ b/function-literals.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-01 21:36:23 +03:00
"gitDir": "test/corpus/repos/go",
2017-01-26 04:27:46 +03:00
"shas": "ba1439005b12e3a83fa33bd5a8712c5c58397bfc..c60d46122dde42854b7b79e875b6ee119bc65104"
2016-11-01 21:36:23 +03:00
}]