Skip to content

Commit 0a7bd77

Browse files
committed
Update test data
1 parent 3e07c4f commit 0a7bd77

File tree

3 files changed

+25
-46
lines changed

3 files changed

+25
-46
lines changed

crates/rust-analyzer/src/lsp_ext.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,9 @@ pub struct CodeAction {
206206
#[derive(Debug, Eq, PartialEq, Clone, Default, Deserialize, Serialize)]
207207
#[serde(rename_all = "camelCase")]
208208
pub struct SnippetWorkspaceEdit {
209+
#[serde(skip_serializing_if = "Option::is_none")]
209210
pub changes: Option<HashMap<lsp_types::Url, Vec<lsp_types::TextEdit>>>,
211+
#[serde(skip_serializing_if = "Option::is_none")]
210212
pub document_changes: Option<Vec<SnippetDocumentChangeOperation>>,
211213
}
212214

crates/rust-analyzer/tests/heavy_tests/main.rs

Lines changed: 14 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -333,29 +333,17 @@ fn main() {}
333333
partial_result_params: PartialResultParams::default(),
334334
work_done_progress_params: WorkDoneProgressParams::default(),
335335
},
336-
json!([
337-
{
338-
"command": {
339-
"arguments": [
336+
json!([{
337+
"edit": {
338+
"documentChanges": [
340339
{
341-
"cursorPosition": null,
342-
"label": "Create module",
343-
"workspaceEdit": {
344-
"documentChanges": [
345-
{
346-
"kind": "create",
347-
"uri": "file:///[..]/src/bar.rs"
348-
}
349-
]
350-
}
340+
"kind": "create",
341+
"uri": "file:///[..]/src/bar.rs"
351342
}
352-
],
353-
"command": "rust-analyzer.applySourceChange",
354-
"title": "Create module"
343+
]
355344
},
356345
"title": "Create module"
357-
}
358-
]),
346+
}]),
359347
);
360348

361349
server.request::<CodeActionRequest>(
@@ -416,29 +404,17 @@ fn main() {{}}
416404
partial_result_params: PartialResultParams::default(),
417405
work_done_progress_params: WorkDoneProgressParams::default(),
418406
},
419-
json!([
420-
{
421-
"command": {
422-
"arguments": [
407+
json!([{
408+
"edit": {
409+
"documentChanges": [
423410
{
424-
"cursorPosition": null,
425-
"label": "Create module",
426-
"workspaceEdit": {
427-
"documentChanges": [
428-
{
429-
"kind": "create",
430-
"uri": "file:///[..]/src/bar.rs"
431-
}
432-
]
433-
}
411+
"kind": "create",
412+
"uri": "file://[..]/src/bar.rs"
434413
}
435-
],
436-
"command": "rust-analyzer.applySourceChange",
437-
"title": "Create module"
414+
]
438415
},
439416
"title": "Create module"
440-
}
441-
]),
417+
}]),
442418
);
443419

444420
server.request::<CodeActionRequest>(

crates/test_utils/src/lib.rs

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -471,14 +471,15 @@ pub fn read_text(path: &Path) -> String {
471471
/// also creates a file at `./target/.slow_tests_cookie` which serves as a flag
472472
/// that slow tests did run.
473473
pub fn skip_slow_tests() -> bool {
474-
let should_skip = std::env::var("CI").is_err() && std::env::var("RUN_SLOW_TESTS").is_err();
475-
if should_skip {
476-
eprintln!("ignoring slow test")
477-
} else {
478-
let path = project_dir().join("./target/.slow_tests_cookie");
479-
fs::write(&path, ".").unwrap();
480-
}
481-
should_skip
474+
// let should_skip = std::env::var("CI").is_err() && std::env::var("RUN_SLOW_TESTS").is_err();
475+
// if should_skip {
476+
// eprintln!("ignoring slow test")
477+
// } else {
478+
// let path = project_dir().join("./target/.slow_tests_cookie");
479+
// fs::write(&path, ".").unwrap();
480+
// }
481+
// should_skip
482+
false
482483
}
483484

484485
const REWRITE: bool = false;

0 commit comments

Comments
 (0)