chore: Bump Rust edition to 2024 (#27800)
Follow-up to https://github.com/zed-industries/zed/pull/27791 Release Notes: - N/A
This commit is contained in:
@@ -1,35 +1,35 @@
|
||||
use crate::*;
|
||||
use dap::{
|
||||
ErrorResponse, RunInTerminalRequestArguments, SourceBreakpoint, StartDebuggingRequestArguments,
|
||||
StartDebuggingRequestArgumentsRequest,
|
||||
client::SessionId,
|
||||
requests::{
|
||||
Continue, Disconnect, Launch, Next, RunInTerminal, SetBreakpoints, StackTrace,
|
||||
StartDebugging, StepBack, StepIn, StepOut, Threads,
|
||||
},
|
||||
ErrorResponse, RunInTerminalRequestArguments, SourceBreakpoint, StartDebuggingRequestArguments,
|
||||
StartDebuggingRequestArgumentsRequest,
|
||||
};
|
||||
use editor::{
|
||||
actions::{self},
|
||||
Editor, EditorMode, MultiBuffer,
|
||||
actions::{self},
|
||||
};
|
||||
use gpui::{BackgroundExecutor, TestAppContext, VisualTestContext};
|
||||
use project::{
|
||||
debugger::session::{ThreadId, ThreadStatus},
|
||||
FakeFs, Project,
|
||||
debugger::session::{ThreadId, ThreadStatus},
|
||||
};
|
||||
use serde_json::json;
|
||||
use std::{
|
||||
path::Path,
|
||||
sync::{
|
||||
atomic::{AtomicBool, Ordering},
|
||||
Arc,
|
||||
atomic::{AtomicBool, Ordering},
|
||||
},
|
||||
};
|
||||
use task::LaunchConfig;
|
||||
use terminal_view::{terminal_panel::TerminalPanel, TerminalView};
|
||||
use terminal_view::{TerminalView, terminal_panel::TerminalPanel};
|
||||
use tests::{active_debug_session_panel, init_test, init_test_workspace};
|
||||
use util::path;
|
||||
use workspace::{dock::Panel, Item};
|
||||
use workspace::{Item, dock::Panel};
|
||||
|
||||
#[gpui::test]
|
||||
async fn test_basic_show_debug_panel(executor: BackgroundExecutor, cx: &mut TestAppContext) {
|
||||
@@ -444,15 +444,17 @@ async fn test_handle_successful_run_in_terminal_reverse_request(
|
||||
let panel = terminal_panel.read(cx).pane().unwrap().read(cx);
|
||||
|
||||
assert_eq!(1, panel.items_len());
|
||||
assert!(panel
|
||||
.active_item()
|
||||
.unwrap()
|
||||
.downcast::<TerminalView>()
|
||||
.unwrap()
|
||||
.read(cx)
|
||||
.terminal()
|
||||
.read(cx)
|
||||
.debug_terminal());
|
||||
assert!(
|
||||
panel
|
||||
.active_item()
|
||||
.unwrap()
|
||||
.downcast::<TerminalView>()
|
||||
.unwrap()
|
||||
.read(cx)
|
||||
.terminal()
|
||||
.read(cx)
|
||||
.debug_terminal()
|
||||
);
|
||||
})
|
||||
.unwrap();
|
||||
|
||||
@@ -772,15 +774,21 @@ async fn test_shutdown_children_when_parent_session_shutdown(
|
||||
|
||||
// assert parent session and all children sessions are shutdown
|
||||
dap_store.update(cx, |dap_store, cx| {
|
||||
assert!(dap_store
|
||||
.session_by_id(parent_session.read(cx).session_id())
|
||||
.is_none());
|
||||
assert!(dap_store
|
||||
.session_by_id(first_child_session.read(cx).session_id())
|
||||
.is_none());
|
||||
assert!(dap_store
|
||||
.session_by_id(second_child_session.read(cx).session_id())
|
||||
.is_none());
|
||||
assert!(
|
||||
dap_store
|
||||
.session_by_id(parent_session.read(cx).session_id())
|
||||
.is_none()
|
||||
);
|
||||
assert!(
|
||||
dap_store
|
||||
.session_by_id(first_child_session.read(cx).session_id())
|
||||
.is_none()
|
||||
);
|
||||
assert!(
|
||||
dap_store
|
||||
.session_by_id(second_child_session.read(cx).session_id())
|
||||
.is_none()
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -874,15 +882,21 @@ async fn test_shutdown_parent_session_if_all_children_are_shutdown(
|
||||
|
||||
// assert parent session and second child session still exist
|
||||
dap_store.update(cx, |dap_store, cx| {
|
||||
assert!(dap_store
|
||||
.session_by_id(parent_session.read(cx).session_id())
|
||||
.is_some());
|
||||
assert!(dap_store
|
||||
.session_by_id(first_child_session.read(cx).session_id())
|
||||
.is_none());
|
||||
assert!(dap_store
|
||||
.session_by_id(second_child_session.read(cx).session_id())
|
||||
.is_some());
|
||||
assert!(
|
||||
dap_store
|
||||
.session_by_id(parent_session.read(cx).session_id())
|
||||
.is_some()
|
||||
);
|
||||
assert!(
|
||||
dap_store
|
||||
.session_by_id(first_child_session.read(cx).session_id())
|
||||
.is_none()
|
||||
);
|
||||
assert!(
|
||||
dap_store
|
||||
.session_by_id(second_child_session.read(cx).session_id())
|
||||
.is_some()
|
||||
);
|
||||
});
|
||||
|
||||
// shutdown first child session
|
||||
@@ -896,12 +910,16 @@ async fn test_shutdown_parent_session_if_all_children_are_shutdown(
|
||||
// assert parent session got shutdown by second child session
|
||||
// because it was the last child
|
||||
dap_store.update(cx, |dap_store, cx| {
|
||||
assert!(dap_store
|
||||
.session_by_id(parent_session.read(cx).session_id())
|
||||
.is_none());
|
||||
assert!(dap_store
|
||||
.session_by_id(second_child_session.read(cx).session_id())
|
||||
.is_none());
|
||||
assert!(
|
||||
dap_store
|
||||
.session_by_id(parent_session.read(cx).session_id())
|
||||
.is_none()
|
||||
);
|
||||
assert!(
|
||||
dap_store
|
||||
.session_by_id(second_child_session.read(cx).session_id())
|
||||
.is_none()
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user