mirror of
https://github.com/github/semantic.git
synced 2024-12-23 23:11:50 +03:00
511 lines
16 KiB
JSON
511 lines
16 KiB
JSON
[{
|
|
"testCaseDescription": "go-method-declarations-setup-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"method-declarations.go": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
6,
|
|
1
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'main' module"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"method-declarations.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/method-declarations.go b/method-declarations.go",
|
|
"index e69de29..6aaca9e 100644",
|
|
"--- a/method-declarations.go",
|
|
"+++ b/method-declarations.go",
|
|
"@@ -0,0 +1,5 @@",
|
|
"+package main",
|
|
"+",
|
|
"+func main() {}",
|
|
"+",
|
|
"+"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "75a65d024e28e2ac270fa87a322a96997a129620..d38a5545f5688226f0c93b07f9a39aade9ff7126"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-method-declarations-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"method-declarations.go": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
5,
|
|
7
|
|
],
|
|
"end": [
|
|
5,
|
|
11
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'self' identifier in the main module"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
5,
|
|
12
|
|
],
|
|
"end": [
|
|
5,
|
|
18
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'Person' identifier in the main module"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
5,
|
|
20
|
|
],
|
|
"end": [
|
|
5,
|
|
26
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'Equals' identifier in the main module"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
5,
|
|
27
|
|
],
|
|
"end": [
|
|
5,
|
|
32
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'other' identifier in the main module"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
5,
|
|
33
|
|
],
|
|
"end": [
|
|
5,
|
|
39
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'Person' identifier in the main module"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
5,
|
|
41
|
|
],
|
|
"end": [
|
|
5,
|
|
45
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'bool' identifier in the main module"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
5,
|
|
46
|
|
],
|
|
"end": [
|
|
5,
|
|
48
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the '{}' block in the main module"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"method-declarations.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/method-declarations.go b/method-declarations.go",
|
|
"index 6aaca9e..e556c01 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": "d38a5545f5688226f0c93b07f9a39aade9ff7126..7c74b8aa80f6713f57b97fe1a9188a339cf2ee00"
|
|
}
|
|
,{
|
|
"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 main module"
|
|
},
|
|
{
|
|
"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 main module"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"method-declarations.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/method-declarations.go b/method-declarations.go",
|
|
"index e556c01..1be6d20 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": "7c74b8aa80f6713f57b97fe1a9188a339cf2ee00..d91e3b57da9cd9b7bb34e9f4a1e318ccbca1e235"
|
|
}
|
|
,{
|
|
"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 main module"
|
|
},
|
|
{
|
|
"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 main module"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"method-declarations.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/method-declarations.go b/method-declarations.go",
|
|
"index 1be6d20..e556c01 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": "d91e3b57da9cd9b7bb34e9f4a1e318ccbca1e235..e02db3583e3839739efc2dc4a323c8e7cb4e7e03"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-method-declarations-delete-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"method-declarations.go": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
5,
|
|
7
|
|
],
|
|
"end": [
|
|
5,
|
|
11
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'self' identifier in the main module"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
5,
|
|
12
|
|
],
|
|
"end": [
|
|
5,
|
|
18
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'Person' identifier in the main module"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
5,
|
|
20
|
|
],
|
|
"end": [
|
|
5,
|
|
26
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'Equals' identifier in the main module"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
5,
|
|
27
|
|
],
|
|
"end": [
|
|
5,
|
|
32
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'other' identifier in the main module"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
5,
|
|
33
|
|
],
|
|
"end": [
|
|
5,
|
|
39
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'Person' identifier in the main module"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
5,
|
|
41
|
|
],
|
|
"end": [
|
|
5,
|
|
45
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'bool' identifier in the main module"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
5,
|
|
46
|
|
],
|
|
"end": [
|
|
5,
|
|
48
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the '{}' block in the main module"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"method-declarations.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/method-declarations.go b/method-declarations.go",
|
|
"index e556c01..6aaca9e 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": "e02db3583e3839739efc2dc4a323c8e7cb4e7e03..2591194d26468cbf1c57d1d47466b27467621b0e"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-method-declarations-teardown-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"method-declarations.go": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
6,
|
|
1
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'main' module"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"method-declarations.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/method-declarations.go b/method-declarations.go",
|
|
"index 6aaca9e..e69de29 100644",
|
|
"--- a/method-declarations.go",
|
|
"+++ b/method-declarations.go",
|
|
"@@ -1,5 +0,0 @@",
|
|
"-package main",
|
|
"-",
|
|
"-func main() {}",
|
|
"-",
|
|
"-"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "2591194d26468cbf1c57d1d47466b27467621b0e..81885792a1345c5526f8ddc2b596f29352cbddb5"
|
|
}]
|