1
1
mirror of https://github.com/github/semantic.git synced 2024-12-23 23:11:50 +03:00
semantic/test/corpus/diff-summaries/go/function-literals.json

424 lines
13 KiB
JSON
Raw Normal View History

2016-11-01 21:36:23 +03:00
[{
2016-11-02 21:37:30 +03:00
"testCaseDescription": "go-function-literals-insert-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": [
2016-11-11 00:19:53 +03:00
3,
2016-11-01 21:36:23 +03:00
2
]
}
},
"summary": "Added the 's1' variable"
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",
"index e69de29..49cbe77 100644",
"--- a/function-literals.go",
"+++ b/function-literals.go",
"@@ -0,0 +1,3 @@",
"+const s1 = func(s string) (int, int) {",
"+return 1, 2",
"+}"
],
2016-11-01 21:36:23 +03:00
"gitDir": "test/corpus/repos/go",
"shas": "8cef11ced56e7aed74af10acde19377ccfe0b6af..1dc216376d4051127f8fc7833470538864904865"
2016-11-01 21:36:23 +03:00
}
,{
2016-11-02 21:37:30 +03:00
"testCaseDescription": "go-function-literals-replacement-insert-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": [
2016-11-11 00:19:53 +03:00
3,
2016-11-01 21:36:23 +03:00
2
]
}
},
"summary": "Added the 's1' variable"
2016-11-01 21:36:23 +03:00
},
{
"span": {
"insert": {
"start": [
2016-11-11 00:19:53 +03:00
4,
2016-11-01 21:36:23 +03:00
1
],
"end": [
2016-11-11 00:19:53 +03:00
6,
2016-11-01 21:36:23 +03:00
2
]
}
},
"summary": "Added the 's1' variable"
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",
"index 49cbe77..913c35a 100644",
"--- a/function-literals.go",
"+++ b/function-literals.go",
"@@ -1,3 +1,9 @@",
"+const s1 = func(b int) (string, string) {",
"+return 1, 2",
"+}",
"+const s1 = func(s string) (int, int) {",
"+return 1, 2",
"+}",
" const s1 = func(s string) (int, int) {",
" return 1, 2",
" }"
],
2016-11-01 21:36:23 +03:00
"gitDir": "test/corpus/repos/go",
"shas": "1dc216376d4051127f8fc7833470538864904865..0a1fc24e689a77c0b136e4702b5328ccfac82601"
2016-11-01 21:36:23 +03:00
}
,{
2016-11-02 21:37:30 +03:00
"testCaseDescription": "go-function-literals-delete-insert-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": {
2016-11-01 23:24:34 +03:00
"replace": [
{
"start": [
2016-11-11 00:19:53 +03:00
1,
2016-11-01 23:24:34 +03:00
17
],
"end": [
2016-11-11 00:19:53 +03:00
1,
2016-11-01 23:24:34 +03:00
18
]
},
{
"start": [
2016-11-11 00:19:53 +03:00
1,
2016-11-01 23:24:34 +03:00
17
],
"end": [
2016-11-11 00:19:53 +03:00
1,
2016-11-01 23:24:34 +03:00
18
]
}
]
},
2016-11-11 00:19:53 +03:00
"summary": "Replaced the 'b' identifier with the 's' identifier in the s1 variable"
2016-11-01 21:36:23 +03:00
},
{
"span": {
2016-11-01 23:24:34 +03:00
"replace": [
{
"start": [
2016-11-11 00:19:53 +03:00
1,
2016-11-01 23:24:34 +03:00
19
],
"end": [
2016-11-11 00:19:53 +03:00
1,
2016-11-01 23:24:34 +03:00
22
]
},
{
"start": [
2016-11-11 00:19:53 +03:00
1,
2016-11-01 23:24:34 +03:00
19
],
"end": [
2016-11-11 00:19:53 +03:00
1,
2016-11-01 23:24:34 +03:00
25
]
}
]
},
2016-11-11 00:19:53 +03:00
"summary": "Replaced the 'int' identifier with the 'string' identifier in the s1 variable"
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",
"index 913c35a..731e2c6 100644",
"--- a/function-literals.go",
"+++ b/function-literals.go",
"@@ -1,4 +1,4 @@",
"-const s1 = func(b int) (string, string) {",
"+const s1 = func(s string) (int, int) {",
" return 1, 2",
" }",
" const s1 = func(s string) (int, int) {"
],
2016-11-01 21:36:23 +03:00
"gitDir": "test/corpus/repos/go",
"shas": "0a1fc24e689a77c0b136e4702b5328ccfac82601..a91d7138a089662fc0100619eaeff8fd15c4fbed"
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": {
"changes": {
2016-11-02 21:37:30 +03:00
"function-literals.go": [
2016-11-01 21:36:23 +03:00
{
"span": {
2016-11-01 23:24:34 +03:00
"replace": [
{
"start": [
2016-11-11 00:19:53 +03:00
1,
2016-11-01 23:24:34 +03:00
17
],
"end": [
2016-11-11 00:19:53 +03:00
1,
2016-11-01 23:24:34 +03:00
18
]
},
{
"start": [
2016-11-11 00:19:53 +03:00
1,
2016-11-01 23:24:34 +03:00
17
],
"end": [
2016-11-11 00:19:53 +03:00
1,
2016-11-01 23:24:34 +03:00
18
]
}
]
},
2016-11-11 00:19:53 +03:00
"summary": "Replaced the 's' identifier with the 'b' identifier in the s1 variable"
2016-11-01 21:36:23 +03:00
},
{
"span": {
2016-11-01 23:24:34 +03:00
"replace": [
{
"start": [
2016-11-11 00:19:53 +03:00
1,
2016-11-01 23:24:34 +03:00
19
],
"end": [
2016-11-11 00:19:53 +03:00
1,
2016-11-01 23:24:34 +03:00
25
]
},
{
"start": [
2016-11-11 00:19:53 +03:00
1,
2016-11-01 23:24:34 +03:00
19
],
"end": [
2016-11-11 00:19:53 +03:00
1,
2016-11-01 23:24:34 +03:00
22
]
}
]
},
2016-11-11 00:19:53 +03:00
"summary": "Replaced the 'string' identifier with the 'int' identifier in the s1 variable"
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",
"index 731e2c6..913c35a 100644",
"--- a/function-literals.go",
"+++ b/function-literals.go",
"@@ -1,4 +1,4 @@",
"-const s1 = func(s string) (int, int) {",
"+const s1 = func(b int) (string, string) {",
" return 1, 2",
" }",
" const s1 = func(s string) (int, int) {"
],
2016-11-01 21:36:23 +03:00
"gitDir": "test/corpus/repos/go",
"shas": "a91d7138a089662fc0100619eaeff8fd15c4fbed..ad88b2ad21c0631a650d20f3b876ef0db92ec589"
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": {
"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": [
2016-11-11 00:19:53 +03:00
3,
2016-11-01 21:36:23 +03:00
2
]
}
},
"summary": "Deleted the 's1' variable"
2016-11-01 21:36:23 +03:00
},
{
"span": {
"delete": {
"start": [
2016-11-11 00:19:53 +03:00
4,
2016-11-01 21:36:23 +03:00
1
],
"end": [
2016-11-11 00:19:53 +03:00
6,
2016-11-01 21:36:23 +03:00
2
]
}
},
"summary": "Deleted the 's1' variable"
2016-11-01 21:36:23 +03:00
},
{
"span": {
"insert": {
"start": [
2016-11-11 00:19:53 +03:00
4,
2016-11-01 21:36:23 +03:00
1
],
"end": [
2016-11-11 00:19:53 +03:00
6,
2016-11-01 21:36:23 +03:00
2
]
}
},
"summary": "Added the 's1' variable"
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",
"index 913c35a..51820bc 100644",
"--- a/function-literals.go",
"+++ b/function-literals.go",
"@@ -1,9 +1,6 @@",
"-const s1 = func(b int) (string, string) {",
"-return 1, 2",
"-}",
" const s1 = func(s string) (int, int) {",
" return 1, 2",
" }",
"-const s1 = func(s string) (int, int) {",
"+const s1 = func(b int) (string, string) {",
" return 1, 2",
" }"
],
2016-11-01 21:36:23 +03:00
"gitDir": "test/corpus/repos/go",
"shas": "ad88b2ad21c0631a650d20f3b876ef0db92ec589..54387de238ddc7806f785f4b874a5fcf20c70808"
2016-11-01 21:36:23 +03:00
}
,{
2016-11-02 21:37:30 +03:00
"testCaseDescription": "go-function-literals-delete-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": [
2016-11-11 00:19:53 +03:00
3,
2016-11-01 21:36:23 +03:00
2
]
}
},
"summary": "Deleted the 's1' variable"
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",
"index 51820bc..d21dc2d 100644",
"--- a/function-literals.go",
"+++ b/function-literals.go",
"@@ -1,6 +1,3 @@",
"-const s1 = func(s string) (int, int) {",
"-return 1, 2",
"-}",
" const s1 = func(b int) (string, string) {",
" return 1, 2",
" }"
],
2016-11-01 21:36:23 +03:00
"gitDir": "test/corpus/repos/go",
"shas": "54387de238ddc7806f785f4b874a5fcf20c70808..68548df887acedb0540ef6087756db5c6a0a5c47"
2016-11-01 21:36:23 +03:00
}
,{
2016-11-02 21:37:30 +03:00
"testCaseDescription": "go-function-literals-delete-rest-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": [
2016-11-11 00:19:53 +03:00
3,
2016-11-01 21:36:23 +03:00
2
]
}
},
"summary": "Deleted the 's1' variable"
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",
"index d21dc2d..e69de29 100644",
"--- a/function-literals.go",
"+++ b/function-literals.go",
"@@ -1,3 +0,0 @@",
"-const s1 = func(b int) (string, string) {",
"-return 1, 2",
"-}"
],
2016-11-01 21:36:23 +03:00
"gitDir": "test/corpus/repos/go",
"shas": "68548df887acedb0540ef6087756db5c6a0a5c47..e3cc7c05800e63045739cf83cc9bed769e582946"
2016-11-01 21:36:23 +03:00
}]