1
1
mirror of https://github.com/github/semantic.git synced 2024-12-23 14:54:16 +03:00
semantic/test/corpus/diff-summaries/ruby/method-invocation.json

721 lines
22 KiB
JSON
Raw Normal View History

[{
"testCaseDescription": "ruby-method-invocation-insert-test",
"expectedResult": {
"changes": {
"method-invocation.rb": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
1,
6
]
}
},
"summary": "Added the 'print' identifier"
},
{
"span": {
"insert": {
"start": [
2,
1
],
"end": [
2,
8
]
}
},
"summary": "Added the 'foo.bar' member access"
},
{
"span": {
"insert": {
"start": [
3,
1
],
"end": [
3,
4
]
}
},
"summary": "Added the 'bar' identifier"
}
]
},
"errors": {}
},
"filePaths": [
"method-invocation.rb"
],
"patch": [
"diff --git a/method-invocation.rb b/method-invocation.rb",
"index e69de29..fbe3bdc 100644",
"--- a/method-invocation.rb",
"+++ b/method-invocation.rb",
"@@ -0,0 +1,3 @@",
"+print",
"+foo.bar",
"+bar"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "38847e533e9d63b067fd46b4e3bf8e4bcd68f0db..337912159e09103c0f9708052b84b68f93ff3543"
}
,{
"testCaseDescription": "ruby-method-invocation-replacement-insert-test",
"expectedResult": {
"changes": {
"method-invocation.rb": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
1,
21
]
}
},
"summary": "Added the 'print(\"hello world\")' function call"
},
{
"span": {
"insert": {
"start": [
2,
1
],
"end": [
2,
10
]
}
},
2016-11-05 00:49:39 +03:00
"summary": "Added the 'foo.bar()' method call"
},
{
"span": {
"insert": {
"start": [
3,
1
],
"end": [
3,
9
]
}
},
"summary": "Added the 'bar(2, 3)' function call"
},
{
"span": {
"insert": {
"start": [
4,
1
],
"end": [
4,
10
]
}
},
"summary": "Added the 'bar(2, 3)' function call"
},
{
"span": {
"insert": {
"start": [
5,
1
],
"end": [
5,
6
]
}
},
"summary": "Added the 'print' identifier"
},
{
"span": {
"insert": {
"start": [
6,
1
],
"end": [
6,
8
]
}
},
"summary": "Added the 'foo.bar' member access"
},
{
"span": {
"insert": {
"start": [
7,
1
],
"end": [
7,
4
]
}
},
"summary": "Added the 'bar' identifier"
}
]
},
"errors": {}
},
"filePaths": [
"method-invocation.rb"
],
"patch": [
"diff --git a/method-invocation.rb b/method-invocation.rb",
"index fbe3bdc..c34b65a 100644",
"--- a/method-invocation.rb",
"+++ b/method-invocation.rb",
"@@ -1,3 +1,10 @@",
"+print(\"hello world\")",
"+foo.bar()",
"+bar 2, 3",
"+bar(2, 3)",
"+print",
"+foo.bar",
"+bar",
" print",
" foo.bar",
" bar"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "337912159e09103c0f9708052b84b68f93ff3543..ea127bd5909b83d6dee0fb6be0dcc5d7bc4988fd"
}
,{
"testCaseDescription": "ruby-method-invocation-delete-insert-test",
"expectedResult": {
"changes": {
"method-invocation.rb": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
1,
6
]
}
},
"summary": "Added the 'print' identifier"
},
{
"span": {
"insert": {
"start": [
2,
1
],
"end": [
2,
8
]
}
},
"summary": "Added the 'foo.bar' member access"
},
{
"span": {
"insert": {
"start": [
3,
1
],
"end": [
3,
4
]
}
},
"summary": "Added the 'bar' identifier"
},
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
1,
21
]
}
},
"summary": "Deleted the 'print(\"hello world\")' function call"
},
{
"span": {
"delete": {
"start": [
2,
1
],
"end": [
2,
10
]
}
},
2016-11-05 00:49:39 +03:00
"summary": "Deleted the 'foo.bar()' method call"
},
{
"span": {
"delete": {
"start": [
3,
1
],
"end": [
3,
9
]
}
},
"summary": "Deleted the 'bar(2, 3)' function call"
},
{
"span": {
"delete": {
"start": [
4,
1
],
"end": [
4,
10
]
}
},
"summary": "Deleted the 'bar(2, 3)' function call"
}
]
},
"errors": {}
},
"filePaths": [
"method-invocation.rb"
],
"patch": [
"diff --git a/method-invocation.rb b/method-invocation.rb",
"index c34b65a..02ba81a 100644",
"--- a/method-invocation.rb",
"+++ b/method-invocation.rb",
"@@ -1,7 +1,6 @@",
"-print(\"hello world\")",
"-foo.bar()",
"-bar 2, 3",
"-bar(2, 3)",
"+print",
"+foo.bar",
"+bar",
" print",
" foo.bar",
" bar"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "ea127bd5909b83d6dee0fb6be0dcc5d7bc4988fd..d1a8f6f9af6a5bfd0c1668a3d18dc3843c47e114"
}
,{
"testCaseDescription": "ruby-method-invocation-replacement-test",
"expectedResult": {
"changes": {
"method-invocation.rb": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
1,
21
]
}
},
"summary": "Added the 'print(\"hello world\")' function call"
},
{
"span": {
"insert": {
"start": [
2,
1
],
"end": [
2,
10
]
}
},
2016-11-05 00:49:39 +03:00
"summary": "Added the 'foo.bar()' method call"
},
{
"span": {
"insert": {
"start": [
3,
1
],
"end": [
3,
9
]
}
},
"summary": "Added the 'bar(2, 3)' function call"
},
{
"span": {
"insert": {
"start": [
4,
1
],
"end": [
4,
10
]
}
},
"summary": "Added the 'bar(2, 3)' function call"
},
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
1,
6
]
}
},
"summary": "Deleted the 'print' identifier"
},
{
"span": {
"delete": {
"start": [
2,
1
],
"end": [
2,
8
]
}
},
"summary": "Deleted the 'foo.bar' member access"
},
{
"span": {
"delete": {
"start": [
3,
1
],
"end": [
3,
4
]
}
},
"summary": "Deleted the 'bar' identifier"
}
]
},
"errors": {}
},
"filePaths": [
"method-invocation.rb"
],
"patch": [
"diff --git a/method-invocation.rb b/method-invocation.rb",
"index 02ba81a..c34b65a 100644",
"--- a/method-invocation.rb",
"+++ b/method-invocation.rb",
"@@ -1,6 +1,7 @@",
"-print",
"-foo.bar",
"-bar",
"+print(\"hello world\")",
"+foo.bar()",
"+bar 2, 3",
"+bar(2, 3)",
" print",
" foo.bar",
" bar"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "d1a8f6f9af6a5bfd0c1668a3d18dc3843c47e114..5fe58e778dc1c9be8f575f594e744ffefeeb4fc7"
}
,{
"testCaseDescription": "ruby-method-invocation-delete-replacement-test",
"expectedResult": {
"changes": {
"method-invocation.rb": [
{
"span": {
"delete": {
"start": [
8,
1
],
"end": [
8,
6
]
}
},
"summary": "Deleted the 'print' identifier"
},
{
"span": {
"delete": {
"start": [
9,
1
],
"end": [
9,
8
]
}
},
"summary": "Deleted the 'foo.bar' member access"
},
{
"span": {
"delete": {
"start": [
10,
1
],
"end": [
10,
4
]
}
},
"summary": "Deleted the 'bar' identifier"
}
]
},
"errors": {}
},
"filePaths": [
"method-invocation.rb"
],
"patch": [
"diff --git a/method-invocation.rb b/method-invocation.rb",
"index c34b65a..4e17a42 100644",
"--- a/method-invocation.rb",
"+++ b/method-invocation.rb",
"@@ -1,10 +1,7 @@",
"+print",
"+foo.bar",
"+bar",
" print(\"hello world\")",
" foo.bar()",
" bar 2, 3",
" bar(2, 3)",
"-print",
"-foo.bar",
"-bar",
"-print",
"-foo.bar",
"-bar"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "5fe58e778dc1c9be8f575f594e744ffefeeb4fc7..ec527d127ee949363d1abf4cb103ecfaf766c82a"
}
,{
"testCaseDescription": "ruby-method-invocation-delete-test",
"expectedResult": {
"changes": {
"method-invocation.rb": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
1,
6
]
}
},
"summary": "Deleted the 'print' identifier"
},
{
"span": {
"delete": {
"start": [
2,
1
],
"end": [
2,
8
]
}
},
"summary": "Deleted the 'foo.bar' member access"
},
{
"span": {
"delete": {
"start": [
3,
1
],
"end": [
3,
4
]
}
},
"summary": "Deleted the 'bar' identifier"
}
]
},
"errors": {}
},
"filePaths": [
"method-invocation.rb"
],
"patch": [
"diff --git a/method-invocation.rb b/method-invocation.rb",
"index 4e17a42..2db15c7 100644",
"--- a/method-invocation.rb",
"+++ b/method-invocation.rb",
"@@ -1,6 +1,3 @@",
"-print",
"-foo.bar",
"-bar",
" print(\"hello world\")",
" foo.bar()",
" bar 2, 3"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "ec527d127ee949363d1abf4cb103ecfaf766c82a..f373fd312755ca8a3de02ecce462b619ad8460dc"
}
,{
"testCaseDescription": "ruby-method-invocation-delete-rest-test",
"expectedResult": {
"changes": {
"method-invocation.rb": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
1,
21
]
}
},
"summary": "Deleted the 'print(\"hello world\")' function call"
},
{
"span": {
"delete": {
"start": [
2,
1
],
"end": [
2,
10
]
}
},
2016-11-05 00:49:39 +03:00
"summary": "Deleted the 'foo.bar()' method call"
},
{
"span": {
"delete": {
"start": [
3,
1
],
"end": [
3,
9
]
}
},
"summary": "Deleted the 'bar(2, 3)' function call"
},
{
"span": {
"delete": {
"start": [
4,
1
],
"end": [
4,
10
]
}
},
"summary": "Deleted the 'bar(2, 3)' function call"
}
]
},
"errors": {}
},
"filePaths": [
"method-invocation.rb"
],
"patch": [
"diff --git a/method-invocation.rb b/method-invocation.rb",
"index 2db15c7..e69de29 100644",
"--- a/method-invocation.rb",
"+++ b/method-invocation.rb",
"@@ -1,4 +0,0 @@",
"-print(\"hello world\")",
"-foo.bar()",
"-bar 2, 3",
"-bar(2, 3)"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "f373fd312755ca8a3de02ecce462b619ad8460dc..98200bee05decb871fcfdf6858ee954898880f72"
}]