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

586 lines
18 KiB
JSON
Raw Normal View History

2016-11-02 04:36:43 +03:00
[{
2016-11-02 21:37:30 +03:00
"testCaseDescription": "go-map-literals-insert-test",
2016-11-02 04:36:43 +03:00
"expectedResult": {
"changes": {
2016-11-02 21:37:30 +03:00
"map-literals.go": [
2016-11-02 04:36:43 +03:00
{
"span": {
"insert": {
"start": [
2016-11-11 00:19:53 +03:00
1,
2016-11-02 04:36:43 +03:00
1
],
"end": [
2016-11-11 00:19:53 +03:00
4,
2016-11-02 21:37:30 +03:00
2
2016-11-02 04:36:43 +03:00
]
}
},
"summary": "Added the 's' variable"
2016-11-02 04:36:43 +03:00
}
]
},
2016-11-02 21:37:30 +03:00
"errors": {}
2016-11-02 04:36:43 +03:00
},
"filePaths": [
2016-11-02 21:37:30 +03:00
"map-literals.go"
2016-11-02 04:36:43 +03:00
],
2016-11-11 00:19:53 +03:00
"patch": [
"diff --git a/map-literals.go b/map-literals.go",
"index e69de29..16fb3cf 100644",
"--- a/map-literals.go",
"+++ b/map-literals.go",
"@@ -0,0 +1,4 @@",
"+const s = map[string]string{",
"+\"hi\": \"hello\",",
"+\"bye\": \"goodbye\",",
"+}"
],
2016-11-02 04:36:43 +03:00
"gitDir": "test/corpus/repos/go",
"shas": "f366494a187af73e7fcf6d60c2aa3bb503543f80..e925ebba0abf3bdf2a84d3a66d52bd0380796809"
2016-11-02 04:36:43 +03:00
}
,{
2016-11-02 21:37:30 +03:00
"testCaseDescription": "go-map-literals-replacement-insert-test",
2016-11-02 04:36:43 +03:00
"expectedResult": {
"changes": {
2016-11-02 21:37:30 +03:00
"map-literals.go": [
2016-11-02 04:36:43 +03:00
{
"span": {
"insert": {
"start": [
2016-11-11 00:19:53 +03:00
1,
2016-11-02 04:36:43 +03:00
1
],
"end": [
2016-11-11 00:19:53 +03:00
4,
2016-11-02 21:37:30 +03:00
2
2016-11-02 04:36:43 +03:00
]
}
},
"summary": "Added the 's' variable"
2016-11-02 04:36:43 +03:00
},
{
"span": {
"insert": {
"start": [
2016-11-11 00:19:53 +03:00
5,
2016-11-02 04:36:43 +03:00
1
],
"end": [
2016-11-11 00:19:53 +03:00
8,
2016-11-02 21:37:30 +03:00
2
2016-11-02 04:36:43 +03:00
]
}
},
"summary": "Added the 's' variable"
2016-11-02 04:36:43 +03:00
}
]
},
2016-11-02 21:37:30 +03:00
"errors": {}
2016-11-02 04:36:43 +03:00
},
"filePaths": [
2016-11-02 21:37:30 +03:00
"map-literals.go"
2016-11-02 04:36:43 +03:00
],
2016-11-11 00:19:53 +03:00
"patch": [
"diff --git a/map-literals.go b/map-literals.go",
"index 16fb3cf..b3c30ca 100644",
"--- a/map-literals.go",
"+++ b/map-literals.go",
"@@ -1,3 +1,11 @@",
"+const s = map[string]int{",
"+\"foo\": \"bar\",",
"+\"baz\": \"hello\",",
"+}",
"+const s = map[string]string{",
"+\"hi\": \"hello\",",
"+\"bye\": \"goodbye\",",
"+}",
" const s = map[string]string{",
" \"hi\": \"hello\",",
" \"bye\": \"goodbye\","
],
2016-11-02 04:36:43 +03:00
"gitDir": "test/corpus/repos/go",
"shas": "e925ebba0abf3bdf2a84d3a66d52bd0380796809..de28fc5f9c2b25ec7ae4a2a30d8a7edc342a76bb"
2016-11-02 04:36:43 +03:00
}
,{
2016-11-02 21:37:30 +03:00
"testCaseDescription": "go-map-literals-delete-insert-test",
2016-11-02 04:36:43 +03:00
"expectedResult": {
"changes": {
2016-11-02 21:37:30 +03:00
"map-literals.go": [
2016-11-02 04:36:43 +03:00
{
"span": {
"replace": [
{
"start": [
2016-11-11 00:19:53 +03:00
1,
2016-11-02 21:37:30 +03:00
22
2016-11-02 04:36:43 +03:00
],
"end": [
2016-11-11 00:19:53 +03:00
1,
2016-11-02 21:37:30 +03:00
25
2016-11-02 04:36:43 +03:00
]
},
{
"start": [
2016-11-11 00:19:53 +03:00
1,
2016-11-02 21:37:30 +03:00
15
2016-11-02 04:36:43 +03:00
],
"end": [
2016-11-11 00:19:53 +03:00
1,
2016-11-02 21:37:30 +03:00
21
2016-11-02 04:36:43 +03:00
]
}
]
},
2016-11-11 00:19:53 +03:00
"summary": "Replaced the 'int' identifier with the 'string' identifier in the s variable"
2016-11-02 04:36:43 +03:00
},
{
"span": {
"replace": [
{
"start": [
2016-11-11 00:19:53 +03:00
2,
2016-11-02 21:37:30 +03:00
1
2016-11-02 04:36:43 +03:00
],
"end": [
2016-11-11 00:19:53 +03:00
2,
2016-11-02 21:37:30 +03:00
6
2016-11-02 04:36:43 +03:00
]
},
{
"start": [
2016-11-11 00:19:53 +03:00
2,
2016-11-02 21:37:30 +03:00
1
2016-11-02 04:36:43 +03:00
],
"end": [
2016-11-11 00:19:53 +03:00
2,
2016-11-02 21:37:30 +03:00
5
2016-11-02 04:36:43 +03:00
]
}
]
},
2016-11-11 00:19:53 +03:00
"summary": "Replaced the \"foo\" string with the \"hi\" string in the s variable"
2016-11-02 04:36:43 +03:00
},
{
"span": {
"replace": [
{
"start": [
2016-11-11 00:19:53 +03:00
2,
2016-11-02 21:37:30 +03:00
8
],
"end": [
2016-11-11 00:19:53 +03:00
2,
2016-11-02 21:37:30 +03:00
13
]
},
{
"start": [
2016-11-11 00:19:53 +03:00
2,
2016-11-02 21:37:30 +03:00
7
],
"end": [
2016-11-11 00:19:53 +03:00
2,
2016-11-02 04:36:43 +03:00
14
2016-11-02 21:37:30 +03:00
]
}
]
},
2016-11-11 00:19:53 +03:00
"summary": "Replaced the \"bar\" string with the \"hello\" string in the s variable"
2016-11-02 21:37:30 +03:00
},
{
"span": {
"replace": [
{
"start": [
2016-11-11 00:19:53 +03:00
3,
2016-11-02 21:37:30 +03:00
1
2016-11-02 04:36:43 +03:00
],
"end": [
2016-11-11 00:19:53 +03:00
3,
2016-11-02 21:37:30 +03:00
6
2016-11-02 04:36:43 +03:00
]
},
{
"start": [
2016-11-11 00:19:53 +03:00
3,
2016-11-02 21:37:30 +03:00
1
2016-11-02 04:36:43 +03:00
],
"end": [
2016-11-11 00:19:53 +03:00
3,
2016-11-02 21:37:30 +03:00
6
2016-11-02 04:36:43 +03:00
]
}
]
},
2016-11-11 00:19:53 +03:00
"summary": "Replaced the \"baz\" string with the \"bye\" string in the s variable"
2016-11-02 21:37:30 +03:00
},
2016-11-02 04:36:43 +03:00
{
"span": {
"replace": [
{
"start": [
2016-11-11 00:19:53 +03:00
3,
2016-11-02 21:37:30 +03:00
8
],
"end": [
2016-11-11 00:19:53 +03:00
3,
2016-11-02 21:37:30 +03:00
15
]
},
{
"start": [
2016-11-11 00:19:53 +03:00
3,
2016-11-02 04:36:43 +03:00
8
],
"end": [
2016-11-11 00:19:53 +03:00
3,
2016-11-02 21:37:30 +03:00
17
]
}
]
},
2016-11-11 00:19:53 +03:00
"summary": "Replaced the \"hello\" string with the \"goodbye\" string in the s variable"
2016-11-02 04:36:43 +03:00
}
]
},
"errors": {}
},
"filePaths": [
2016-11-02 21:37:30 +03:00
"map-literals.go"
2016-11-02 04:36:43 +03:00
],
2016-11-11 00:19:53 +03:00
"patch": [
"diff --git a/map-literals.go b/map-literals.go",
"index b3c30ca..72c2e91 100644",
"--- a/map-literals.go",
"+++ b/map-literals.go",
"@@ -1,6 +1,6 @@",
"-const s = map[string]int{",
"-\"foo\": \"bar\",",
"-\"baz\": \"hello\",",
"+const s = map[string]string{",
"+\"hi\": \"hello\",",
"+\"bye\": \"goodbye\",",
" }",
" const s = map[string]string{",
" \"hi\": \"hello\","
],
2016-11-02 04:36:43 +03:00
"gitDir": "test/corpus/repos/go",
"shas": "de28fc5f9c2b25ec7ae4a2a30d8a7edc342a76bb..db595e9471ff2fef089dc2aa7f502568d1502a6a"
2016-11-02 04:36:43 +03:00
}
,{
2016-11-02 21:37:30 +03:00
"testCaseDescription": "go-map-literals-replacement-test",
2016-11-02 04:36:43 +03:00
"expectedResult": {
"changes": {
2016-11-02 21:37:30 +03:00
"map-literals.go": [
2016-11-02 04:36:43 +03:00
{
"span": {
"delete": {
"start": [
2016-11-11 00:19:53 +03:00
1,
2016-11-02 21:37:30 +03:00
15
2016-11-02 04:36:43 +03:00
],
"end": [
2016-11-11 00:19:53 +03:00
1,
2016-11-02 21:37:30 +03:00
21
2016-11-02 04:36:43 +03:00
]
}
},
2016-11-11 00:19:53 +03:00
"summary": "Deleted the 'string' identifier in the s variable"
2016-11-02 04:36:43 +03:00
},
{
"span": {
"insert": {
"start": [
2016-11-11 00:19:53 +03:00
1,
2016-11-02 21:37:30 +03:00
22
2016-11-02 04:36:43 +03:00
],
"end": [
2016-11-11 00:19:53 +03:00
1,
2016-11-02 21:37:30 +03:00
25
2016-11-02 04:36:43 +03:00
]
}
},
2016-11-11 00:19:53 +03:00
"summary": "Added the 'int' identifier in the s variable"
2016-11-02 04:36:43 +03:00
},
{
"span": {
"insert": {
"start": [
2016-11-11 00:19:53 +03:00
2,
2016-11-02 04:36:43 +03:00
1
],
"end": [
2016-11-11 00:19:53 +03:00
2,
2016-11-02 21:37:30 +03:00
6
2016-11-02 04:36:43 +03:00
]
}
},
2016-11-11 00:19:53 +03:00
"summary": "Added the \"foo\" string in the s variable"
2016-11-02 21:37:30 +03:00
},
2016-11-02 04:36:43 +03:00
{
"span": {
2016-11-02 21:37:30 +03:00
"insert": {
2016-11-02 04:36:43 +03:00
"start": [
2016-11-11 00:19:53 +03:00
2,
2016-11-02 21:37:30 +03:00
8
2016-11-02 04:36:43 +03:00
],
"end": [
2016-11-11 00:19:53 +03:00
2,
2016-11-02 21:37:30 +03:00
13
2016-11-02 04:36:43 +03:00
]
}
},
2016-11-11 00:19:53 +03:00
"summary": "Added the \"bar\" string in the s variable"
2016-11-02 21:37:30 +03:00
},
{
"span": {
"replace": [
{
"start": [
2016-11-11 00:19:53 +03:00
2,
2016-11-02 21:37:30 +03:00
1
],
"end": [
2016-11-11 00:19:53 +03:00
2,
2016-11-02 21:37:30 +03:00
5
]
},
{
"start": [
2016-11-11 00:19:53 +03:00
3,
2016-11-02 21:37:30 +03:00
1
],
"end": [
2016-11-11 00:19:53 +03:00
3,
2016-11-02 21:37:30 +03:00
6
]
}
]
},
2016-11-11 00:19:53 +03:00
"summary": "Replaced the \"hi\" string with the \"baz\" string in the s variable"
2016-11-02 04:36:43 +03:00
},
{
"span": {
"delete": {
"start": [
2016-11-11 00:19:53 +03:00
3,
2016-11-02 04:36:43 +03:00
1
],
"end": [
2016-11-11 00:19:53 +03:00
3,
2016-11-02 21:37:30 +03:00
6
2016-11-02 04:36:43 +03:00
]
}
},
2016-11-11 00:19:53 +03:00
"summary": "Deleted the \"bye\" string in the s variable"
2016-11-02 04:36:43 +03:00
},
{
"span": {
2016-11-02 21:37:30 +03:00
"delete": {
2016-11-02 04:36:43 +03:00
"start": [
2016-11-11 00:19:53 +03:00
3,
2016-11-02 21:37:30 +03:00
8
2016-11-02 04:36:43 +03:00
],
"end": [
2016-11-11 00:19:53 +03:00
3,
2016-11-02 21:37:30 +03:00
17
2016-11-02 04:36:43 +03:00
]
}
},
2016-11-11 00:19:53 +03:00
"summary": "Deleted the \"goodbye\" string in the s variable"
2016-11-02 04:36:43 +03:00
}
]
2016-11-02 21:37:30 +03:00
},
"errors": {}
2016-11-02 04:36:43 +03:00
},
"filePaths": [
2016-11-02 21:37:30 +03:00
"map-literals.go"
2016-11-02 04:36:43 +03:00
],
2016-11-11 00:19:53 +03:00
"patch": [
"diff --git a/map-literals.go b/map-literals.go",
"index 72c2e91..b3c30ca 100644",
"--- a/map-literals.go",
"+++ b/map-literals.go",
"@@ -1,6 +1,6 @@",
"-const s = map[string]string{",
"-\"hi\": \"hello\",",
"-\"bye\": \"goodbye\",",
"+const s = map[string]int{",
"+\"foo\": \"bar\",",
"+\"baz\": \"hello\",",
" }",
" const s = map[string]string{",
" \"hi\": \"hello\","
],
2016-11-02 04:36:43 +03:00
"gitDir": "test/corpus/repos/go",
"shas": "db595e9471ff2fef089dc2aa7f502568d1502a6a..a7fd4cda280bf4ae44d7ada58ada52f350017735"
2016-11-02 04:36:43 +03:00
}
,{
2016-11-02 21:37:30 +03:00
"testCaseDescription": "go-map-literals-delete-replacement-test",
2016-11-02 04:36:43 +03:00
"expectedResult": {
"changes": {
2016-11-02 21:37:30 +03:00
"map-literals.go": [
2016-11-02 04:36:43 +03:00
{
"span": {
"delete": {
"start": [
2016-11-11 00:19:53 +03:00
1,
2016-11-02 04:36:43 +03:00
1
],
"end": [
2016-11-11 00:19:53 +03:00
4,
2016-11-02 21:37:30 +03:00
2
2016-11-02 04:36:43 +03:00
]
}
},
"summary": "Deleted the 's' variable"
2016-11-02 04:36:43 +03:00
},
{
"span": {
"delete": {
"start": [
2016-11-11 00:19:53 +03:00
5,
2016-11-02 04:36:43 +03:00
1
],
"end": [
2016-11-11 00:19:53 +03:00
8,
2016-11-02 21:37:30 +03:00
2
2016-11-02 04:36:43 +03:00
]
}
},
"summary": "Deleted the 's' variable"
2016-11-02 21:37:30 +03:00
},
2016-11-02 04:36:43 +03:00
{
"span": {
2016-11-02 21:37:30 +03:00
"insert": {
2016-11-02 04:36:43 +03:00
"start": [
2016-11-11 00:19:53 +03:00
5,
2016-11-02 04:36:43 +03:00
1
],
"end": [
2016-11-11 00:19:53 +03:00
8,
2016-11-02 21:37:30 +03:00
2
2016-11-02 04:36:43 +03:00
]
}
},
"summary": "Added the 's' variable"
2016-11-02 04:36:43 +03:00
}
]
2016-11-02 21:37:30 +03:00
},
"errors": {}
2016-11-02 04:36:43 +03:00
},
"filePaths": [
2016-11-02 21:37:30 +03:00
"map-literals.go"
2016-11-02 04:36:43 +03:00
],
2016-11-11 00:19:53 +03:00
"patch": [
"diff --git a/map-literals.go b/map-literals.go",
"index b3c30ca..6d5f577 100644",
"--- a/map-literals.go",
"+++ b/map-literals.go",
"@@ -1,12 +1,8 @@",
"-const s = map[string]int{",
"-\"foo\": \"bar\",",
"-\"baz\": \"hello\",",
"-}",
" const s = map[string]string{",
" \"hi\": \"hello\",",
" \"bye\": \"goodbye\",",
" }",
"-const s = map[string]string{",
"-\"hi\": \"hello\",",
"-\"bye\": \"goodbye\",",
"+const s = map[string]int{",
"+\"foo\": \"bar\",",
"+\"baz\": \"hello\",",
" }"
],
2016-11-02 04:36:43 +03:00
"gitDir": "test/corpus/repos/go",
"shas": "a7fd4cda280bf4ae44d7ada58ada52f350017735..c67615be6903f594bbda655de325f090b44a779e"
2016-11-02 04:36:43 +03:00
}
,{
2016-11-02 21:37:30 +03:00
"testCaseDescription": "go-map-literals-delete-test",
2016-11-02 04:36:43 +03:00
"expectedResult": {
"changes": {
2016-11-02 21:37:30 +03:00
"map-literals.go": [
2016-11-02 04:36:43 +03:00
{
"span": {
"delete": {
"start": [
2016-11-11 00:19:53 +03:00
1,
2016-11-02 04:36:43 +03:00
1
],
"end": [
2016-11-11 00:19:53 +03:00
4,
2016-11-02 21:37:30 +03:00
2
2016-11-02 04:36:43 +03:00
]
}
},
"summary": "Deleted the 's' variable"
2016-11-02 04:36:43 +03:00
}
]
},
2016-11-02 21:37:30 +03:00
"errors": {}
},
"filePaths": [
"map-literals.go"
],
2016-11-11 00:19:53 +03:00
"patch": [
"diff --git a/map-literals.go b/map-literals.go",
"index 6d5f577..7f8e649 100644",
"--- a/map-literals.go",
"+++ b/map-literals.go",
"@@ -1,7 +1,3 @@",
"-const s = map[string]string{",
"-\"hi\": \"hello\",",
"-\"bye\": \"goodbye\",",
"-}",
" const s = map[string]int{",
" \"foo\": \"bar\",",
" \"baz\": \"hello\","
],
2016-11-02 21:37:30 +03:00
"gitDir": "test/corpus/repos/go",
"shas": "c67615be6903f594bbda655de325f090b44a779e..1c5da0b334e2c57d642798de8f4554d4e5d7e8b9"
2016-11-02 21:37:30 +03:00
}
,{
"testCaseDescription": "go-map-literals-delete-rest-test",
"expectedResult": {
"changes": {
"map-literals.go": [
2016-11-02 04:36:43 +03:00
{
"span": {
"delete": {
"start": [
2016-11-11 00:19:53 +03:00
1,
2016-11-02 04:36:43 +03:00
1
],
"end": [
2016-11-11 00:19:53 +03:00
4,
2016-11-02 21:37:30 +03:00
2
2016-11-02 04:36:43 +03:00
]
}
},
"summary": "Deleted the 's' variable"
2016-11-02 04:36:43 +03:00
}
]
2016-11-02 21:37:30 +03:00
},
"errors": {}
2016-11-02 04:36:43 +03:00
},
"filePaths": [
2016-11-02 21:37:30 +03:00
"map-literals.go"
2016-11-02 04:36:43 +03:00
],
2016-11-11 00:19:53 +03:00
"patch": [
"diff --git a/map-literals.go b/map-literals.go",
"index 7f8e649..e69de29 100644",
"--- a/map-literals.go",
"+++ b/map-literals.go",
"@@ -1,4 +0,0 @@",
"-const s = map[string]int{",
"-\"foo\": \"bar\",",
"-\"baz\": \"hello\",",
"-}"
],
2016-11-02 04:36:43 +03:00
"gitDir": "test/corpus/repos/go",
"shas": "1c5da0b334e2c57d642798de8f4554d4e5d7e8b9..821d52811675ea17dd00d79b0f4e082376b97afc"
2016-11-02 04:36:43 +03:00
}]