From 518c9c75481d4dcf6b1e7768fb48990dc74b7bf5 Mon Sep 17 00:00:00 2001 From: Chetan Khilosiya Date: Wed, 31 Mar 2021 01:46:01 +0530 Subject: Revert "8024: Added test case for highlighting trait items." This reverts commit d7dcd41801b319f64f3ca2ed22735ab70092e491. --- .../test_data/highlight_trait_items.html | 67 ---------------------- crates/ide/src/syntax_highlighting/tests.rs | 37 ------------ 2 files changed, 104 deletions(-) delete mode 100644 crates/ide/src/syntax_highlighting/test_data/highlight_trait_items.html (limited to 'crates') diff --git a/crates/ide/src/syntax_highlighting/test_data/highlight_trait_items.html b/crates/ide/src/syntax_highlighting/test_data/highlight_trait_items.html deleted file mode 100644 index 85274a61f..000000000 --- a/crates/ide/src/syntax_highlighting/test_data/highlight_trait_items.html +++ /dev/null @@ -1,67 +0,0 @@ - - -
struct Cat;
-
-trait Animal {
-    const SOUND: &'static str;
-
-    fn make_sound(&self) {
-        println!("{}", Self::SOUND);
-    }
-}
-
-impl Animal for Cat {
-    const SOUND: &'static str = "Meow!";
-}
-
-impl Cat {
-    const SPEED: u32 = 2;
-
-    fn run() {}
-}
-
-fn main() {
-    let cat = Cat;
-    cat.make_sound();
-    let _sound = Cat::SOUND;
-    let _speed = Cat::SPEED;
-    Cat::run();
-}
-
\ No newline at end of file diff --git a/crates/ide/src/syntax_highlighting/tests.rs b/crates/ide/src/syntax_highlighting/tests.rs index 7b3b5caf9..369ae0972 100644 --- a/crates/ide/src/syntax_highlighting/tests.rs +++ b/crates/ide/src/syntax_highlighting/tests.rs @@ -659,43 +659,6 @@ fn foo() { ); } -#[test] -fn test_highlight_trait_items() { - check_highlighting( - r#" -struct Cat; - -trait Animal { - const SOUND: &'static str; - - fn make_sound(&self) { - println!("{}", Self::SOUND); - } -} - -impl Animal for Cat { - const SOUND: &'static str = "Meow!"; -} - -impl Cat { - const SPEED: u32 = 2; - - fn run() {} -} - -fn main() { - let cat = Cat; - cat.make_sound(); - let _sound = Cat::SOUND; - let _speed = Cat::SPEED; - Cat::run(); -} -"#, - expect_file!["./test_data/highlight_trait_items.html"], - false, - ); -} - /// Highlights the code given by the `ra_fixture` argument, renders the /// result as HTML, and compares it with the HTML file given as `snapshot`. /// Note that the `snapshot` file is overwritten by the rendered HTML. -- cgit v1.2.3