mirror of
https://github.com/github/semantic.git
synced 2024-12-26 00:12:29 +03:00
348 lines
10 KiB
JSON
348 lines
10 KiB
JSON
[{
|
|
"testCaseDescription": "ruby-method-calls-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"method-calls.rb": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
8
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'x.foo()' method call"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"method-calls.rb"
|
|
],
|
|
"patch": [
|
|
"diff --git a/method-calls.rb b/method-calls.rb",
|
|
"index e69de29..5831d31 100644",
|
|
"--- a/method-calls.rb",
|
|
"+++ b/method-calls.rb",
|
|
"@@ -0,0 +1 @@",
|
|
"+x.foo()"
|
|
],
|
|
"gitDir": "test/corpus/repos/ruby",
|
|
"shas": "ced1708aaf5fc212fcffdca226498865be13beb9..4f26c5ab156cf53a6335f74870f4042c0c9b455c"
|
|
}
|
|
,{
|
|
"testCaseDescription": "ruby-method-calls-replacement-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"method-calls.rb": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
6
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'bar()' method call"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
8
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'x.foo()' method call"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"method-calls.rb"
|
|
],
|
|
"patch": [
|
|
"diff --git a/method-calls.rb b/method-calls.rb",
|
|
"index 5831d31..ce891a7 100644",
|
|
"--- a/method-calls.rb",
|
|
"+++ b/method-calls.rb",
|
|
"@@ -1 +1,3 @@",
|
|
"+bar()",
|
|
"+x.foo()",
|
|
" x.foo()"
|
|
],
|
|
"gitDir": "test/corpus/repos/ruby",
|
|
"shas": "4f26c5ab156cf53a6335f74870f4042c0c9b455c..664c5f01d2f57a89eb9e69b023632f94ddfdf321"
|
|
}
|
|
,{
|
|
"testCaseDescription": "ruby-method-calls-delete-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"method-calls.rb": [
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
6
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
8
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'bar()' method call with the 'x.foo()' method call"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"method-calls.rb"
|
|
],
|
|
"patch": [
|
|
"diff --git a/method-calls.rb b/method-calls.rb",
|
|
"index ce891a7..472abf1 100644",
|
|
"--- a/method-calls.rb",
|
|
"+++ b/method-calls.rb",
|
|
"@@ -1,3 +1,3 @@",
|
|
"-bar()",
|
|
"+x.foo()",
|
|
" x.foo()",
|
|
" x.foo()"
|
|
],
|
|
"gitDir": "test/corpus/repos/ruby",
|
|
"shas": "664c5f01d2f57a89eb9e69b023632f94ddfdf321..eb27079ca92ec295a40216fccc86caa56c6d6ab0"
|
|
}
|
|
,{
|
|
"testCaseDescription": "ruby-method-calls-replacement-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"method-calls.rb": [
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
8
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
6
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'x.foo()' method call with the 'bar()' method call"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"method-calls.rb"
|
|
],
|
|
"patch": [
|
|
"diff --git a/method-calls.rb b/method-calls.rb",
|
|
"index 472abf1..ce891a7 100644",
|
|
"--- a/method-calls.rb",
|
|
"+++ b/method-calls.rb",
|
|
"@@ -1,3 +1,3 @@",
|
|
"-x.foo()",
|
|
"+bar()",
|
|
" x.foo()",
|
|
" x.foo()"
|
|
],
|
|
"gitDir": "test/corpus/repos/ruby",
|
|
"shas": "eb27079ca92ec295a40216fccc86caa56c6d6ab0..36537a27c8791dc83f170745f485615f26f8373a"
|
|
}
|
|
,{
|
|
"testCaseDescription": "ruby-method-calls-delete-replacement-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"method-calls.rb": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
6
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'bar()' method call"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
8
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'x.foo()' method call"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
6
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'bar()' method call"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"method-calls.rb"
|
|
],
|
|
"patch": [
|
|
"diff --git a/method-calls.rb b/method-calls.rb",
|
|
"index ce891a7..6c5bbe0 100644",
|
|
"--- a/method-calls.rb",
|
|
"+++ b/method-calls.rb",
|
|
"@@ -1,3 +1,2 @@",
|
|
"-bar()",
|
|
"-x.foo()",
|
|
" x.foo()",
|
|
"+bar()"
|
|
],
|
|
"gitDir": "test/corpus/repos/ruby",
|
|
"shas": "36537a27c8791dc83f170745f485615f26f8373a..1e78aa9b67594f5d84862f0d65c5909ffd9e1f4a"
|
|
}
|
|
,{
|
|
"testCaseDescription": "ruby-method-calls-delete-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"method-calls.rb": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
8
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'x.foo()' method call"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"method-calls.rb"
|
|
],
|
|
"patch": [
|
|
"diff --git a/method-calls.rb b/method-calls.rb",
|
|
"index 6c5bbe0..4be2e26 100644",
|
|
"--- a/method-calls.rb",
|
|
"+++ b/method-calls.rb",
|
|
"@@ -1,2 +1 @@",
|
|
"-x.foo()",
|
|
" bar()"
|
|
],
|
|
"gitDir": "test/corpus/repos/ruby",
|
|
"shas": "1e78aa9b67594f5d84862f0d65c5909ffd9e1f4a..6b2de862a2b378fb008be9b4a46cfc1c5800eaf5"
|
|
}
|
|
,{
|
|
"testCaseDescription": "ruby-method-calls-delete-rest-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"method-calls.rb": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
6
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'bar()' method call"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"method-calls.rb"
|
|
],
|
|
"patch": [
|
|
"diff --git a/method-calls.rb b/method-calls.rb",
|
|
"index 4be2e26..e69de29 100644",
|
|
"--- a/method-calls.rb",
|
|
"+++ b/method-calls.rb",
|
|
"@@ -1 +0,0 @@",
|
|
"-bar()"
|
|
],
|
|
"gitDir": "test/corpus/repos/ruby",
|
|
"shas": "6b2de862a2b378fb008be9b4a46cfc1c5800eaf5..0a21b5bc55d33503289a9d86ac42f0ddf22c31f2"
|
|
}]
|