Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/ide/src/syntax_highlighting/tests.rs')
-rw-r--r--crates/ide/src/syntax_highlighting/tests.rs33
1 files changed, 29 insertions, 4 deletions
diff --git a/crates/ide/src/syntax_highlighting/tests.rs b/crates/ide/src/syntax_highlighting/tests.rs
index 864c6d1cad..6fed7d783e 100644
--- a/crates/ide/src/syntax_highlighting/tests.rs
+++ b/crates/ide/src/syntax_highlighting/tests.rs
@@ -993,10 +993,6 @@ pub struct Struct;
}
#[test]
-#[cfg_attr(
- not(all(unix, target_pointer_width = "64")),
- ignore = "depends on `DefaultHasher` outputs"
-)]
fn test_rainbow_highlighting() {
check_highlighting(
r#"
@@ -1019,6 +1015,35 @@ fn bar() {
}
#[test]
+fn test_block_mod_items() {
+ check_highlighting(
+ r#"
+macro_rules! foo {
+ ($foo:ident) => {
+ mod y {
+ struct $foo;
+ }
+ };
+}
+fn main() {
+ foo!(Foo);
+ mod module {
+ // FIXME: IDE layer has this unresolved
+ foo!(Bar);
+ fn func() {
+ mod inner {
+ struct Innerest<const C: usize> { field: [(); {C}] }
+ }
+ }
+ }
+}
+"#,
+ expect_file!["./test_data/highlight_block_mod_items.html"],
+ false,
+ );
+}
+
+#[test]
fn test_ranges() {
let (analysis, file_id) = fixture::file(
r#"