mirror of
https://github.com/github/semantic.git
synced 2024-12-23 14:54:16 +03:00
377 lines
12 KiB
JSON
377 lines
12 KiB
JSON
[{
|
|
"testCaseDescription": "go-imaginary-literals-setup-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"imaginary-literals.go": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
6,
|
|
1
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'main' module"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"imaginary-literals.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/imaginary-literals.go b/imaginary-literals.go",
|
|
"index e69de29b..79058077 100644",
|
|
"--- a/imaginary-literals.go",
|
|
"+++ b/imaginary-literals.go",
|
|
"@@ -0,0 +1,5 @@",
|
|
"+package main",
|
|
"+",
|
|
"+func main() {",
|
|
"+",
|
|
"+}"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "03178122dd15aa885cdb41437e13e912c2b91c96..38a182fee50bfeaa60287707d8b41f195968ad80"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-imaginary-literals-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"imaginary-literals.go": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
5,
|
|
1
|
|
],
|
|
"end": [
|
|
5,
|
|
8
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'a' var assignment in the main function of the 'main' module"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
6,
|
|
1
|
|
],
|
|
"end": [
|
|
6,
|
|
13
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'b' var assignment in the main function of the 'main' module"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"imaginary-literals.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/imaginary-literals.go b/imaginary-literals.go",
|
|
"index 79058077..25a97daf 100644",
|
|
"--- a/imaginary-literals.go",
|
|
"+++ b/imaginary-literals.go",
|
|
"@@ -1,5 +1,8 @@",
|
|
" package main",
|
|
" ",
|
|
" func main() {",
|
|
"-",
|
|
"+const (",
|
|
"+a = 01i",
|
|
"+b = 1.e+100i",
|
|
"+)",
|
|
" }"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "38a182fee50bfeaa60287707d8b41f195968ad80..e5e1986e6bb5c8827a6257d066cddef003057dd0"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-imaginary-literals-replacement-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"imaginary-literals.go": [
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
5,
|
|
5
|
|
],
|
|
"end": [
|
|
5,
|
|
8
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
5,
|
|
5
|
|
],
|
|
"end": [
|
|
5,
|
|
8
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the '01i' imaginary_literal with the '02i' imaginary_literal in the a var assignment of the 'main' function"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
6,
|
|
5
|
|
],
|
|
"end": [
|
|
6,
|
|
13
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
6,
|
|
5
|
|
],
|
|
"end": [
|
|
6,
|
|
13
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the '1.e+100i' imaginary_literal with the '1.e+103i' imaginary_literal in the b var assignment of the 'main' function"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"imaginary-literals.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/imaginary-literals.go b/imaginary-literals.go",
|
|
"index 25a97daf..151a5338 100644",
|
|
"--- a/imaginary-literals.go",
|
|
"+++ b/imaginary-literals.go",
|
|
"@@ -2,7 +2,7 @@ package main",
|
|
" ",
|
|
" func main() {",
|
|
" const (",
|
|
"-a = 01i",
|
|
"-b = 1.e+100i",
|
|
"+a = 02i",
|
|
"+b = 1.e+103i",
|
|
" )",
|
|
" }"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "e5e1986e6bb5c8827a6257d066cddef003057dd0..fd1fbf1346b6ccce7c0be7b6d374a15ce7108aa2"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-imaginary-literals-delete-replacement-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"imaginary-literals.go": [
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
5,
|
|
5
|
|
],
|
|
"end": [
|
|
5,
|
|
8
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
5,
|
|
5
|
|
],
|
|
"end": [
|
|
5,
|
|
8
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the '02i' imaginary_literal with the '01i' imaginary_literal in the a var assignment of the 'main' function"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
6,
|
|
5
|
|
],
|
|
"end": [
|
|
6,
|
|
13
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
6,
|
|
5
|
|
],
|
|
"end": [
|
|
6,
|
|
13
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the '1.e+103i' imaginary_literal with the '1.e+100i' imaginary_literal in the b var assignment of the 'main' function"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"imaginary-literals.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/imaginary-literals.go b/imaginary-literals.go",
|
|
"index 151a5338..25a97daf 100644",
|
|
"--- a/imaginary-literals.go",
|
|
"+++ b/imaginary-literals.go",
|
|
"@@ -2,7 +2,7 @@ package main",
|
|
" ",
|
|
" func main() {",
|
|
" const (",
|
|
"-a = 02i",
|
|
"-b = 1.e+103i",
|
|
"+a = 01i",
|
|
"+b = 1.e+100i",
|
|
" )",
|
|
" }"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "fd1fbf1346b6ccce7c0be7b6d374a15ce7108aa2..afed26122f2e10d1e84b3a743ae4503e3697ecf1"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-imaginary-literals-delete-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"imaginary-literals.go": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
5,
|
|
1
|
|
],
|
|
"end": [
|
|
5,
|
|
8
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'a' var assignment in the main function of the 'main' module"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
6,
|
|
1
|
|
],
|
|
"end": [
|
|
6,
|
|
13
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'b' var assignment in the main function of the 'main' module"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"imaginary-literals.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/imaginary-literals.go b/imaginary-literals.go",
|
|
"index 25a97daf..79058077 100644",
|
|
"--- a/imaginary-literals.go",
|
|
"+++ b/imaginary-literals.go",
|
|
"@@ -1,8 +1,5 @@",
|
|
" package main",
|
|
" ",
|
|
" func main() {",
|
|
"-const (",
|
|
"-a = 01i",
|
|
"-b = 1.e+100i",
|
|
"-)",
|
|
"+",
|
|
" }"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "afed26122f2e10d1e84b3a743ae4503e3697ecf1..a6c277df634090415f165bd11da2c0d6e5160ed3"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-imaginary-literals-teardown-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"imaginary-literals.go": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
6,
|
|
1
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'main' module"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"imaginary-literals.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/imaginary-literals.go b/imaginary-literals.go",
|
|
"index 79058077..e69de29b 100644",
|
|
"--- a/imaginary-literals.go",
|
|
"+++ b/imaginary-literals.go",
|
|
"@@ -1,5 +0,0 @@",
|
|
"-package main",
|
|
"-",
|
|
"-func main() {",
|
|
"-",
|
|
"-}"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "a6c277df634090415f165bd11da2c0d6e5160ed3..ef1ba5e3f4f7beea225774e61c0ed1394cc9e463"
|
|
}]
|