mirror of
https://github.com/github/semantic.git
synced 2024-12-24 23:42:31 +03:00
561 lines
17 KiB
JSON
561 lines
17 KiB
JSON
[{
|
|
"testCaseDescription": "go-imaginary-literals-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"imaginary-literals.go": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
4,
|
|
2
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'a' variable"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
4,
|
|
2
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'b' variable"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"imaginary-literals.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/imaginary-literals.go b/imaginary-literals.go",
|
|
"index e69de29..aca2d55 100644",
|
|
"--- a/imaginary-literals.go",
|
|
"+++ b/imaginary-literals.go",
|
|
"@@ -0,0 +1,4 @@",
|
|
"+const (",
|
|
"+a = 01i",
|
|
"+b = 1.e+100i",
|
|
"+)"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "7b72b761ffb6668a47963816a4e3f9d9897b2c0d..9001f7bd86bc7887c0f4d18ef4ac8a2c10597939"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-imaginary-literals-replacement-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"imaginary-literals.go": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
4,
|
|
2
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'a' variable"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
4,
|
|
2
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'b' variable"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
5,
|
|
1
|
|
],
|
|
"end": [
|
|
8,
|
|
2
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'a' variable"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
5,
|
|
1
|
|
],
|
|
"end": [
|
|
8,
|
|
2
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'b' variable"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"imaginary-literals.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/imaginary-literals.go b/imaginary-literals.go",
|
|
"index aca2d55..6983988 100644",
|
|
"--- a/imaginary-literals.go",
|
|
"+++ b/imaginary-literals.go",
|
|
"@@ -1,4 +1,12 @@",
|
|
" const (",
|
|
"+a = 02i",
|
|
"+b = 1.e+103i",
|
|
"+)",
|
|
"+const (",
|
|
"+a = 01i",
|
|
"+b = 1.e+100i",
|
|
"+)",
|
|
"+const (",
|
|
" a = 01i",
|
|
" b = 1.e+100i",
|
|
" )"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "9001f7bd86bc7887c0f4d18ef4ac8a2c10597939..660530ac05d0ed245af60d56794997a80561189a"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-imaginary-literals-delete-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"imaginary-literals.go": [
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
2,
|
|
5
|
|
],
|
|
"end": [
|
|
2,
|
|
8
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
2,
|
|
5
|
|
],
|
|
"end": [
|
|
2,
|
|
8
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the '02i' imaginary_literal with the '01i' imaginary_literal in the a variable"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
3,
|
|
5
|
|
],
|
|
"end": [
|
|
3,
|
|
13
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
3,
|
|
5
|
|
],
|
|
"end": [
|
|
3,
|
|
13
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the '1.e+103i' imaginary_literal with the '1.e+100i' imaginary_literal in the b variable"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"imaginary-literals.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/imaginary-literals.go b/imaginary-literals.go",
|
|
"index 6983988..a7e36a5 100644",
|
|
"--- a/imaginary-literals.go",
|
|
"+++ b/imaginary-literals.go",
|
|
"@@ -1,6 +1,6 @@",
|
|
" const (",
|
|
"-a = 02i",
|
|
"-b = 1.e+103i",
|
|
"+a = 01i",
|
|
"+b = 1.e+100i",
|
|
" )",
|
|
" const (",
|
|
" a = 01i"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "660530ac05d0ed245af60d56794997a80561189a..a685868d6e7febe5704df9ed25b2f890841598ee"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-imaginary-literals-replacement-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"imaginary-literals.go": [
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
2,
|
|
5
|
|
],
|
|
"end": [
|
|
2,
|
|
8
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
2,
|
|
5
|
|
],
|
|
"end": [
|
|
2,
|
|
8
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the '01i' imaginary_literal with the '02i' imaginary_literal in the a variable"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
3,
|
|
5
|
|
],
|
|
"end": [
|
|
3,
|
|
13
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
3,
|
|
5
|
|
],
|
|
"end": [
|
|
3,
|
|
13
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the '1.e+100i' imaginary_literal with the '1.e+103i' imaginary_literal in the b variable"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"imaginary-literals.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/imaginary-literals.go b/imaginary-literals.go",
|
|
"index a7e36a5..6983988 100644",
|
|
"--- a/imaginary-literals.go",
|
|
"+++ b/imaginary-literals.go",
|
|
"@@ -1,6 +1,6 @@",
|
|
" const (",
|
|
"-a = 01i",
|
|
"-b = 1.e+100i",
|
|
"+a = 02i",
|
|
"+b = 1.e+103i",
|
|
" )",
|
|
" const (",
|
|
" a = 01i"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "a685868d6e7febe5704df9ed25b2f890841598ee..90397b090e7a4b8b219f2f0fddf65d2222754647"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-imaginary-literals-delete-replacement-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"imaginary-literals.go": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
4,
|
|
2
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'a' variable"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
4,
|
|
2
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'b' variable"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
5,
|
|
1
|
|
],
|
|
"end": [
|
|
8,
|
|
2
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'a' variable"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
5,
|
|
1
|
|
],
|
|
"end": [
|
|
8,
|
|
2
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'b' variable"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
5,
|
|
1
|
|
],
|
|
"end": [
|
|
8,
|
|
2
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'a' variable"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
5,
|
|
1
|
|
],
|
|
"end": [
|
|
8,
|
|
2
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'b' variable"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"imaginary-literals.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/imaginary-literals.go b/imaginary-literals.go",
|
|
"index 6983988..02cff8d 100644",
|
|
"--- a/imaginary-literals.go",
|
|
"+++ b/imaginary-literals.go",
|
|
"@@ -1,12 +1,8 @@",
|
|
" const (",
|
|
"-a = 02i",
|
|
"-b = 1.e+103i",
|
|
"-)",
|
|
"-const (",
|
|
" a = 01i",
|
|
" b = 1.e+100i",
|
|
" )",
|
|
" const (",
|
|
"-a = 01i",
|
|
"-b = 1.e+100i",
|
|
"+a = 02i",
|
|
"+b = 1.e+103i",
|
|
" )"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "90397b090e7a4b8b219f2f0fddf65d2222754647..93071b390b43672ccc53a6be8ac4c6cf3ca6a4a4"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-imaginary-literals-delete-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"imaginary-literals.go": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
4,
|
|
2
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'a' variable"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
4,
|
|
2
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'b' variable"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"imaginary-literals.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/imaginary-literals.go b/imaginary-literals.go",
|
|
"index 02cff8d..6d8ec55 100644",
|
|
"--- a/imaginary-literals.go",
|
|
"+++ b/imaginary-literals.go",
|
|
"@@ -1,8 +1,4 @@",
|
|
" const (",
|
|
"-a = 01i",
|
|
"-b = 1.e+100i",
|
|
"-)",
|
|
"-const (",
|
|
" a = 02i",
|
|
" b = 1.e+103i",
|
|
" )"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "93071b390b43672ccc53a6be8ac4c6cf3ca6a4a4..e7328a4670f61a6e23af0996e2b07a40f026e0f4"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-imaginary-literals-delete-rest-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"imaginary-literals.go": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
4,
|
|
2
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'a' variable"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
4,
|
|
2
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'b' variable"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"imaginary-literals.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/imaginary-literals.go b/imaginary-literals.go",
|
|
"index 6d8ec55..e69de29 100644",
|
|
"--- a/imaginary-literals.go",
|
|
"+++ b/imaginary-literals.go",
|
|
"@@ -1,4 +0,0 @@",
|
|
"-const (",
|
|
"-a = 02i",
|
|
"-b = 1.e+103i",
|
|
"-)"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "e7328a4670f61a6e23af0996e2b07a40f026e0f4..be3a1f4ddfbded880b71ef46fd4d077ba6140459"
|
|
}]
|