1
1
mirror of https://github.com/github/semantic.git synced 2024-12-23 06:41:45 +03:00
semantic/test/corpus/diff-summaries/go/variadic-function-declarations.json

489 lines
16 KiB
JSON
Raw Normal View History

2016-11-02 04:36:43 +03:00
[{
2016-12-02 00:03:52 +03:00
"testCaseDescription": "go-variadic-function-declarations-setup-test",
2016-11-02 04:36:43 +03:00
"expectedResult": {
"changes": {
2016-11-02 21:37:30 +03:00
"variadic-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": [
1,
13
2016-11-02 04:36:43 +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 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
"variadic-function-declarations.go"
2016-11-02 04:36:43 +03:00
],
2016-11-11 00:19:53 +03:00
"patch": [
"diff --git a/variadic-function-declarations.go b/variadic-function-declarations.go",
"index e69de29b..b97dec38 100644",
2016-11-11 00:19:53 +03:00
"--- a/variadic-function-declarations.go",
"+++ b/variadic-function-declarations.go",
"@@ -0,0 +1,6 @@",
2016-12-02 00:03:52 +03:00
"+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",
2017-02-07 19:37:47 +03:00
"shas": "ba5ad24cc5920db43a2b1942f11e4737fe450953..15a77f6125a6c4dab3cb92fdca8bd43ffb7a095c"
2016-11-02 04:36:43 +03:00
}
,{
2016-12-02 00:03:52 +03:00
"testCaseDescription": "go-variadic-function-declarations-insert-test",
2016-11-02 04:36:43 +03:00
"expectedResult": {
"changes": {
2016-11-02 21:37:30 +03:00
"variadic-function-declarations.go": [
2016-11-02 04:36:43 +03:00
{
"span": {
"insert": {
"start": [
6,
1
2016-11-02 04:36:43 +03:00
],
"end": [
6,
2016-11-02 21:37:30 +03:00
22
2016-11-02 04:36:43 +03:00
]
}
},
"summary": "Added the 'f1' function"
},
2016-11-02 04:36:43 +03:00
{
"span": {
"insert": {
"start": [
7,
1
2016-11-02 04:36:43 +03:00
],
"end": [
7,
2016-12-02 00:03:52 +03:00
19
2016-11-02 04:36:43 +03:00
]
}
},
"summary": "Added the 'f2' function"
2016-11-02 21:37:30 +03:00
},
2016-11-02 04:36:43 +03:00
{
"span": {
"insert": {
"start": [
8,
2016-11-02 04:36:43 +03:00
1
],
"end": [
8,
23
2016-11-02 04:36:43 +03:00
]
}
},
"summary": "Added the 'f3' function"
2016-11-02 04:36:43 +03:00
}
]
},
"errors": {}
2016-11-02 04:36:43 +03:00
},
"filePaths": [
2016-11-02 21:37:30 +03:00
"variadic-function-declarations.go"
2016-11-02 04:36:43 +03:00
],
2016-11-11 00:19:53 +03:00
"patch": [
"diff --git a/variadic-function-declarations.go b/variadic-function-declarations.go",
"index b97dec38..6bdb4e0a 100644",
2016-11-11 00:19:53 +03:00
"--- a/variadic-function-declarations.go",
"+++ b/variadic-function-declarations.go",
"@@ -3,4 +3,6 @@ package main",
2016-12-02 00:03:52 +03:00
" func main() {",
" ",
" }",
2016-12-02 00:03:52 +03:00
"-",
2016-11-11 00:19:53 +03:00
"+func f1(a ...*int) {}",
"+func f2(...int) {}",
"+func f3(a, ...bool) {}"
2016-11-11 00:19:53 +03:00
],
2016-11-02 04:36:43 +03:00
"gitDir": "test/corpus/repos/go",
2017-02-07 19:37:47 +03:00
"shas": "15a77f6125a6c4dab3cb92fdca8bd43ffb7a095c..2795525acc11b3b4d3bb239efb44e4dbeeb3eb80"
2016-11-02 04:36:43 +03:00
}
,{
2016-12-02 00:03:52 +03:00
"testCaseDescription": "go-variadic-function-declarations-replacement-test",
2016-11-02 04:36:43 +03:00
"expectedResult": {
"changes": {
2016-11-02 21:37:30 +03:00
"variadic-function-declarations.go": [
2016-11-02 04:36:43 +03:00
{
"span": {
"replace": [
{
"start": [
6,
2016-11-02 21:37:30 +03:00
6
2016-11-02 04:36:43 +03:00
],
"end": [
6,
2016-11-02 21:37:30 +03:00
8
2016-11-02 04:36:43 +03:00
]
},
{
"start": [
6,
2016-11-02 21:37:30 +03:00
6
2016-11-02 04:36:43 +03:00
],
"end": [
6,
2016-11-02 21:37:30 +03:00
8
2016-11-02 04:36:43 +03:00
]
}
]
},
"summary": "Replaced the 'f1' identifier with the 'g1' identifier in the g1 function"
2016-11-02 04:36:43 +03:00
},
{
"span": {
"replace": [
{
"start": [
7,
2016-11-02 21:37:30 +03:00
6
2016-11-02 04:36:43 +03:00
],
"end": [
7,
2016-11-02 21:37:30 +03:00
8
2016-11-02 04:36:43 +03:00
]
},
{
"start": [
7,
2016-11-02 21:37:30 +03:00
6
2016-11-02 04:36:43 +03:00
],
"end": [
7,
2016-11-02 21:37:30 +03:00
8
2016-11-02 04:36:43 +03:00
]
}
]
},
"summary": "Replaced the 'f2' identifier with the 'g2' identifier in the g2 function"
2016-11-02 04:36:43 +03:00
},
{
"span": {
"replace": [
{
"start": [
8,
2016-11-02 21:37:30 +03:00
6
2016-11-02 04:36:43 +03:00
],
"end": [
8,
2016-11-02 21:37:30 +03:00
8
2016-11-02 04:36:43 +03:00
]
},
{
"start": [
8,
2016-11-02 21:37:30 +03:00
6
2016-11-02 04:36:43 +03:00
],
"end": [
8,
2016-11-02 21:37:30 +03:00
8
2016-11-02 04:36:43 +03:00
]
}
]
},
"summary": "Replaced the 'f3' identifier with the 'g3' identifier in the g3 function"
2016-11-02 04:36:43 +03:00
}
]
},
"errors": {}
},
"filePaths": [
2016-11-02 21:37:30 +03:00
"variadic-function-declarations.go"
2016-11-02 04:36:43 +03:00
],
2016-11-11 00:19:53 +03:00
"patch": [
"diff --git a/variadic-function-declarations.go b/variadic-function-declarations.go",
"index 6bdb4e0a..ecc181af 100644",
2016-11-11 00:19:53 +03:00
"--- a/variadic-function-declarations.go",
"+++ b/variadic-function-declarations.go",
"@@ -3,6 +3,6 @@ package main",
2016-12-02 00:03:52 +03:00
" func main() {",
" ",
" }",
2016-12-02 00:03:52 +03:00
"-func f1(a ...*int) {}",
"-func f2(...int) {}",
"-func f3(a, ...bool) {}",
"+func g1(a ...*int) {}",
"+func g2(...int) {}",
"+func g3(a, ...bool) {}"
2016-11-11 00:19:53 +03:00
],
2016-11-02 04:36:43 +03:00
"gitDir": "test/corpus/repos/go",
2017-02-07 19:37:47 +03:00
"shas": "2795525acc11b3b4d3bb239efb44e4dbeeb3eb80..12f649346665ffb181bde064b58e5ac1d9d97860"
2016-11-02 04:36:43 +03:00
}
,{
2016-12-02 00:03:52 +03:00
"testCaseDescription": "go-variadic-function-declarations-delete-replacement-test",
2016-11-02 04:36:43 +03:00
"expectedResult": {
"changes": {
2016-11-02 21:37:30 +03:00
"variadic-function-declarations.go": [
2016-11-02 04:36:43 +03:00
{
"span": {
"replace": [
{
"start": [
6,
2016-11-02 21:37:30 +03:00
6
2016-11-02 04:36:43 +03:00
],
"end": [
6,
2016-11-02 21:37:30 +03:00
8
2016-11-02 04:36:43 +03:00
]
},
{
"start": [
6,
2016-11-02 21:37:30 +03:00
6
2016-11-02 04:36:43 +03:00
],
"end": [
6,
2016-11-02 21:37:30 +03:00
8
2016-11-02 04:36:43 +03:00
]
}
]
},
"summary": "Replaced the 'g1' identifier with the 'f1' identifier in the f1 function"
2016-11-02 04:36:43 +03:00
},
{
"span": {
"replace": [
{
"start": [
7,
2016-11-02 21:37:30 +03:00
6
2016-11-02 04:36:43 +03:00
],
"end": [
7,
2016-11-02 21:37:30 +03:00
8
2016-11-02 04:36:43 +03:00
]
},
{
"start": [
7,
2016-11-02 21:37:30 +03:00
6
2016-11-02 04:36:43 +03:00
],
"end": [
7,
2016-11-02 21:37:30 +03:00
8
2016-11-02 04:36:43 +03:00
]
}
]
},
"summary": "Replaced the 'g2' identifier with the 'f2' identifier in the f2 function"
2016-11-02 04:36:43 +03:00
},
{
"span": {
"replace": [
{
"start": [
8,
2016-11-02 21:37:30 +03:00
6
2016-11-02 04:36:43 +03:00
],
"end": [
8,
2016-11-02 21:37:30 +03:00
8
2016-11-02 04:36:43 +03:00
]
},
{
"start": [
8,
2016-11-02 21:37:30 +03:00
6
2016-11-02 04:36:43 +03:00
],
"end": [
8,
2016-11-02 21:37:30 +03:00
8
2016-11-02 04:36:43 +03:00
]
}
]
},
"summary": "Replaced the 'g3' identifier with the 'f3' identifier in the f3 function"
2016-11-02 04:36:43 +03:00
}
]
},
"errors": {}
},
"filePaths": [
2016-11-02 21:37:30 +03:00
"variadic-function-declarations.go"
2016-11-02 04:36:43 +03:00
],
2016-11-11 00:19:53 +03:00
"patch": [
"diff --git a/variadic-function-declarations.go b/variadic-function-declarations.go",
"index ecc181af..6bdb4e0a 100644",
2016-11-11 00:19:53 +03:00
"--- a/variadic-function-declarations.go",
"+++ b/variadic-function-declarations.go",
"@@ -3,6 +3,6 @@ package main",
2016-12-02 00:03:52 +03:00
" func main() {",
" ",
" }",
2016-12-02 00:03:52 +03:00
"-func g1(a ...*int) {}",
"-func g2(...int) {}",
"-func g3(a, ...bool) {}",
"+func f1(a ...*int) {}",
"+func f2(...int) {}",
"+func f3(a, ...bool) {}"
2016-11-11 00:19:53 +03:00
],
2016-11-02 04:36:43 +03:00
"gitDir": "test/corpus/repos/go",
2017-02-07 19:37:47 +03:00
"shas": "12f649346665ffb181bde064b58e5ac1d9d97860..ef93bbef3117c5583f11f22bd06558ddfad0784b"
2016-11-02 04:36:43 +03:00
}
,{
2016-12-02 00:03:52 +03:00
"testCaseDescription": "go-variadic-function-declarations-delete-insert-test",
2016-11-02 04:36:43 +03:00
"expectedResult": {
"changes": {
2016-11-02 21:37:30 +03:00
"variadic-function-declarations.go": [
2016-11-02 04:36:43 +03:00
{
"span": {
"delete": {
"start": [
6,
1
2016-11-02 04:36:43 +03:00
],
"end": [
6,
2016-11-02 21:37:30 +03:00
22
2016-11-02 04:36:43 +03:00
]
}
},
"summary": "Deleted the 'f1' function"
},
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": [
7,
1
2016-11-02 04:36:43 +03:00
],
"end": [
7,
2016-11-02 21:37:30 +03:00
19
2016-11-02 04:36:43 +03:00
]
}
},
"summary": "Deleted the 'f2' function"
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": [
8,
2016-11-02 04:36:43 +03:00
1
],
"end": [
8,
23
2016-11-02 04:36:43 +03:00
]
}
},
"summary": "Deleted the 'f3' function"
2016-11-02 04:36:43 +03:00
}
]
},
"errors": {}
2016-11-02 04:36:43 +03:00
},
"filePaths": [
2016-11-02 21:37:30 +03:00
"variadic-function-declarations.go"
2016-11-02 04:36:43 +03:00
],
2016-11-11 00:19:53 +03:00
"patch": [
"diff --git a/variadic-function-declarations.go b/variadic-function-declarations.go",
"index 6bdb4e0a..b97dec38 100644",
2016-11-11 00:19:53 +03:00
"--- a/variadic-function-declarations.go",
"+++ b/variadic-function-declarations.go",
"@@ -3,6 +3,4 @@ package main",
2016-12-02 00:03:52 +03:00
" func main() {",
" ",
" }",
2016-11-11 00:19:53 +03:00
"-func f1(a ...*int) {}",
"-func f2(...int) {}",
"-func f3(a, ...bool) {}",
"+"
2016-11-11 00:19:53 +03:00
],
2016-11-02 04:36:43 +03:00
"gitDir": "test/corpus/repos/go",
2017-02-07 19:37:47 +03:00
"shas": "ef93bbef3117c5583f11f22bd06558ddfad0784b..2f16adfed9c6ae862992be30903bb8e0e3f1e344"
2016-11-02 04:36:43 +03:00
}
,{
2016-12-02 00:03:52 +03:00
"testCaseDescription": "go-variadic-function-declarations-teardown-test",
2016-11-02 04:36:43 +03:00
"expectedResult": {
"changes": {
2016-11-02 21:37:30 +03:00
"variadic-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": [
1,
13
2016-11-02 04:36:43 +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 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
"variadic-function-declarations.go"
2016-11-02 04:36:43 +03:00
],
2016-11-11 00:19:53 +03:00
"patch": [
"diff --git a/variadic-function-declarations.go b/variadic-function-declarations.go",
"index b97dec38..e69de29b 100644",
2016-11-11 00:19:53 +03:00
"--- a/variadic-function-declarations.go",
"+++ b/variadic-function-declarations.go",
"@@ -1,6 +0,0 @@",
2016-12-02 00:03:52 +03:00
"-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",
2017-02-07 19:37:47 +03:00
"shas": "2f16adfed9c6ae862992be30903bb8e0e3f1e344..d6222a7346773adfd0929112bedb22129a3519ea"
2016-11-02 04:36:43 +03:00
}]