mirror of
https://github.com/github/semantic.git
synced 2024-12-23 23:11:50 +03:00
361 lines
11 KiB
JSON
361 lines
11 KiB
JSON
[{
|
|
"testCaseDescription": "go-method-declarations-setup-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"method-declarations.go": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
13
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'main' module"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
3,
|
|
1
|
|
],
|
|
"end": [
|
|
3,
|
|
15
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'main' function"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"method-declarations.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/method-declarations.go b/method-declarations.go",
|
|
"index e69de29b..6aaca9ef 100644",
|
|
"--- a/method-declarations.go",
|
|
"+++ b/method-declarations.go",
|
|
"@@ -0,0 +1,5 @@",
|
|
"+package main",
|
|
"+",
|
|
"+func main() {}",
|
|
"+",
|
|
"+"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "a8adfaba3e02d1f9416a61ff929abbed0bc123d4..ae946e153675d03124e44ed3b708c539b9a137d7"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-method-declarations-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"method-declarations.go": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
5,
|
|
1
|
|
],
|
|
"end": [
|
|
5,
|
|
48
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'Equals(…, …)' method"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"method-declarations.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/method-declarations.go b/method-declarations.go",
|
|
"index 6aaca9ef..e556c016 100644",
|
|
"--- a/method-declarations.go",
|
|
"+++ b/method-declarations.go",
|
|
"@@ -2,4 +2,4 @@ package main",
|
|
" ",
|
|
" func main() {}",
|
|
" ",
|
|
"-",
|
|
"+func (self Person) Equals(other Person) bool {}"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "ae946e153675d03124e44ed3b708c539b9a137d7..f425e8a6f57e66d892e1f41ef0dbb8eead4b2df0"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-method-declarations-replacement-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"method-declarations.go": [
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
5,
|
|
12
|
|
],
|
|
"end": [
|
|
5,
|
|
18
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
5,
|
|
12
|
|
],
|
|
"end": [
|
|
5,
|
|
15
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'Person' identifier with the 'Num' identifier in the 'Equals(…, …)' method"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
5,
|
|
33
|
|
],
|
|
"end": [
|
|
5,
|
|
39
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
5,
|
|
30
|
|
],
|
|
"end": [
|
|
5,
|
|
33
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'Person' identifier with the 'Num' identifier in the 'Equals(…, …)' method"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"method-declarations.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/method-declarations.go b/method-declarations.go",
|
|
"index e556c016..1be6d205 100644",
|
|
"--- a/method-declarations.go",
|
|
"+++ b/method-declarations.go",
|
|
"@@ -2,4 +2,4 @@ package main",
|
|
" ",
|
|
" func main() {}",
|
|
" ",
|
|
"-func (self Person) Equals(other Person) bool {}",
|
|
"+func (self Num) Equals(other Num) bool {}"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "f425e8a6f57e66d892e1f41ef0dbb8eead4b2df0..8a314273a9e0b9e328c88a98232a005930d054e9"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-method-declarations-delete-replacement-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"method-declarations.go": [
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
5,
|
|
12
|
|
],
|
|
"end": [
|
|
5,
|
|
15
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
5,
|
|
12
|
|
],
|
|
"end": [
|
|
5,
|
|
18
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'Num' identifier with the 'Person' identifier in the 'Equals(…, …)' method"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
5,
|
|
30
|
|
],
|
|
"end": [
|
|
5,
|
|
33
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
5,
|
|
33
|
|
],
|
|
"end": [
|
|
5,
|
|
39
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'Num' identifier with the 'Person' identifier in the 'Equals(…, …)' method"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"method-declarations.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/method-declarations.go b/method-declarations.go",
|
|
"index 1be6d205..e556c016 100644",
|
|
"--- a/method-declarations.go",
|
|
"+++ b/method-declarations.go",
|
|
"@@ -2,4 +2,4 @@ package main",
|
|
" ",
|
|
" func main() {}",
|
|
" ",
|
|
"-func (self Num) Equals(other Num) bool {}",
|
|
"+func (self Person) Equals(other Person) bool {}"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "8a314273a9e0b9e328c88a98232a005930d054e9..65cf1134e9a92c0d5a1b4d6a160fcaf411f99806"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-method-declarations-delete-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"method-declarations.go": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
5,
|
|
1
|
|
],
|
|
"end": [
|
|
5,
|
|
48
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'Equals(…, …)' method"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"method-declarations.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/method-declarations.go b/method-declarations.go",
|
|
"index e556c016..6aaca9ef 100644",
|
|
"--- a/method-declarations.go",
|
|
"+++ b/method-declarations.go",
|
|
"@@ -2,4 +2,4 @@ package main",
|
|
" ",
|
|
" func main() {}",
|
|
" ",
|
|
"-func (self Person) Equals(other Person) bool {}",
|
|
"+"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "65cf1134e9a92c0d5a1b4d6a160fcaf411f99806..516ad90702a68100aa6a68fc772bc05ef9d21161"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-method-declarations-teardown-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"method-declarations.go": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
13
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'main' module"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
3,
|
|
1
|
|
],
|
|
"end": [
|
|
3,
|
|
15
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'main' function"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"method-declarations.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/method-declarations.go b/method-declarations.go",
|
|
"index 6aaca9ef..e69de29b 100644",
|
|
"--- a/method-declarations.go",
|
|
"+++ b/method-declarations.go",
|
|
"@@ -1,5 +0,0 @@",
|
|
"-package main",
|
|
"-",
|
|
"-func main() {}",
|
|
"-",
|
|
"-"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "516ad90702a68100aa6a68fc772bc05ef9d21161..407e4c1852d95bd8c9a3494899d65731e2bbb43f"
|
|
}]
|