1
1
mirror of https://github.com/github/semantic.git synced 2024-12-24 23:42:31 +03:00
semantic/test/corpus/diff-summaries/ruby/boolean-operator.json
2017-01-25 20:27:46 -05: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": "502a790cb75c5cd2f5a1166305c358bca7535c16..0c26fdb0f1aba41228b41822641f41c7cf33e3ff"
}
,{
"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": "0c26fdb0f1aba41228b41822641f41c7cf33e3ff..bce58fa8f6e6b6a1637bed891e3f9be91cba8614"
}
,{
"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": "bce58fa8f6e6b6a1637bed891e3f9be91cba8614..b07b94c6b0a2f2bb84788f610181a7a5989fb404"
}
,{
"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": "b07b94c6b0a2f2bb84788f610181a7a5989fb404..d3ed9391e469db052979ba6991b101b7a1baa97b"
}
,{
"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": "d3ed9391e469db052979ba6991b101b7a1baa97b..d97528c4c6f6b944d5415386ed8c94784c3d5cad"
}
,{
"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": "d97528c4c6f6b944d5415386ed8c94784c3d5cad..20168e6d538da9ab68d624225cb4321da06adf13"
}
,{
"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": "20168e6d538da9ab68d624225cb4321da06adf13..6c27e99fb23d5f85525e0885c8e8a54cbfc8717a"
}]