1
1
mirror of https://github.com/github/semantic.git synced 2024-12-26 00:12:29 +03:00
semantic/test/corpus/diff-summaries/ruby/relational-operator.json
2017-01-10 16:58:40 -05:00

734 lines
23 KiB
JSON

[{
"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"
},
{
"span": {
"insert": {
"start": [
2,
1
],
"end": [
2,
7
]
}
},
"summary": "Added the 'x != y' binary statement"
},
{
"span": {
"insert": {
"start": [
3,
1
],
"end": [
3,
8
]
}
},
"summary": "Added the 'x === y' binary statement"
}
]
},
"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"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "88429f0be2cb1dafc9c8b1339ae88968f72b0acd..a77e0e6e4e5a807eebf1dbeda51a4f62d09e427a"
}
,{
"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"
},
{
"span": {
"insert": {
"start": [
2,
1
],
"end": [
2,
7
]
}
},
"summary": "Added the 'x =~ y' binary statement"
},
{
"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"
},
{
"span": {
"insert": {
"start": [
5,
1
],
"end": [
5,
7
]
}
},
"summary": "Added the 'x != y' binary statement"
},
{
"span": {
"insert": {
"start": [
6,
1
],
"end": [
6,
8
]
}
},
"summary": "Added the 'x === y' binary statement"
}
]
},
"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"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "a77e0e6e4e5a807eebf1dbeda51a4f62d09e427a..7f68968a0c652eb923b3e85f5db97dba640fc75e"
}
,{
"testCaseDescription": "ruby-relational-operator-delete-insert-test",
"expectedResult": {
"changes": {
"relational-operator.rb": [
{
"span": {
"replace": [
{
"start": [
1,
1
],
"end": [
1,
8
]
},
{
"start": [
1,
1
],
"end": [
1,
7
]
}
]
},
"summary": "Replaced the 'x <=> y' binary statement with the 'x == y' binary statement"
},
{
"span": {
"replace": [
{
"start": [
2,
1
],
"end": [
2,
7
]
},
{
"start": [
2,
1
],
"end": [
2,
7
]
}
]
},
"summary": "Replaced the 'x =~ y' binary statement with the 'x != y' binary statement"
},
{
"span": {
"insert": {
"start": [
3,
1
],
"end": [
3,
8
]
}
},
"summary": "Added the 'x === y' binary statement"
},
{
"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"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "7f68968a0c652eb923b3e85f5db97dba640fc75e..05587827d04e135e97e7c46112867190add41a86"
}
,{
"testCaseDescription": "ruby-relational-operator-replacement-test",
"expectedResult": {
"changes": {
"relational-operator.rb": [
{
"span": {
"replace": [
{
"start": [
1,
1
],
"end": [
1,
7
]
},
{
"start": [
1,
1
],
"end": [
1,
8
]
}
]
},
"summary": "Replaced the 'x == y' binary statement with the 'x <=> y' binary statement"
},
{
"span": {
"replace": [
{
"start": [
2,
1
],
"end": [
2,
7
]
},
{
"start": [
2,
1
],
"end": [
2,
7
]
}
]
},
"summary": "Replaced the 'x != y' binary statement with the 'x =~ y' binary statement"
},
{
"span": {
"insert": {
"start": [
3,
1
],
"end": [
3,
7
]
}
},
"summary": "Added the 'x' assignment"
},
{
"span": {
"delete": {
"start": [
3,
1
],
"end": [
3,
8
]
}
},
"summary": "Deleted the 'x === y' binary statement"
}
]
},
"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"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "05587827d04e135e97e7c46112867190add41a86..ef65f4e206d697c2fb430ac36e65576666d99bf1"
}
,{
"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"
},
{
"span": {
"delete": {
"start": [
2,
1
],
"end": [
2,
7
]
}
},
"summary": "Deleted the 'x =~ y' binary statement"
},
{
"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"
},
{
"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"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "ef65f4e206d697c2fb430ac36e65576666d99bf1..1e109930563f92a8ff3a8c08bd39085825642ee5"
}
,{
"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"
},
{
"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"
}
]
},
"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"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "1e109930563f92a8ff3a8c08bd39085825642ee5..a32169b2e8222471bf465741b9822387980b9902"
}
,{
"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"
},
{
"span": {
"delete": {
"start": [
2,
1
],
"end": [
2,
7
]
}
},
"summary": "Deleted the 'x =~ y' binary statement"
},
{
"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"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "a32169b2e8222471bf465741b9822387980b9902..b0cc59e6aa3699247d3763b615593a0a3a14cf6a"
}]