diff options
| author | David Tolnay <dtolnay@gmail.com> | 2021-11-05 11:48:28 -0700 |
|---|---|---|
| committer | David Tolnay <dtolnay@gmail.com> | 2021-11-05 12:06:49 -0700 |
| commit | 1f9807799c5f70c3a215698ad6e8eb8a03725969 (patch) | |
| tree | 9500587d28d1f58eb9dd7d7d32f139a393700c4e | |
| parent | c5025f0e4e46569bdd31743434a9d2dd602e95f2 (diff) | |
| download | rust-1f9807799c5f70c3a215698ad6e8eb8a03725969.tar.gz rust-1f9807799c5f70c3a215698ad6e8eb8a03725969.zip | |
Add test to confirm fnn_unsuffixed does not emit exponent notation
| -rw-r--r-- | src/test/ui/proc-macro/auxiliary/api/parse.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/test/ui/proc-macro/auxiliary/api/parse.rs b/src/test/ui/proc-macro/auxiliary/api/parse.rs index ef777fc0333..6186b941ef6 100644 --- a/src/test/ui/proc-macro/auxiliary/api/parse.rs +++ b/src/test/ui/proc-macro/auxiliary/api/parse.rs @@ -1,3 +1,5 @@ +// ignore-tidy-linelength + use proc_macro::Literal; pub fn test() { @@ -12,6 +14,10 @@ fn test_display_literal() { assert_eq!(Literal::f32_suffixed(-10.0).to_string(), "-10f32"); assert_eq!(Literal::f64_unsuffixed(-10.0).to_string(), "-10.0"); assert_eq!(Literal::f64_suffixed(-10.0).to_string(), "-10f64"); + assert_eq!( + Literal::f64_unsuffixed(1e100).to_string(), + "10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.0", + ); } fn test_parse_literal() { |
