From ee9123a7da70eed702da7496276ba785268f03af Mon Sep 17 00:00:00 2001 From: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com> Date: Mon, 17 Jul 2023 12:56:25 +0200 Subject: [PATCH] Remove test --- crates/zed/src/languages/php.rs | 61 --------------------------------- 1 file changed, 61 deletions(-) diff --git a/crates/zed/src/languages/php.rs b/crates/zed/src/languages/php.rs index 75eef29e5055d64b78b9fc7dcd7d318227a42051..2607dc410bc0352eb801d923ebfd30ca7e0f704c 100644 --- a/crates/zed/src/languages/php.rs +++ b/crates/zed/src/languages/php.rs @@ -134,64 +134,3 @@ async fn get_cached_server_binary( .await .log_err() } - -#[cfg(test)] -mod tests { - use gpui::TestAppContext; - use unindent::Unindent; - - #[gpui::test] - async fn test_outline(cx: &mut TestAppContext) { - let language = crate::languages::language("php", tree_sitter_php::language(), None).await; - - /*let text = r#" - function a() { - // local variables are omitted - let a1 = 1; - // all functions are included - async function a2() {} - } - // top-level variables are included - let b: C - function getB() {} - // exported variables are included - export const d = e; - "# - .unindent();*/ - let text = r#" - function a() { - // local variables are omitted - $a1 = 1; - // all functions are included - function a2() {} - } - class Foo {} - "# - .unindent(); - let buffer = - cx.add_model(|cx| language::Buffer::new(0, text, cx).with_language(language, cx)); - let outline = buffer.read_with(cx, |buffer, _| buffer.snapshot().outline(None).unwrap()); - panic!( - "{:?}", - outline - .items - .iter() - .map(|item| (item.text.as_str(), item.depth)) - .collect::>() - ); - assert_eq!( - outline - .items - .iter() - .map(|item| (item.text.as_str(), item.depth)) - .collect::>(), - &[ - ("function a()", 0), - ("async function a2()", 1), - ("let b", 0), - ("function getB()", 0), - ("const d", 0), - ] - ); - } -}