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-22 13:34:21 -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": "2ca1ce0f986cd6f9a082dc37a2a4755736a93730..53bd8710dd66bf7f03439b21574a223ae7a94fbe"
}
,{
"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": "53bd8710dd66bf7f03439b21574a223ae7a94fbe..98ff1024e3ad8416be23543c8385a6a89d9f8b75"
}
,{
"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": "98ff1024e3ad8416be23543c8385a6a89d9f8b75..753e9baeff37e5aae5ff47697e1d9931b4af91b9"
}
,{
"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": "753e9baeff37e5aae5ff47697e1d9931b4af91b9..2f3ce064a925c25174f7446800f9c6830c1a6b7b"
}
,{
"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": "2f3ce064a925c25174f7446800f9c6830c1a6b7b..cce48901e602f824f8845693055d435a4f5a3840"
}
,{
"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": "cce48901e602f824f8845693055d435a4f5a3840..1b8b363ce7b0120053d9c8b8911dc76438a02bc4"
}
,{
"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": "1b8b363ce7b0120053d9c8b8911dc76438a02bc4..7612dbd06f83acd11874aa82e79f0aa17e597c0a"
}]