mirror of
https://github.com/github/semantic.git
synced 2024-12-23 14:54:16 +03:00
561 lines
17 KiB
JSON
561 lines
17 KiB
JSON
[{
|
|
"testCaseDescription": "go-string-literals-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"string-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": [
|
|
"string-literals.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/string-literals.go b/string-literals.go",
|
|
"index e69de29..90ac543 100644",
|
|
"--- a/string-literals.go",
|
|
"+++ b/string-literals.go",
|
|
"@@ -0,0 +1,4 @@",
|
|
"+const (",
|
|
"+a = \"0\"",
|
|
"+b = \"hello world\"",
|
|
"+)"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "7c1b0386f5dbef684aa8e24820422e08f1f5c061..b84a88b96d189db6c563e3704ef869b5ea0ed1ab"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-string-literals-replacement-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"string-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": [
|
|
"string-literals.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/string-literals.go b/string-literals.go",
|
|
"index 90ac543..a781ce7 100644",
|
|
"--- a/string-literals.go",
|
|
"+++ b/string-literals.go",
|
|
"@@ -1,4 +1,12 @@",
|
|
" const (",
|
|
"+a = \"2\"",
|
|
"+b = \"hi\"",
|
|
"+)",
|
|
"+const (",
|
|
"+a = \"0\"",
|
|
"+b = \"hello world\"",
|
|
"+)",
|
|
"+const (",
|
|
" a = \"0\"",
|
|
" b = \"hello world\"",
|
|
" )"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "b84a88b96d189db6c563e3704ef869b5ea0ed1ab..96718341a4847bff463f489a3eb5ee640bba6af5"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-string-literals-delete-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"string-literals.go": [
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
2,
|
|
5
|
|
],
|
|
"end": [
|
|
2,
|
|
8
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
2,
|
|
5
|
|
],
|
|
"end": [
|
|
2,
|
|
8
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the \"2\" string with the \"0\" string in the a variable"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
3,
|
|
5
|
|
],
|
|
"end": [
|
|
3,
|
|
9
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
3,
|
|
5
|
|
],
|
|
"end": [
|
|
3,
|
|
18
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the \"hi\" string with the \"hello world\" string in the b variable"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"string-literals.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/string-literals.go b/string-literals.go",
|
|
"index a781ce7..e7b83ba 100644",
|
|
"--- a/string-literals.go",
|
|
"+++ b/string-literals.go",
|
|
"@@ -1,6 +1,6 @@",
|
|
" const (",
|
|
"-a = \"2\"",
|
|
"-b = \"hi\"",
|
|
"+a = \"0\"",
|
|
"+b = \"hello world\"",
|
|
" )",
|
|
" const (",
|
|
" a = \"0\""
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "96718341a4847bff463f489a3eb5ee640bba6af5..60dcf6fffa6f054138001066c6a3da01f2ba426d"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-string-literals-replacement-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"string-literals.go": [
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
2,
|
|
5
|
|
],
|
|
"end": [
|
|
2,
|
|
8
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
2,
|
|
5
|
|
],
|
|
"end": [
|
|
2,
|
|
8
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the \"0\" string with the \"2\" string in the a variable"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
3,
|
|
5
|
|
],
|
|
"end": [
|
|
3,
|
|
18
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
3,
|
|
5
|
|
],
|
|
"end": [
|
|
3,
|
|
9
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the \"hello world\" string with the \"hi\" string in the b variable"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"string-literals.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/string-literals.go b/string-literals.go",
|
|
"index e7b83ba..a781ce7 100644",
|
|
"--- a/string-literals.go",
|
|
"+++ b/string-literals.go",
|
|
"@@ -1,6 +1,6 @@",
|
|
" const (",
|
|
"-a = \"0\"",
|
|
"-b = \"hello world\"",
|
|
"+a = \"2\"",
|
|
"+b = \"hi\"",
|
|
" )",
|
|
" const (",
|
|
" a = \"0\""
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "60dcf6fffa6f054138001066c6a3da01f2ba426d..972d59ad9d3bd920fc37d22e675e83563e7e085b"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-string-literals-delete-replacement-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"string-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": [
|
|
"string-literals.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/string-literals.go b/string-literals.go",
|
|
"index a781ce7..38c651f 100644",
|
|
"--- a/string-literals.go",
|
|
"+++ b/string-literals.go",
|
|
"@@ -1,12 +1,8 @@",
|
|
" const (",
|
|
"-a = \"2\"",
|
|
"-b = \"hi\"",
|
|
"-)",
|
|
"-const (",
|
|
" a = \"0\"",
|
|
" b = \"hello world\"",
|
|
" )",
|
|
" const (",
|
|
"-a = \"0\"",
|
|
"-b = \"hello world\"",
|
|
"+a = \"2\"",
|
|
"+b = \"hi\"",
|
|
" )"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "972d59ad9d3bd920fc37d22e675e83563e7e085b..af284aefb744b3c429139fe6ec89bd82973d0eda"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-string-literals-delete-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"string-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": [
|
|
"string-literals.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/string-literals.go b/string-literals.go",
|
|
"index 38c651f..f70bc80 100644",
|
|
"--- a/string-literals.go",
|
|
"+++ b/string-literals.go",
|
|
"@@ -1,8 +1,4 @@",
|
|
" const (",
|
|
"-a = \"0\"",
|
|
"-b = \"hello world\"",
|
|
"-)",
|
|
"-const (",
|
|
" a = \"2\"",
|
|
" b = \"hi\"",
|
|
" )"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "af284aefb744b3c429139fe6ec89bd82973d0eda..6b1d410021f393030cd07c6fb4419cc514dbe27c"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-string-literals-delete-rest-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"string-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": [
|
|
"string-literals.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/string-literals.go b/string-literals.go",
|
|
"index f70bc80..e69de29 100644",
|
|
"--- a/string-literals.go",
|
|
"+++ b/string-literals.go",
|
|
"@@ -1,4 +0,0 @@",
|
|
"-const (",
|
|
"-a = \"2\"",
|
|
"-b = \"hi\"",
|
|
"-)"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "6b1d410021f393030cd07c6fb4419cc514dbe27c..79aefa1533a679c173158328e430b41a54ee121b"
|
|
}]
|