1
1
mirror of https://github.com/github/semantic.git synced 2024-12-25 16:02:43 +03:00
semantic/test/corpus/diff-summaries/go/struct-literals.json

866 lines
28 KiB
JSON
Raw Normal View History

2016-11-02 21:37:30 +03:00
[{
"testCaseDescription": "go-struct-literals-insert-test",
"expectedResult": {
"changes": {
"struct-literals.go": [
{
"span": {
"insert": {
"start": [
2016-11-11 00:19:53 +03:00
1,
2016-11-02 21:37:30 +03:00
1
],
"end": [
2016-11-11 00:19:53 +03:00
4,
2016-11-02 21:37:30 +03:00
2
]
}
},
"summary": "Added the 's1' variable"
2016-11-02 21:37:30 +03:00
},
{
"span": {
"insert": {
"start": [
2016-11-11 00:19:53 +03:00
5,
2016-11-02 21:37:30 +03:00
1
],
"end": [
2016-11-11 00:19:53 +03:00
5,
2016-11-02 21:37:30 +03:00
32
]
}
},
"summary": "Added the 's2' variable"
2016-11-02 21:37:30 +03:00
},
{
"span": {
"insert": {
"start": [
2016-11-11 00:19:53 +03:00
6,
2016-11-02 21:37:30 +03:00
1
],
"end": [
2016-11-11 00:19:53 +03:00
6,
2016-11-02 21:37:30 +03:00
23
]
}
},
"summary": "Added the 's3' variable"
2016-11-02 21:37:30 +03:00
}
]
},
"errors": {}
},
"filePaths": [
"struct-literals.go"
],
2016-11-11 00:19:53 +03:00
"patch": [
"diff --git a/struct-literals.go b/struct-literals.go",
"index e69de29..f949dbb 100644",
"--- a/struct-literals.go",
"+++ b/struct-literals.go",
"@@ -0,0 +1,6 @@",
"+const s1 = Person{",
"+name: \"Frank\",",
"+Age: \"5 months\",",
"+}",
"+const s2 = struct{i int;}{i: 5}",
"+const s3 = time.Time{}"
],
2016-11-02 21:37:30 +03:00
"gitDir": "test/corpus/repos/go",
2016-11-21 22:39:16 +03:00
"shas": "91ef7591f827fd0486806d3ebffd2d5aca667fc4..af1893249ab817841c2e8d3ef543005b90e87542"
2016-11-02 21:37:30 +03:00
}
,{
"testCaseDescription": "go-struct-literals-replacement-insert-test",
"expectedResult": {
"changes": {
"struct-literals.go": [
{
"span": {
"insert": {
"start": [
2016-11-11 00:19:53 +03:00
1,
2016-11-02 21:37:30 +03:00
1
],
"end": [
2016-11-11 00:19:53 +03:00
4,
2016-11-02 21:37:30 +03:00
2
]
}
},
"summary": "Added the 's1' variable"
2016-11-02 21:37:30 +03:00
},
{
"span": {
"insert": {
"start": [
2016-11-11 00:19:53 +03:00
5,
2016-11-02 21:37:30 +03:00
1
],
"end": [
2016-11-11 00:19:53 +03:00
5,
2016-11-02 21:37:30 +03:00
34
]
}
},
"summary": "Added the 's2' variable"
2016-11-02 21:37:30 +03:00
},
{
"span": {
"insert": {
"start": [
2016-11-11 00:19:53 +03:00
6,
2016-11-02 21:37:30 +03:00
1
],
"end": [
2016-11-11 00:19:53 +03:00
6,
2016-11-02 21:37:30 +03:00
24
]
}
},
"summary": "Added the 's3' variable"
2016-11-02 21:37:30 +03:00
},
{
"span": {
"insert": {
"start": [
2016-11-11 00:19:53 +03:00
7,
2016-11-02 21:37:30 +03:00
1
],
"end": [
2016-11-11 00:19:53 +03:00
10,
2016-11-02 21:37:30 +03:00
2
]
}
},
"summary": "Added the 's1' variable"
2016-11-02 21:37:30 +03:00
},
{
"span": {
"insert": {
"start": [
2016-11-11 00:19:53 +03:00
11,
2016-11-02 21:37:30 +03:00
1
],
"end": [
2016-11-11 00:19:53 +03:00
11,
2016-11-02 21:37:30 +03:00
32
]
}
},
"summary": "Added the 's2' variable"
2016-11-02 21:37:30 +03:00
},
{
"span": {
"insert": {
"start": [
2016-11-11 00:19:53 +03:00
12,
2016-11-02 21:37:30 +03:00
1
],
"end": [
2016-11-11 00:19:53 +03:00
12,
2016-11-02 21:37:30 +03:00
23
]
}
},
"summary": "Added the 's3' variable"
2016-11-02 21:37:30 +03:00
}
]
},
"errors": {}
},
"filePaths": [
"struct-literals.go"
],
2016-11-11 00:19:53 +03:00
"patch": [
"diff --git a/struct-literals.go b/struct-literals.go",
"index f949dbb..c6a242e 100644",
"--- a/struct-literals.go",
"+++ b/struct-literals.go",
"@@ -1,3 +1,15 @@",
"+const s1 = Dog{",
"+name: \"Frank\",",
"+Age: \"5 months\",",
"+}",
"+const s2 = struct{i float;}{j: 6}",
"+const s3 = time.Month{}",
"+const s1 = Person{",
"+name: \"Frank\",",
"+Age: \"5 months\",",
"+}",
"+const s2 = struct{i int;}{i: 5}",
"+const s3 = time.Time{}",
" const s1 = Person{",
" name: \"Frank\",",
" Age: \"5 months\","
],
2016-11-02 21:37:30 +03:00
"gitDir": "test/corpus/repos/go",
2016-11-21 22:39:16 +03:00
"shas": "af1893249ab817841c2e8d3ef543005b90e87542..3bd18ca3ae0f7fc34e51b201ee47d406cf407c83"
2016-11-02 21:37:30 +03:00
}
,{
"testCaseDescription": "go-struct-literals-delete-insert-test",
"expectedResult": {
"changes": {
"struct-literals.go": [
{
"span": {
"replace": [
{
"start": [
2016-11-11 00:19:53 +03:00
1,
2016-11-02 21:37:30 +03:00
12
],
"end": [
2016-11-11 00:19:53 +03:00
1,
2016-11-02 21:37:30 +03:00
15
]
},
{
"start": [
2016-11-11 00:19:53 +03:00
1,
2016-11-02 21:37:30 +03:00
12
],
"end": [
2016-11-11 00:19:53 +03:00
1,
2016-11-02 21:37:30 +03:00
18
]
}
]
},
2016-11-11 00:19:53 +03:00
"summary": "Replaced the 'Dog' identifier with the 'Person' identifier in the s1 variable"
2016-11-02 21:37:30 +03:00
},
{
"span": {
"replace": [
{
"start": [
2016-11-11 00:19:53 +03:00
5,
2016-11-02 21:37:30 +03:00
21
],
"end": [
2016-11-11 00:19:53 +03:00
5,
2016-11-02 21:37:30 +03:00
26
]
},
{
"start": [
2016-11-11 00:19:53 +03:00
5,
2016-11-02 21:37:30 +03:00
21
],
"end": [
2016-11-11 00:19:53 +03:00
5,
2016-11-02 21:37:30 +03:00
24
]
}
]
},
2016-11-11 00:19:53 +03:00
"summary": "Replaced the 'float' identifier with the 'int' identifier in the s2 variable"
2016-11-02 21:37:30 +03:00
},
{
"span": {
"replace": [
{
"start": [
2016-11-11 00:19:53 +03:00
5,
2016-11-02 21:37:30 +03:00
29
],
"end": [
2016-11-11 00:19:53 +03:00
5,
2016-11-02 21:37:30 +03:00
30
]
},
{
"start": [
2016-11-11 00:19:53 +03:00
5,
2016-11-02 21:37:30 +03:00
27
],
"end": [
2016-11-11 00:19:53 +03:00
5,
2016-11-02 21:37:30 +03:00
28
]
}
]
},
2016-11-11 00:19:53 +03:00
"summary": "Replaced the 'j' identifier with the 'i' identifier in the s2 variable"
2016-11-02 21:37:30 +03:00
},
{
"span": {
"replace": [
{
"start": [
2016-11-11 00:19:53 +03:00
5,
2016-11-02 21:37:30 +03:00
32
],
"end": [
2016-11-11 00:19:53 +03:00
5,
2016-11-02 21:37:30 +03:00
33
]
},
{
"start": [
2016-11-11 00:19:53 +03:00
5,
2016-11-02 21:37:30 +03:00
30
],
"end": [
2016-11-11 00:19:53 +03:00
5,
2016-11-02 21:37:30 +03:00
31
]
}
]
},
2016-11-11 00:19:53 +03:00
"summary": "Replaced '6' with '5' in the s2 variable"
2016-11-02 21:37:30 +03:00
},
{
"span": {
"replace": [
{
"start": [
2016-11-11 00:19:53 +03:00
6,
2016-11-02 21:37:30 +03:00
17
],
"end": [
2016-11-11 00:19:53 +03:00
6,
2016-11-02 21:37:30 +03:00
22
]
},
{
"start": [
2016-11-11 00:19:53 +03:00
6,
2016-11-02 21:37:30 +03:00
17
],
"end": [
2016-11-11 00:19:53 +03:00
6,
2016-11-02 21:37:30 +03:00
21
]
}
]
},
2016-11-11 00:19:53 +03:00
"summary": "Replaced the 'Month' identifier with the 'Time' identifier in the s3 variable"
2016-11-02 21:37:30 +03:00
}
]
},
"errors": {}
},
"filePaths": [
"struct-literals.go"
],
2016-11-11 00:19:53 +03:00
"patch": [
"diff --git a/struct-literals.go b/struct-literals.go",
"index c6a242e..680652e 100644",
"--- a/struct-literals.go",
"+++ b/struct-literals.go",
"@@ -1,9 +1,9 @@",
"-const s1 = Dog{",
"+const s1 = Person{",
" name: \"Frank\",",
" Age: \"5 months\",",
" }",
"-const s2 = struct{i float;}{j: 6}",
"-const s3 = time.Month{}",
"+const s2 = struct{i int;}{i: 5}",
"+const s3 = time.Time{}",
" const s1 = Person{",
" name: \"Frank\",",
" Age: \"5 months\","
],
2016-11-02 21:37:30 +03:00
"gitDir": "test/corpus/repos/go",
2016-11-21 22:39:16 +03:00
"shas": "3bd18ca3ae0f7fc34e51b201ee47d406cf407c83..64dadf57f923bfcf011025fd183879d00ac33805"
2016-11-02 21:37:30 +03:00
}
,{
"testCaseDescription": "go-struct-literals-replacement-test",
"expectedResult": {
"changes": {
"struct-literals.go": [
{
"span": {
"replace": [
{
"start": [
2016-11-11 00:19:53 +03:00
1,
2016-11-02 21:37:30 +03:00
12
],
"end": [
2016-11-11 00:19:53 +03:00
1,
2016-11-02 21:37:30 +03:00
18
]
},
{
"start": [
2016-11-11 00:19:53 +03:00
1,
2016-11-02 21:37:30 +03:00
12
],
"end": [
2016-11-11 00:19:53 +03:00
1,
2016-11-02 21:37:30 +03:00
15
]
}
]
},
2016-11-11 00:19:53 +03:00
"summary": "Replaced the 'Person' identifier with the 'Dog' identifier in the s1 variable"
2016-11-02 21:37:30 +03:00
},
{
"span": {
"replace": [
{
"start": [
2016-11-11 00:19:53 +03:00
5,
2016-11-02 21:37:30 +03:00
21
],
"end": [
2016-11-11 00:19:53 +03:00
5,
2016-11-02 21:37:30 +03:00
24
]
},
{
"start": [
2016-11-11 00:19:53 +03:00
5,
2016-11-02 21:37:30 +03:00
21
],
"end": [
2016-11-11 00:19:53 +03:00
5,
2016-11-02 21:37:30 +03:00
26
]
}
]
},
2016-11-11 00:19:53 +03:00
"summary": "Replaced the 'int' identifier with the 'float' identifier in the s2 variable"
2016-11-02 21:37:30 +03:00
},
{
"span": {
"replace": [
{
"start": [
2016-11-11 00:19:53 +03:00
5,
2016-11-02 21:37:30 +03:00
27
],
"end": [
2016-11-11 00:19:53 +03:00
5,
2016-11-02 21:37:30 +03:00
28
]
},
{
"start": [
2016-11-11 00:19:53 +03:00
5,
2016-11-02 21:37:30 +03:00
29
],
"end": [
2016-11-11 00:19:53 +03:00
5,
2016-11-02 21:37:30 +03:00
30
]
}
]
},
2016-11-11 00:19:53 +03:00
"summary": "Replaced the 'i' identifier with the 'j' identifier in the s2 variable"
2016-11-02 21:37:30 +03:00
},
{
"span": {
"replace": [
{
"start": [
2016-11-11 00:19:53 +03:00
5,
2016-11-02 21:37:30 +03:00
30
],
"end": [
2016-11-11 00:19:53 +03:00
5,
2016-11-02 21:37:30 +03:00
31
]
},
{
"start": [
2016-11-11 00:19:53 +03:00
5,
2016-11-02 21:37:30 +03:00
32
],
"end": [
2016-11-11 00:19:53 +03:00
5,
2016-11-02 21:37:30 +03:00
33
]
}
]
},
2016-11-11 00:19:53 +03:00
"summary": "Replaced '5' with '6' in the s2 variable"
2016-11-02 21:37:30 +03:00
},
{
"span": {
"replace": [
{
"start": [
2016-11-11 00:19:53 +03:00
6,
2016-11-02 21:37:30 +03:00
17
],
"end": [
2016-11-11 00:19:53 +03:00
6,
2016-11-02 21:37:30 +03:00
21
]
},
{
"start": [
2016-11-11 00:19:53 +03:00
6,
2016-11-02 21:37:30 +03:00
17
],
"end": [
2016-11-11 00:19:53 +03:00
6,
2016-11-02 21:37:30 +03:00
22
]
}
]
},
2016-11-11 00:19:53 +03:00
"summary": "Replaced the 'Time' identifier with the 'Month' identifier in the s3 variable"
2016-11-02 21:37:30 +03:00
}
]
},
"errors": {}
},
"filePaths": [
"struct-literals.go"
],
2016-11-11 00:19:53 +03:00
"patch": [
"diff --git a/struct-literals.go b/struct-literals.go",
"index 680652e..c6a242e 100644",
"--- a/struct-literals.go",
"+++ b/struct-literals.go",
"@@ -1,9 +1,9 @@",
"-const s1 = Person{",
"+const s1 = Dog{",
" name: \"Frank\",",
" Age: \"5 months\",",
" }",
"-const s2 = struct{i int;}{i: 5}",
"-const s3 = time.Time{}",
"+const s2 = struct{i float;}{j: 6}",
"+const s3 = time.Month{}",
" const s1 = Person{",
" name: \"Frank\",",
" Age: \"5 months\","
],
2016-11-02 21:37:30 +03:00
"gitDir": "test/corpus/repos/go",
2016-11-21 22:39:16 +03:00
"shas": "64dadf57f923bfcf011025fd183879d00ac33805..80808f49007345f31933d0c16fa43cb00282e92e"
2016-11-02 21:37:30 +03:00
}
,{
"testCaseDescription": "go-struct-literals-delete-replacement-test",
"expectedResult": {
"changes": {
"struct-literals.go": [
{
"span": {
"delete": {
"start": [
2016-11-11 00:19:53 +03:00
1,
2016-11-02 21:37:30 +03:00
1
],
"end": [
2016-11-11 00:19:53 +03:00
4,
2016-11-02 21:37:30 +03:00
2
]
}
},
"summary": "Deleted the 's1' variable"
2016-11-02 21:37:30 +03:00
},
{
"span": {
"delete": {
"start": [
2016-11-11 00:19:53 +03:00
5,
2016-11-02 21:37:30 +03:00
1
],
"end": [
2016-11-11 00:19:53 +03:00
5,
2016-11-02 21:37:30 +03:00
34
]
}
},
"summary": "Deleted the 's2' variable"
2016-11-02 21:37:30 +03:00
},
{
"span": {
"delete": {
"start": [
2016-11-11 00:19:53 +03:00
6,
2016-11-02 21:37:30 +03:00
1
],
"end": [
2016-11-11 00:19:53 +03:00
6,
2016-11-02 21:37:30 +03:00
24
]
}
},
"summary": "Deleted the 's3' variable"
2016-11-02 21:37:30 +03:00
},
{
"span": {
"delete": {
"start": [
2016-11-11 00:19:53 +03:00
7,
2016-11-02 21:37:30 +03:00
1
],
"end": [
2016-11-11 00:19:53 +03:00
10,
2016-11-02 21:37:30 +03:00
2
]
}
},
"summary": "Deleted the 's1' variable"
2016-11-02 21:37:30 +03:00
},
{
"span": {
"delete": {
"start": [
2016-11-11 00:19:53 +03:00
11,
2016-11-02 21:37:30 +03:00
1
],
"end": [
2016-11-11 00:19:53 +03:00
11,
2016-11-02 21:37:30 +03:00
32
]
}
},
"summary": "Deleted the 's2' variable"
2016-11-02 21:37:30 +03:00
},
{
"span": {
"delete": {
"start": [
2016-11-11 00:19:53 +03:00
12,
2016-11-02 21:37:30 +03:00
1
],
"end": [
2016-11-11 00:19:53 +03:00
12,
2016-11-02 21:37:30 +03:00
23
]
}
},
"summary": "Deleted the 's3' variable"
2016-11-02 21:37:30 +03:00
},
{
"span": {
"insert": {
"start": [
2016-11-11 00:19:53 +03:00
7,
2016-11-02 21:37:30 +03:00
1
],
"end": [
2016-11-11 00:19:53 +03:00
10,
2016-11-02 21:37:30 +03:00
2
]
}
},
"summary": "Added the 's1' variable"
2016-11-02 21:37:30 +03:00
},
{
"span": {
"insert": {
"start": [
2016-11-11 00:19:53 +03:00
11,
2016-11-02 21:37:30 +03:00
1
],
"end": [
2016-11-11 00:19:53 +03:00
11,
2016-11-02 21:37:30 +03:00
34
]
}
},
"summary": "Added the 's2' variable"
2016-11-02 21:37:30 +03:00
},
{
"span": {
"insert": {
"start": [
2016-11-11 00:19:53 +03:00
12,
2016-11-02 21:37:30 +03:00
1
],
"end": [
2016-11-11 00:19:53 +03:00
12,
2016-11-02 21:37:30 +03:00
24
]
}
},
"summary": "Added the 's3' variable"
2016-11-02 21:37:30 +03:00
}
]
},
"errors": {}
},
"filePaths": [
"struct-literals.go"
],
2016-11-11 00:19:53 +03:00
"patch": [
"diff --git a/struct-literals.go b/struct-literals.go",
"index c6a242e..5aaf236 100644",
"--- a/struct-literals.go",
"+++ b/struct-literals.go",
"@@ -1,18 +1,12 @@",
"-const s1 = Dog{",
"-name: \"Frank\",",
"-Age: \"5 months\",",
"-}",
"-const s2 = struct{i float;}{j: 6}",
"-const s3 = time.Month{}",
" const s1 = Person{",
" name: \"Frank\",",
" Age: \"5 months\",",
" }",
" const s2 = struct{i int;}{i: 5}",
" const s3 = time.Time{}",
"-const s1 = Person{",
"+const s1 = Dog{",
" name: \"Frank\",",
" Age: \"5 months\",",
" }",
"-const s2 = struct{i int;}{i: 5}",
"-const s3 = time.Time{}",
"+const s2 = struct{i float;}{j: 6}",
"+const s3 = time.Month{}"
],
2016-11-02 21:37:30 +03:00
"gitDir": "test/corpus/repos/go",
2016-11-21 22:39:16 +03:00
"shas": "80808f49007345f31933d0c16fa43cb00282e92e..988c7876422b69403136a9ef555dfea74ca17389"
2016-11-02 21:37:30 +03:00
}
,{
"testCaseDescription": "go-struct-literals-delete-test",
"expectedResult": {
"changes": {
"struct-literals.go": [
{
"span": {
"delete": {
"start": [
2016-11-11 00:19:53 +03:00
1,
2016-11-02 21:37:30 +03:00
1
],
"end": [
2016-11-11 00:19:53 +03:00
4,
2016-11-02 21:37:30 +03:00
2
]
}
},
"summary": "Deleted the 's1' variable"
2016-11-02 21:37:30 +03:00
},
{
"span": {
"delete": {
"start": [
2016-11-11 00:19:53 +03:00
5,
2016-11-02 21:37:30 +03:00
1
],
"end": [
2016-11-11 00:19:53 +03:00
5,
2016-11-02 21:37:30 +03:00
32
]
}
},
"summary": "Deleted the 's2' variable"
2016-11-02 21:37:30 +03:00
},
{
"span": {
"delete": {
"start": [
2016-11-11 00:19:53 +03:00
6,
2016-11-02 21:37:30 +03:00
1
],
"end": [
2016-11-11 00:19:53 +03:00
6,
2016-11-02 21:37:30 +03:00
23
]
}
},
"summary": "Deleted the 's3' variable"
2016-11-02 21:37:30 +03:00
}
]
},
"errors": {}
},
"filePaths": [
"struct-literals.go"
],
2016-11-11 00:19:53 +03:00
"patch": [
"diff --git a/struct-literals.go b/struct-literals.go",
"index 5aaf236..9f5ac64 100644",
"--- a/struct-literals.go",
"+++ b/struct-literals.go",
"@@ -1,9 +1,3 @@",
"-const s1 = Person{",
"-name: \"Frank\",",
"-Age: \"5 months\",",
"-}",
"-const s2 = struct{i int;}{i: 5}",
"-const s3 = time.Time{}",
" const s1 = Dog{",
" name: \"Frank\",",
" Age: \"5 months\","
],
2016-11-02 21:37:30 +03:00
"gitDir": "test/corpus/repos/go",
2016-11-21 22:39:16 +03:00
"shas": "988c7876422b69403136a9ef555dfea74ca17389..b2b27b63dfb93f3d178a7ed1999cf255a8dfeaa9"
2016-11-02 21:37:30 +03:00
}
,{
"testCaseDescription": "go-struct-literals-delete-rest-test",
"expectedResult": {
"changes": {
"struct-literals.go": [
{
"span": {
"delete": {
"start": [
2016-11-11 00:19:53 +03:00
1,
2016-11-02 21:37:30 +03:00
1
],
"end": [
2016-11-11 00:19:53 +03:00
4,
2016-11-02 21:37:30 +03:00
2
]
}
},
"summary": "Deleted the 's1' variable"
2016-11-02 21:37:30 +03:00
},
{
"span": {
"delete": {
"start": [
2016-11-11 00:19:53 +03:00
5,
2016-11-02 21:37:30 +03:00
1
],
"end": [
2016-11-11 00:19:53 +03:00
5,
2016-11-02 21:37:30 +03:00
34
]
}
},
"summary": "Deleted the 's2' variable"
2016-11-02 21:37:30 +03:00
},
{
"span": {
"delete": {
"start": [
2016-11-11 00:19:53 +03:00
6,
2016-11-02 21:37:30 +03:00
1
],
"end": [
2016-11-11 00:19:53 +03:00
6,
2016-11-02 21:37:30 +03:00
24
]
}
},
"summary": "Deleted the 's3' variable"
2016-11-02 21:37:30 +03:00
}
]
},
"errors": {}
},
"filePaths": [
"struct-literals.go"
],
2016-11-11 00:19:53 +03:00
"patch": [
"diff --git a/struct-literals.go b/struct-literals.go",
"index 9f5ac64..e69de29 100644",
"--- a/struct-literals.go",
"+++ b/struct-literals.go",
"@@ -1,6 +0,0 @@",
"-const s1 = Dog{",
"-name: \"Frank\",",
"-Age: \"5 months\",",
"-}",
"-const s2 = struct{i float;}{j: 6}",
"-const s3 = time.Month{}"
],
2016-11-02 21:37:30 +03:00
"gitDir": "test/corpus/repos/go",
2016-11-21 22:39:16 +03:00
"shas": "b2b27b63dfb93f3d178a7ed1999cf255a8dfeaa9..d303593216e0b28cabe160a33fe26ad04c4c7a59"
2016-11-02 21:37:30 +03:00
}]