mirror of
https://github.com/github/semantic.git
synced 2024-12-23 14:54:16 +03:00
85367c9312
Fixes #771, a long standing issue in JavaScript diffing
348 lines
11 KiB
JSON
348 lines
11 KiB
JSON
[{
|
|
"testCaseDescription": "javascript-relational-operator-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"relational-operator.js": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
6
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'x < y' relational operator"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"relational-operator.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/relational-operator.js b/relational-operator.js",
|
|
"index e69de29b..4021910f 100644",
|
|
"--- a/relational-operator.js",
|
|
"+++ b/relational-operator.js",
|
|
"@@ -0,0 +1 @@",
|
|
"+x < y;"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "1d234a84ee270c0d6a329fcdcbc065e50bed813b..f7081b58f603918674558efe269d8dbd1ffc0835"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-relational-operator-replacement-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"relational-operator.js": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
7
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'x <= y' relational operator"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
6
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'x < y' relational operator"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"relational-operator.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/relational-operator.js b/relational-operator.js",
|
|
"index 4021910f..dbef0501 100644",
|
|
"--- a/relational-operator.js",
|
|
"+++ b/relational-operator.js",
|
|
"@@ -1 +1,3 @@",
|
|
"+x <= y;",
|
|
"+x < y;",
|
|
" x < y;"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "f7081b58f603918674558efe269d8dbd1ffc0835..57f5399d4cf2022a779be84e5e9ffe8f15beca07"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-relational-operator-delete-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"relational-operator.js": [
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
7
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
6
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'x <= y' relational operator with the 'x < y' relational operator"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"relational-operator.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/relational-operator.js b/relational-operator.js",
|
|
"index dbef0501..a9ff7f65 100644",
|
|
"--- a/relational-operator.js",
|
|
"+++ b/relational-operator.js",
|
|
"@@ -1,3 +1,3 @@",
|
|
"-x <= y;",
|
|
"+x < y;",
|
|
" x < y;",
|
|
" x < y;"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "57f5399d4cf2022a779be84e5e9ffe8f15beca07..3161974cca9b971b21e69bbe11c32ece0e43e408"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-relational-operator-replacement-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"relational-operator.js": [
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
6
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
7
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'x < y' relational operator with the 'x <= y' relational operator"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"relational-operator.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/relational-operator.js b/relational-operator.js",
|
|
"index a9ff7f65..dbef0501 100644",
|
|
"--- a/relational-operator.js",
|
|
"+++ b/relational-operator.js",
|
|
"@@ -1,3 +1,3 @@",
|
|
"-x < y;",
|
|
"+x <= y;",
|
|
" x < y;",
|
|
" x < y;"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "3161974cca9b971b21e69bbe11c32ece0e43e408..b7a5454b7132955133e3749565ef37567cfa2d5e"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-relational-operator-delete-replacement-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"relational-operator.js": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
7
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'x <= y' relational operator"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
6
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'x < y' relational operator"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
7
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'x <= y' relational operator"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"relational-operator.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/relational-operator.js b/relational-operator.js",
|
|
"index dbef0501..1ee42eb9 100644",
|
|
"--- a/relational-operator.js",
|
|
"+++ b/relational-operator.js",
|
|
"@@ -1,3 +1,2 @@",
|
|
"-x <= y;",
|
|
"-x < y;",
|
|
" x < y;",
|
|
"+x <= y;"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "b7a5454b7132955133e3749565ef37567cfa2d5e..c40fd681cdd3b75acaf0826df149b0e9c13ceb4f"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-relational-operator-delete-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"relational-operator.js": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
6
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'x < y' relational operator"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"relational-operator.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/relational-operator.js b/relational-operator.js",
|
|
"index 1ee42eb9..3be8450f 100644",
|
|
"--- a/relational-operator.js",
|
|
"+++ b/relational-operator.js",
|
|
"@@ -1,2 +1 @@",
|
|
"-x < y;",
|
|
" x <= y;"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "c40fd681cdd3b75acaf0826df149b0e9c13ceb4f..7e0cd5e7ebf2702d445a75bb632353547258d65b"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-relational-operator-delete-rest-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"relational-operator.js": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
7
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'x <= y' relational operator"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"relational-operator.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/relational-operator.js b/relational-operator.js",
|
|
"index 3be8450f..e69de29b 100644",
|
|
"--- a/relational-operator.js",
|
|
"+++ b/relational-operator.js",
|
|
"@@ -1 +0,0 @@",
|
|
"-x <= y;"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "7e0cd5e7ebf2702d445a75bb632353547258d65b..8a27197df5dd32970d666dec2ed87840381ee268"
|
|
}]
|