1
1
mirror of https://github.com/github/semantic.git synced 2024-12-26 16:33:03 +03:00
semantic/test/corpus/diff-summaries/ruby/relational-operator.json

740 lines
23 KiB
JSON
Raw Normal View History

2016-10-24 20:43:31 +03:00
[{
"testCaseDescription": "ruby-relational-operator-insert-test",
"expectedResult": {
"changes": {
"relational-operator.rb": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
1,
7
]
}
},
"summary": "Added the 'x == y' binary statement"
2016-10-24 20:43:31 +03:00
},
{
"span": {
"insert": {
"start": [
2,
1
],
"end": [
2,
7
]
}
},
"summary": "Added the 'x != y' binary statement"
2016-10-24 20:43:31 +03:00
},
{
"span": {
"insert": {
"start": [
3,
1
],
"end": [
3,
8
]
}
},
"summary": "Added the 'x === y' binary statement"
2016-10-24 20:43:31 +03:00
}
]
},
"errors": {}
},
"filePaths": [
"relational-operator.rb"
],
"patch": [
"diff --git a/relational-operator.rb b/relational-operator.rb",
"index e69de29..e2290b2 100644",
"--- a/relational-operator.rb",
"+++ b/relational-operator.rb",
"@@ -0,0 +1,3 @@",
"+x == y",
"+x != y",
"+x === y"
],
2016-10-24 20:43:31 +03:00
"gitDir": "test/corpus/repos/ruby",
2016-12-06 22:56:42 +03:00
"shas": "7c5058a233fff0a5b08a6fa3752565ecbdde40e5..bd8a856e8f56ace4398ea201818f1d2ba28fe4c8"
2016-10-24 20:43:31 +03:00
}
,{
"testCaseDescription": "ruby-relational-operator-replacement-insert-test",
"expectedResult": {
"changes": {
"relational-operator.rb": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
1,
8
]
}
},
"summary": "Added the 'x <=> y' binary statement"
2016-10-24 20:43:31 +03:00
},
{
"span": {
"insert": {
"start": [
2,
1
],
"end": [
2,
7
]
}
},
"summary": "Added the 'x =~ y' binary statement"
2016-10-24 20:43:31 +03:00
},
{
"span": {
"insert": {
"start": [
3,
1
],
"end": [
3,
7
]
}
},
"summary": "Added the 'x' assignment"
},
{
"span": {
"insert": {
"start": [
4,
1
],
"end": [
4,
7
]
}
},
"summary": "Added the 'x == y' binary statement"
2016-10-24 20:43:31 +03:00
},
{
"span": {
"insert": {
"start": [
5,
1
],
"end": [
5,
7
]
}
},
"summary": "Added the 'x != y' binary statement"
2016-10-24 20:43:31 +03:00
},
{
"span": {
"insert": {
"start": [
6,
1
],
"end": [
6,
8
]
}
},
"summary": "Added the 'x === y' binary statement"
2016-10-24 20:43:31 +03:00
}
]
},
"errors": {}
},
"filePaths": [
"relational-operator.rb"
],
"patch": [
"diff --git a/relational-operator.rb b/relational-operator.rb",
"index e2290b2..d547ce5 100644",
"--- a/relational-operator.rb",
"+++ b/relational-operator.rb",
"@@ -1,3 +1,9 @@",
"+x <=> y",
"+x =~ y",
"+x =! y",
"+x == y",
"+x != y",
"+x === y",
" x == y",
" x != y",
" x === y"
],
2016-10-24 20:43:31 +03:00
"gitDir": "test/corpus/repos/ruby",
2016-12-06 22:56:42 +03:00
"shas": "bd8a856e8f56ace4398ea201818f1d2ba28fe4c8..c68133f93df60e32edbf8f4f54fd5fb233857e17"
2016-10-24 20:43:31 +03:00
}
,{
"testCaseDescription": "ruby-relational-operator-delete-insert-test",
"expectedResult": {
"changes": {
"relational-operator.rb": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
1,
7
]
}
},
"summary": "Added the 'x == y' binary statement"
},
{
"span": {
"replace": [
{
"start": [
1,
1
],
"end": [
1,
8
]
},
{
"start": [
2,
1
],
"end": [
2,
7
]
}
]
},
"summary": "Replaced the 'x <=> y' binary statement with the 'x != y' binary statement"
},
{
"span": {
"replace": [
{
"start": [
2,
1
],
"end": [
2,
7
]
},
{
"start": [
3,
1
],
"end": [
3,
8
]
}
]
},
"summary": "Replaced the 'x =~ y' binary statement with the 'x === y' binary statement"
2016-10-24 20:43:31 +03:00
},
{
"span": {
"delete": {
"start": [
3,
1
],
"end": [
3,
7
]
}
},
"summary": "Deleted the 'x' assignment"
}
]
},
"errors": {}
},
"filePaths": [
"relational-operator.rb"
],
"patch": [
"diff --git a/relational-operator.rb b/relational-operator.rb",
"index d547ce5..5849f29 100644",
"--- a/relational-operator.rb",
"+++ b/relational-operator.rb",
"@@ -1,6 +1,6 @@",
"-x <=> y",
"-x =~ y",
"-x =! y",
"+x == y",
"+x != y",
"+x === y",
" x == y",
" x != y",
" x === y"
],
2016-10-24 20:43:31 +03:00
"gitDir": "test/corpus/repos/ruby",
2016-12-06 22:56:42 +03:00
"shas": "c68133f93df60e32edbf8f4f54fd5fb233857e17..ad13ab775a8fd37a46de7b08990b8061c84bba67"
2016-10-24 20:43:31 +03:00
}
,{
"testCaseDescription": "ruby-relational-operator-replacement-test",
"expectedResult": {
"changes": {
"relational-operator.rb": [
{
"span": {
"insert": {
2016-10-24 20:43:31 +03:00
"start": [
1,
1
],
"end": [
1,
8
2016-10-24 20:43:31 +03:00
]
}
},
"summary": "Added the 'x <=> y' binary statement"
},
{
"span": {
2016-12-06 22:56:42 +03:00
"insert": {
"start": [
2,
1
],
"end": [
2,
7
]
}
},
2016-12-06 22:56:42 +03:00
"summary": "Added the 'x =~ y' binary statement"
2016-10-24 20:43:31 +03:00
},
{
"span": {
"insert": {
"start": [
3,
1
],
"end": [
3,
7
]
}
},
"summary": "Added the 'x' assignment"
},
2016-12-06 22:56:42 +03:00
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
1,
7
]
}
},
"summary": "Deleted the 'x == y' binary statement"
},
{
"span": {
"delete": {
"start": [
2,
1
],
"end": [
2,
7
]
}
},
"summary": "Deleted the 'x != y' binary statement"
},
{
"span": {
"delete": {
"start": [
3,
1
],
"end": [
3,
8
]
}
},
"summary": "Deleted the 'x === y' binary statement"
2016-10-24 20:43:31 +03:00
}
]
},
"errors": {}
},
"filePaths": [
"relational-operator.rb"
],
"patch": [
"diff --git a/relational-operator.rb b/relational-operator.rb",
"index 5849f29..d547ce5 100644",
"--- a/relational-operator.rb",
"+++ b/relational-operator.rb",
"@@ -1,6 +1,6 @@",
"-x == y",
"-x != y",
"-x === y",
"+x <=> y",
"+x =~ y",
"+x =! y",
" x == y",
" x != y",
" x === y"
],
2016-10-24 20:43:31 +03:00
"gitDir": "test/corpus/repos/ruby",
2016-12-06 22:56:42 +03:00
"shas": "ad13ab775a8fd37a46de7b08990b8061c84bba67..c61d17cf7eb2887bbdf676ee6e57ebe1dca60402"
2016-10-24 20:43:31 +03:00
}
,{
"testCaseDescription": "ruby-relational-operator-delete-replacement-test",
"expectedResult": {
"changes": {
"relational-operator.rb": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
1,
8
]
}
},
"summary": "Deleted the 'x <=> y' binary statement"
2016-10-24 20:43:31 +03:00
},
{
"span": {
"delete": {
"start": [
2,
1
],
"end": [
2,
7
]
}
},
"summary": "Deleted the 'x =~ y' binary statement"
2016-10-24 20:43:31 +03:00
},
{
"span": {
"delete": {
"start": [
3,
1
],
"end": [
3,
7
]
}
},
"summary": "Deleted the 'x' assignment"
},
{
"span": {
"delete": {
"start": [
4,
1
],
"end": [
4,
7
]
}
},
"summary": "Deleted the 'x == y' binary statement"
},
{
"span": {
"delete": {
"start": [
5,
1
],
"end": [
5,
7
]
}
},
"summary": "Deleted the 'x != y' binary statement"
},
{
"span": {
"delete": {
"start": [
6,
1
],
"end": [
6,
8
]
}
},
"summary": "Deleted the 'x === y' binary statement"
},
{
"span": {
"insert": {
"start": [
4,
1
],
"end": [
4,
8
]
}
},
"summary": "Added the 'x <=> y' binary statement"
},
{
"span": {
"insert": {
"start": [
5,
1
],
"end": [
5,
7
]
}
},
"summary": "Added the 'x =~ y' binary statement"
2016-10-24 20:43:31 +03:00
},
{
"span": {
"insert": {
"start": [
6,
1
],
"end": [
6,
7
]
}
},
"summary": "Added the 'x' assignment"
}
]
},
"errors": {}
},
"filePaths": [
"relational-operator.rb"
],
"patch": [
"diff --git a/relational-operator.rb b/relational-operator.rb",
"index d547ce5..ac1eb5d 100644",
"--- a/relational-operator.rb",
"+++ b/relational-operator.rb",
"@@ -1,9 +1,6 @@",
"-x <=> y",
"-x =~ y",
"-x =! y",
"-x == y",
"-x != y",
"-x === y",
" x == y",
" x != y",
" x === y",
"+x <=> y",
"+x =~ y",
"+x =! y"
],
2016-10-24 20:43:31 +03:00
"gitDir": "test/corpus/repos/ruby",
2016-12-06 22:56:42 +03:00
"shas": "c61d17cf7eb2887bbdf676ee6e57ebe1dca60402..99180bace272ebfed8d920758060fa1b1915e229"
2016-10-24 20:43:31 +03:00
}
,{
"testCaseDescription": "ruby-relational-operator-delete-test",
"expectedResult": {
"changes": {
"relational-operator.rb": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
1,
7
]
}
},
"summary": "Deleted the 'x == y' binary statement"
2016-10-24 20:43:31 +03:00
},
{
"span": {
"delete": {
"start": [
2,
1
],
"end": [
2,
7
]
}
},
"summary": "Deleted the 'x != y' binary statement"
2016-10-24 20:43:31 +03:00
},
{
"span": {
"delete": {
"start": [
3,
1
],
"end": [
3,
8
]
}
},
"summary": "Deleted the 'x === y' binary statement"
2016-10-24 20:43:31 +03:00
}
]
},
"errors": {}
},
"filePaths": [
"relational-operator.rb"
],
"patch": [
"diff --git a/relational-operator.rb b/relational-operator.rb",
"index ac1eb5d..8180103 100644",
"--- a/relational-operator.rb",
"+++ b/relational-operator.rb",
"@@ -1,6 +1,3 @@",
"-x == y",
"-x != y",
"-x === y",
" x <=> y",
" x =~ y",
" x =! y"
],
2016-10-24 20:43:31 +03:00
"gitDir": "test/corpus/repos/ruby",
2016-12-06 22:56:42 +03:00
"shas": "99180bace272ebfed8d920758060fa1b1915e229..1326cc387018c547c94716af26d3c421ba8fb0f5"
2016-10-24 20:43:31 +03:00
}
,{
"testCaseDescription": "ruby-relational-operator-delete-rest-test",
"expectedResult": {
"changes": {
"relational-operator.rb": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
1,
8
]
}
},
"summary": "Deleted the 'x <=> y' binary statement"
2016-10-24 20:43:31 +03:00
},
{
"span": {
"delete": {
"start": [
2,
1
],
"end": [
2,
7
]
}
},
"summary": "Deleted the 'x =~ y' binary statement"
2016-10-24 20:43:31 +03:00
},
{
"span": {
"delete": {
"start": [
3,
1
],
"end": [
3,
7
]
}
},
"summary": "Deleted the 'x' assignment"
}
]
},
"errors": {}
},
"filePaths": [
"relational-operator.rb"
],
"patch": [
"diff --git a/relational-operator.rb b/relational-operator.rb",
"index 8180103..e69de29 100644",
"--- a/relational-operator.rb",
"+++ b/relational-operator.rb",
"@@ -1,3 +0,0 @@",
"-x <=> y",
"-x =~ y",
"-x =! y"
],
2016-10-24 20:43:31 +03:00
"gitDir": "test/corpus/repos/ruby",
2016-12-06 22:56:42 +03:00
"shas": "1326cc387018c547c94716af26d3c421ba8fb0f5..90aa585d4ae985a7c45200caf714149779717558"
2016-10-24 20:43:31 +03:00
}]