1
1
mirror of https://github.com/github/semantic.git synced 2024-12-24 23:42:31 +03:00
semantic/test/corpus/diff-summaries/go/slice-literals.json

830 lines
28 KiB
JSON

[{
"testCaseDescription": "go-slice-literals-insert-test",
"expectedResult": {
"changes": {
"slice-literals.go": [
{
"span": {
"insert": {
"start": [
3,
1
],
"end": [
3,
22
]
}
},
"summary": "Added the 'const s1 = []string{}' variable"
},
{
"span": {
"insert": {
"start": [
4,
1
],
"end": [
4,
26
]
}
},
"summary": "Added the 'const s2 = []string{\"hi\"}' variable"
},
{
"span": {
"insert": {
"start": [
5,
1
],
"end": [
8,
2
]
}
},
"summary": "Added the 'const s3 = []string{\n\"hi\",\n \"hello\",\n}' variable"
}
]
},
"errors": {}
},
"filePaths": [
"slice-literals.go"
],
"sha1": "d30b530285e291c61e905294debc16aef5899d90",
"gitDir": "test/corpus/repos/go",
"sha2": "606eacb816f45e75fe5dc75368f2b4f143e9862b"
}
,{
"testCaseDescription": "go-slice-literals-replacement-insert-test",
"expectedResult": {
"changes": {
"slice-literals.go": [
{
"span": {
"insert": {
"start": [
3,
1
],
"end": [
3,
27
]
}
},
"summary": "Added the 'const s1 = []string{\"sup\"}' variable"
},
{
"span": {
"insert": {
"start": [
4,
1
],
"end": [
4,
29
]
}
},
"summary": "Added the 'const s2 = []string{\"hello\"}' variable"
},
{
"span": {
"insert": {
"start": [
5,
1
],
"end": [
8,
2
]
}
},
"summary": "Added the 'const s3 = []string{\n\"bar\",\n \"baz\",\n}' variable"
},
{
"span": {
"insert": {
"start": [
9,
1
],
"end": [
9,
22
]
}
},
"summary": "Added the 'const s1 = []string{}' variable"
},
{
"span": {
"insert": {
"start": [
10,
1
],
"end": [
10,
26
]
}
},
"summary": "Added the 'const s2 = []string{\"hi\"}' variable"
},
{
"span": {
"insert": {
"start": [
11,
1
],
"end": [
14,
2
]
}
},
"summary": "Added the 'const s3 = []string{\n\"hi\",\n \"hello\",\n}' variable"
}
]
},
"errors": {}
},
"filePaths": [
"slice-literals.go"
],
"sha1": "606eacb816f45e75fe5dc75368f2b4f143e9862b",
"gitDir": "test/corpus/repos/go",
"sha2": "67b638bb5af9c437535e4d889cdc6f23e4f0a2e6"
}
,{
"testCaseDescription": "go-slice-literals-delete-insert-test",
"expectedResult": {
"changes": {
"slice-literals.go": [
{
"span": {
"insert": {
"start": [
3,
1
],
"end": [
3,
22
]
}
},
"summary": "Added the 'const s1 = []string{}' variable"
},
{
"span": {
"replace": [
{
"start": [
3,
7
],
"end": [
3,
9
]
},
{
"start": [
4,
7
],
"end": [
4,
9
]
}
]
},
"summary": "Replaced the 's1' identifier with the 's2' identifier in the const s2 = []string{\"hi\"} variable of the 'main' module"
},
{
"span": {
"replace": [
{
"start": [
3,
21
],
"end": [
3,
26
]
},
{
"start": [
4,
21
],
"end": [
4,
25
]
}
]
},
"summary": "Replaced the \"sup\" string with the \"hi\" string in the const s2 = []string{\"hi\"} variable of the 'main' module"
},
{
"span": {
"replace": [
{
"start": [
3,
21
],
"end": [
3,
26
]
},
{
"start": [
4,
21
],
"end": [
4,
25
]
}
]
},
"summary": "Replaced the \"sup\" string with the \"hi\" string in the const s2 = []string{\"hi\"} variable of the 'main' module"
},
{
"span": {
"insert": {
"start": [
5,
1
],
"end": [
8,
2
]
}
},
"summary": "Added the 'const s3 = []string{\n\"hi\",\n \"hello\",\n}' variable"
},
{
"span": {
"delete": {
"start": [
4,
1
],
"end": [
4,
29
]
}
},
"summary": "Deleted the 'const s2 = []string{\"hello\"}' variable"
},
{
"span": {
"delete": {
"start": [
5,
1
],
"end": [
8,
2
]
}
},
"summary": "Deleted the 'const s3 = []string{\n\"bar\",\n \"baz\",\n}' variable"
}
]
},
"errors": {}
},
"filePaths": [
"slice-literals.go"
],
"sha1": "67b638bb5af9c437535e4d889cdc6f23e4f0a2e6",
"gitDir": "test/corpus/repos/go",
"sha2": "740445f8cd0fd6fbd098cd3391c70e7795fef0cc"
}
,{
"testCaseDescription": "go-slice-literals-replacement-test",
"expectedResult": {
"changes": {
"slice-literals.go": [
{
"span": {
"replace": [
{
"start": [
3,
20
],
"end": [
3,
22
]
},
{
"start": [
3,
21
],
"end": [
3,
26
]
}
]
},
"summary": "Replaced the '{}' literal_value with the \"sup\" string in the const s1 = []string{\"sup\"} variable of the 'main' module"
},
{
"span": {
"replace": [
{
"start": [
3,
20
],
"end": [
3,
22
]
},
{
"start": [
3,
21
],
"end": [
3,
26
]
}
]
},
"summary": "Replaced the '{}' literal_value with the \"sup\" string in the const s1 = []string{\"sup\"} variable of the 'main' module"
},
{
"span": {
"replace": [
{
"start": [
4,
21
],
"end": [
4,
25
]
},
{
"start": [
4,
21
],
"end": [
4,
28
]
}
]
},
"summary": "Replaced the \"hi\" string with the \"hello\" string in the const s2 = []string{\"hello\"} variable of the 'main' module"
},
{
"span": {
"replace": [
{
"start": [
4,
21
],
"end": [
4,
25
]
},
{
"start": [
4,
21
],
"end": [
4,
28
]
}
]
},
"summary": "Replaced the \"hi\" string with the \"hello\" string in the const s2 = []string{\"hello\"} variable of the 'main' module"
},
{
"span": {
"replace": [
{
"start": [
6,
1
],
"end": [
6,
5
]
},
{
"start": [
6,
1
],
"end": [
6,
6
]
}
]
},
"summary": "Replaced the \"hi\" string with the \"bar\" string in the const s3 = []string{\n\"bar\",\n \"baz\",\n} variable of the 'main' module"
},
{
"span": {
"replace": [
{
"start": [
7,
2
],
"end": [
7,
9
]
},
{
"start": [
7,
2
],
"end": [
7,
7
]
}
]
},
"summary": "Replaced the \"hello\" string with the \"baz\" string in the const s3 = []string{\n\"bar\",\n \"baz\",\n} variable of the 'main' module"
},
{
"span": {
"replace": [
{
"start": [
6,
1
],
"end": [
6,
5
]
},
{
"start": [
6,
1
],
"end": [
6,
6
]
}
]
},
"summary": "Replaced the \"hi\" string with the \"bar\" string in the const s3 = []string{\n\"bar\",\n \"baz\",\n} variable of the 'main' module"
},
{
"span": {
"replace": [
{
"start": [
7,
2
],
"end": [
7,
9
]
},
{
"start": [
7,
2
],
"end": [
7,
7
]
}
]
},
"summary": "Replaced the \"hello\" string with the \"baz\" string in the const s3 = []string{\n\"bar\",\n \"baz\",\n} variable of the 'main' module"
}
]
},
"errors": {}
},
"filePaths": [
"slice-literals.go"
],
"sha1": "740445f8cd0fd6fbd098cd3391c70e7795fef0cc",
"gitDir": "test/corpus/repos/go",
"sha2": "676657bca8b8d1ef701ea338b3a4b2ba5c3165d1"
}
,{
"testCaseDescription": "go-slice-literals-delete-replacement-test",
"expectedResult": {
"changes": {
"slice-literals.go": [
{
"span": {
"delete": {
"start": [
3,
1
],
"end": [
3,
27
]
}
},
"summary": "Deleted the 'const s1 = []string{\"sup\"}' variable"
},
{
"span": {
"delete": {
"start": [
4,
1
],
"end": [
4,
29
]
}
},
"summary": "Deleted the 'const s2 = []string{\"hello\"}' variable"
},
{
"span": {
"delete": {
"start": [
5,
1
],
"end": [
8,
2
]
}
},
"summary": "Deleted the 'const s3 = []string{\n\"bar\",\n \"baz\",\n}' variable"
},
{
"span": {
"delete": {
"start": [
9,
1
],
"end": [
9,
22
]
}
},
"summary": "Deleted the 'const s1 = []string{}' variable"
},
{
"span": {
"delete": {
"start": [
10,
1
],
"end": [
10,
26
]
}
},
"summary": "Deleted the 'const s2 = []string{\"hi\"}' variable"
},
{
"span": {
"delete": {
"start": [
11,
1
],
"end": [
14,
2
]
}
},
"summary": "Deleted the 'const s3 = []string{\n\"hi\",\n \"hello\",\n}' variable"
},
{
"span": {
"insert": {
"start": [
9,
1
],
"end": [
9,
27
]
}
},
"summary": "Added the 'const s1 = []string{\"sup\"}' variable"
},
{
"span": {
"insert": {
"start": [
10,
1
],
"end": [
10,
29
]
}
},
"summary": "Added the 'const s2 = []string{\"hello\"}' variable"
},
{
"span": {
"insert": {
"start": [
11,
1
],
"end": [
14,
2
]
}
},
"summary": "Added the 'const s3 = []string{\n\"bar\",\n \"baz\",\n}' variable"
}
]
},
"errors": {}
},
"filePaths": [
"slice-literals.go"
],
"sha1": "676657bca8b8d1ef701ea338b3a4b2ba5c3165d1",
"gitDir": "test/corpus/repos/go",
"sha2": "685a5760201d45711f3bee97a3b280142d23e3f5"
}
,{
"testCaseDescription": "go-slice-literals-delete-test",
"expectedResult": {
"changes": {
"slice-literals.go": [
{
"span": {
"delete": {
"start": [
3,
1
],
"end": [
3,
22
]
}
},
"summary": "Deleted the 'const s1 = []string{}' variable"
},
{
"span": {
"delete": {
"start": [
4,
1
],
"end": [
4,
26
]
}
},
"summary": "Deleted the 'const s2 = []string{\"hi\"}' variable"
},
{
"span": {
"delete": {
"start": [
5,
1
],
"end": [
8,
2
]
}
},
"summary": "Deleted the 'const s3 = []string{\n\"hi\",\n \"hello\",\n}' variable"
}
]
},
"errors": {}
},
"filePaths": [
"slice-literals.go"
],
"sha1": "685a5760201d45711f3bee97a3b280142d23e3f5",
"gitDir": "test/corpus/repos/go",
"sha2": "9499dbe6667807f32102339e95f518bb258fd077"
}
,{
"testCaseDescription": "go-slice-literals-delete-rest-test",
"expectedResult": {
"changes": {
"slice-literals.go": [
{
"span": {
"delete": {
"start": [
3,
1
],
"end": [
3,
27
]
}
},
"summary": "Deleted the 'const s1 = []string{\"sup\"}' variable"
},
{
"span": {
"delete": {
"start": [
4,
1
],
"end": [
4,
29
]
}
},
"summary": "Deleted the 'const s2 = []string{\"hello\"}' variable"
},
{
"span": {
"delete": {
"start": [
5,
1
],
"end": [
8,
2
]
}
},
"summary": "Deleted the 'const s3 = []string{\n\"bar\",\n \"baz\",\n}' variable"
}
]
},
"errors": {}
},
"filePaths": [
"slice-literals.go"
],
"sha1": "9499dbe6667807f32102339e95f518bb258fd077",
"gitDir": "test/corpus/repos/go",
"sha2": "8c85c91b7af89c811cad3055e5b6c870fb9b6b9d"
}]