test and build fixes

This commit is contained in:
Keith Simmons 2022-06-09 13:14:25 -07:00
parent dddfc7beae
commit 722023e347
4 changed files with 6 additions and 6 deletions

View File

@ -16,6 +16,7 @@ test-support = [
"project/test-support",
"util/test-support",
"workspace/test-support",
"tree-sitter-rust"
]
[dependencies]
@ -48,6 +49,7 @@ rand = { version = "0.8.3", optional = true }
serde = { version = "1.0", features = ["derive", "rc"] }
smallvec = { version = "1.6", features = ["union"] }
smol = "1.2"
tree-sitter-rust = { version = "*", optional = true }
[dev-dependencies]
text = { path = "../text", features = ["test-support"] }

View File

@ -43,7 +43,7 @@ pub use multi_buffer::{
ToPoint,
};
use ordered_float::OrderedFloat;
use project::{HoverBlock, Project, ProjectPath, ProjectTransaction};
use project::{Project, ProjectPath, ProjectTransaction};
use selections_collection::{resolve_multiple, MutableSelectionsCollection, SelectionsCollection};
use serde::{Deserialize, Serialize};
use settings::Settings;
@ -6148,10 +6148,7 @@ pub fn styled_runs_for_code_label<'a>(
#[cfg(test)]
mod tests {
use crate::{
hover_popover::{
hover, hover_at, HoverAt, HOVER_DELAY_MILLIS, HOVER_GRACE_MILLIS,
HOVER_REQUEST_DELAY_MILLIS,
},
hover_popover::{hover, hover_at, HoverAt, HOVER_DELAY_MILLIS, HOVER_GRACE_MILLIS},
test::{
assert_text_with_selections, build_editor, select_ranges, EditorLspTestContext,
EditorTestContext,

View File

@ -217,7 +217,7 @@ fn show_hover(
this.hover_state.popover = hover_popover;
cx.notify();
} else {
if this.hover_state.popover.is_some() {
if this.hover_state.visible() {
// Popover was visible, but now is hidden. Dismiss it
hide_hover(this, cx);
} else {

View File

@ -449,6 +449,7 @@ impl<'a> EditorLspTestContext<'a> {
}
}
#[cfg(feature = "test-support")]
pub async fn new_rust(
capabilities: lsp::ServerCapabilities,
cx: &'a mut gpui::TestAppContext,