mirror of
https://github.com/github/semantic.git
synced 2024-12-23 06:41:45 +03:00
748 lines
23 KiB
JSON
748 lines
23 KiB
JSON
[{
|
|
"testCaseDescription": "go-const-with-implicit-values-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"const-with-implicit-values.go": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
5,
|
|
3
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'zero' variable"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
5,
|
|
3
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'one' variable"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
5,
|
|
3
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'two' variable"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"const-with-implicit-values.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/const-with-implicit-values.go b/const-with-implicit-values.go",
|
|
"index e69de29..938a571 100644",
|
|
"--- a/const-with-implicit-values.go",
|
|
"+++ b/const-with-implicit-values.go",
|
|
"@@ -0,0 +1,5 @@",
|
|
"+const (",
|
|
"+ zero = iota",
|
|
"+ one",
|
|
"+ two",
|
|
"+ )"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "eab68be4fe73c7ea63793058e38316a7eab75064..9c08f71afc4f67ed8399c2904fa3c511085e32fa"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-const-with-implicit-values-replacement-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"const-with-implicit-values.go": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
5,
|
|
3
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'a' variable"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
5,
|
|
3
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'b' variable"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
5,
|
|
3
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'c' variable"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
6,
|
|
1
|
|
],
|
|
"end": [
|
|
10,
|
|
3
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'zero' variable"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
6,
|
|
1
|
|
],
|
|
"end": [
|
|
10,
|
|
3
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'one' variable"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
6,
|
|
1
|
|
],
|
|
"end": [
|
|
10,
|
|
3
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'two' variable"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"const-with-implicit-values.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/const-with-implicit-values.go b/const-with-implicit-values.go",
|
|
"index 938a571..071b359 100644",
|
|
"--- a/const-with-implicit-values.go",
|
|
"+++ b/const-with-implicit-values.go",
|
|
"@@ -1,4 +1,14 @@",
|
|
" const (",
|
|
"+ a = iota",
|
|
"+ b",
|
|
"+ c",
|
|
"+ )",
|
|
"+const (",
|
|
"+ zero = iota",
|
|
"+ one",
|
|
"+ two",
|
|
"+ )",
|
|
"+const (",
|
|
" zero = iota",
|
|
" one",
|
|
" two"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "9c08f71afc4f67ed8399c2904fa3c511085e32fa..a3fffc055f14421a39ce87b49fc3ac583af306f1"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-const-with-implicit-values-delete-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"const-with-implicit-values.go": [
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
2,
|
|
2
|
|
],
|
|
"end": [
|
|
2,
|
|
3
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
2,
|
|
2
|
|
],
|
|
"end": [
|
|
2,
|
|
6
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'a' identifier with the 'zero' identifier in the zero variable"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
3,
|
|
2
|
|
],
|
|
"end": [
|
|
3,
|
|
3
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
3,
|
|
2
|
|
],
|
|
"end": [
|
|
3,
|
|
5
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'b' identifier with the 'one' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
4,
|
|
2
|
|
],
|
|
"end": [
|
|
4,
|
|
3
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
4,
|
|
2
|
|
],
|
|
"end": [
|
|
4,
|
|
5
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'c' identifier with the 'two' identifier"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"const-with-implicit-values.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/const-with-implicit-values.go b/const-with-implicit-values.go",
|
|
"index 071b359..8a6d638 100644",
|
|
"--- a/const-with-implicit-values.go",
|
|
"+++ b/const-with-implicit-values.go",
|
|
"@@ -1,7 +1,7 @@",
|
|
" const (",
|
|
"- a = iota",
|
|
"- b",
|
|
"- c",
|
|
"+ zero = iota",
|
|
"+ one",
|
|
"+ two",
|
|
" )",
|
|
" const (",
|
|
" zero = iota"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "a3fffc055f14421a39ce87b49fc3ac583af306f1..2c83dd0ff7ac9b61cd2d2155917f60c1578bd472"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-const-with-implicit-values-replacement-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"const-with-implicit-values.go": [
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
2,
|
|
2
|
|
],
|
|
"end": [
|
|
2,
|
|
6
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
2,
|
|
2
|
|
],
|
|
"end": [
|
|
2,
|
|
3
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'zero' identifier with the 'a' identifier in the a variable"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
3,
|
|
2
|
|
],
|
|
"end": [
|
|
3,
|
|
5
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
3,
|
|
2
|
|
],
|
|
"end": [
|
|
3,
|
|
3
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'one' identifier with the 'b' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
4,
|
|
2
|
|
],
|
|
"end": [
|
|
4,
|
|
5
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
4,
|
|
2
|
|
],
|
|
"end": [
|
|
4,
|
|
3
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'two' identifier with the 'c' identifier"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"const-with-implicit-values.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/const-with-implicit-values.go b/const-with-implicit-values.go",
|
|
"index 8a6d638..071b359 100644",
|
|
"--- a/const-with-implicit-values.go",
|
|
"+++ b/const-with-implicit-values.go",
|
|
"@@ -1,7 +1,7 @@",
|
|
" const (",
|
|
"- zero = iota",
|
|
"- one",
|
|
"- two",
|
|
"+ a = iota",
|
|
"+ b",
|
|
"+ c",
|
|
" )",
|
|
" const (",
|
|
" zero = iota"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "2c83dd0ff7ac9b61cd2d2155917f60c1578bd472..eaa7f3281ecec5fa706b862a28ae1cfbcdac382d"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-const-with-implicit-values-delete-replacement-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"const-with-implicit-values.go": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
5,
|
|
3
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'a' variable"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
5,
|
|
3
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'b' variable"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
5,
|
|
3
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'c' variable"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
6,
|
|
1
|
|
],
|
|
"end": [
|
|
10,
|
|
3
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'zero' variable"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
6,
|
|
1
|
|
],
|
|
"end": [
|
|
10,
|
|
3
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'one' variable"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
6,
|
|
1
|
|
],
|
|
"end": [
|
|
10,
|
|
3
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'two' variable"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
6,
|
|
1
|
|
],
|
|
"end": [
|
|
10,
|
|
3
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'a' variable"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
6,
|
|
1
|
|
],
|
|
"end": [
|
|
10,
|
|
3
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'b' variable"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
6,
|
|
1
|
|
],
|
|
"end": [
|
|
10,
|
|
3
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'c' variable"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"const-with-implicit-values.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/const-with-implicit-values.go b/const-with-implicit-values.go",
|
|
"index 071b359..ae8b277 100644",
|
|
"--- a/const-with-implicit-values.go",
|
|
"+++ b/const-with-implicit-values.go",
|
|
"@@ -1,15 +1,10 @@",
|
|
" const (",
|
|
"- a = iota",
|
|
"- b",
|
|
"- c",
|
|
"- )",
|
|
"-const (",
|
|
" zero = iota",
|
|
" one",
|
|
" two",
|
|
" )",
|
|
" const (",
|
|
"- zero = iota",
|
|
"- one",
|
|
"- two",
|
|
"+ a = iota",
|
|
"+ b",
|
|
"+ c",
|
|
" )"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "eaa7f3281ecec5fa706b862a28ae1cfbcdac382d..697b694fcc19b4223284ab44c961bd9544dcdaa3"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-const-with-implicit-values-delete-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"const-with-implicit-values.go": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
5,
|
|
3
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'zero' variable"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
5,
|
|
3
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'one' variable"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
5,
|
|
3
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'two' variable"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"const-with-implicit-values.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/const-with-implicit-values.go b/const-with-implicit-values.go",
|
|
"index ae8b277..dfb4fad 100644",
|
|
"--- a/const-with-implicit-values.go",
|
|
"+++ b/const-with-implicit-values.go",
|
|
"@@ -1,9 +1,4 @@",
|
|
" const (",
|
|
"- zero = iota",
|
|
"- one",
|
|
"- two",
|
|
"- )",
|
|
"-const (",
|
|
" a = iota",
|
|
" b",
|
|
" c"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "697b694fcc19b4223284ab44c961bd9544dcdaa3..512cbb151aefa21474c28b2baae09a6eee09bcf5"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-const-with-implicit-values-delete-rest-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"const-with-implicit-values.go": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
5,
|
|
3
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'a' variable"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
5,
|
|
3
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'b' variable"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
5,
|
|
3
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'c' variable"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"const-with-implicit-values.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/const-with-implicit-values.go b/const-with-implicit-values.go",
|
|
"index dfb4fad..e69de29 100644",
|
|
"--- a/const-with-implicit-values.go",
|
|
"+++ b/const-with-implicit-values.go",
|
|
"@@ -1,5 +0,0 @@",
|
|
"-const (",
|
|
"- a = iota",
|
|
"- b",
|
|
"- c",
|
|
"- )"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "512cbb151aefa21474c28b2baae09a6eee09bcf5..966bee07072f36b83494af4ac7d3c83673e1f3f8"
|
|
}]
|