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/struct-literals.json

1013 lines
36 KiB
JSON

[{
"testCaseDescription": "go-struct-literals-insert-test",
"expectedResult": {
"changes": {
"struct-literals.go": [
{
"span": {
"insert": {
"start": [
3,
1
],
"end": [
6,
2
]
}
},
"summary": "Added the 'const s1 = Person{\nname: \"Frank\",\nAge: \"5 months\",\n}' variable"
},
{
"span": {
"insert": {
"start": [
7,
1
],
"end": [
7,
32
]
}
},
"summary": "Added the 'const s2 = struct{i int;}{i: 5}' variable"
},
{
"span": {
"insert": {
"start": [
8,
1
],
"end": [
8,
23
]
}
},
"summary": "Added the 'const s3 = time.Time{}' variable"
}
]
},
"errors": {}
},
"filePaths": [
"struct-literals.go"
],
"sha1": "2a84ca72f3317af6335480d69f4b155e133a4a3f",
"gitDir": "test/corpus/repos/go",
"sha2": "663e9e5b3391e7939860e7e5929e2d6069a68ddb"
}
,{
"testCaseDescription": "go-struct-literals-replacement-insert-test",
"expectedResult": {
"changes": {
"struct-literals.go": [
{
"span": {
"insert": {
"start": [
3,
1
],
"end": [
6,
2
]
}
},
"summary": "Added the 'const s1 = Dog{\nname: \"Frank\",\nAge: \"5 months\",\n}' variable"
},
{
"span": {
"insert": {
"start": [
7,
1
],
"end": [
7,
34
]
}
},
"summary": "Added the 'const s2 = struct{i float;}{j: 6}' variable"
},
{
"span": {
"insert": {
"start": [
8,
1
],
"end": [
8,
24
]
}
},
"summary": "Added the 'const s3 = time.Month{}' variable"
},
{
"span": {
"insert": {
"start": [
9,
1
],
"end": [
12,
2
]
}
},
"summary": "Added the 'const s1 = Person{\nname: \"Frank\",\nAge: \"5 months\",\n}' variable"
},
{
"span": {
"insert": {
"start": [
13,
1
],
"end": [
13,
32
]
}
},
"summary": "Added the 'const s2 = struct{i int;}{i: 5}' variable"
},
{
"span": {
"insert": {
"start": [
14,
1
],
"end": [
14,
23
]
}
},
"summary": "Added the 'const s3 = time.Time{}' variable"
}
]
},
"errors": {}
},
"filePaths": [
"struct-literals.go"
],
"sha1": "663e9e5b3391e7939860e7e5929e2d6069a68ddb",
"gitDir": "test/corpus/repos/go",
"sha2": "36edff92e06a0593f40c5b31ab1ac742aaae8594"
}
,{
"testCaseDescription": "go-struct-literals-delete-insert-test",
"expectedResult": {
"changes": {
"struct-literals.go": [
{
"span": {
"replace": [
{
"start": [
3,
12
],
"end": [
3,
15
]
},
{
"start": [
3,
12
],
"end": [
3,
18
]
}
]
},
"summary": "Replaced the 'Dog' identifier with the 'Person' identifier in the const s1 = Person{\nname: \"Frank\",\nAge: \"5 months\",\n} variable of the 'main' module"
},
{
"span": {
"replace": [
{
"start": [
3,
12
],
"end": [
3,
15
]
},
{
"start": [
3,
12
],
"end": [
3,
18
]
}
]
},
"summary": "Replaced the 'Dog' identifier with the 'Person' identifier in the const s1 = Person{\nname: \"Frank\",\nAge: \"5 months\",\n} variable of the 'main' module"
},
{
"span": {
"replace": [
{
"start": [
7,
21
],
"end": [
7,
26
]
},
{
"start": [
7,
21
],
"end": [
7,
24
]
}
]
},
"summary": "Replaced the 'float' identifier with the 'int' identifier in the const s2 = struct{i int;}{i: 5} variable of the 'main' module"
},
{
"span": {
"replace": [
{
"start": [
7,
29
],
"end": [
7,
30
]
},
{
"start": [
7,
27
],
"end": [
7,
28
]
}
]
},
"summary": "Replaced the 'j' identifier with the 'i' identifier in the const s2 = struct{i int;}{i: 5} variable of the 'main' module"
},
{
"span": {
"replace": [
{
"start": [
7,
32
],
"end": [
7,
33
]
},
{
"start": [
7,
30
],
"end": [
7,
31
]
}
]
},
"summary": "Replaced '6' with '5' in the const s2 = struct{i int;}{i: 5} variable of the 'main' module"
},
{
"span": {
"replace": [
{
"start": [
7,
21
],
"end": [
7,
26
]
},
{
"start": [
7,
21
],
"end": [
7,
24
]
}
]
},
"summary": "Replaced the 'float' identifier with the 'int' identifier in the const s2 = struct{i int;}{i: 5} variable of the 'main' module"
},
{
"span": {
"replace": [
{
"start": [
7,
29
],
"end": [
7,
30
]
},
{
"start": [
7,
27
],
"end": [
7,
28
]
}
]
},
"summary": "Replaced the 'j' identifier with the 'i' identifier in the const s2 = struct{i int;}{i: 5} variable of the 'main' module"
},
{
"span": {
"replace": [
{
"start": [
7,
32
],
"end": [
7,
33
]
},
{
"start": [
7,
30
],
"end": [
7,
31
]
}
]
},
"summary": "Replaced '6' with '5' in the const s2 = struct{i int;}{i: 5} variable of the 'main' module"
},
{
"span": {
"replace": [
{
"start": [
8,
17
],
"end": [
8,
22
]
},
{
"start": [
8,
17
],
"end": [
8,
21
]
}
]
},
"summary": "Replaced the 'Month' identifier with the 'Time' identifier in the const s3 = time.Time{} variable of the 'main' module"
},
{
"span": {
"replace": [
{
"start": [
8,
17
],
"end": [
8,
22
]
},
{
"start": [
8,
17
],
"end": [
8,
21
]
}
]
},
"summary": "Replaced the 'Month' identifier with the 'Time' identifier in the const s3 = time.Time{} variable of the 'main' module"
}
]
},
"errors": {}
},
"filePaths": [
"struct-literals.go"
],
"sha1": "36edff92e06a0593f40c5b31ab1ac742aaae8594",
"gitDir": "test/corpus/repos/go",
"sha2": "13492e5b1cf9fede215b1a4c8f7fac86ebbb9e39"
}
,{
"testCaseDescription": "go-struct-literals-replacement-test",
"expectedResult": {
"changes": {
"struct-literals.go": [
{
"span": {
"replace": [
{
"start": [
3,
12
],
"end": [
3,
18
]
},
{
"start": [
3,
12
],
"end": [
3,
15
]
}
]
},
"summary": "Replaced the 'Person' identifier with the 'Dog' identifier in the const s1 = Dog{\nname: \"Frank\",\nAge: \"5 months\",\n} variable of the 'main' module"
},
{
"span": {
"replace": [
{
"start": [
3,
12
],
"end": [
3,
18
]
},
{
"start": [
3,
12
],
"end": [
3,
15
]
}
]
},
"summary": "Replaced the 'Person' identifier with the 'Dog' identifier in the const s1 = Dog{\nname: \"Frank\",\nAge: \"5 months\",\n} variable of the 'main' module"
},
{
"span": {
"replace": [
{
"start": [
7,
21
],
"end": [
7,
24
]
},
{
"start": [
7,
21
],
"end": [
7,
26
]
}
]
},
"summary": "Replaced the 'int' identifier with the 'float' identifier in the const s2 = struct{i float;}{j: 6} variable of the 'main' module"
},
{
"span": {
"replace": [
{
"start": [
7,
27
],
"end": [
7,
28
]
},
{
"start": [
7,
29
],
"end": [
7,
30
]
}
]
},
"summary": "Replaced the 'i' identifier with the 'j' identifier in the const s2 = struct{i float;}{j: 6} variable of the 'main' module"
},
{
"span": {
"replace": [
{
"start": [
7,
30
],
"end": [
7,
31
]
},
{
"start": [
7,
32
],
"end": [
7,
33
]
}
]
},
"summary": "Replaced '5' with '6' in the const s2 = struct{i float;}{j: 6} variable of the 'main' module"
},
{
"span": {
"replace": [
{
"start": [
7,
21
],
"end": [
7,
24
]
},
{
"start": [
7,
21
],
"end": [
7,
26
]
}
]
},
"summary": "Replaced the 'int' identifier with the 'float' identifier in the const s2 = struct{i float;}{j: 6} variable of the 'main' module"
},
{
"span": {
"replace": [
{
"start": [
7,
27
],
"end": [
7,
28
]
},
{
"start": [
7,
29
],
"end": [
7,
30
]
}
]
},
"summary": "Replaced the 'i' identifier with the 'j' identifier in the const s2 = struct{i float;}{j: 6} variable of the 'main' module"
},
{
"span": {
"replace": [
{
"start": [
7,
30
],
"end": [
7,
31
]
},
{
"start": [
7,
32
],
"end": [
7,
33
]
}
]
},
"summary": "Replaced '5' with '6' in the const s2 = struct{i float;}{j: 6} variable of the 'main' module"
},
{
"span": {
"replace": [
{
"start": [
8,
17
],
"end": [
8,
21
]
},
{
"start": [
8,
17
],
"end": [
8,
22
]
}
]
},
"summary": "Replaced the 'Time' identifier with the 'Month' identifier in the const s3 = time.Month{} variable of the 'main' module"
},
{
"span": {
"replace": [
{
"start": [
8,
17
],
"end": [
8,
21
]
},
{
"start": [
8,
17
],
"end": [
8,
22
]
}
]
},
"summary": "Replaced the 'Time' identifier with the 'Month' identifier in the const s3 = time.Month{} variable of the 'main' module"
}
]
},
"errors": {}
},
"filePaths": [
"struct-literals.go"
],
"sha1": "13492e5b1cf9fede215b1a4c8f7fac86ebbb9e39",
"gitDir": "test/corpus/repos/go",
"sha2": "408b253417f296ca55acbfaf836f22fdbcb4cac8"
}
,{
"testCaseDescription": "go-struct-literals-delete-replacement-test",
"expectedResult": {
"changes": {
"struct-literals.go": [
{
"span": {
"delete": {
"start": [
3,
1
],
"end": [
6,
2
]
}
},
"summary": "Deleted the 'const s1 = Dog{\nname: \"Frank\",\nAge: \"5 months\",\n}' variable"
},
{
"span": {
"delete": {
"start": [
7,
1
],
"end": [
7,
34
]
}
},
"summary": "Deleted the 'const s2 = struct{i float;}{j: 6}' variable"
},
{
"span": {
"delete": {
"start": [
8,
1
],
"end": [
8,
24
]
}
},
"summary": "Deleted the 'const s3 = time.Month{}' variable"
},
{
"span": {
"delete": {
"start": [
9,
1
],
"end": [
12,
2
]
}
},
"summary": "Deleted the 'const s1 = Person{\nname: \"Frank\",\nAge: \"5 months\",\n}' variable"
},
{
"span": {
"delete": {
"start": [
13,
1
],
"end": [
13,
32
]
}
},
"summary": "Deleted the 'const s2 = struct{i int;}{i: 5}' variable"
},
{
"span": {
"delete": {
"start": [
14,
1
],
"end": [
14,
23
]
}
},
"summary": "Deleted the 'const s3 = time.Time{}' variable"
},
{
"span": {
"insert": {
"start": [
9,
1
],
"end": [
12,
2
]
}
},
"summary": "Added the 'const s1 = Dog{\nname: \"Frank\",\nAge: \"5 months\",\n}' variable"
},
{
"span": {
"insert": {
"start": [
13,
1
],
"end": [
13,
34
]
}
},
"summary": "Added the 'const s2 = struct{i float;}{j: 6}' variable"
},
{
"span": {
"insert": {
"start": [
14,
1
],
"end": [
14,
24
]
}
},
"summary": "Added the 'const s3 = time.Month{}' variable"
}
]
},
"errors": {}
},
"filePaths": [
"struct-literals.go"
],
"sha1": "408b253417f296ca55acbfaf836f22fdbcb4cac8",
"gitDir": "test/corpus/repos/go",
"sha2": "5cc421acb78b392c5a6b2e8c65b8296b84bac07d"
}
,{
"testCaseDescription": "go-struct-literals-delete-test",
"expectedResult": {
"changes": {
"struct-literals.go": [
{
"span": {
"delete": {
"start": [
3,
1
],
"end": [
6,
2
]
}
},
"summary": "Deleted the 'const s1 = Person{\nname: \"Frank\",\nAge: \"5 months\",\n}' variable"
},
{
"span": {
"delete": {
"start": [
7,
1
],
"end": [
7,
32
]
}
},
"summary": "Deleted the 'const s2 = struct{i int;}{i: 5}' variable"
},
{
"span": {
"delete": {
"start": [
8,
1
],
"end": [
8,
23
]
}
},
"summary": "Deleted the 'const s3 = time.Time{}' variable"
}
]
},
"errors": {}
},
"filePaths": [
"struct-literals.go"
],
"sha1": "5cc421acb78b392c5a6b2e8c65b8296b84bac07d",
"gitDir": "test/corpus/repos/go",
"sha2": "408ca3761e659f2264ceaa8e993272497ac06edd"
}
,{
"testCaseDescription": "go-struct-literals-delete-rest-test",
"expectedResult": {
"changes": {
"struct-literals.go": [
{
"span": {
"delete": {
"start": [
3,
1
],
"end": [
6,
2
]
}
},
"summary": "Deleted the 'const s1 = Dog{\nname: \"Frank\",\nAge: \"5 months\",\n}' variable"
},
{
"span": {
"delete": {
"start": [
7,
1
],
"end": [
7,
34
]
}
},
"summary": "Deleted the 'const s2 = struct{i float;}{j: 6}' variable"
},
{
"span": {
"delete": {
"start": [
8,
1
],
"end": [
8,
24
]
}
},
"summary": "Deleted the 'const s3 = time.Month{}' variable"
}
]
},
"errors": {}
},
"filePaths": [
"struct-literals.go"
],
"sha1": "408ca3761e659f2264ceaa8e993272497ac06edd",
"gitDir": "test/corpus/repos/go",
"sha2": "ed8d39e3da1d734318a28b270ae0622437b84e21"
}]