Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/ide/src/hover/tests.rs')
-rw-r--r--crates/ide/src/hover/tests.rs26
1 files changed, 26 insertions, 0 deletions
diff --git a/crates/ide/src/hover/tests.rs b/crates/ide/src/hover/tests.rs
index 4451e31870..466e5570b3 100644
--- a/crates/ide/src/hover/tests.rs
+++ b/crates/ide/src/hover/tests.rs
@@ -5106,6 +5106,32 @@ fn foo(e: E) {
}
#[test]
+fn hover_const_value() {
+ check(
+ r#"
+pub enum AA {
+ BB,
+}
+const CONST: AA = AA::BB;
+pub fn the_function() -> AA {
+ CON$0ST
+}
+"#,
+ expect![[r#"
+ *CONST*
+
+ ```rust
+ test
+ ```
+
+ ```rust
+ const CONST: AA = BB
+ ```
+ "#]],
+ );
+}
+
+#[test]
fn array_repeat_exp() {
check(
r#"