Add #[track_caller] to test utilities that involve marked text (#32043)
Release Notes: - N/A
This commit is contained in:
@@ -109,6 +109,7 @@ impl EditorTestContext {
|
||||
}
|
||||
}
|
||||
|
||||
#[track_caller]
|
||||
pub fn new_multibuffer<const COUNT: usize>(
|
||||
cx: &mut gpui::TestAppContext,
|
||||
excerpts: [&str; COUNT],
|
||||
@@ -351,6 +352,7 @@ impl EditorTestContext {
|
||||
/// editor state was needed to cause the failure.
|
||||
///
|
||||
/// See the `util::test::marked_text_ranges` function for more information.
|
||||
#[track_caller]
|
||||
pub fn set_state(&mut self, marked_text: &str) -> ContextHandle {
|
||||
let state_context = self.add_assertion_context(format!(
|
||||
"Initial Editor State: \"{}\"",
|
||||
@@ -367,6 +369,7 @@ impl EditorTestContext {
|
||||
}
|
||||
|
||||
/// Only change the editor's selections
|
||||
#[track_caller]
|
||||
pub fn set_selections_state(&mut self, marked_text: &str) -> ContextHandle {
|
||||
let state_context = self.add_assertion_context(format!(
|
||||
"Initial Editor State: \"{}\"",
|
||||
|
||||
Reference in New Issue
Block a user