mirror of
https://github.com/github/semantic.git
synced 2024-12-23 14:54:16 +03:00
354 lines
11 KiB
JSON
354 lines
11 KiB
JSON
[{
|
|
"testCaseDescription": "javascript-object-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"object.js": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
21
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the '{ \"key1\": \"value1\" }' object"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"object.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/object.js b/object.js",
|
|
"index e69de29..fe17bb2 100644",
|
|
"--- a/object.js",
|
|
"+++ b/object.js",
|
|
"@@ -0,0 +1 @@",
|
|
"+{ \"key1\": \"value1\" };"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "5dede241573c8e353a4d8c662194e8e3b750e01a..45f29912e03b7de277df4c10ad238121235b6ed7"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-object-replacement-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"object.js": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
54
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the '{ \"key1\": \"value1\", \"key2\": \"value2\", \"key3\": \"3.0\" }' object"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
21
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the '{ \"key1\": \"value1\" }' object"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"object.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/object.js b/object.js",
|
|
"index fe17bb2..741c3dc 100644",
|
|
"--- a/object.js",
|
|
"+++ b/object.js",
|
|
"@@ -1 +1,3 @@",
|
|
"+{ \"key1\": \"value1\", \"key2\": \"value2\", \"key3\": \"3.0\" };",
|
|
"+{ \"key1\": \"value1\" };",
|
|
" { \"key1\": \"value1\" };"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "45f29912e03b7de277df4c10ad238121235b6ed7..4e17781769a2098bcce839e1282b1fa0d1df7821"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-object-delete-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"object.js": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
21
|
|
],
|
|
"end": [
|
|
1,
|
|
37
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the '\"key2\": \"value2\"' pair"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
39
|
|
],
|
|
"end": [
|
|
1,
|
|
52
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the '\"key3\": \"3.0\"' pair"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"object.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/object.js b/object.js",
|
|
"index 741c3dc..701239d 100644",
|
|
"--- a/object.js",
|
|
"+++ b/object.js",
|
|
"@@ -1,3 +1,3 @@",
|
|
"-{ \"key1\": \"value1\", \"key2\": \"value2\", \"key3\": \"3.0\" };",
|
|
"+{ \"key1\": \"value1\" };",
|
|
" { \"key1\": \"value1\" };",
|
|
" { \"key1\": \"value1\" };"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "4e17781769a2098bcce839e1282b1fa0d1df7821..d035734af1172dab5eb30ad01fe898f5d850606c"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-object-replacement-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"object.js": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
1,
|
|
21
|
|
],
|
|
"end": [
|
|
1,
|
|
37
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the '\"key2\": \"value2\"' pair"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
1,
|
|
39
|
|
],
|
|
"end": [
|
|
1,
|
|
52
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the '\"key3\": \"3.0\"' pair"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"object.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/object.js b/object.js",
|
|
"index 701239d..741c3dc 100644",
|
|
"--- a/object.js",
|
|
"+++ b/object.js",
|
|
"@@ -1,3 +1,3 @@",
|
|
"-{ \"key1\": \"value1\" };",
|
|
"+{ \"key1\": \"value1\", \"key2\": \"value2\", \"key3\": \"3.0\" };",
|
|
" { \"key1\": \"value1\" };",
|
|
" { \"key1\": \"value1\" };"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "d035734af1172dab5eb30ad01fe898f5d850606c..d172e093c2f663040bb8d2c429564a4d273753d3"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-object-delete-replacement-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"object.js": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
54
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the '{ \"key1\": \"value1\", \"key2\": \"value2\", \"key3\": \"3.0\" }' object"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
21
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the '{ \"key1\": \"value1\" }' object"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
54
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the '{ \"key1\": \"value1\", \"key2\": \"value2\", \"key3\": \"3.0\" }' object"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"object.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/object.js b/object.js",
|
|
"index 741c3dc..9e48273 100644",
|
|
"--- a/object.js",
|
|
"+++ b/object.js",
|
|
"@@ -1,3 +1,2 @@",
|
|
"-{ \"key1\": \"value1\", \"key2\": \"value2\", \"key3\": \"3.0\" };",
|
|
"-{ \"key1\": \"value1\" };",
|
|
" { \"key1\": \"value1\" };",
|
|
"+{ \"key1\": \"value1\", \"key2\": \"value2\", \"key3\": \"3.0\" };"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "d172e093c2f663040bb8d2c429564a4d273753d3..337ff59260d3eed7762de977645c68224ea4d46c"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-object-delete-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"object.js": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
21
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the '{ \"key1\": \"value1\" }' object"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"object.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/object.js b/object.js",
|
|
"index 9e48273..12d063a 100644",
|
|
"--- a/object.js",
|
|
"+++ b/object.js",
|
|
"@@ -1,2 +1 @@",
|
|
"-{ \"key1\": \"value1\" };",
|
|
" { \"key1\": \"value1\", \"key2\": \"value2\", \"key3\": \"3.0\" };"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "337ff59260d3eed7762de977645c68224ea4d46c..9d30494c528991b340e861222f5a6276e874a964"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-object-delete-rest-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"object.js": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
54
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the '{ \"key1\": \"value1\", \"key2\": \"value2\", \"key3\": \"3.0\" }' object"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"object.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/object.js b/object.js",
|
|
"index 12d063a..e69de29 100644",
|
|
"--- a/object.js",
|
|
"+++ b/object.js",
|
|
"@@ -1 +0,0 @@",
|
|
"-{ \"key1\": \"value1\", \"key2\": \"value2\", \"key3\": \"3.0\" };"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "9d30494c528991b340e861222f5a6276e874a964..ba01e3794a8efa31353fd2d5726c70bb2ad8c6a8"
|
|
}]
|