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/constructors.json
2017-02-06 10:44:04 -05:00

743 lines
25 KiB
JSON

[{
"testCaseDescription": "go-constructors-setup-test",
"expectedResult": {
"changes": {
"constructors.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": [
"constructors.go"
],
"patch": [
"diff --git a/constructors.go b/constructors.go",
"index e69de29b..79058077 100644",
"--- a/constructors.go",
"+++ b/constructors.go",
"@@ -0,0 +1,5 @@",
"+package main",
"+",
"+func main() {",
"+",
"+}"
],
"gitDir": "test/corpus/repos/go",
"shas": "faa9fbbc723f20dd1c278ced316f35e0782f0234..977814b10acebf4bd9ef0c33c6a8b80b977119dc"
}
,{
"testCaseDescription": "go-constructors-insert-test",
"expectedResult": {
"changes": {
"constructors.go": [
{
"span": {
"insert": {
"start": [
4,
1
],
"end": [
4,
17
]
}
},
"summary": "Added the 'make(chan<- int)' function call in the main function"
},
{
"span": {
"insert": {
"start": [
5,
1
],
"end": [
5,
30
]
}
},
"summary": "Added the 'make(chan<- int, …)' function call in the main function"
},
{
"span": {
"insert": {
"start": [
6,
1
],
"end": [
6,
24
]
}
},
"summary": "Added the 'make(chan<- int, 5, 10)' function call in the main function"
},
{
"span": {
"insert": {
"start": [
7,
2
],
"end": [
7,
24
]
}
},
"summary": "Added the 'new(…)' function call in the main function"
}
]
},
"errors": {}
},
"filePaths": [
"constructors.go"
],
"patch": [
"diff --git a/constructors.go b/constructors.go",
"index 79058077..082e65fd 100644",
"--- a/constructors.go",
"+++ b/constructors.go",
"@@ -1,5 +1,8 @@",
" package main",
" ",
" func main() {",
"-",
"+make(chan<- int)",
"+make(chan<- int, (new - old))",
"+make(chan<- int, 5, 10)",
"+ new(map[string]string)",
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "977814b10acebf4bd9ef0c33c6a8b80b977119dc..cb304692f838db1d40175831264ec740aae56e59"
}
,{
"testCaseDescription": "go-constructors-replacement-test",
"expectedResult": {
"changes": {
"constructors.go": [
{
"span": {
"replace": [
{
"start": [
4,
13
],
"end": [
4,
16
]
},
{
"start": [
4,
13
],
"end": [
4,
19
]
}
]
},
"summary": "Replaced the 'int' identifier with the 'string' identifier in the chan<- string channel type of the 'main' function"
},
{
"span": {
"replace": [
{
"start": [
5,
13
],
"end": [
5,
16
]
},
{
"start": [
5,
13
],
"end": [
5,
19
]
}
]
},
"summary": "Replaced the 'int' identifier with the 'string' identifier in the chan<- string channel type of the 'main' function"
},
{
"span": {
"replace": [
{
"start": [
6,
13
],
"end": [
6,
16
]
},
{
"start": [
6,
13
],
"end": [
6,
19
]
}
]
},
"summary": "Replaced the 'int' identifier with the 'string' identifier in the chan<- string channel type of the 'main' function"
},
{
"span": {
"replace": [
{
"start": [
6,
18
],
"end": [
6,
19
]
},
{
"start": [
6,
21
],
"end": [
6,
22
]
}
]
},
"summary": "Replaced '5' with '7' in the make(chan<- string, 7, 11) function call of the 'main' function"
},
{
"span": {
"replace": [
{
"start": [
6,
21
],
"end": [
6,
23
]
},
{
"start": [
6,
24
],
"end": [
6,
26
]
}
]
},
"summary": "Replaced '10' with '11' in the make(chan<- string, 7, 11) function call of the 'main' function"
},
{
"span": {
"replace": [
{
"start": [
7,
10
],
"end": [
7,
16
]
},
{
"start": [
7,
10
],
"end": [
7,
13
]
}
]
},
"summary": "Replaced the 'string' identifier with the 'int' identifier in the new(…) function call of the 'main' function"
},
{
"span": {
"replace": [
{
"start": [
7,
17
],
"end": [
7,
23
]
},
{
"start": [
7,
14
],
"end": [
7,
17
]
}
]
},
"summary": "Replaced the 'string' identifier with the 'int' identifier in the new(…) function call of the 'main' function"
}
]
},
"errors": {}
},
"filePaths": [
"constructors.go"
],
"patch": [
"diff --git a/constructors.go b/constructors.go",
"index 082e65fd..e4fdb2e9 100644",
"--- a/constructors.go",
"+++ b/constructors.go",
"@@ -1,8 +1,8 @@",
" package main",
" ",
" func main() {",
"-make(chan<- int)",
"-make(chan<- int, (new - old))",
"-make(chan<- int, 5, 10)",
"- new(map[string]string)",
"+make(chan<- string)",
"+make(chan<- string, (new - old))",
"+make(chan<- string, 7, 11)",
"+ new(map[int]int)",
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "cb304692f838db1d40175831264ec740aae56e59..74b776bd1caa296f9657c91ec1665799f6f6e75e"
}
,{
"testCaseDescription": "go-constructors-delete-replacement-test",
"expectedResult": {
"changes": {
"constructors.go": [
{
"span": {
"replace": [
{
"start": [
4,
13
],
"end": [
4,
19
]
},
{
"start": [
4,
13
],
"end": [
4,
16
]
}
]
},
"summary": "Replaced the 'string' identifier with the 'int' identifier in the chan<- int channel type of the 'main' function"
},
{
"span": {
"replace": [
{
"start": [
5,
13
],
"end": [
5,
19
]
},
{
"start": [
5,
13
],
"end": [
5,
16
]
}
]
},
"summary": "Replaced the 'string' identifier with the 'int' identifier in the chan<- int channel type of the 'main' function"
},
{
"span": {
"replace": [
{
"start": [
6,
13
],
"end": [
6,
19
]
},
{
"start": [
6,
13
],
"end": [
6,
16
]
}
]
},
"summary": "Replaced the 'string' identifier with the 'int' identifier in the chan<- int channel type of the 'main' function"
},
{
"span": {
"replace": [
{
"start": [
6,
21
],
"end": [
6,
22
]
},
{
"start": [
6,
18
],
"end": [
6,
19
]
}
]
},
"summary": "Replaced '7' with '5' in the make(chan<- int, 5, 10) function call of the 'main' function"
},
{
"span": {
"replace": [
{
"start": [
6,
24
],
"end": [
6,
26
]
},
{
"start": [
6,
21
],
"end": [
6,
23
]
}
]
},
"summary": "Replaced '11' with '10' in the make(chan<- int, 5, 10) function call of the 'main' function"
},
{
"span": {
"replace": [
{
"start": [
7,
10
],
"end": [
7,
13
]
},
{
"start": [
7,
10
],
"end": [
7,
16
]
}
]
},
"summary": "Replaced the 'int' identifier with the 'string' identifier in the new(…) function call of the 'main' function"
},
{
"span": {
"replace": [
{
"start": [
7,
14
],
"end": [
7,
17
]
},
{
"start": [
7,
17
],
"end": [
7,
23
]
}
]
},
"summary": "Replaced the 'int' identifier with the 'string' identifier in the new(…) function call of the 'main' function"
}
]
},
"errors": {}
},
"filePaths": [
"constructors.go"
],
"patch": [
"diff --git a/constructors.go b/constructors.go",
"index e4fdb2e9..082e65fd 100644",
"--- a/constructors.go",
"+++ b/constructors.go",
"@@ -1,8 +1,8 @@",
" package main",
" ",
" func main() {",
"-make(chan<- string)",
"-make(chan<- string, (new - old))",
"-make(chan<- string, 7, 11)",
"- new(map[int]int)",
"+make(chan<- int)",
"+make(chan<- int, (new - old))",
"+make(chan<- int, 5, 10)",
"+ new(map[string]string)",
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "74b776bd1caa296f9657c91ec1665799f6f6e75e..b37403fc18fd588a7e3abe2d799b60ffa348a0d3"
}
,{
"testCaseDescription": "go-constructors-delete-insert-test",
"expectedResult": {
"changes": {
"constructors.go": [
{
"span": {
"delete": {
"start": [
4,
1
],
"end": [
4,
17
]
}
},
"summary": "Deleted the 'make(chan<- int)' function call in the main function"
},
{
"span": {
"delete": {
"start": [
5,
1
],
"end": [
5,
30
]
}
},
"summary": "Deleted the 'make(chan<- int, …)' function call in the main function"
},
{
"span": {
"delete": {
"start": [
6,
1
],
"end": [
6,
24
]
}
},
"summary": "Deleted the 'make(chan<- int, 5, 10)' function call in the main function"
},
{
"span": {
"delete": {
"start": [
7,
2
],
"end": [
7,
24
]
}
},
"summary": "Deleted the 'new(…)' function call in the main function"
}
]
},
"errors": {}
},
"filePaths": [
"constructors.go"
],
"patch": [
"diff --git a/constructors.go b/constructors.go",
"index 082e65fd..79058077 100644",
"--- a/constructors.go",
"+++ b/constructors.go",
"@@ -1,8 +1,5 @@",
" package main",
" ",
" func main() {",
"-make(chan<- int)",
"-make(chan<- int, (new - old))",
"-make(chan<- int, 5, 10)",
"- new(map[string]string)",
"+",
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "b37403fc18fd588a7e3abe2d799b60ffa348a0d3..abecfd24381a925ba2031acf652c4a2bd9267445"
}
,{
"testCaseDescription": "go-constructors-teardown-test",
"expectedResult": {
"changes": {
"constructors.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": [
"constructors.go"
],
"patch": [
"diff --git a/constructors.go b/constructors.go",
"index 79058077..e69de29b 100644",
"--- a/constructors.go",
"+++ b/constructors.go",
"@@ -1,5 +0,0 @@",
"-package main",
"-",
"-func main() {",
"-",
"-}"
],
"gitDir": "test/corpus/repos/go",
"shas": "abecfd24381a925ba2031acf652c4a2bd9267445..94bc6c0af023bccf8cd7c512076c1042bde6e921"
}]