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/boolean-operator.json
2016-12-06 11:56:42 -08:00

348 lines
10 KiB
JSON

[{
"testCaseDescription": "ruby-boolean-operator-insert-test",
"expectedResult": {
"changes": {
"boolean-operator.rb": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
1,
7
]
}
},
"summary": "Added the 'a || b' binary statement"
}
]
},
"errors": {}
},
"filePaths": [
"boolean-operator.rb"
],
"patch": [
"diff --git a/boolean-operator.rb b/boolean-operator.rb",
"index e69de29..ba0778d 100644",
"--- a/boolean-operator.rb",
"+++ b/boolean-operator.rb",
"@@ -0,0 +1 @@",
"+a || b"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "e29d844a20e10103ff1197d78c6639bba8fc6e8a..df14bb28f16cb2a1559a25f79ed0f828988ae3f1"
}
,{
"testCaseDescription": "ruby-boolean-operator-replacement-insert-test",
"expectedResult": {
"changes": {
"boolean-operator.rb": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
1,
7
]
}
},
"summary": "Added the 'a && b' binary statement"
},
{
"span": {
"insert": {
"start": [
2,
1
],
"end": [
2,
7
]
}
},
"summary": "Added the 'a || b' binary statement"
}
]
},
"errors": {}
},
"filePaths": [
"boolean-operator.rb"
],
"patch": [
"diff --git a/boolean-operator.rb b/boolean-operator.rb",
"index ba0778d..2d34b94 100644",
"--- a/boolean-operator.rb",
"+++ b/boolean-operator.rb",
"@@ -1 +1,3 @@",
"+a && b",
"+a || b",
" a || b"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "df14bb28f16cb2a1559a25f79ed0f828988ae3f1..f5f5bd68d54c7d785cb8be9fa807e45b0edb3e49"
}
,{
"testCaseDescription": "ruby-boolean-operator-delete-insert-test",
"expectedResult": {
"changes": {
"boolean-operator.rb": [
{
"span": {
"replace": [
{
"start": [
1,
1
],
"end": [
1,
7
]
},
{
"start": [
1,
1
],
"end": [
1,
7
]
}
]
},
"summary": "Replaced the 'a && b' binary statement with the 'a || b' binary statement"
}
]
},
"errors": {}
},
"filePaths": [
"boolean-operator.rb"
],
"patch": [
"diff --git a/boolean-operator.rb b/boolean-operator.rb",
"index 2d34b94..2c61248 100644",
"--- a/boolean-operator.rb",
"+++ b/boolean-operator.rb",
"@@ -1,3 +1,3 @@",
"-a && b",
"+a || b",
" a || b",
" a || b"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "f5f5bd68d54c7d785cb8be9fa807e45b0edb3e49..b6258c7694077f26c384afdba0d38ff1c987c01e"
}
,{
"testCaseDescription": "ruby-boolean-operator-replacement-test",
"expectedResult": {
"changes": {
"boolean-operator.rb": [
{
"span": {
"replace": [
{
"start": [
1,
1
],
"end": [
1,
7
]
},
{
"start": [
1,
1
],
"end": [
1,
7
]
}
]
},
"summary": "Replaced the 'a || b' binary statement with the 'a && b' binary statement"
}
]
},
"errors": {}
},
"filePaths": [
"boolean-operator.rb"
],
"patch": [
"diff --git a/boolean-operator.rb b/boolean-operator.rb",
"index 2c61248..2d34b94 100644",
"--- a/boolean-operator.rb",
"+++ b/boolean-operator.rb",
"@@ -1,3 +1,3 @@",
"-a || b",
"+a && b",
" a || b",
" a || b"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "b6258c7694077f26c384afdba0d38ff1c987c01e..53428a8acedfee4c1f2f28b0c8b798fc74d5ae20"
}
,{
"testCaseDescription": "ruby-boolean-operator-delete-replacement-test",
"expectedResult": {
"changes": {
"boolean-operator.rb": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
1,
7
]
}
},
"summary": "Deleted the 'a && b' binary statement"
},
{
"span": {
"delete": {
"start": [
2,
1
],
"end": [
2,
7
]
}
},
"summary": "Deleted the 'a || b' binary statement"
},
{
"span": {
"insert": {
"start": [
2,
1
],
"end": [
2,
7
]
}
},
"summary": "Added the 'a && b' binary statement"
}
]
},
"errors": {}
},
"filePaths": [
"boolean-operator.rb"
],
"patch": [
"diff --git a/boolean-operator.rb b/boolean-operator.rb",
"index 2d34b94..32a41c9 100644",
"--- a/boolean-operator.rb",
"+++ b/boolean-operator.rb",
"@@ -1,3 +1,2 @@",
"-a && b",
"-a || b",
" a || b",
"+a && b"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "53428a8acedfee4c1f2f28b0c8b798fc74d5ae20..11ad3b40423df923fb6260046df3bd83b3b2fc94"
}
,{
"testCaseDescription": "ruby-boolean-operator-delete-test",
"expectedResult": {
"changes": {
"boolean-operator.rb": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
1,
7
]
}
},
"summary": "Deleted the 'a || b' binary statement"
}
]
},
"errors": {}
},
"filePaths": [
"boolean-operator.rb"
],
"patch": [
"diff --git a/boolean-operator.rb b/boolean-operator.rb",
"index 32a41c9..b0af58d 100644",
"--- a/boolean-operator.rb",
"+++ b/boolean-operator.rb",
"@@ -1,2 +1 @@",
"-a || b",
" a && b"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "11ad3b40423df923fb6260046df3bd83b3b2fc94..1a515a532b8a07afeeedbdd56956bf3e6a4f4f57"
}
,{
"testCaseDescription": "ruby-boolean-operator-delete-rest-test",
"expectedResult": {
"changes": {
"boolean-operator.rb": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
1,
7
]
}
},
"summary": "Deleted the 'a && b' binary statement"
}
]
},
"errors": {}
},
"filePaths": [
"boolean-operator.rb"
],
"patch": [
"diff --git a/boolean-operator.rb b/boolean-operator.rb",
"index b0af58d..e69de29 100644",
"--- a/boolean-operator.rb",
"+++ b/boolean-operator.rb",
"@@ -1 +0,0 @@",
"-a && b"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "1a515a532b8a07afeeedbdd56956bf3e6a4f4f57..7c5058a233fff0a5b08a6fa3752565ecbdde40e5"
}]