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/variadic-function-declarations.json
2017-02-07 11:37:47 -05:00

489 lines
16 KiB
JSON

[{
"testCaseDescription": "go-variadic-function-declarations-setup-test",
"expectedResult": {
"changes": {
"variadic-function-declarations.go": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
1,
13
]
}
},
"summary": "Added the 'main' module"
},
{
"span": {
"insert": {
"start": [
3,
1
],
"end": [
5,
2
]
}
},
"summary": "Added the 'main' function"
}
]
},
"errors": {}
},
"filePaths": [
"variadic-function-declarations.go"
],
"patch": [
"diff --git a/variadic-function-declarations.go b/variadic-function-declarations.go",
"index e69de29b..b97dec38 100644",
"--- a/variadic-function-declarations.go",
"+++ b/variadic-function-declarations.go",
"@@ -0,0 +1,6 @@",
"+package main",
"+",
"+func main() {",
"+",
"+}",
"+"
],
"gitDir": "test/corpus/repos/go",
"shas": "ba5ad24cc5920db43a2b1942f11e4737fe450953..15a77f6125a6c4dab3cb92fdca8bd43ffb7a095c"
}
,{
"testCaseDescription": "go-variadic-function-declarations-insert-test",
"expectedResult": {
"changes": {
"variadic-function-declarations.go": [
{
"span": {
"insert": {
"start": [
6,
1
],
"end": [
6,
22
]
}
},
"summary": "Added the 'f1' function"
},
{
"span": {
"insert": {
"start": [
7,
1
],
"end": [
7,
19
]
}
},
"summary": "Added the 'f2' function"
},
{
"span": {
"insert": {
"start": [
8,
1
],
"end": [
8,
23
]
}
},
"summary": "Added the 'f3' function"
}
]
},
"errors": {}
},
"filePaths": [
"variadic-function-declarations.go"
],
"patch": [
"diff --git a/variadic-function-declarations.go b/variadic-function-declarations.go",
"index b97dec38..6bdb4e0a 100644",
"--- a/variadic-function-declarations.go",
"+++ b/variadic-function-declarations.go",
"@@ -3,4 +3,6 @@ package main",
" func main() {",
" ",
" }",
"-",
"+func f1(a ...*int) {}",
"+func f2(...int) {}",
"+func f3(a, ...bool) {}"
],
"gitDir": "test/corpus/repos/go",
"shas": "15a77f6125a6c4dab3cb92fdca8bd43ffb7a095c..2795525acc11b3b4d3bb239efb44e4dbeeb3eb80"
}
,{
"testCaseDescription": "go-variadic-function-declarations-replacement-test",
"expectedResult": {
"changes": {
"variadic-function-declarations.go": [
{
"span": {
"replace": [
{
"start": [
6,
6
],
"end": [
6,
8
]
},
{
"start": [
6,
6
],
"end": [
6,
8
]
}
]
},
"summary": "Replaced the 'f1' identifier with the 'g1' identifier in the g1 function"
},
{
"span": {
"replace": [
{
"start": [
7,
6
],
"end": [
7,
8
]
},
{
"start": [
7,
6
],
"end": [
7,
8
]
}
]
},
"summary": "Replaced the 'f2' identifier with the 'g2' identifier in the g2 function"
},
{
"span": {
"replace": [
{
"start": [
8,
6
],
"end": [
8,
8
]
},
{
"start": [
8,
6
],
"end": [
8,
8
]
}
]
},
"summary": "Replaced the 'f3' identifier with the 'g3' identifier in the g3 function"
}
]
},
"errors": {}
},
"filePaths": [
"variadic-function-declarations.go"
],
"patch": [
"diff --git a/variadic-function-declarations.go b/variadic-function-declarations.go",
"index 6bdb4e0a..ecc181af 100644",
"--- a/variadic-function-declarations.go",
"+++ b/variadic-function-declarations.go",
"@@ -3,6 +3,6 @@ package main",
" func main() {",
" ",
" }",
"-func f1(a ...*int) {}",
"-func f2(...int) {}",
"-func f3(a, ...bool) {}",
"+func g1(a ...*int) {}",
"+func g2(...int) {}",
"+func g3(a, ...bool) {}"
],
"gitDir": "test/corpus/repos/go",
"shas": "2795525acc11b3b4d3bb239efb44e4dbeeb3eb80..12f649346665ffb181bde064b58e5ac1d9d97860"
}
,{
"testCaseDescription": "go-variadic-function-declarations-delete-replacement-test",
"expectedResult": {
"changes": {
"variadic-function-declarations.go": [
{
"span": {
"replace": [
{
"start": [
6,
6
],
"end": [
6,
8
]
},
{
"start": [
6,
6
],
"end": [
6,
8
]
}
]
},
"summary": "Replaced the 'g1' identifier with the 'f1' identifier in the f1 function"
},
{
"span": {
"replace": [
{
"start": [
7,
6
],
"end": [
7,
8
]
},
{
"start": [
7,
6
],
"end": [
7,
8
]
}
]
},
"summary": "Replaced the 'g2' identifier with the 'f2' identifier in the f2 function"
},
{
"span": {
"replace": [
{
"start": [
8,
6
],
"end": [
8,
8
]
},
{
"start": [
8,
6
],
"end": [
8,
8
]
}
]
},
"summary": "Replaced the 'g3' identifier with the 'f3' identifier in the f3 function"
}
]
},
"errors": {}
},
"filePaths": [
"variadic-function-declarations.go"
],
"patch": [
"diff --git a/variadic-function-declarations.go b/variadic-function-declarations.go",
"index ecc181af..6bdb4e0a 100644",
"--- a/variadic-function-declarations.go",
"+++ b/variadic-function-declarations.go",
"@@ -3,6 +3,6 @@ package main",
" func main() {",
" ",
" }",
"-func g1(a ...*int) {}",
"-func g2(...int) {}",
"-func g3(a, ...bool) {}",
"+func f1(a ...*int) {}",
"+func f2(...int) {}",
"+func f3(a, ...bool) {}"
],
"gitDir": "test/corpus/repos/go",
"shas": "12f649346665ffb181bde064b58e5ac1d9d97860..ef93bbef3117c5583f11f22bd06558ddfad0784b"
}
,{
"testCaseDescription": "go-variadic-function-declarations-delete-insert-test",
"expectedResult": {
"changes": {
"variadic-function-declarations.go": [
{
"span": {
"delete": {
"start": [
6,
1
],
"end": [
6,
22
]
}
},
"summary": "Deleted the 'f1' function"
},
{
"span": {
"delete": {
"start": [
7,
1
],
"end": [
7,
19
]
}
},
"summary": "Deleted the 'f2' function"
},
{
"span": {
"delete": {
"start": [
8,
1
],
"end": [
8,
23
]
}
},
"summary": "Deleted the 'f3' function"
}
]
},
"errors": {}
},
"filePaths": [
"variadic-function-declarations.go"
],
"patch": [
"diff --git a/variadic-function-declarations.go b/variadic-function-declarations.go",
"index 6bdb4e0a..b97dec38 100644",
"--- a/variadic-function-declarations.go",
"+++ b/variadic-function-declarations.go",
"@@ -3,6 +3,4 @@ package main",
" func main() {",
" ",
" }",
"-func f1(a ...*int) {}",
"-func f2(...int) {}",
"-func f3(a, ...bool) {}",
"+"
],
"gitDir": "test/corpus/repos/go",
"shas": "ef93bbef3117c5583f11f22bd06558ddfad0784b..2f16adfed9c6ae862992be30903bb8e0e3f1e344"
}
,{
"testCaseDescription": "go-variadic-function-declarations-teardown-test",
"expectedResult": {
"changes": {
"variadic-function-declarations.go": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
1,
13
]
}
},
"summary": "Deleted the 'main' module"
},
{
"span": {
"delete": {
"start": [
3,
1
],
"end": [
5,
2
]
}
},
"summary": "Deleted the 'main' function"
}
]
},
"errors": {}
},
"filePaths": [
"variadic-function-declarations.go"
],
"patch": [
"diff --git a/variadic-function-declarations.go b/variadic-function-declarations.go",
"index b97dec38..e69de29b 100644",
"--- a/variadic-function-declarations.go",
"+++ b/variadic-function-declarations.go",
"@@ -1,6 +0,0 @@",
"-package main",
"-",
"-func main() {",
"-",
"-}",
"-"
],
"gitDir": "test/corpus/repos/go",
"shas": "2f16adfed9c6ae862992be30903bb8e0e3f1e344..d6222a7346773adfd0929112bedb22129a3519ea"
}]