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

View file

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

View file

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

View file

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