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.rs22
1 files changed, 22 insertions, 0 deletions
diff --git a/crates/ide/src/hover/tests.rs b/crates/ide/src/hover/tests.rs
index 8479374647..51b60df7cc 100644
--- a/crates/ide/src/hover/tests.rs
+++ b/crates/ide/src/hover/tests.rs
@@ -5310,6 +5310,28 @@ const FOO$0: f64 = expf64(1.2);
```
"#]],
);
+ // check `f32` isn't double rounded via `f64`
+ check(
+ r#"
+/// This is a doc
+const FOO$0: f32 = 1.9999999403953552_f32;
+"#,
+ expect![[r#"
+ *FOO*
+
+ ```rust
+ test
+ ```
+
+ ```rust
+ const FOO: f32 = 1.9999999
+ ```
+
+ ---
+
+ This is a doc
+ "#]],
+ );
}
#[test]