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

497 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",
2017-01-17 23:26:07 +03:00
"index e69de29b..79058077 100644",
2016-11-11 00:19:53 +03:00
"--- a/variadic-function-declarations.go",
"+++ b/variadic-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",
2017-01-26 04:27:46 +03:00
"shas": "c6729f44705a6dc43bcedcd145acac0c9358ba62..36fef538acd082b6e0a19107dcc499c60fdf9e59"
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": [
2016-12-02 00:03:52 +03:00
4,
20
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
22
2016-11-02 04:36:43 +03:00
]
}
},
"summary": "Added the '{}' expression statements in the main function"
}
]
},
"errors": {
"variadic-function-declarations.go": [
2016-11-02 04:36:43 +03:00
{
"span": {
"insert": {
"start": [
4,
1
2016-11-02 04:36:43 +03:00
],
"end": [
4,
2016-12-02 00:03:52 +03:00
19
2016-11-02 04:36:43 +03:00
]
}
},
"summary": "Added 'func f1(a ...*int)' at line 4, column 1 - line 4, column 19 in the main function"
2016-11-02 21:37:30 +03:00
},
2016-11-02 04:36:43 +03:00
{
"span": {
"insert": {
"start": [
5,
2016-11-02 04:36:43 +03:00
1
],
"end": [
7,
2016-11-02 04:36:43 +03:00
1
]
}
},
"summary": "Added 'func f2(...int) {}\nfunc f3(a, ...bool) {}\n' at line 5, column 1 - line 7, column 1 in the main function"
2016-11-02 04:36:43 +03:00
}
]
2016-12-02 00:03:52 +03:00
}
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",
2017-01-17 23:26:07 +03:00
"index 79058077..7447883f 100644",
2016-11-11 00:19:53 +03:00
"--- a/variadic-function-declarations.go",
"+++ b/variadic-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 ...*int) {}",
"+func f2(...int) {}",
"+func f3(a, ...bool) {}",
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",
2017-01-26 04:27:46 +03:00
"shas": "36fef538acd082b6e0a19107dcc499c60fdf9e59..269f39e2fbe5288129204b143babb8f4a5fc0711"
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": [
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
]
}
]
},
"summary": "Replaced the 'f1' identifier with the 'g1' identifier in 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
]
}
]
},
"summary": "Replaced the 'f2' identifier with the 'g2' identifier in 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 of the 'main' 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",
2017-01-17 23:26:07 +03:00
"index 7447883f..42ee7381 100644",
2016-11-11 00:19:53 +03:00
"--- a/variadic-function-declarations.go",
"+++ b/variadic-function-declarations.go",
2016-12-02 00:03:52 +03:00
"@@ -1,7 +1,7 @@",
" 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) {}",
" }"
2016-11-11 00:19:53 +03:00
],
2016-11-02 04:36:43 +03:00
"gitDir": "test/corpus/repos/go",
2017-01-26 04:27:46 +03:00
"shas": "269f39e2fbe5288129204b143babb8f4a5fc0711..393f8f1ee18de185c7439731cc91140acd995014"
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": [
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
]
}
]
},
"summary": "Replaced the 'g1' identifier with the 'f1' identifier in 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
]
}
]
},
"summary": "Replaced the 'g2' identifier with the 'f2' identifier in 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 of the 'main' 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",
2017-01-17 23:26:07 +03:00
"index 42ee7381..7447883f 100644",
2016-11-11 00:19:53 +03:00
"--- a/variadic-function-declarations.go",
"+++ b/variadic-function-declarations.go",
2016-12-02 00:03:52 +03:00
"@@ -1,7 +1,7 @@",
" 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) {}",
" }"
2016-11-11 00:19:53 +03:00
],
2016-11-02 04:36:43 +03:00
"gitDir": "test/corpus/repos/go",
2017-01-26 04:27:46 +03:00
"shas": "393f8f1ee18de185c7439731cc91140acd995014..fdf4d26cb6a7841daa7d685dbed2f99b819d75a7"
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": [
2016-11-11 00:19:53 +03:00
4,
2016-12-02 00:03:52 +03:00
20
2016-11-02 04:36:43 +03:00
],
"end": [
2016-11-11 00:19:53 +03:00
4,
2016-11-02 21:37:30 +03:00
22
2016-11-02 04:36:43 +03:00
]
}
},
"summary": "Deleted the '{}' expression statements in the main function"
}
]
},
"errors": {
"variadic-function-declarations.go": [
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": [
4,
1
2016-11-02 04:36:43 +03:00
],
"end": [
4,
2016-11-02 21:37:30 +03:00
19
2016-11-02 04:36:43 +03:00
]
}
},
"summary": "Deleted 'func f1(a ...*int)' at line 4, column 1 - line 4, column 19 in the main 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": [
5,
2016-11-02 04:36:43 +03:00
1
],
"end": [
7,
2016-11-02 04:36:43 +03:00
1
]
}
},
"summary": "Deleted 'func f2(...int) {}\nfunc f3(a, ...bool) {}\n' at line 5, column 1 - line 7, column 1 in the main function"
2016-11-02 04:36:43 +03:00
}
]
2016-12-02 00:03:52 +03:00
}
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",
2017-01-17 23:26:07 +03:00
"index 7447883f..79058077 100644",
2016-11-11 00:19:53 +03:00
"--- a/variadic-function-declarations.go",
"+++ b/variadic-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 ...*int) {}",
"-func f2(...int) {}",
"-func f3(a, ...bool) {}",
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",
2017-01-26 04:27:46 +03:00
"shas": "fdf4d26cb6a7841daa7d685dbed2f99b819d75a7..1162333d2198a57f258fb79d6ec5eadbc9b0fc5c"
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",
2017-01-17 23:26:07 +03:00
"index 79058077..e69de29b 100644",
2016-11-11 00:19:53 +03:00
"--- a/variadic-function-declarations.go",
"+++ b/variadic-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",
2017-01-26 04:27:46 +03:00
"shas": "1162333d2198a57f258fb79d6ec5eadbc9b0fc5c..d8c1b5127002fa4bad70fbb9833ccacaee15c063"
2016-11-02 04:36:43 +03:00
}]