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/slice-literals.json
2016-11-21 15:47:41 -05:00

813 lines
26 KiB
JSON

[{
"testCaseDescription": "go-slice-literals-insert-test",
"expectedResult": {
"changes": {
"slice-literals.go": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
1,
22
]
}
},
"summary": "Added the 's1' variable"
},
{
"span": {
"insert": {
"start": [
2,
1
],
"end": [
2,
26
]
}
},
"summary": "Added the 's2' variable"
},
{
"span": {
"insert": {
"start": [
3,
1
],
"end": [
6,
2
]
}
},
"summary": "Added the 's3' variable"
}
]
},
"errors": {}
},
"filePaths": [
"slice-literals.go"
],
"patch": [
"diff --git a/slice-literals.go b/slice-literals.go",
"index e69de29..9b1eb7a 100644",
"--- a/slice-literals.go",
"+++ b/slice-literals.go",
"@@ -0,0 +1,6 @@",
"+const s1 = []string{}",
"+const s2 = []string{\"hi\"}",
"+const s3 = []string{",
"+\"hi\",",
"+ \"hello\",",
"+}"
],
"gitDir": "test/corpus/repos/go",
"shas": "1c3168ee8d918ef3e634abc7f0efb6af42d5c457..167f97a44ff2dd15ae4472d4dbd20d1a6b8cafe6"
}
,{
"testCaseDescription": "go-slice-literals-replacement-insert-test",
"expectedResult": {
"changes": {
"slice-literals.go": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
1,
27
]
}
},
"summary": "Added the 's1' variable"
},
{
"span": {
"insert": {
"start": [
2,
1
],
"end": [
2,
29
]
}
},
"summary": "Added the 's2' variable"
},
{
"span": {
"insert": {
"start": [
3,
1
],
"end": [
6,
2
]
}
},
"summary": "Added the 's3' variable"
},
{
"span": {
"insert": {
"start": [
7,
1
],
"end": [
7,
22
]
}
},
"summary": "Added the 's1' variable"
},
{
"span": {
"insert": {
"start": [
8,
1
],
"end": [
8,
26
]
}
},
"summary": "Added the 's2' variable"
},
{
"span": {
"insert": {
"start": [
9,
1
],
"end": [
12,
2
]
}
},
"summary": "Added the 's3' variable"
}
]
},
"errors": {}
},
"filePaths": [
"slice-literals.go"
],
"patch": [
"diff --git a/slice-literals.go b/slice-literals.go",
"index 9b1eb7a..4555163 100644",
"--- a/slice-literals.go",
"+++ b/slice-literals.go",
"@@ -1,3 +1,15 @@",
"+const s1 = []string{\"sup\"}",
"+const s2 = []string{\"hello\"}",
"+const s3 = []string{",
"+\"bar\",",
"+ \"baz\",",
"+}",
"+const s1 = []string{}",
"+const s2 = []string{\"hi\"}",
"+const s3 = []string{",
"+\"hi\",",
"+ \"hello\",",
"+}",
" const s1 = []string{}",
" const s2 = []string{\"hi\"}",
" const s3 = []string{"
],
"gitDir": "test/corpus/repos/go",
"shas": "167f97a44ff2dd15ae4472d4dbd20d1a6b8cafe6..a4a9915dd92184927a4389fbd0e1974b77768a92"
}
,{
"testCaseDescription": "go-slice-literals-delete-insert-test",
"expectedResult": {
"changes": {
"slice-literals.go": [
{
"span": {
"replace": [
{
"start": [
1,
21
],
"end": [
1,
26
]
},
{
"start": [
1,
20
],
"end": [
1,
22
]
}
]
},
"summary": "Replaced the \"sup\" string with the '{}' literal_value in the s1 variable"
},
{
"span": {
"replace": [
{
"start": [
2,
21
],
"end": [
2,
28
]
},
{
"start": [
2,
21
],
"end": [
2,
25
]
}
]
},
"summary": "Replaced the \"hello\" string with the \"hi\" string in the s2 variable"
},
{
"span": {
"replace": [
{
"start": [
4,
1
],
"end": [
4,
6
]
},
{
"start": [
4,
1
],
"end": [
4,
5
]
}
]
},
"summary": "Replaced the \"bar\" string with the \"hi\" string in the s3 variable"
},
{
"span": {
"replace": [
{
"start": [
5,
2
],
"end": [
5,
7
]
},
{
"start": [
5,
2
],
"end": [
5,
9
]
}
]
},
"summary": "Replaced the \"baz\" string with the \"hello\" string in the s3 variable"
}
]
},
"errors": {}
},
"filePaths": [
"slice-literals.go"
],
"patch": [
"diff --git a/slice-literals.go b/slice-literals.go",
"index 4555163..39a2067 100644",
"--- a/slice-literals.go",
"+++ b/slice-literals.go",
"@@ -1,8 +1,8 @@",
"-const s1 = []string{\"sup\"}",
"-const s2 = []string{\"hello\"}",
"+const s1 = []string{}",
"+const s2 = []string{\"hi\"}",
" const s3 = []string{",
"-\"bar\",",
"- \"baz\",",
"+\"hi\",",
"+ \"hello\",",
" }",
" const s1 = []string{}",
" const s2 = []string{\"hi\"}"
],
"gitDir": "test/corpus/repos/go",
"shas": "a4a9915dd92184927a4389fbd0e1974b77768a92..0282fa8fe4e3f3c10056781a58fb727d33a1a18a"
}
,{
"testCaseDescription": "go-slice-literals-replacement-test",
"expectedResult": {
"changes": {
"slice-literals.go": [
{
"span": {
"replace": [
{
"start": [
1,
20
],
"end": [
1,
22
]
},
{
"start": [
1,
21
],
"end": [
1,
26
]
}
]
},
"summary": "Replaced the '{}' literal_value with the \"sup\" string in the s1 variable"
},
{
"span": {
"replace": [
{
"start": [
2,
21
],
"end": [
2,
25
]
},
{
"start": [
2,
21
],
"end": [
2,
28
]
}
]
},
"summary": "Replaced the \"hi\" string with the \"hello\" string in the s2 variable"
},
{
"span": {
"replace": [
{
"start": [
4,
1
],
"end": [
4,
5
]
},
{
"start": [
4,
1
],
"end": [
4,
6
]
}
]
},
"summary": "Replaced the \"hi\" string with the \"bar\" string in the s3 variable"
},
{
"span": {
"replace": [
{
"start": [
5,
2
],
"end": [
5,
9
]
},
{
"start": [
5,
2
],
"end": [
5,
7
]
}
]
},
"summary": "Replaced the \"hello\" string with the \"baz\" string in the s3 variable"
}
]
},
"errors": {}
},
"filePaths": [
"slice-literals.go"
],
"patch": [
"diff --git a/slice-literals.go b/slice-literals.go",
"index 39a2067..4555163 100644",
"--- a/slice-literals.go",
"+++ b/slice-literals.go",
"@@ -1,8 +1,8 @@",
"-const s1 = []string{}",
"-const s2 = []string{\"hi\"}",
"+const s1 = []string{\"sup\"}",
"+const s2 = []string{\"hello\"}",
" const s3 = []string{",
"-\"hi\",",
"- \"hello\",",
"+\"bar\",",
"+ \"baz\",",
" }",
" const s1 = []string{}",
" const s2 = []string{\"hi\"}"
],
"gitDir": "test/corpus/repos/go",
"shas": "0282fa8fe4e3f3c10056781a58fb727d33a1a18a..d138dd59f8a7d676ba1093b8c2e90849bee1fa71"
}
,{
"testCaseDescription": "go-slice-literals-delete-replacement-test",
"expectedResult": {
"changes": {
"slice-literals.go": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
1,
27
]
}
},
"summary": "Deleted the 's1' variable"
},
{
"span": {
"delete": {
"start": [
2,
1
],
"end": [
2,
29
]
}
},
"summary": "Deleted the 's2' variable"
},
{
"span": {
"delete": {
"start": [
3,
1
],
"end": [
6,
2
]
}
},
"summary": "Deleted the 's3' variable"
},
{
"span": {
"delete": {
"start": [
7,
1
],
"end": [
7,
22
]
}
},
"summary": "Deleted the 's1' variable"
},
{
"span": {
"delete": {
"start": [
8,
1
],
"end": [
8,
26
]
}
},
"summary": "Deleted the 's2' variable"
},
{
"span": {
"delete": {
"start": [
9,
1
],
"end": [
12,
2
]
}
},
"summary": "Deleted the 's3' variable"
},
{
"span": {
"insert": {
"start": [
7,
1
],
"end": [
7,
27
]
}
},
"summary": "Added the 's1' variable"
},
{
"span": {
"insert": {
"start": [
8,
1
],
"end": [
8,
29
]
}
},
"summary": "Added the 's2' variable"
},
{
"span": {
"insert": {
"start": [
9,
1
],
"end": [
12,
2
]
}
},
"summary": "Added the 's3' variable"
}
]
},
"errors": {}
},
"filePaths": [
"slice-literals.go"
],
"patch": [
"diff --git a/slice-literals.go b/slice-literals.go",
"index 4555163..d3fb29c 100644",
"--- a/slice-literals.go",
"+++ b/slice-literals.go",
"@@ -1,18 +1,12 @@",
"-const s1 = []string{\"sup\"}",
"-const s2 = []string{\"hello\"}",
"-const s3 = []string{",
"-\"bar\",",
"- \"baz\",",
"-}",
" const s1 = []string{}",
" const s2 = []string{\"hi\"}",
" const s3 = []string{",
" \"hi\",",
" \"hello\",",
" }",
"-const s1 = []string{}",
"-const s2 = []string{\"hi\"}",
"+const s1 = []string{\"sup\"}",
"+const s2 = []string{\"hello\"}",
" const s3 = []string{",
"-\"hi\",",
"- \"hello\",",
"+\"bar\",",
"+ \"baz\",",
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "d138dd59f8a7d676ba1093b8c2e90849bee1fa71..d622ba9f0003a2f9365e0b842a9228352c6901d0"
}
,{
"testCaseDescription": "go-slice-literals-delete-test",
"expectedResult": {
"changes": {
"slice-literals.go": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
1,
22
]
}
},
"summary": "Deleted the 's1' variable"
},
{
"span": {
"delete": {
"start": [
2,
1
],
"end": [
2,
26
]
}
},
"summary": "Deleted the 's2' variable"
},
{
"span": {
"delete": {
"start": [
3,
1
],
"end": [
6,
2
]
}
},
"summary": "Deleted the 's3' variable"
}
]
},
"errors": {}
},
"filePaths": [
"slice-literals.go"
],
"patch": [
"diff --git a/slice-literals.go b/slice-literals.go",
"index d3fb29c..e3fd378 100644",
"--- a/slice-literals.go",
"+++ b/slice-literals.go",
"@@ -1,9 +1,3 @@",
"-const s1 = []string{}",
"-const s2 = []string{\"hi\"}",
"-const s3 = []string{",
"-\"hi\",",
"- \"hello\",",
"-}",
" const s1 = []string{\"sup\"}",
" const s2 = []string{\"hello\"}",
" const s3 = []string{"
],
"gitDir": "test/corpus/repos/go",
"shas": "d622ba9f0003a2f9365e0b842a9228352c6901d0..f7c615e0b5706efe9897ef9cc6f52b57201561f5"
}
,{
"testCaseDescription": "go-slice-literals-delete-rest-test",
"expectedResult": {
"changes": {
"slice-literals.go": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
1,
27
]
}
},
"summary": "Deleted the 's1' variable"
},
{
"span": {
"delete": {
"start": [
2,
1
],
"end": [
2,
29
]
}
},
"summary": "Deleted the 's2' variable"
},
{
"span": {
"delete": {
"start": [
3,
1
],
"end": [
6,
2
]
}
},
"summary": "Deleted the 's3' variable"
}
]
},
"errors": {}
},
"filePaths": [
"slice-literals.go"
],
"patch": [
"diff --git a/slice-literals.go b/slice-literals.go",
"index e3fd378..e69de29 100644",
"--- a/slice-literals.go",
"+++ b/slice-literals.go",
"@@ -1,6 +0,0 @@",
"-const s1 = []string{\"sup\"}",
"-const s2 = []string{\"hello\"}",
"-const s3 = []string{",
"-\"bar\",",
"- \"baz\",",
"-}"
],
"gitDir": "test/corpus/repos/go",
"shas": "f7c615e0b5706efe9897ef9cc6f52b57201561f5..6d1ce7698c0643e9ec216b0c91910e196f3146e1"
}]